ros2_documentation
ros2_documentation copied to clipboard
Port GDB Guide from NAV2 to ros2_documenation
Purpose
NAV2 has an excellent guide on using GDB with ROS 2:
https://navigation.ros.org/tutorials/docs/get_backtrace.html
The guide has very little to do with NAV2, and is helpful for anyone using ROS.
This ticket is to keep track of porting the information over.
Improvements
- Use the
--mixin debug
when compiling rather than modifying the CMakeLists to add debug symbols. - Link in some GDB training like this one - using GDB is more than getting a backtrace: https://www.youtube.com/watch?v=PorfLSr3DDI
- Perhaps link in using VSCode instructions - the statement
Many IDEs will have some kind of debugger or profiler built in, but with ROS, there are few IDEs to choose.
is not as true with open source editors such as VSCode and most debugging is done on dev machines anyways - Provide an example repository with a segfault that users can try GDB out on, and perhaps integrate the backward-cpp interface.
@Ryanf55 i think this is useful for developers, IMO probably we can move the ROS 2 generic part from Nav2 to ROS 2 doc? So that Nav2 just has a link to that? (Nav2 specific guide can stay in Nav2 repo.)
Yes, that is what I had in mind.
Can we tag this as " good first issue" and hopefully someone new gets inspired to do the work?
This issue has been mentioned on ROS Discourse. There might be relevant details there:
https://discourse.ros.org/t/growing-issue-with-ros-documentation/36075/65
hii, can I work on this issue ?
Go for it!
@GauravKumar9920 thank you very much, i will be happy to review.
Shall, I commit the Tutorial first, followed by the improvements in the future commits. Also any recommendations on which ROS package example must I use to elaborate on this point.
- Provide an example repository with a segfault that users can try GDB out on, and perhaps integrate the backward-cpp interface.
p.s - some general examples have already been included in the documentation.
Further, under what hierarchy of the ROS2 documentation shall I add this section in ?
Shall, I commit the Tutorial first, followed by the improvements in the future commits. Also any recommendations on which ROS package example must I use to elaborate on this point.
- Provide an example repository with a segfault that users can try GDB out on, and perhaps integrate the backward-cpp interface.
p.s - some general examples have already been included in the documentation.
Yep, that sounds like a good plan.
For which package, it does not matter. It might actually be a good idea to create a ROS package that intentionally has a segfault, so others can reproduce it.
As far as where, I might put it under intermediate: https://docs.ros.org/en/humble/Tutorials/Intermediate.html
Looks like there's other resources from Autoware explaining similar things. https://autowarefoundation.github.io/autoware-documentation/main/support/troubleshooting/#died-process-issues
Closed by #4190