Hi all, friendly neighborhood navigator here.
I’m here to let you know about a new tutorial I’ve written to help with new ROS/ROS2 users interacting with gdb. All too often, we as maintainers get tickets (and emails… please don’t email us) with something along the lines of:
help, my thing failed, I don't know why. Please?!
[ERROR] [planner_server-6]:
process has died [pid 73156, exit code -11, cmd '/home/<install_path>/install/nav2_planner/lib/nav2_planner/planner_server --ros-args -r __node:=planner_server --params-file /tmp/tmpsiwxomfg -r /tf:=tf -r /tf_static:=tf_static'].
Look familiar? Absolutely. Looks like something I can help with? Absolutely not. My responses usually go something like this
- Give me your versions / OS / install type / other metadata
- Get me a backtrace or print some logs to isolate the area of failure
- If you’re so compelled, try fixing the issue you find.
A typical response is “What’s GDB? How do I get a backtrace?”.
This is where the new tutorial comes in place. Many junior developers and new C++ folks haven’t run into GDB and Valgrind yet. There’s also a number of ROS developers learning C++ and ROS together so they might not have experience to know how to react to these situations. This tutorial tries to standardize a workflow in ROS2 for getting backtraces that we can work with as maintainers. The goal is to use to link users who file tickets with crash reports to a workflow to get useful information from it we can act upon.
As such, I’m very open to more details, guidance, etc to be added to this tutorial so that we can use this across the ecosystem as a tool for education, but more importantly progress in debugging issues reported by users without this knowledge. I encourage you to look over this and submit PRs with any additional information or context you think might be necessary to use for this purpose in your own projects. As always, these are living documents and the hardest part is just getting started. Help me make it awesome!
https://navigation.ros.org/tutorials/docs/get_backtrace.html
Happy debugging,
Steve