43 #include <std_msgs/Float64MultiArray.h> 44 #include <sensor_msgs/JointState.h> 50 : _nh(nh), _hardware_interface(hardware_interface)
61 char error_message[] =
"could not retrieve one of the required parameters\n\tdynamixel_hw/loop_hz or dynamixel_hw/cycle_time_error_threshold";
63 throw std::runtime_error(error_message);
66 torque_pub = np.
advertise<std_msgs::Float64MultiArray>(
"/revel/motor_controller/pos_torque", 1);
114 std_msgs::Float64MultiArray goals;
117 for (
unsigned int i = 0; i < 6; i++) {
121 double torque = cmds[i];
122 goals.data.push_back(torque);
ros::Publisher torque_pub
void publish(const boost::shared_ptr< M > &message) const
static const double BILLION
ros::Timer _non_realtime_loop
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
boost::shared_ptr< dynamixel::DynamixelHardwareInterface > _hardware_interface
Abstract Hardware Interface for your robot.
ros::Duration _elapsed_time
void jsCallback(const sensor_msgs::JointState::ConstPtr &js)
ros::Duration _desired_update_freq
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define ROS_WARN_STREAM(args)
DynamixelLoop(ros::NodeHandle &nh, boost::shared_ptr< dynamixel::DynamixelHardwareInterface > hardware_interface)
boost::shared_ptr< controller_manager::ControllerManager > _controller_manager
void update(const ros::TimerEvent &e)
bool getParam(const std::string &key, std::string &s) const
sensor_msgs::JointState joint_state
struct timespec _current_time
struct timespec _last_time
#define ROS_ERROR_STREAM(args)
double _cycle_time_error_threshold