0
$\begingroup$

Rosanswers logo

Hi,

I moved from Diamondback to Electric and I have some issues with the robot_state_publisher. Simply put the problem is: /tf published does not contain all the frames. Note that this was working well on diamondback.

To elaborate: /joint_state are published @100Hz from an Orocos component and one of them looks like the following.

header: 
  seq: 30197
  stamp: 
    secs: 0
    nsecs: 0
  frame_id: arm_0_link
name: ['arm_1_joint', 'arm_2_joint', 'arm_3_joint', 'arm_4_joint', 'arm_5_joint', 'arm_6_joint', 'arm_7_joint']
position: [0.85575544023703909, -0.60253893146418169, 0.69191502336820099, -0.69900108242376158, -0.69835294705758466, -0.10636135673431404, -0.29402346125214407]
velocity: []
effort: [] 

The /tf published by the joint_state_publisher(in electric) is the following:

header: 
  seq: 0
  stamp: 
    secs: 1320055266
    nsecs: 436124783
  frame_id: /base_link
child_frame_id: /arm_0_link
transform: 
  translation: 
    x: 0.0
    y: 0.0
    z: 0.01
  rotation: 
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0

All the other Frames are missing.

This is my launch file:

<launch>

  <!-- Load arm into parameter server -->
  <param name="robot_description" command="$(find xacro)/xacro.py '$(find re_kuka)/description/robots/lbr.urdf.xacro'" />

  <!-- State publisher -->
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" >
  </node>

  <node pkg="rviz" type="rviz" output="screen" name="rviz" />
</launch>

FYI:

  • I don't see any parsing errors when I launch. I checked the urdf file using:

     demoelec@totoro:~$rosrun xacro xacro.py /home/demoelec/ros/stacks/trajectory-generator/re_kuka/description/robots/lbr.urdf.xacro > lbr.urdf
        demoelec@totoro:~$ rosrun urdf check_urdf lbr.urdf
     robot name is: lbr
     ---------- Successfully Parsed XML ---------------
     root Link: base_link has 1 child(ren)
         child(1):  arm_0_link
             child(1):  arm_1_link
                 child(1):  arm_2_link
                     child(1):  arm_3_link
                         child(1):  arm_4_link
                             child(1):  arm_5_link
                                 child(1):  arm_6_link
                                     child(1):  arm_7_link
    
  • robot_state_publisher is running and corresponding topics were published

    demoelec@totoro:~$ rosnode ping /robot_state_publisher rosnode: node is [/robot_state_publisher] pinging /robot_state_publisher with a timeout of 3.0s xmlrpc reply from http://totoro:38288/ time=0.640869ms

    demoelec@totoro:~$ rostopic hz joint_states subscribed to [/joint_states] average rate: 100.008 min: 0.009s max: 0.010s std dev: 0.00013s window: 98

    demoelec@totoro:~$ rostopic hz tf subscribed to [/tf] average rate: 50.040 min: 0.019s max: 0.021s std dev: 0.00049s window: 49

To reproduce:

git clone [email protected]:IDSCETHZurich/trajectory-generator.git
roscd re_kuka/launch (no need to rosmake)
rosbag play ./joint_states.bag -l 
roslaunch ./visualize.launch 

I would appreciate any help/hints solving this.

Best Regards, Gajan


Originally posted by gajan on ROS Answers with karma: 13 on 2011-10-30

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I notice your joint_states has an emtpy time stamp, and inside robot_state_publisher there is a line like:

if (state->header.stamp >= last_published + publish_interval_){

So.. you probably need to get Orocos to publish a valid timestamp.


Originally posted by fergs with karma: 13902 on 2011-10-31

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by gajan on 2011-10-31:
Thank you ! Adding the time stamp simply solved it !

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.