[ros-users] robot_state_publisher

Ugo Cupcic ugo at shadowrobot.com
Wed Mar 31 16:43:22 UTC 2010


Hi,

Is there an example of a working robot_state_publisher somewhere? I 
can't get it to work on my robot.

I don't understand what those 2 lines are for in the tutorial:
<remap from="robot_description" to="different_robot_description" />
<remap from="joint_states" to="different_joint_states" />

Here is my launch file:

<launch>
   <param name="robot_description" textfile="$(find 
shadowhand)/model/dummy.xml"/>

   <node pkg="shadowhand" name="shadowhand_publisher" 
type="shadowhand_publisher"/>

   <!-- Robot state publisher -->
   <node pkg="robot_state_publisher" type="state_publisher"
	name="robot_state_publisher">
     <param name="publish_frequency" type="double" value="50.0" />
     <param name="tf_prefix" type="string" value="" />
     <param name="joint_states" value="/joint_states"/>
   </node>
</launch>

My shadowhand_publisher publishes data to the /joint_states topic. Here 
is a sample of data published:
---
header:
   seq: 1016
   stamp: 0
   frame_id:
name: ['FFJ0', 'FFJ1', 'FFJ2', 'FFJ3', 'FFJ4', 'MFJ0', 'MFJ1', 'MFJ2', 
'MFJ3', 'MFJ4', 'RFJ0', 'RFJ1', 'RFJ2', 'RFJ3', 'RFJ4', 'LFJ0', 'LFJ1', 
'LFJ2', 'LFJ3', 'LFJ4', 'LFJ5', 'THJ1', 'THJ2', 'THJ3']
position: [0.8703459082378282, 0.013021781957811779, 
0.85691506506668191, -0.21032564052277142, -0.038315400315655605, 
0.38506295548544989, 0.014589849942260319, 0.36972315998540983, 
-0.17596449860268168, 0.0096129385133584336, 0.17903245770268969, 
0.0086584623489114974, 0.16982858040266566, -0.010362884071138169, 
-0.025498148964511025, 0.66404270297951173, 0.0036815509200096132, 
0.66745154642396498, 0.35526966378092767, -0.22164300075835652, 
-0.047655631353457767, 0.3409525213142236, 0.17262383202711742, 
0.089720759458012056]
velocity: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
effort: [0.09490966796875, 0.0003662109375, -9.1552734375e-05, 
-0.000213623046875, -3.0517578125e-05, -0.000579833984375, 
3.0517578125e-05, -0.0003662109375, -0.0001220703125, 0.0001220703125, 
0.00054931640625, -6.103515625e-05, 9.1552734375e-05, 0.000244140625, 
0.000213623046875, 0.0001220703125]


robot_state_publisher parses the urdf file. But the callbackJointState 
function in joint_state_listener.cpp is never called, so nothing is sent 
to the /tf topic.

Any ideas ?

Cheers,

Ugo

-- 
Ugo Cupcic         |  Shadow Robot Company | ugo at shadowrobot.com
Software Engineer      251 Liverpool Road
need a Hand?           London  N1 1LX       | +44 20 7700 2487
http://www.shadowrobot.com/hand/              @shadowrobot




More information about the ros-users mailing list