ros2_documentation icon indicating copy to clipboard operation
ros2_documentation copied to clipboard

Port GDB Guide from NAV2 to ros2_documenation

Open Ryanf55 opened this issue 1 year ago • 11 comments

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

  1. Use the --mixin debug when compiling rather than modifying the CMakeLists to add debug symbols.
  2. Link in some GDB training like this one - using GDB is more than getting a backtrace: https://www.youtube.com/watch?v=PorfLSr3DDI
  3. 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
  4. Provide an example repository with a segfault that users can try GDB out on, and perhaps integrate the backward-cpp interface.

Ryanf55 avatar Feb 20 '24 14:02 Ryanf55

@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.)

fujitatomoya avatar Feb 20 '24 19:02 fujitatomoya

Yes, that is what I had in mind.

Ryanf55 avatar Feb 20 '24 20:02 Ryanf55

Can we tag this as " good first issue" and hopefully someone new gets inspired to do the work?

Ryanf55 avatar Feb 20 '24 20:02 Ryanf55

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

ros-discourse avatar Feb 20 '24 20:02 ros-discourse

hii, can I work on this issue ?

GauravKumar9920 avatar Feb 23 '24 21:02 GauravKumar9920

Go for it!

Ryanf55 avatar Feb 23 '24 22:02 Ryanf55

@GauravKumar9920 thank you very much, i will be happy to review.

fujitatomoya avatar Feb 24 '24 23:02 fujitatomoya

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.

  1. 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.

GauravKumar9920 avatar Feb 25 '24 15:02 GauravKumar9920

Further, under what hierarchy of the ROS2 documentation shall I add this section in ?

GauravKumar9920 avatar Feb 25 '24 18:02 GauravKumar9920

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.

  1. 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

Ryanf55 avatar Feb 25 '24 19:02 Ryanf55

Looks like there's other resources from Autoware explaining similar things. https://autowarefoundation.github.io/autoware-documentation/main/support/troubleshooting/#died-process-issues

Ryanf55 avatar Mar 06 '24 22:03 Ryanf55

Closed by #4190

clalancette avatar Apr 21 '24 13:04 clalancette