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

R2D2 Tutorial, Using urdf with robot_state_publisher

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

tangell gravatar image

Hi all,

I am trying to follow the r2d2 tutorial (http://www.ros.org/wiki/urdf/Tutorials/Using%20urdf%20with%20robot_state_publisher). 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
2

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

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

<package>
  <description brief="r2d2_try">

     r2d2_try

  </description>
  <author>ROSfuerte</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/r2d2_try</url>
  <depend package="roscpp"/>
  <depend package="rospy"/>
  <depend package="std_msgs"/>
  <depend package="tf"/>

</package>
edit flag offensive delete link more

Comments

Thanks, worked perfectly.

tangell gravatar image tangell  ( 2012-11-07 02:18:32 -0600 )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 -0600 )edit

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

tangell gravatar image tangell  ( 2012-11-07 03:21:51 -0600 )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 -0600 )edit

Question Tools

Stats

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

Seen: 1,211 times

Last updated: Nov 06 '12