0
$\begingroup$

Rosanswers logo

Hello all,

I am trying to run the URDF tutorial "Using urdf with robot_state_publisher". I have followed the instructions in the tutorial however, when I go to run rviz and pick /odom as my fixed frame I get an error that says "No transform from [ ] to [/odom]" within the RobotModel in rviz. Moreover, when I pick a different fixed frame I can see the model but it looks really strange (not like R2D2 at all). Is there something wrong I am doing here? Does anyone else get the same errors?

Kind Regards, Martin


Originally posted by MartinW on ROS Answers with karma: 464 on 2013-01-16

Post score: 0


Original comments

Comment by David Lu on 2013-01-16:
Are there tfs being published?

Comment by MartinW on 2013-01-16:
How can I check if there are? rxgraph says there are tf publications but it just says /tf [tf/tfMessage]

Comment by David Lu on 2013-01-16:
Add a TF tree to rviz?

Comment by MartinW on 2013-01-17:
Hey David, I'm not sure if I know what you mean? Here is a link to my rviz when I run the program. To my knowledge I have added a TF to rviz http://i.imgur.com/3SNpC.png

Comment by MartinW on 2013-01-17:
From my understanding it looks like there is no transform from /base_link to the /axis link. So either the model.xml file can be changed to replace the axis link with base_link or just add another joint that has base_link as the parent and axis as the child. I tried the first way and it worked

Comment by David Lu on 2013-01-17:
I can't reproduce your error in my copy of fuerte. You shouldn't have to name it base_link for it to work.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Is line 22 of the state_publisher copied correctly? I.e. does it say base_link or odom?


Originally posted by David Lu with karma: 10932 on 2013-01-17

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by MartinW on 2013-01-17:
odom_trans.header.frame_id = "odom"; odom_trans.child_frame_id = "base_link"; Should this be changed to axis?

Comment by David Lu on 2013-01-17:
Yes. It should say axis.

Comment by David Lu on 2013-01-17:
Robot_state_publisher publishes all the tfs in the robot_model, i.e. starting from axis. If you change the fixed frame in rviz to axis, then you will see everything relative to this coordinate frame (i.e. robot will not move). We publish the additional transform from odom to axis to specify how

Comment by David Lu on 2013-01-17:
...the pose should change relative to some other point.

Comment by MartinW on 2013-01-17:
Ahh okay this makes sense now. So the program state_publisher has its own tf transform odom_trans? which is an object from geometry_msgs::TransformStamped where we define the transform with the translation and rotation stuff in the //update transform section of the program?

Comment by David Lu on 2013-01-17:
Indeed. That is the truth.

Comment by MartinW on 2013-01-17:
Thank you very much for the help, David! I'm slowly starting to understand, the basics.. haha! It's great to have a helpful and resourceful community like this! :)

Comment by David Lu on 2013-01-17:
Glad to hear it. Be sure to hit the check box marking this answer as correct.

$\endgroup$

Your Answer

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