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

About the tutorial on Setting up your robot using tf

asked 2014-03-09 05:15:31 -0600

Maya gravatar image

I followed the tutorial here => wiki.ros.org/navigation/Tutorials/RobotSetup/TF on the TF (sorry my karma doesn't allow me to post link) and I had those lines at the end of the make file

add_executable(tf_broadcaster src/tf_broadcaster.cpp)
add_executable(tf_listener src/tf_listener.cpp)
target_link_libraries(tf_broadcaster ${catkin_LIBRARIES})
target_link_libraries(tf_listener ${catkin_LIBRARIES})

Then I used catkin_make that compile without a problem but when I use

rosrun robot_setup_tf tf_broadcaster

I have in my terminal this

[rosrun] Couldn't find executable named tf_broadcaster below /home/ros/catkin_ws/src/robot_setup_tf

After a few search it appears that the file is actually situated here

/home/ros/catkin_ws/devel/lib/robot_setup_tf

I can launch it manually and it's working perfectly, it just that I can't understand why it's there and not in the src folder of the robot_setup_tf. If someone could explain to me.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-03-09 21:31:53 -0600

BennyRe gravatar image

Catkin does out-of-source builds, so the location of your executable is absolutely correct.

The actual strange thing is why rosrun searches your node in your source directory. Did you try re-sourcing setup.bash?

edit flag offensive delete link more

Comments

I tried "source /opt/ros/groovy/setup.bash" without much success. Nor wth the setup.bash in the devel of my catkin directory.

Maya gravatar image Maya  ( 2014-03-09 22:11:36 -0600 )edit
1

The one in the devel directory of your catkin workspace is the right one to source. I get the same error when I try to run an executable that does not exist. (also with ~/catkin_ws/src/...)

BennyRe gravatar image BennyRe  ( 2014-03-09 22:31:31 -0600 )edit

Yep it did the trick. Should I put this source in the .bashrc ?

Maya gravatar image Maya  ( 2014-03-09 23:01:50 -0600 )edit

Yes you can add this to your .bashrc. This will save you from some future headache.

BennyRe gravatar image BennyRe  ( 2014-03-10 00:03:58 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-03-09 05:15:31 -0600

Seen: 473 times

Last updated: Mar 09 '14