How to debug turtlebot?

asked 2017-09-08 03:08:44 -0600

Chrizzl gravatar image

I am trying to debug my turtlebot with kobuki base. The robot is launched from

roslaunch turtlebot_bringup minimal.launch

I did a catkin_make with the option -DCMAKE_BUILD_TYPE=Debug, and added

launch-prefix="xterm -e gdb --args"

to the mobile base nodelet manager.

However: when I run this launch file an xterm screen opens with gdb, but it says "Reading symbols from /opt/ros/indigo/lib/nodelet/nodelet...(no debugging symbols found)...done.

How can I properly debug my turtlebot software? A solution without gdb would also be fine.

edit retag flag offensive close merge delete

Comments

I believe what you did would be the approach to use. gdb will just need symbols for things that you want to debug. If it can't find them, you can still debug it.

In any case: I guess you want to debug the nodelets themselves, not the nodelet manager? A CMake debug build should then be enough.

gvdhoorn gravatar imagegvdhoorn ( 2017-09-08 06:04:04 -0600 )edit

It's correct to debug the nodelet manager. The nodelet manager ist the process that loads and executes the nodelet lib and code. The process named after the nodelet to run afaik only triggern loading/unloading the lib into the Manager.

I agree that missing Symbols in the nodelet manager should

Wolf gravatar imageWolf ( 2017-09-10 01:43:58 -0600 )edit

Prevent you from Debugging. Failures in your part of the Code should still bei traceable.

Wolf gravatar imageWolf ( 2017-09-10 01:45:23 -0600 )edit

Thanks for the suggestions, do you have any known way to actually get debug symbols? Do I have to build something, what and where?

Chrizzl gravatar imageChrizzl ( 2017-09-11 01:06:31 -0600 )edit

If you want debug symbols for packages that you installed from .debs, you'll have to build them from sources in a Catkin workspace with the CMAKE_BUILD_TYPE set to Debug or RelWithDebInfo.

gvdhoorn gravatar imagegvdhoorn ( 2017-09-11 01:15:55 -0600 )edit

I'm not sure this is already supported everywhere, but IIRC, for Lunar (and perhaps Kinetic), the OSRF buildfarm provides -dbg pkgs that could also be installed.

gvdhoorn gravatar imagegvdhoorn ( 2017-09-11 01:16:22 -0600 )edit