Ask Your Question
1

robot_state_publisher

asked 2012-05-31 19:33:00 -0500

ocli gravatar image

updated 2012-06-03 04:15:52 -0500

Kevin gravatar image

Is there a reason why the robot_state_publisher is publishing joints at different time stamps? I'm new to using this system and need some help with it. My launch file is

<launch>
    <include file="$(find hokuyo_node)/hokuyo_test.launch"/>
    <node pkg="robot_state_publisher" type="state_publisher" name="rob_st_pub" >
         <param name="publish_frequency" value="2"/>
         <remap from="joint_states" to="al5b_joint_states" />
    </node>
    <param name="use_rep_117" value="true" />
</launch>

And the publisher node is publishing at 100 Hz to try and send the data. I've varied both frequencies in case the node publisher could not catch up but that doesn't seem to be the case. Are there extra parameters to set to get the tf to sample all links in the tree at the same time?

EDIT: I Attempted publishing and publish_frequency frequencies across the board - I understand this was just the latest attempt.

edit retag flag offensive close merge delete

Comments

I don't quite understand your question, but 2 Hz is way too low for the robot state publisher; try something around 100 Hz.

Martin Günther gravatar imageMartin Günther ( 2012-05-31 23:05:27 -0500 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2012-06-01 00:12:48 -0500

Lorenz gravatar image

The robot_state_publisher publishes the TF tree whenever a joint state message is received. For non-fixed joints, the time stamps of the TF transforms are set to the joint state message's stamp.

The publish_frequency specifies how often transforms for fixed joints should be published. A rate of 2Hz might be a little small, the default is 50Hz and should be fine. When fixed joint transforms are published, all transforms have the same time stamp (current time + 0.5 seconds).

edit flag offensive delete link more

Comments

thankyou, that makes perfect sense from what results I was seeing. Can I do forward/inverse kinematics from the fixed joint children/parent links (either end of the tree), or just children/parents of revolute joints? Because I'm experiencing an error with the get_ik/get_fk service.

ocli gravatar imageocli ( 2012-06-01 00:32:16 -0500 )edit

You can transform from any part of the tree to any other part of the tree as long as they are connected and there is data at that time. But that is not inverse kinematics!

dornhege gravatar imagedornhege ( 2012-06-01 01:02:21 -0500 )edit

I think libraries like KDL should support fixed joints. IK/FK is independent of the robot_state_publisher, it normally works directly on your URDF file. Check this node out: http://ros.org/wiki/arm_kinematics and maybe open a new question.

Lorenz gravatar imageLorenz ( 2012-06-01 01:03:36 -0500 )edit

I understand it's not inverse kinematics but I thought maybe the problem was related. Apparently not, I get "forward kinematics failed" every time I request the service using the tutorial, and thought maybe you can't do forward kinematics on fixed joints or some abnormality.

ocli gravatar imageocli ( 2012-06-01 01:22:17 -0500 )edit

p.s. the robot_state_publisher published the transform to transform a laser to pointcloud not IK.

ocli gravatar imageocli ( 2012-06-01 01:26:05 -0500 )edit

Let's move the discussion of IK/FK to the corresponding question. I posted an answer there.

Lorenz gravatar imageLorenz ( 2012-06-01 01:36:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-05-31 19:33:00 -0500

Seen: 2,045 times

Last updated: Sep 20 '13