5 #ifndef ARMADILLO2_HW_DXL_MOTORS_BUILDER_H 6 #define ARMADILLO2_HW_DXL_MOTORS_BUILDER_H 9 #include <std_srvs/SetBool.h> 12 #include <std_msgs/String.h> 16 #include <boost/thread.hpp> 18 #define MAX_PING_ERRORS 5 19 #define MAX_READ_ERRORS 100 20 #define MAX_WRITE_ERRORS 10 21 #define DXL_JOINTS_CONFIG_PARAM "dxl_joints_config" 22 #define SPEC_CONFIG_PARAM "dxl_spec_config" 23 #define DXL_PROTOCOL_PARAM "~dxl_protocol" 24 #define DXL_PORT_PARAM "~dxl_port_name" 25 #define DXL_PORT_BAUD_PARAM "~dxl_port_baudrate" 45 void writeToMotor(
int motor_id,
double position,
double velocity);
61 std::map<uint16_t, dxl::spec>
specs_;
71 std_srvs::SetBool::Response &res);
80 void write(std::vector<dxl::motor> &motors);
83 std_msgs::String speak_msg;
91 #endif //ARMADILLO2_HW_DXL_MOTORS_BUILDER_H std::vector< hardware_interface::JointHandle > pos_handles_
std::vector< hardware_interface::JointStateHandle > joint_state_handles_
void registerHandles(hardware_interface::JointStateInterface &joint_state_interface, hardware_interface::PositionJointInterface &position_interface, hardware_interface::PosVelJointInterface &posvel_interface)
DxlMotorsBuilder(ros::NodeHandle &nh)
void speakMsg(std::string msg, int sleep_time)
XmlRpc::XmlRpcValue dxl_joints_config_
void publish(const boost::shared_ptr< M > &message) const
bool setTorque(bool flag)
ros::Publisher espeak_pub_
std::map< uint16_t, dxl::spec > specs_
XmlRpc::XmlRpcValue dxl_spec_config_
std::vector< hardware_interface::PosVelJointHandle > posvel_handles_
void writeToMotor(int motor_id, double position, double velocity)
ros::ServiceServer torque_srv_
dxl::DxlInterface dxl_interface_
std::vector< dxl::motor > motors_
bool torqueServiceCB(std_srvs::SetBool::Request &req, std_srvs::SetBool::Response &res)