Ask Your Question
0

How to debug nodelet manager?

asked 2018-10-30 03:15:37 -0500

tyjin gravatar image

updated 2018-10-30 03:20:51 -0500

gvdhoorn gravatar image

Hi,everyone I am a beginner of ros , and now I want to debug my code which has one nodelet manager and four nodelets. I add launch-prefix="gdb -ex run --args" to nodelet manager in .launch file,and also add -g to CMAKE_CXX_FLAGS in CmakeLists.txt ,but the xterm tells that no debug symbols was found.Could anyone tell me where i am wrong or give me some directions about the details to debug nodelet manager? Thank you very much!

Your Sincerely

tyjin

edit retag flag offensive close merge delete

Comments

Do you want to debug nodelet_manageritself, or your nodelets?

If the former: you'll have to build nodelet_manager in your workspace with debug symbols enabled.

If the latter: just make sure to build your own nodelets with debug enabled.

gvdhoorn gravatar imagegvdhoorn ( 2018-10-30 03:20:22 -0500 )edit

Hi gvdhoorn, Thank you very much. I want to debug nodelet_manager so that I can step through the code and set breakpoints at some line of code.I tried many options to enable debug symbols but failed. So please can you tell me what to add in CmakeLists.txt to make debug symbols enabled.

tyjin

tyjin gravatar imagetyjin ( 2018-10-30 03:41:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-10-30 03:57:49 -0500

gvdhoorn gravatar image

updated 2018-10-30 04:04:57 -0500

I want to debug nodelet_manager so that I can step through the code and set breakpoints at some line of code

If you really want to debug nodelet_manager itself, you'll have to build it from sources in your Catkin workspace. The default Indigo binaries do not come with debug symbols, so that is why gdb tells you this.

(I'm assuming you are using ROS Indigo here, as that is what you tagged the question with)

To build it from source, clone ros/nodelet_core into your Catkin workspace (make sure to have the indigo-devel branch checked out) and make sure to install all dependencies (using rosdep install ..). Update the CMakeLists.txt to enable debug symbols and then build the workspace.

Now source /path/to/your/catkin_ws/devel/setup.bash and then run your launch file.

edit flag offensive delete link more

Comments

Hi,gvdhoorn,thank you for telling me the reason of this problem i am confused with for a long time.I will follow your advice to try it.Thank you very much again !

tyjin

tyjin gravatar imagetyjin ( 2018-10-30 08:08:45 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-10-30 03:15:37 -0500

Seen: 183 times

Last updated: Oct 30 '18