Skip to content

Add completion spec: ROS 2 (ros2)#205

Merged
lucieleblanc merged 1 commit into
mainfrom
lucie/test-command-spec-ros2-test
Apr 1, 2026
Merged

Add completion spec: ROS 2 (ros2)#205
lucieleblanc merged 1 commit into
mainfrom
lucie/test-command-spec-ros2-test

Conversation

@lucieleblanc
Copy link
Copy Markdown
Contributor

Adds a completion spec for the ros2 CLI command (ROS 2 command line interface).

What's included

JSON spec (command-signatures/json/ros2.json):

  • All core subcommands: action, bag, component, daemon, doctor, extension_points, extensions, interface, launch, lifecycle, multicast, node, param, pkg, run, security, service, test, topic, wtf
  • Full option coverage for each subcommand
  • Static suggestions for enum-valued options (log levels, storage IDs, QoS settings, lifecycle transitions, build types)

Generators (command-signatures/src/generators/ros2.rs):

  • packages — lists installed ROS 2 packages via ros2 pkg list
  • executables — token-based: reads the package name from tokens and runs ros2 pkg executables <pkg>
  • topics — lists active topics via ros2 topic list
  • nodes — lists running nodes via ros2 node list
  • services — lists running services via ros2 service list
  • actions — lists running actions via ros2 action list
  • interfaces — lists all interface types via ros2 interface list

The dynamic generators (topics, nodes, services, actions) require a running ROS 2 system but degrade gracefully to empty results when none is available.


Conversation: https://staging.warp.dev/conversation/3716f6a7-7335-4f2d-93e2-8f4972406b10

Copy link
Copy Markdown
Contributor Author

Generator Validation Results

All 7 ros2 generators were tested against a local Warp build with ROS 2 Jazzy installed on Ubuntu 24.04. Demo nodes (talker, listener, add_two_ints_server, fibonacci_action_server) were running to provide live ROS 2 data.

Test Results

Generator Command Tested Result Sample Completions
packages ros2 pkg prefix ✅ Working action_msgs, action_tutorials_cpp, ament_cmake, ... (scrollable list of ~199 packages)
topics ros2 topic echo ✅ Working /chatter, /parameter_events, /rosout
nodes ros2 node info ✅ Working /add_two_ints_server, /fibonacci_action_server, /listener, /talker
services ros2 service info ✅ Working /add_two_ints, /add_two_ints_server/describe_parameters, /listener/set_parameters, ... (scrollable list)
actions ros2 action info ✅ Working /fibonacci
interfaces ros2 interface show ✅ Working action_msgs/msg/GoalInfo, action_msgs/msg/GoalStatus, action_tutorials_interfaces/action/Fibonacci, ... (scrollable list)
executables ros2 run demo_nodes_cpp ✅ Working add_two_ints_client, talker, listener, parameter_blackboard, ... (scrollable list of ~30 executables)

Notes

  • Static completions (subcommands, flags/options) from the JSON spec also work correctly
  • Generators execute ros2 CLI commands as subprocesses; the ROS 2 environment (PYTHONPATH, AMENT_PREFIX_PATH, etc.) must be available in the Warp process's environment for generators to work
  • The executables generator correctly uses context (the preceding package name token) to scope executables to the specified package

@lucieleblanc
Copy link
Copy Markdown
Contributor Author

Uploading screenshots here since they didn't make it in:

packages:
image

topics:
image

nodes:
image

services:
image

actions:
image

interfaces:
image

executables:
image

@lucieleblanc lucieleblanc changed the title [Test] Add completion spec: ros2 Add completion spec: ROS 2 (ros2) Apr 1, 2026
Co-Authored-By: Oz <oz-agent@warp.dev>
@lucieleblanc lucieleblanc force-pushed the lucie/test-command-spec-ros2-test branch from bc8071f to fea4741 Compare April 1, 2026 20:48
@lucieleblanc lucieleblanc merged commit 1627080 into main Apr 1, 2026
3 checks passed
@lucieleblanc lucieleblanc deleted the lucie/test-command-spec-ros2-test branch April 1, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants