Skip to content

Runnable spec discovery - #42

Closed
KalanaRatnayake wants to merge 24 commits into
mainfrom
runnable-spec-discovery
Closed

KalanaRatnayake wants to merge 24 commits into
mainfrom
runnable-spec-discovery

Conversation

@KalanaRatnayake

@KalanaRatnayake KalanaRatnayake commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This change updates runnable-spec discovery so it returns invokable interface/provider pairs rather than only raw provider-backed specs.

Previously, get_runnable_specs copied provider definitions directly and keyed results by provider name. That worked for direct runtime execution, but it broke prompt-driven plan generation for semantic interfaces such as turtlebot_capabilities/TurtlebotWaypointRunner, because the prompted runnable-spec list did not expose the resolved command shape that runtime actually accepts.

This PR makes runnable-spec discovery follow the same semantic-interface resolution path already used at runtime. For semantic interface plus provider pairs, the emitted runnable spec now:

  • resolves the interface through the semantic remapping path
  • preserves the concrete provider
  • rewrites definition.command to advertise the resolved semantic interface name
  • uses an interface_name|provider_name key so one provider can expose multiple invokable runnable specs

As a result, prompt-based generation now sees runnable specs like:

<Runner interface="turtlebot_capabilities/TurtlebotWaypointRunner" provider="nav2_capabilities/WaypointRunner" x="3.0" y="0.0" />

which matches the form already accepted by runtime execution.

Fixes #[issue]

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

How Has This Been Tested?

Tested locally in the ROS 2 workspace on Ubuntu.

Commands and validation performed:

  1. Focused package build:
colcon build --packages-select capabilities2_server
  1. Focused executable regression test:
./build/capabilities2_server/test_capabilities_server
  1. End-to-end prompt generation validation:
source install/setup.bash
ros2 launch turtlebot_capabilities system.launch.py filename:=turtlebot_5.xml

Verified outcomes:

  • capabilities2_server builds successfully
  • the focused runnable-spec test passes
  • runnable-spec generation resolves semantic interface plus provider pairs correctly
  • prompt-based generation emits:
<Runner interface="turtlebot_capabilities/TurtlebotWaypointRunner" provider="nav2_capabilities/WaypointRunner" x="0.0" y="3.5" />
  • the generated TurtleBot plan executes successfully end to end

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes do not break the build
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@KalanaRatnayake
KalanaRatnayake requested a review from mik-p October 11, 2026 11:04
@KalanaRatnayake
KalanaRatnayake marked this pull request as draft October 11, 2026 11:30
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.

1 participant