Skip to content

Commit bc84622

Browse files
authored
replace large latency values with N/A, add latency note to README (#11)
* add N/A when latency is nonsense * minor fixup to make types in messaage_diagnostics consistent * update readme and update tests
1 parent c17aefa commit bc84622

File tree

5 files changed

+3736
-18
lines changed

5 files changed

+3736
-18
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ The diagnostics messages published by greenwave monitor are valid ROS 2 Diagnost
2121

2222
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)).
2323

24+
## Latency Measurements
25+
26+
Latency is calculated as the difference between the current system time and the timestamp in the message header. For this calculation to work correctly:
27+
28+
- The message type must have a `std_msgs/Header` field
29+
- The message type must be in the recognized types list (see `has_header_from_type()` in `greenwave_monitor.cpp`)
30+
- The header timestamp must be in epoch time (not boottime)
31+
32+
If any of these conditions are not met, the latency will be reported as **"N/A"** in the dashboard. This typically occurs when:
33+
- The message type doesn't have a header (e.g., `std_msgs/String`, `geometry_msgs/Twist`)
34+
- The message type is not recognized by greenwave monitor
35+
- The header timestamp is in boottime format instead of epoch time
36+
37+
Currently, message types with headers must be manually registered in the `known_header_types` map in `greenwave_monitor.cpp`. Support for automatic detection of arbitrary message types may be added in the future. In the meantime, if you need support for a commonly used message type, please submit an issue or pull request to add it to the registry.
38+
2439
## Compatibility
2540

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

0 commit comments

Comments
 (0)