forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(diagnostic_graph_aggregator): update tools (autowarefoundation#6614
- Loading branch information
1 parent
4fd9ef8
commit 49ac701
Showing
22 changed files
with
454 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Converter tool | ||
|
||
This tool converts `/diagnostics_graph` to `/diagnostics_agg` so it can be read by tools such as `rqt_runtime_monitor` and `rqt_robot_monitor`. | ||
|
||
## Usage | ||
|
||
```bash | ||
ros2 launch diagnostic_graph_aggregator converter.launch.xml complement:=false | ||
``` | ||
|
||
The `complement` argument specifies whether to add an intermediate path that does not exist. | ||
This means that if the graph contains paths `/A/B` and `/A/B/C/D/E`, the intermediate paths `/A`, `/A/B/C` and `/A/B/C/D` will be added. | ||
This is useful for tree view in `rqt_robot_monitor`. The completed node has an error level of `STALE`. | ||
|
||
## Examples | ||
|
||
```bash | ||
ros2 launch diagnostic_graph_aggregator example-main.launch.xml complement:=false | ||
ros2 run rqt_runtime_monitor rqt_runtime_monitor --ros-args -r diagnostics:=diagnostics_agg | ||
``` | ||
|
||
![rqt_runtime_monitor](./images/rqt_runtime_monitor.png) | ||
|
||
```bash | ||
ros2 launch diagnostic_graph_aggregator example-main.launch.xml complement:=true | ||
ros2 run rqt_robot_monitor rqt_robot_monitor | ||
``` | ||
|
||
![rqt_robot_monitor](./images/rqt_robot_monitor.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Dump tool | ||
|
||
This tool displays `/diagnostics_graph` in table format. | ||
|
||
## Usage | ||
|
||
```bash | ||
ros2 run diagnostic_graph_aggregator dump | ||
``` | ||
|
||
## Examples | ||
|
||
```bash | ||
ros2 launch diagnostic_graph_aggregator example-main.launch.xml | ||
ros2 run diagnostic_graph_aggregator dump | ||
``` | ||
|
||
```txt | ||
| ----- | ----- | -------------------------------- | ----- | | ||
| index | level | name | links | | ||
| ----- | ----- | -------------------------------- | ----- | | ||
| 0 | OK | /sensing/radars/front | | | ||
| 1 | OK | /sensing/lidars/front | | | ||
| 2 | ERROR | /sensing/lidars/top | | | ||
| 3 | OK | /functions/obstacle_detection | 1 0 | | ||
| 4 | ERROR | /functions/pose_estimation | 2 | | ||
| 5 | OK | /external/remote_command | | | ||
| 6 | OK | /external/joystick_command | | | ||
| 7 | ERROR | /autoware/modes/pull_over | 4 3 | | ||
| 8 | OK | /autoware/modes/comfortable_stop | 3 | | ||
| 9 | OK | /autoware/modes/emergency_stop | | | ||
| 10 | OK | /autoware/modes/remote | 5 | | ||
| 11 | OK | /autoware/modes/local | 6 | | ||
| 12 | ERROR | /autoware/modes/autonomous | 4 3 | | ||
| 13 | OK | /autoware/modes/stop | | | ||
``` |
Binary file added
BIN
+85.3 KB
system/diagnostic_graph_aggregator/doc/tool/images/rqt_robot_monitor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+80.6 KB
system/diagnostic_graph_aggregator/doc/tool/images/rqt_runtime_monitor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Tree tool | ||
|
||
This tool displays the graph structure of the configuration file in tree format. | ||
|
||
## Usage | ||
|
||
```bash | ||
ros2 run diagnostic_graph_aggregator tree <graph-config-path> | ||
``` | ||
|
||
## Examples | ||
|
||
```bash | ||
ros2 run diagnostic_graph_aggregator tree system/diagnostic_graph_aggregator/example/graph/main.yaml | ||
``` | ||
|
||
```txt | ||
===== root nodes ================================= | ||
- /autoware/modes/local (and) | ||
- /external/joystick_command (diag) | ||
- /autoware/modes/comfortable_stop (and) | ||
- /functions/obstacle_detection (or) | ||
- /autoware/modes/pull_over (and) | ||
- /functions/pose_estimation (and) | ||
- /functions/obstacle_detection (or) | ||
- /autoware/modes/autonomous (and) | ||
- /functions/pose_estimation (and) | ||
- /functions/obstacle_detection (or) | ||
- /autoware/modes/remote (and) | ||
- /external/remote_command (diag) | ||
===== intermediate nodes ========================= | ||
- /functions/obstacle_detection (or) | ||
- /sensing/lidars/front (diag) | ||
- /sensing/radars/front (diag) | ||
- /functions/pose_estimation (and) | ||
- /sensing/lidars/top (diag) | ||
===== isolated nodes ============================= | ||
- /autoware/modes/stop (const) | ||
- /autoware/modes/emergency_stop (const) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
system/diagnostic_graph_aggregator/example/example-edit.launch.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
<launch> | ||
<arg name="complement" default="false"/> | ||
<include file="$(find-pkg-share diagnostic_graph_aggregator)/launch/diagnostic_graph_aggregator.launch.xml"> | ||
<arg name="graph_file" value="$(find-pkg-share diagnostic_graph_aggregator)/example/graph/edit.yaml"/> | ||
</include> | ||
<node pkg="diagnostic_graph_aggregator" exec="converter" name="converter"/> | ||
<include file="$(find-pkg-share diagnostic_graph_aggregator)/launch/converter.launch.xml"> | ||
<arg name="complement" value="$(var complement)"/> | ||
</include> | ||
<executable cmd="python3 $(find-pkg-share diagnostic_graph_aggregator)/example/dummy-diags.py"/> | ||
</launch> |
7 changes: 5 additions & 2 deletions
7
system/diagnostic_graph_aggregator/example/example-main.launch.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
<launch> | ||
<include file="$(find-pkg-share diagnostic_graph_aggregator)/launch/diagnostic_graph_aggregator.launch.xml"> | ||
<arg name="complement" default="false"/> | ||
<include file="$(find-pkg-share diagnostic_graph_aggregator)/launch/aggregator.launch.xml"> | ||
<arg name="graph_file" value="$(find-pkg-share diagnostic_graph_aggregator)/example/graph/main.yaml"/> | ||
</include> | ||
<node pkg="diagnostic_graph_aggregator" exec="converter" name="converter"/> | ||
<include file="$(find-pkg-share diagnostic_graph_aggregator)/launch/converter.launch.xml"> | ||
<arg name="complement" value="$(var complement)"/> | ||
</include> | ||
<executable cmd="python3 $(find-pkg-share diagnostic_graph_aggregator)/example/dummy-diags.py"/> | ||
</launch> |
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
system/diagnostic_graph_aggregator/launch/converter.launch.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<launch> | ||
<arg name="complement"/> | ||
<node pkg="diagnostic_graph_aggregator" exec="converter" name="converter"> | ||
<param name="complement_tree" value="$(var complement)"/> | ||
</node> | ||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.