2 #include <unordered_map> 9 #include <matlogger2/matlogger2.h> 10 #include <matlogger2/utils/mat_appender.h> 13 int main (
int argc,
char **argv ) {
15 ros::init ( argc, argv,
"EEHalExecutor" );
16 ros::NodeHandle nh(
"EEHalExecutor");
19 if ( ! nh.getParam (
"/rosee/hal_library_name", hal_lib ) ) {
20 ROS_ERROR_STREAM(
"Ros parameter 'hal_library_name' not found" );
25 std::string matlogger_path;
26 XBot::MatLogger2::Ptr logger;
27 XBot::MatAppender::Ptr appender;
31 if ( nh.getParam (
"/rosee/matlogger_path", matlogger_path ) && matlogger_path.size() != 0) {
32 ROS_INFO_STREAM(
"Logging data with matlogger into " << matlogger_path );
34 logger = XBot::MatLogger2::MakeLogger(matlogger_path);
35 appender = XBot::MatAppender::MakeInstance();
36 appender->add_logger(logger);
37 appender->start_flush_thread();
42 std::unique_ptr<ROSEE::EEHal> eeHalPtr = ROSEE::Utils::loadObject<ROSEE::EEHal>
43 (hal_lib,
"create_object_"+hal_lib, &nh);
45 if (eeHalPtr ==
nullptr) {
46 ROS_ERROR_STREAM(
"[EEHalExecutor ERROR] in loading the EEHal Object" );
50 ROS_INFO_STREAM (
"[EEHalExecutor] Loaded "<< hal_lib <<
" HAL" );
72 ROS_WARN_STREAM_ONCE (
"[EEHalExecutor] someone is publishing on '/ros_end_effector/motor_reference_pos', I will call the move()" );
75 ROS_WARN_STREAM_THROTTLE (60,
"[EEHalExecutor] no-one is publishing on '/ros_end_effector/motor_reference_pos', I will not call the move()" );
93 logger->add(
"pressure1", pressures.row(0));
94 logger->add(
"pressure2", pressures.row(1));
95 logger->add(
"pressure3", pressures.row(2));
96 logger->add(
"pressure4", pressures.row(3));
Eigen::VectorXd getJointEffort() const
int main(int argc, char **argv)
virtual bool checkCommandPub()
virtual bool publish_joint_state()
Eigen::VectorXd getMotorReference() const
virtual bool init_hand_info_response()
init the service message with info parsed from yaml file, ie info that will not change according to h...
virtual bool isHandInfoPresent()
Eigen::MatrixXd getPressure() const
virtual bool setHandInfoCallback()
Here service is advertise and callback set: if derived class wants to use different callback...
Eigen::VectorXd getJointPosition() const