Ask Your Question
0

No transform from /odom using robot_state_publisher

asked 2013-01-16 09:10:31 -0600

MartinW gravatar image

updated 2014-01-28 17:14:52 -0600

ngrennan gravatar image

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

edit retag flag offensive close merge delete

Comments

Are there tfs being published?

David Lu gravatar imageDavid Lu ( 2013-01-16 10:17:55 -0600 )edit

How can I check if there are? rxgraph says there are tf publications but it just says /tf [tf/tfMessage]

MartinW gravatar imageMartinW ( 2013-01-16 11:21:20 -0600 )edit

Add a TF tree to rviz?

David Lu gravatar imageDavid Lu ( 2013-01-16 11:59:34 -0600 )edit

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

MartinW gravatar imageMartinW ( 2013-01-17 08:53:14 -0600 )edit

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

MartinW gravatar imageMartinW ( 2013-01-17 09:02:03 -0600 )edit

I can't reproduce your error in my copy of fuerte. You shouldn't have to name it base_link for it to work.

David Lu gravatar imageDavid Lu ( 2013-01-17 09:47:22 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-01-17 09:48:25 -0600

David Lu gravatar image

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

edit flag offensive delete link more

Comments

odom_trans.header.frame_id = "odom"; odom_trans.child_frame_id = "base_link"; Should this be changed to axis?

MartinW gravatar imageMartinW ( 2013-01-17 09:51:33 -0600 )edit
1

Yes. It should say axis.

David Lu gravatar imageDavid Lu ( 2013-01-17 10:53:03 -0600 )edit
1

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

David Lu gravatar imageDavid Lu ( 2013-01-17 10:55:54 -0600 )edit
1

...the pose should change relative to some other point.

David Lu gravatar imageDavid Lu ( 2013-01-17 10:56:30 -0600 )edit

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?

MartinW gravatar imageMartinW ( 2013-01-17 11:05:02 -0600 )edit
1

Indeed. That is the truth.

David Lu gravatar imageDavid Lu ( 2013-01-17 11:16:41 -0600 )edit

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! :)

MartinW gravatar imageMartinW ( 2013-01-17 11:26:59 -0600 )edit
1

Glad to hear it. Be sure to hit the check box marking this answer as correct.

David Lu gravatar imageDavid Lu ( 2013-01-17 12:29:09 -0600 )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

Stats

Asked: 2013-01-16 09:10:31 -0600

Seen: 1,515 times

Last updated: Jan 17 '13