ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

R2D2 Tutorial, Using urdf with robot_state_publisher

asked 2012-11-06 14:20:29 -0500

tangell gravatar image

Hi all,

I am trying to follow the r2d2 tutorial ( I ran

roscreate-pkg r2d2

I added dependencies to roscpp rospy std_msgs

and then I put the state_publisher.cpp file in r2d2/src. I added rosbuild_add_executable(state_publisher state_publisher.cpp)

I added the launch file to the r2d2 directory as well.

When I try to run rosmake I get a fatal error: 'tf/transform_broadcaster.h' No such file or directory.

Although when I roscd to tf, I can find transform_broadcaster.cpp.

My questions are: 1) Do I have the r2d2 directory and files in the write places for how this tutorial should run or is there something I'm missing? 2) Why is it not finding tf/transform_broadcaster.h?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-11-06 16:25:37 -0500

1.launch file should be added to r2d2/launch directory. But this is not relevant to the problem.

2.Because you didn't depend this package on "tf".You can solve this problem by adding the dependency to manifest.xml.

For example, your manifest.xml should looks like

  <description brief="r2d2_try">


  <review status="unreviewed" notes=""/>
  <depend package="roscpp"/>
  <depend package="rospy"/>
  <depend package="std_msgs"/>
  <depend package="tf"/>

edit flag offensive delete link more


Thanks, worked perfectly.

tangell gravatar image tangell  ( 2012-11-07 02:18:32 -0500 )edit

Good~Then you should close this problem by marking this answer as correct so that this question won't track other attentions and we can concentrate on other unanswered questions: )

Po-Jen Lai gravatar image Po-Jen Lai  ( 2012-11-07 03:19:41 -0500 )edit

I can't because my karma has to be at 25.

tangell gravatar image tangell  ( 2012-11-07 03:21:51 -0500 )edit

Oh I mean pressing the check mark button in the left side of the answer zone instead of "closing" this question. This question might be helpful for other people in the future.

Po-Jen Lai gravatar image Po-Jen Lai  ( 2012-11-07 03:30:46 -0500 )edit

Question Tools


Asked: 2012-11-06 14:20:29 -0500

Seen: 1,158 times

Last updated: Nov 06 '12