"Debugging tf problems" tutorial not working for me
ROS Kinetic & Ubuntu 16.04
The tutorial about debugging /tf has some major issues, or my brain does. Probably the latter. (http://wiki.ros.org/tf/Tutorials/Debugging%20tf%20problems)
First, I start the start_debug_demo.launch
file. A turtle sim comes up, with a live and dead turtle, and a
"turtle3" passed to lookupTransform argument target_frame does not exist
error, as expected. Except my error looks like
"turtle3" passed to lookupTransform argument target_frame does not exist.
My first clue.
In learning_tf /src
I create the turtle_tf_listener.debug.cpp
file. Somehow the tutorial also forgets to mention that I need to put add_executable(...)
in the CMakeLists.txt
. But I put it in.
I'm not sure why it's expected that this cpp would erase the error. The error existed before the creation of this turtle_tf_listener_debug.cpp
file. It's clear this cpp file is completely unattached to the launch file.
According to the tutorial, you mention "turtle3" in this cpp file. Then you change it to "turtle2" and hooray, the "turtle3 doesn't exist" error is gone. Except, no it isn't. I already put "turtle2" in this cpp file. Doesn't change the error. As expected, the startdebugdemo.launch is not in contact with this cpp file. I investigate:
I go to $roscd turtle_tf
to look inside. Doesn't have /src or /nodes. Just /rviz and /cmake and /launch.
I look inside /opt/ros/kinetic/share/turtle_tf/launch
which has the start_debug_demo.launch
. I open it with gedit.
<node name="turtle_pointer" pkg="turtle_tf" type="turtle_tf_listener_debug" respawn="false" output="screen" </node>
Sure enough, it doesn't even mention learning/tf/src
's cpp file. If I change it to
<node name="turtle_pointer" pkg="learning_tf" type="turtle_tf_listener_debug" respawn="false" output="screen" </node>
I do the catkinmake, the source bash, re-run roscore, and try again, I still get errors about "turtle3" not existing. But where am I mentioning "turtle3"? Not in the launch file. Not in the cpp file for the nodes. And there's no alternative turtletflistenerdebug.cpp files that I can find. Only the one I created. Rqt_graph
doesn't show any "turtle3". view_frames
of course doesn't show any "turtle3" either.
The CMakeLists.txt from learning_tf package (created in the tutorials):
cmakeminimumrequired(VERSION 2.8.3)
project(learning_tf)
find_package(catkin REQUIRED
COMPONENTS roscpp rospy tf
turtlesim) catkinpackage( # INCLUDEDIRS include # LIBRARIES learningtf # CATKINDEPENDS roscpp rospy tf turtlesim # DEPENDS systemlib ) includedirectories( # include ${catkinINCLUDEDIRS} )
addexecutable(turtletflistenerdebug src/turtletflistener_debug.cpp)
targetlinklibraries(turtletflistenerdebug ${catkinLIBRARIES})
addexecutable(turtletfmessagefilter src/turtletfmessage_filter.cpp)
targetlinklibraries(turtletfmessagefilter ${catkinLIBRARIES})
/opt/ros/kinetic/share/turtletf does not contain a CMakeLists.txt but does containt a /cmake/turtletfCongif-version.cmake
According to the tutorial, I should be witnissing timestamp errors now. But I'm still getting "turtle3" errors. What did I do wrong? Where are these coming from?
Asked by anonymous32749 on 2018-04-13 08:30:26 UTC
Comments
Sounds like there is some mix-up between the learning_tf package and turtle_tf package. Try copying the debug launch file to learning_tf (and changing turtle_tf to learning_tf in it) and launching it after removing the turtle_tf package (use
sudo apt-get remove ros-your_dist-turtle-tf
to remove).Asked by stevejp on 2018-04-13 09:47:09 UTC
@stevejp I thought so too. Except, in the tutorial it's supposed to be the turtle_tf package that you use. If you look at the tutorial, it's all about turtle_tf and learning_tf things. I did try adjusting the launch file to search the learning_tf, as I mentioned, but the problem persists, somehow.
Asked by anonymous32749 on 2018-04-13 09:51:50 UTC
Okay if you've completely removed turtle_tf and still have the problem, then something is wrong with your setup. If you've fixed the .cpp code and still see the error, then it isn't building correctly. Can you please add your CMakeList file to the original post?
Asked by stevejp on 2018-04-13 10:06:13 UTC
@stevejp But if the first line of the tutorial is $ roslaunch turtle_tf start_debug_demo.launch, then removing the turtle_tf package isn't going to work, is it?
Besides, turtle_tf is in my /opt/ros folder. I'm not sure I'm supposed to delete folders in there. Had to use 'sudo' just to edit launch.
Asked by anonymous32749 on 2018-04-13 10:23:51 UTC
Alright don't worry about that - but if you can post your CMake file that would be useful.
Asked by stevejp on 2018-04-13 10:27:46 UTC
@stevejp Sorry, took a while. Updated.
Asked by anonymous32749 on 2018-04-13 10:47:16 UTC