Hi, I generally use gdb to debug my run time errors in my C++ programs. But in ros as it spins n waits for the msgs in topics, the gdb doesn't really work well. So I want to know if there is another method to debug the ros codes when they run into segmentation faults.
Thanks, Karthik
You can launch nodes directly in gdb, here is some more info:
http://www.ros.org/wiki/roslaunch/Tutorials/Roslaunch%20Nodes%20in%20Valgrind%20or%20GDB
For debugging ROS nodes I use the same way as for any other C++ program: gdb/ddd/kdbg.
The spinning shouldn't be a problem, just start of with the message handler in the backtrace. This is under the assumption that you want to debug your ROS code and not the ROS core functionality, which I would consider mostly bug-free.
Asked: 2012-03-14 06:32:27 -0500
Seen: 674 times
Last updated: Mar 14 '12
rviz on groovy only works if started in gdb
Difference between turtlebot_bringup minimal.launch and turtlebot service?
How to insert breakpoints and step through a Gazebo plugin?
Debugging ROS package with Qtcreator???
Is there a way to watch service calls?
How to set verbosity/logger levels programmatically?
Can the log level of a (python) ROS node be changed dynamically?
Is there a way to get ROS_INFO, ROS_ERROR, etc to output line numbers?
debug an compilation error in ROS
changes in tabletop_collision_map_processing since diamondback
ROS Answers is licensed under Creative Commons Attribution 3.0 Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.