Skip to content

Commit b43da7c

Browse files
committed
try r2s as not a submodule
1 parent e720cd1 commit b43da7c

39 files changed

+4338
-28
lines changed

.github/workflows/debian-packages.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ jobs:
8484
steps:
8585
- name: Checkout code
8686
uses: actions/checkout@v4
87-
with:
88-
submodules: recursive
89-
token: ${{ secrets.GITHUB_TOKEN }}
9087

9188
- name: Setup build environment
9289
run: |

.github/workflows/ros-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ jobs:
3838
steps:
3939
- name: Checkout code
4040
uses: actions/checkout@v4
41-
with:
42-
submodules: recursive
43-
token: ${{ secrets.GITHUB_TOKEN }}
4441

4542
- name: Setup ROS environment
4643
run: |

.gitmodules

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
11
# Greenwave Monitor
22

3-
A high-performance diagnostic tool for ROS 2 that provides real-time monitoring of topic frame rates and latency metrics. The monitor node offers a significant performance improvement over the standard `ros2 topic hz` command. 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.
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.
44

5-
## Dashboard Interface
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).
66

7-
The Greenwave Monitor builds upon [r2s](https://github.com/mjcarroll/r2s) to provide an intuitive terminal interface that displays real-time statistics for all monitored topics:
7+
Finally, we provide monitoring code as a standalone C++ header, which can be integrated into your own nodes.
88

9-
![r2s_gw + Greenwave Monitor Dashboard](docs/images/greenwave_r2s_dashboard.png)
9+
## Dashboard Interface
1010

11-
By integrating the r2s_gw TUI with the Greenwave Monitor, the dashboard retains all the information from r2s plus a list of:
12-
- Topic names
13-
- Message types
14-
- Message receive rates in Hz
15-
- Expected frequencies and acceptable tolerance
16-
- Topic statuses
11+
The Greenwave Monitor 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.
1712

18-
The dashboard also enables the following runtime features:
19-
- Interactive controls for adding/removing topics from monitoring
20-
- Interactive controls for setting/clearing expected topic frequencies and acceptable tolerances
13+
![r2s_gw + Greenwave Monitor Dashboard](docs/images/greenwave_r2s_dashboard.png)
2114

2215
## Key Features
2316

24-
- **High Performance**: Up to 10.35x more efficient than the built-in `ros2 topic hz` command
25-
- **Superior Throughput**: Handles topics with rates up to 10 kHz (the standard tool caps around 4.7 kHz)
26-
- **Accurate Measurements**: Reports precise 30.0 fps values for image_raw NITROS topics without dropping frames
17+
- **High Performance**: Up to 10x more CPU efficient than the built-in `ros2 topic hz` command
2718
- **Interactive Dashboard**: Real-time visualization of monitoring data with an easy-to-use terminal interface
2819
- **Dynamic Topic Management**: Add or remove topics from monitoring without restarting
2920
- **Topic Status Indicators**: Color-coded topic status to easily catch topics that are not working as expected
3021
- **Universal Compatibility**: Displays diagnostics from any source that publishes a compatible `/diagnostics` topic, including NVIDIA Nova sensors and other hardware drivers
3122

3223
## Installation
24+
TODO
3325

3426
```bash
3527
cd ros_ws/src
@@ -67,7 +59,7 @@ ros2 run greenwave_monitor r2s_gw_dashboard --log-dir /path/to/logs
6759

6860
### Manual Launch (ros2 topic hz mode)
6961

70-
Alternatively, you can monitor specific topics by using the launch file:
62+
If you want to use the tool as C++ based ros2 topic hz, you can do so with the following:
7163

7264
```bash
7365
ros2 launch greenwave_monitor hz.launch.py topics:='["/topic1", "/topic2"]'

r2s_gw

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
name: Black format check
3+
4+
on:
5+
pull_request:
6+
paths:
7+
- '.github/workflows/black_format.yml'
8+
- '**.py'
9+
10+
jobs:
11+
black-format-check:
12+
runs-on: "ubuntu-latest"
13+
steps:
14+
- uses: actions/[email protected]
15+
- name: Set up Python 3.12
16+
uses: actions/[email protected]
17+
with:
18+
python-version: 3.12
19+
- name: Install black
20+
run: python -m pip install black==24.1.1
21+
- name: Run black
22+
run: black --check r2s_gw

r2s_gw/.pre-commit-config.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.3.0
6+
hooks:
7+
- id: check-ast # simply checks whether the files parse as valid python
8+
- id: check-builtin-literals # requires literal syntax when initializing empty or zero python builtin types
9+
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems
10+
- id: check-merge-conflict # checks for files that contain merge conflict strings
11+
- id: check-json # checks json files for parseable syntax
12+
- id: check-toml # checks toml files for parseable syntax
13+
- id: check-yaml # checks yaml files for parseable syntax
14+
args: [ '--unsafe' ] # Instead of loading the files, simply parse them for syntax.
15+
- id: check-shebang-scripts-are-executable # ensures that (non-binary) files with a shebang are executable
16+
- id: check-vcs-permalinks # ensures that links to vcs websites are permalinks
17+
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline
18+
- id: mixed-line-ending # replaces or checks mixed line ending
19+
- repo: https://github.com/pycqa/isort
20+
rev: '5.13.2'
21+
hooks:
22+
- id: isort
23+
name: isort (python)
24+
language_version: '3.12'
25+
args: ['--profile', 'black', '--filter-files']
26+
- repo: https://github.com/psf/black
27+
rev: '24.1.1'
28+
hooks:
29+
- id: black
30+
- repo: https://github.com/hadialqattan/pycln # removes unused imports
31+
rev: v2.4.0
32+
hooks:
33+
- id: pycln
34+
language_version: '3.12'
35+
args: [--all]

r2s_gw/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# r2s_gw
2+
3+
**Note: This is a fork of [r2s](https://github.com/mjcarroll/r2s) designed to work with the Greenwave Monitor system. It has been renamed to r2s_gw to allow users to install it alongside the standard r2s package.**
4+
5+
r2s_gw is a _Text User Interface_ (TUI) for interacting with various aspects of a ROS 2 system.
6+
It is intended as a supplement to the [ros2cli](https://github.com/ros2/ros2cli) suite of command line tools.
7+
8+
9+
r2s_gw is written in Python and utilizes [Textual](https://github.com/textualize/textual/) for building the UI.
10+
11+
![Alt Text](doc/r2s.gif)
12+
13+
14+
## Installing
15+
16+
To run:
17+
18+
```
19+
git clone https://github.com/mjcarroll/r2s.git
20+
cd r2s
21+
poetry install
22+
poetry run r2s_gw
23+
```
24+
25+
## Development
26+
27+
To run in development mode:
28+
29+
```
30+
poetry shell
31+
textual run --dev r2s_gw.main:main
32+
```
33+
34+
```
35+
poetry shell
36+
textual console
37+
```
38+
39+
## Roadmap
40+
41+
Currently, there are 2 primary widgets for visualizing information in a grid or as a stream of text logs.
42+
43+
* ROS 2
44+
* Visualize stream of ROS messages in the text log view (ros2 topic echo)
45+
* Visualize stream of ROS logs from a node (rosconsole)
46+
* Visualize system load of individual nodes (requires instrumentation to associate PID with node)
47+
* Publish messages on a topic (ros2 topic pub)
48+
* Advance lifecycle node states (ros2 lifecycle)
49+
* Visualize message definitions (ros2 interface)
50+
* Call Services (ros2 service)
51+
* Colcon
52+
* List packages in a workspace (colon list/colcon graph)
53+
* Select and build multiple packages
54+
* View package build logs
55+
* View test logs
56+
* Gazebo
57+
* Visualize topics/nodes
58+
* Port ROS functionality to gz-transport and gz-msgs

r2s_gw/doc/r2s.gif

3.79 MB
Loading

r2s_gw/package.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>r2s_gw</name>
5+
<version>0.1.0</version>
6+
<description>A TUI for ROS 2</description>
7+
<maintainer email="[email protected]">Sean Gillen</maintainer>
8+
<license>Apache License 2.0</license>
9+
10+
<buildtool_depend>python3-setuptools</buildtool_depend>
11+
12+
<depend>greenwave_monitor_interfaces</depend>
13+
<depend>greenwave_monitor</depend>
14+
<!-- TODO: Update debian package dependencies when available -->
15+
16+
<exec_depend>python3-psutil</exec_depend>
17+
<exec_depend>python3-distro</exec_depend>
18+
19+
<test_depend>ament_copyright</test_depend>
20+
<test_depend>ament_flake8</test_depend>
21+
<test_depend>ament_pep257</test_depend>
22+
<test_depend>python3-pytest</test_depend>
23+
24+
<export>
25+
<build_type>ament_python</build_type>
26+
</export>
27+
</package>

0 commit comments

Comments
 (0)