Skip to main content

Top-level Utilities: ros2-listen & grep

These commands are available at the root level (before any manager). Use them for quick ROS 2 discovery/listening and for fuzzy-searching CLI commands.

ros2-listen

Discover ROS 2 topics on a domain and start a live listener for the selected topic (auto-detects message type via Nimbus.Ros2.Messages). Optional substring filter and a boolean flag to enable Hz rate printing.

nimbus ros2-listen <domain-id> [filter] [hz]

Args

  • <domain-id> — ROS 2 domain ID (integer, required)
  • [filter] — Optional case-insensitive substring to filter by topic name or type
  • [hz] — Optional true|false. If true, prints message frequency (Hz). Default: false

Flow

  1. Enumerates discovered topics and types on the given domain.
  2. Applies optional filter to topic name or type.
  3. Shows a selection menu; pick a topic to start listening.
  4. Starts a dynamic RosToNimbusAdapter<T> based on the detected message type.

Examples

# Discover everything on domain 25
nimbus ros2-listen 25

# Filter to camera topics and show Hz rate
nimbus ros2-listen 25 camera true

Notes

  • Topic names with a leading / are normalized (leading slash removed).
  • Unknown message types (not found in Nimbus.Ros2.Messages) are reported as unsupported.

grep

Search CLI commands by keyword and execute interactively.

nimbus grep <keyword>

How it works

  1. Builds a navigable tree of commands from the root CLI.
  2. Prints matches with numbered ordinals at depth 2 (e.g., manager subcommand).
  3. Prompts for a number to run the selected command with its arguments.

Example

# Search for any command mentioning "segment"
nimbus grep segment
# → Shows numbered matches; enter the number to execute.