0
$\begingroup$

Rosanswers logo

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?

Originally posted by tangell on ROS Answers with karma: 15 on 2012-11-06

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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>

Originally posted by Po-Jen Lai with karma: 1371 on 2012-11-06

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by tangell on 2012-11-07:
Thanks, worked perfectly.

Comment by Po-Jen Lai on 2012-11-07:
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: )

Comment by tangell on 2012-11-07:
I can't because my karma has to be at 25.

Comment by Po-Jen Lai on 2012-11-07:
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.

$\endgroup$

Your Answer

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