Skip to content

Commit 7bf0bf7

Browse files
authored
feat(how-to-guides): add debug autoware guides (#268)
Signed-off-by: Cynthia Liu <cynthia.liu@autocore.ai>
1 parent 1a530e8 commit 7bf0bf7

3 files changed

Lines changed: 73 additions & 1 deletion

File tree

docs/how-to-guides/.pages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ nav:
88
- running-autoware-without-cuda.md
99
- calibrating-your-sensors.md
1010
- evaluating-controller-performance.md
11+
- debug-autoware.md
1112
- add-a-custom-ros-message.md
1213
- fixing-dependent-package-versions.md
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Debug Autoware
2+
3+
This page provides some methods for debugging Autoware.
4+
5+
## Print debug messages
6+
7+
The essential thing for debug is to print the program information clearly, which can quickly judge the program operation and locate the problem. Autoware uses ROS2 logging tool to print debug messages, how to design console logging refer to tutorial [Console logging](../contributing/coding-guidelines/ros-nodes/console-logging.md).
8+
9+
## Using ROS2 tools debug Autoware
10+
11+
### Using command line tools
12+
13+
ROS2 includes a suite of command-line tools for introspecting a ROS2 system. The main entry point for the tools is the command `ros2`, which itself has various sub-commands for introspecting and working with nodes, topics, services, and more. How to use the ROS2 command line tool refer to tutorial [CLI tools](http://docs.ros.org/en/galactic/Tutorials/Beginner-CLI-Tools.html).
14+
15+
### Using rviz2
16+
17+
Rviz2 is a port of Rviz to ROS2. It provides a graphical interface for users to view their robot, sensor data, maps, and more. You can run Rviz2 tool easily by:
18+
it will open
19+
20+
```console
21+
rviz2
22+
```
23+
24+
When Autoware launch the simulators, the Rviz2 tool is opened by default to visualize the autopilot graphic information.
25+
26+
### Using rqt tools
27+
28+
RQt is a graphical user interface framework that implements various tools and interfaces in the form of plugins. You can run any RQt tools/plugins easily by:
29+
30+
```console
31+
rqt
32+
```
33+
34+
This GUI allows you to choose any available plugins on your system. You can also run plugins in standalone windows. For example, RQt Console:
35+
36+
```console
37+
ros2 run rqt_console rqt_console
38+
```
39+
40+
#### Common RQt tools
41+
42+
1. rqt_graph: view node interaction
43+
44+
In complex applications, it may be helpful to get a visual representation of the ROS node interactions.
45+
46+
```console
47+
ros2 run rqt_graph rqt_graph
48+
```
49+
50+
2. rqt_console: view messages
51+
52+
rqt_console is a great gui for viewing ROS topics.
53+
54+
```console
55+
ros2 run rqt_console rqt_console
56+
```
57+
58+
3. rqt_plot: view data plots
59+
60+
rqt_plot is an easy way to plot ROS data in real time.
61+
62+
```console
63+
ros2 run rqt_plot rqt_plot
64+
```
65+
66+
## Using a debugger with breakpoints
67+
68+
Many IDE(e.g. VSCode, CLion) supports debugging C/C++ executable with GBD on linux platform. The following lists some references for using the debugger:
69+
70+
- <https://code.visualstudio.com/docs/cpp/cpp-debug>
71+
- <https://www.jetbrains.com/help/clion/debugging-code.html#useful-debugger-shortcuts>

docs/how-to-guides/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
- [Calibrating your sensors](calibrating-your-sensors.md)
1010
- [Applying Clang-Tidy to ROS packages](applying-clang-tidy-to-ros-packages.md)
1111
- [Evaluating controller performance](evaluating-controller-performance.md)
12+
- [Debug Autoware](debug-autoware.md)
1213
- [Add a custom ROS message](add-a-custom-ros-message.md)
1314

1415
TODO: Write the following contents.
1516

1617
- Create an Autoware package
17-
- Debug Autoware
1818
- etc.

0 commit comments

Comments
 (0)