Hello all.
I am wondering if it is possible to control the order in which Gazebo's joint_state_controller publishes the robot joints and their respective values?
I am using an UR5 manipulator, and if we look at a sample message taken from the /joint_states topic, they seem to be ordered in alphabetical order (see below)? It would help me out a bunch if we could publish these messages in the order in which they appear in the kinematic chain (i.e base_link --> .. --> tip_link).
header:
seq: 685
stamp:
secs: 13
nsecs: 722000000
frame_id: ''
name: [elbow_joint, shoulder_lift_joint, shoulder_pan_joint, wrist_1_joint, wrist_2_joint, wrist_3_joint]
position: [-9.935968448004928e-07, -1.5675146858950169, -0.0005566812821147238, -1.567509637814898, -1.5170622604365747e-05, -1.739371527698097e-06]
velocity: [3.6741224523988668e-06, -5.112008493828534e-05, 0.001605313567856731, 3.934066966728182e-05, 5.4372582579940575e-05, 6.217080293624165e-06]
effort: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
In ROS this is done easily enough with a .yaml file specifying the required joint order which is loaded onto the parameter server (http://wiki.ros.org/industrial_robot_client/joint_naming#Joint_Reordering).
I am hoping Gazebo has somthing similar, however after a bit of searching I havent been able to find much. My backup plan is to manually write some code which re-orders the values after they are received. However this is not so elegant :)
I am spawning the controller
and my .yaml file which is read is as follows
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
↧