18 #ifndef __ROSEE_EE_HAL__ 19 #define __ROSEE_EE_HAL__ 23 #include <sensor_msgs/JointState.h> 28 #include <unordered_map> 31 #include <Eigen/Dense> 32 #include <yaml-cpp/yaml.h> 38 #include <rosee_msg/HandInfo.h> 39 #include <rosee_msg/MotorPhalangePressure.h> 42 #define HAL_CREATE_OBJECT(className) \ 43 extern "C" ::ROSEE::EEHal* create_object_##className ( ros::NodeHandle* nh) { \ 44 return new className(nh); \ 58 typedef std::shared_ptr<EEHal>
Ptr;
61 EEHal ( ros::NodeHandle* nh );
64 virtual bool sense() = 0;
66 virtual bool move() = 0;
87 virtual bool getTipsJacobiansNormal(std::unordered_map<std::string, Eigen::MatrixXd>& tips_jacobian_normal) {
return false;}
88 virtual bool getTipsJacobiansFriction(std::unordered_map<std::string, Eigen::MatrixXd>& tips_jacobian_friction) {
return false;}
160 rosee_msg::HandInfo::Request& request,
161 rosee_msg::HandInfo::Response& response);
168 #endif // __ROSEE_EE_HAL__
ros::Publisher _joint_state_pub
Eigen::VectorXd motors_stiffness
std::shared_ptr< EEHal > Ptr
Eigen::VectorXd getJointEffort() const
virtual bool getMotorsNames(std::vector< std::string > &motors_names)
sensor_msgs::JointState _mr_msg
The references that must be read in the move() to send to the real/simulated robot TODO put private a...
Eigen::VectorXd tip_joint_to_tip_frame_y
virtual bool getTransmissionAugmentedMatrices(std::unordered_map< std::string, Eigen::MatrixXd > &transmission_augmented_matrices)
virtual bool checkCommandPub()
bool initPressureSensing()
Eigen::VectorXd tips_frictions
std::vector< std::string > fingers_names
EEHal(ros::NodeHandle *nh)
virtual bool publish_joint_state()
virtual bool getTransmissionMatrix(Eigen::MatrixXd &transmission_matrix)
virtual bool getFingersNames(std::vector< std::string > &fingers_names)
virtual bool getTransmissionSquareMatrices(std::unordered_map< std::string, Eigen::MatrixXd > &transmission_square_matrices)
void motor_reference_clbk(const sensor_msgs::JointState::ConstPtr &msg)
virtual bool getTipsFrictions(Eigen::VectorXd &tips_friction)
std::shared_ptr< const EEHal > ConstPtr
virtual bool getTipsForcesNormal(Eigen::VectorXd &tips_forces_normal)
virtual bool getTipJointToTipFrameX(Eigen::VectorXd &tip_joint_to_tip_frame_x)
rosee_msg::MotorPhalangePressure _pressure_msg
std::vector< std::string > motors_names
virtual bool getMotorTorqueLimits(Eigen::VectorXd &motors_torque_limits)
ros::Publisher _pressure_pub
ros::Subscriber _motor_reference_sub
virtual bool getTipJointToTipFrameY(Eigen::VectorXd &tip_joint_to_tip_frame_y)
Class representing an end-effector.
virtual bool getTipsJacobiansFriction(std::unordered_map< std::string, Eigen::MatrixXd > &tips_jacobian_friction)
Eigen::VectorXd getMotorReference() const
std::string _hand_info_service_name
Eigen::VectorXd motors_torque_limits
virtual bool getTipsForcesFriction(Eigen::VectorXd &tips_forces_friction)
rosee_msg::HandInfo::Response _hand_info_response
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...
bool handInfoEEHalCallback(rosee_msg::HandInfo::Request &request, rosee_msg::HandInfo::Response &response)
sensor_msgs::JointState _js_msg
The states that must be filled in the sense(), reading info from real/simulated robot TODO put privat...
virtual bool isHandInfoPresent()
virtual bool getMotorStiffness(Eigen::VectorXd &motors_stiffness)
Eigen::MatrixXd getPressure() const
Eigen::VectorXd tip_joint_to_tip_frame_x
virtual bool getTipsJacobiansNormal(std::unordered_map< std::string, Eigen::MatrixXd > &tips_jacobian_normal)
virtual bool parseHandInfo()
virtual bool setHandInfoCallback()
Here service is advertise and callback set: if derived class wants to use different callback...
ros::ServiceServer _hand_info_server
Eigen::VectorXd getJointPosition() const