27 #ifndef _SR_MOTOR_HAND_LIB_HPP_ 28 #define _SR_MOTOR_HAND_LIB_HPP_ 31 #include <std_srvs/Empty.h> 43 template<
class StatusType,
class CommandType>
49 std::string device_id, std::string joint_prefix);
63 sr_robot_msgs::ForceController::Response &
response,
77 std_srvs::Empty::Response &response,
78 std::pair<int, std::string> joint);
80 #ifdef DEBUG_PUBLISHER 90 bool set_debug_data_to_publish(sr_robot_msgs::SetDebugData::Request& request,
91 sr_robot_msgs::SetDebugData::Response& response);
102 virtual void initialize(std::vector<std::string> joint_names, std::vector<int> actuator_ids,
103 std::vector<shadow_joints::JointToSensor> joint_to_sensors);
121 std::string joint_name,
int max_pwm,
int sg_left,
int sg_right,
int f,
int p,
int i,
122 int d,
int imax,
int deadband,
int sign,
int torque_limit,
int torque_limiter_gain);
154 void resend_pids(std::string joint_name,
int motor_index);
bool force_pid_callback(sr_robot_msgs::ForceController::Request &request, sr_robot_msgs::ForceController::Response &response, int motor_index)
std::string find_joint_name(int motor_index)
bool reset_motor_callback(std_srvs::Empty::Request &request, std_srvs::Empty::Response &response, std::pair< int, std::string > joint)
std::map< std::string, ros::Timer > pid_timers
static const int nb_motor_data
virtual void initialize(std::vector< std::string > joint_names, std::vector< int > actuator_ids, std::vector< shadow_joints::JointToSensor > joint_to_sensors)
std::vector< int > read_joint_to_motor_mapping()
void resend_pids(std::string joint_name, int motor_index)
static const int32u motor_data_types[]
SrMotorHandLib(hardware_interface::HardwareInterface *hw, ros::NodeHandle nh, ros::NodeHandle nhtilde, std::string device_id, std::string joint_prefix)
void update_force_control_in_param_server(std::string joint_name, int max_pwm, int sg_left, int sg_right, int f, int p, int i, int d, int imax, int deadband, int sign, int torque_limit, int torque_limiter_gain)
static const char * human_readable_motor_data_types[]
const std::string response