39 #include "geometry_msgs/TwistStamped.h"
40 #include "control_msgs/JointJog.h"
42 #include "sensor_msgs/Joy.h"
66 void joyCallback(
const sensor_msgs::Joy::ConstPtr& msg)
69 geometry_msgs::TwistStamped twist;
71 twist.twist.linear.x = msg->axes[0];
72 twist.twist.linear.y = msg->axes[1];
73 twist.twist.linear.z = msg->axes[2];
75 twist.twist.angular.x = msg->axes[3];
76 twist.twist.angular.y = msg->axes[4];
77 twist.twist.angular.z = msg->axes[5];
80 control_msgs::JointJog joint_deltas;
82 joint_deltas.joint_names.push_back(
"shoulder_pan_joint");
86 joint_deltas.velocities.push_back(msg->buttons[0] - msg->buttons[1]);
100 int main(
int argc,
char** argv)