Skip to content

Commit d9a74a8

Browse files
authored
Update README (#4)
Update README to simplify things. Add smoke checks to CI for the use cases outlined in the README.
1 parent 726c070 commit d9a74a8

File tree

5 files changed

+87
-98
lines changed

5 files changed

+87
-98
lines changed

.github/workflows/debian-packages.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
# Run ncurses frontend with simulated terminal and quit command
146146
# Exit code 0 means clean exit (not 11 for SIGSEGV or 134 for SIGABRT)
147147
set +e
148-
timeout 10s script -qfec 'python3 -m greenwave_monitor.ncurses_frontend' /dev/null <<< $'q'
148+
timeout 10s script -qfec 'ros2 run greenwave_monitor ncurses_dashboard' /dev/null <<< $'q'
149149
EXIT_CODE=$?
150150
set -e
151151
@@ -190,6 +190,7 @@ jobs:
190190
run: |
191191
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
192192
timeout 10s bash -lc "script -qfec 'ros2 run r2s_gw r2s_gw' /dev/null <<< \$'q'" || true
193+
timeout 10s bash -lc "script -qfec 'ros2 run greenwave_monitor r2s_gw_dashboard' /dev/null <<< \$'q'" || true
193194
shell: bash
194195

195196
- name: Test greenwave_monitor execution

.github/workflows/ros-tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ jobs:
6161
colcon build --packages-up-to r2s_gw
6262
shell: bash
6363

64+
- name: Smoke test README commands
65+
run: |
66+
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
67+
source install/setup.bash
68+
set -e
69+
timeout 10s bash -lc "script -qfec 'ros2 run greenwave_monitor ncurses_dashboard' /dev/null <<< \$'q'" || true
70+
timeout 10s bash -lc "script -qfec 'ros2 run greenwave_monitor r2s_gw_dashboard' /dev/null <<< \$'q'" || true
71+
timeout 5s ros2 launch greenwave_monitor hz.launch.py topics:='["/topic1"]' || true
72+
shell: bash
73+
6474
- name: Run tests
6575
run: |
6676
source /opt/ros/${{ matrix.ros_distro }}/setup.bash

README.md

Lines changed: 38 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,146 +1,87 @@
11
# Greenwave Monitor
2+
Greenwave monitor is a tool for runtime monitoring of ROS 2 topics.
23

3-
A high-performance diagnostic tool for ROS 2 that provides real-time monitoring of topic frame rates and latency metrics. The monitor node is like a more performant `ros2 topic hz` with ROS2 Diagnostics output, and services to manage topics. The dashboard is a terminal-based interface that provides a real-time view of the monitoring data, as well as displaying diagnostic data published by sensor drivers.
4+
![Greenwave Monitor](docs/images/greenwave_r2s_dashboard.png)
45

5-
The diagnostics messages follow conventions from [Isaac ROS NITROS](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nitros), that means configured NITROS nodes can be monitored with the same tool without additional subscriber overhead. For example the drivers from [Isaac ROS NOVA](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nova) can be monitored with the same tool (also, did you know you can enable all NITROS nodes to publish diagnostics? see the bottom of [this](https://nvidia-isaac-ros.github.io/repositories_and_packages/isaac_ros_nitros/isaac_ros_nitros/index.html) page).
6+
It provides the following features:
67

7-
Finally, we provide monitoring code as a standalone C++ header, which can be integrated into your own nodes.
8+
1. A node similar to a C++ based ros2 topic hz. I.E. subscribes to topics to determine the frame rate and latency. compared to ros2 topic hz the greenwave node is more performant, publishes Diagnostics, and offers services to manage topics and expected frequencies.
89

9-
## Dashboard Interfaces
10+
2. A terminal based dashboard that displays the topic rates, latency, and status, and allows you to add/remove topics and set expected frequencies.
1011

11-
The Greenwave Monitor provides two terminal-based dashboard options:
12+
3. A header only C++ library so you can calculate and publish compatible diagnostics directly from your own nodes for reduced overhead.
1213

13-
### r2s_gw Dashboard (Rich TUI)
14-
Ships with a fork of [r2s](https://github.com/mjcarroll/r2s) to provide an intuitive terminal interface that displays real-time statistics for all monitored topics. Click around with your mouse and tab key, and see the bottom bar with keyboard shortcuts.
14+
This diagram shows an overview of the ![architecture](docs/images/greenwave_diagram.png)
1515

16-
![r2s_gw + Greenwave Monitor Dashboard](docs/images/greenwave_r2s_dashboard.png)
16+
## Diagnostic messages
1717

18-
### ncurses Dashboard (Lightweight)
19-
A lightweight ncurses-based interface focused specifically on topic monitoring with keyboard navigation. Features color-coded status indicators, interactive frequency management, and filtering options.
18+
The diagnostics messages published by greenwave monitor are valid ROS 2 Diagnostics messages, however the dashboard does rely on specific keys to associate the data with the correct topic, and to find frequency and latency data.
19+
20+
In particular, the messages follow conventions from [Isaac ROS NITROS](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nitros), which means configured NITROS nodes can be monitored by greenwave monitor frontends without any additional subscriber overhead. For example the drivers from [Isaac ROS NOVA](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_nova) can be monitored out of the box. Furthermore, you can set `ENABLE_GLOBAL_NITROS_DIAGNOSTICS=1` to configure all NITROS nodes to publish diagnostics (more info [here](https://nvidia-isaac-ros.github.io/repositories_and_packages/isaac_ros_nitros/isaac_ros_nitros/index.html)).
2021

21-
## Key Features
22+
## Compatibility
2223

23-
- **High Performance**: Up to 10x more CPU efficient than the built-in `ros2 topic hz` command
24-
- **Multiple Dashboard Options**: Choose between rich TUI (r2s_gw) or lightweight ncurses interface
25-
- **Real-time Monitoring**: Live visualization of topic rates, latency, and status with color-coded indicators
26-
- **Interactive Management**: Add/remove topics and set expected frequencies directly from the interface
27-
- **Universal Compatibility**: Displays diagnostics from any source that publishes a compatible `/diagnostics` topic, including NVIDIA Nova sensors and other hardware drivers
24+
Greenwave monitor is a standalone package tested on Humble, Iron, Jazzy, Kilted, and Rolling ROS 2 releases, under Ubuntu 22.04 and Ubuntu 24.04. It does not depend on Isaac ROS.
2825

2926
## Installation
30-
TODO
3127

28+
From source:
3229
```bash
3330
cd ros_ws/src
34-
git clone https://gitlab-master.nvidia.com/sgillen/ros2_monitor_node.git
31+
git clone https://github.com/NVIDIA-ISAAC-ROS/greenwave_monitor.git
3532
cd ..
36-
colcon build --symlink-install --packages-up-to r2s_gw
37-
pip3 install -r requirements.txt --break-system-packages
38-
source install/setup.sh
33+
colcon build --packages-up-to greenwave_monitor
34+
source install/setup.bash
3935
```
4036

4137
## Usage
4238

43-
### Monitor Dashboards
39+
Greenwave monitor provides two dashboard frontends, a lightweight ncurses interface and a rich terminal interface (a fork of [r2s](https://github.com/mjcarroll/r2s)). Note we rename the fork r2s_gw to avoid conflicts with the original r2s package.
4440

45-
The easiest way to use Greenwave Monitor is with one of the all-in-one dashboard commands, which provide visibility into all diagnostics, including those from drivers that publish their own diagnostic data.
41+
We have found that the r2s dashboard gets sluggish when there are many topics, so we recommend using the ncurses dashboard for large deployments.
4642

47-
#### r2s_gw Dashboard (Rich TUI)
48-
49-
```bash
50-
ros2 run greenwave_monitor r2s_gw_dashboard
51-
```
52-
53-
Features:
54-
- Mouse and keyboard navigation
55-
- Tabbed interface (Topics, Nodes, Interfaces)
56-
- Rich text rendering and charts
57-
- Comprehensive ROS 2 system overview
43+
### ncurses Dashboard (Lightweight)
5844

59-
#### ncurses Dashboard (Lightweight)
45+
After installing, you can launch the ncurses dashboard with:
6046

6147
```bash
6248
ros2 run greenwave_monitor ncurses_dashboard
6349
```
6450

65-
Features:
66-
- Keyboard-only navigation (↑/↓ arrows, Enter, etc.)
67-
- Real-time topic monitoring with color-coded status
68-
- Interactive frequency management (`f` to set, `c` to clear)
69-
- Topic filtering (`h` to hide unmonitored topics)
70-
- Minimal resource usage
71-
72-
##### ncurses Dashboard Controls
73-
74-
- **↑/↓ arrows**: Navigate topics
75-
- **Enter/Space**: Toggle monitoring for selected topic
76-
- **f**: Set expected frequency for selected topic
77-
- **c**: Clear expected frequency for selected topic
78-
- **h**: Toggle between showing all topics vs monitored only
79-
- **q**: Quit
80-
81-
Both commands:
82-
- Start the greenwave monitor node in the background
83-
- Launch the respective frontend in the foreground
84-
- Automatically handle cleanup when you exit
85-
86-
#### Dashboard Options
51+
You can also launch the dashboard with some demo publishers to see everything in action:
8752

8853
```bash
89-
# Launch with demo publisher nodes
90-
ros2 run greenwave_monitor r2s_gw_dashboard --demo
9154
ros2 run greenwave_monitor ncurses_dashboard --demo
92-
93-
# Enable logging to a directory
94-
ros2 run greenwave_monitor r2s_gw_dashboard --log-dir /path/to/logs
95-
ros2 run greenwave_monitor ncurses_dashboard --log-dir /path/to/logs
9655
```
9756

98-
### Manual Launch (ros2 topic hz mode)
57+
### r2s_gw Dashboard (Rich TUI)
9958

100-
If you want to use the tool as C++ based ros2 topic hz, you can do so with the following:
59+
First you need to build the r2s_gw package and some additional dependencies, r2s_gw is included in the greenwave_monitor package.
10160

10261
```bash
103-
ros2 launch greenwave_monitor hz.launch.py topics:='["/topic1", "/topic2"]'
62+
cd ros_ws/
63+
colcon build --packages-up-to r2s_gw
64+
pip install -I textual # There is a requirements.txt file in the r2s_gw package, but in case you installed from debian and that's not handy ...
65+
source install/setup.bash
10466
```
10567

106-
## Services
68+
Then you can launch the dashboard with the following. Use tab to navigate between different UI elements.
10769

108-
The Greenwave Monitor provides two services. The `ManageTopic` service dynamically adds or removes topics from monitoring. The `SetExpectedFrequency` service dynamically sets or clears expected frequencies for a specified topic, which enables additional diagnostic values and statuses.
109-
110-
### Manage Topic
111-
112-
The monitor node exposes a `/greenwave_monitor/manage_topic` service that follows the `greenwave_monitor_interfaces/srv/ManageTopic` service definition.
113-
114-
**Usage Examples**
115-
116-
To add a topic to the monitoring list:
11770
```bash
118-
ros2 service call /greenwave_monitor/manage_topic greenwave_monitor_interfaces/srv/ManageTopic "{topic_name: '/topic2', add_topic: true}"
119-
```
120-
121-
To remove a topic from the monitoring list:
122-
```bash
123-
ros2 service call /greenwave_monitor/manage_topic greenwave_monitor_interfaces/srv/ManageTopic "{topic_name: '/topic2', add_topic: false}"
71+
ros2 run greenwave_monitor r2s_gw_dashboard
12472
```
12573

126-
### Set Expected Frequency
74+
Just like before, you can also launch the dashboard with some demo publishers to see everything in action.
12775

128-
The monitor node exposes a `/greenwave_monitor/set_expected_frequency` service that follows the `greenwave_monitor_interfaces/srv/SetExpectedFrequency` service definition.
129-
130-
**Usage Examples**
131-
132-
To set the expected frequency for a topic:
133-
```bash
134-
ros2 service call /greenwave_monitor/set_expected_frequency greenwave_monitor_interfaces/srv/SetExpectedFrequency "{topic_name: '/topic2', expected_hz: <float>, tolerance_percent: <float>, add_topic_if_missing: true}"
135-
```
136-
137-
To clear the expected frequency for a topic:
13876
```bash
139-
ros2 service call /greenwave_monitor/set_expected_frequency greenwave_monitor_interfaces/srv/SetExpectedFrequency "{topic_name: '/topic2', clear_expected: true}"
77+
ros2 run greenwave_monitor r2s_gw_dashboard -- --demo
14078
```
14179

142-
Note: The topic name must include the leading slash (e.g., '/topic2' not 'topic2').
80+
### Manual Launch (ros2 topic hz mode)
14381

144-
## r2s_gw Dashboard
82+
You can of course also launch the node standalone, or incorporate it into your own launch files.
83+
If you want to use it as a command line tool, you can do so with the following launch file:
14584

146-
The r2s_gw dashboard displays real-time information about ROS 2 interfaces, nodes, and topics within your ROS environment. The dashboard can be navigated using key bindings or using a mouse. The full list of available key bindings for each tab can be found in the dashboard footer.
85+
```bash
86+
ros2 launch greenwave_monitor hz.launch.py topics:='["/topic1", "/topic2"]'
87+
```

docs/images/SERVICES.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Services
2+
3+
The Greenwave Monitor provides two services. The `ManageTopic` service dynamically adds or removes topics from monitoring. The `SetExpectedFrequency` service dynamically sets or clears expected frequencies for a specified topic, which enables additional diagnostic values and statuses.
4+
5+
## Manage Topic
6+
7+
The monitor node exposes a `/greenwave_monitor/manage_topic` service that follows the `greenwave_monitor_interfaces/srv/ManageTopic` service definition.
8+
9+
**Usage Examples**
10+
11+
To add a topic to the monitoring list:
12+
```bash
13+
ros2 service call /greenwave_monitor/manage_topic greenwave_monitor_interfaces/srv/ManageTopic "{topic_name: '/topic2', add_topic: true}"
14+
```
15+
16+
To remove a topic from the monitoring list:
17+
```bash
18+
ros2 service call /greenwave_monitor/manage_topic greenwave_monitor_interfaces/srv/ManageTopic "{topic_name: '/topic2', add_topic: false}"
19+
```
20+
21+
## Set Expected Frequency
22+
23+
The monitor node exposes a `/greenwave_monitor/set_expected_frequency` service that follows the `greenwave_monitor_interfaces/srv/SetExpectedFrequency` service definition.
24+
25+
**Usage Examples**
26+
27+
To set the expected frequency for a topic:
28+
```bash
29+
ros2 service call /greenwave_monitor/set_expected_frequency greenwave_monitor_interfaces/srv/SetExpectedFrequency "{topic_name: '/topic2', expected_hz: <float>, tolerance_percent: <float>, add_topic_if_missing: true}"
30+
```
31+
32+
To clear the expected frequency for a topic:
33+
```bash
34+
ros2 service call /greenwave_monitor/set_expected_frequency greenwave_monitor_interfaces/srv/SetExpectedFrequency "{topic_name: '/topic2', clear_expected: true}"
35+
```
36+
37+
Note: The topic name must include the leading slash (e.g., '/topic2' not 'topic2').

docs/images/greenwave_diagram.png

124 KB
Loading

0 commit comments

Comments
 (0)