Skip to content

Update the Database structure and Interface/Provider files #34

Description

@KalanaRatnayake

We need to update the database and YAML files to properly reflect the relationships between capabilities and separate information such as description and trigger commands

  • Update YAML file with seperated description, trigger commands, variable info and relationships
  • Update the database interface to handle the new YAML structure
  • Fix issue with default provider not being present in service response
  • Make 'Provider' tag optional in execution plans (use defualt provider when not provided)
  • Make the CapabilitySpec msg more specific rather than dumping content into the "content" parameter
  • Fix the bug in Capabilities2_api get_capability_spec() overwrites the msg content interface and provider have same name #36

Activity

  1. added
    enhancement
    on Apr 13, 2026
  2. KalanaRatnayake commented on Apr 14, 2026

    @KalanaRatnayake
    CollaboratorAuthor

    Current Execution Plan

    <?xml version="1.0" encoding="UTF-8"?>
    <Plan>
        <Control type="sequential" >
            <Runner interface="capabilities2_runner/GetCapabilitySpecsRunner" provider="capabilities2_runner/GetCapabilitySpecsRunner"/>
            <Runner interface="prompt_capabilities/PromptCapabilityRunner" provider="prompt_capabilities/PromptCapabilityRunner" flush="false"  uuid="prompt-test-uuid"/>
            <Runner interface="nav2_capabilities/RobotPoseRunner" provider="nav2_capabilities/RobotPoseRunner" map="map" odom="odom" robot="base_link"/>
            <Runner interface="prompt_capabilities/PromptPoseRunner" provider="prompt_capabilities/PromptPoseRunner" flush="false" uuid="prompt-test-uuid"/>
            <Runner interface="prompt_capabilities/PromptPlanRunner" provider="prompt_capabilities/PromptPlanRunner" replan="false" flush="true" uuid="prompt-test-uuid" task="move to (2.0, -0.5) position" />
            <Runner interface="fabric_capabilities/FabricSetPlanRunner" provider="fabric_capabilities/FabricSetPlanRunner"/>
        </Control>
    </Plan>

    Proposed Execution Plan

    • Provider becomes optional and on the fabric side we will use the default provider
    • When provider is provided as in provider="nav2_capabilities/RobotPoseRunner" that means it could be a non-default runner, which needs to be verified though alternative provider list.
    <?xml version="1.0" encoding="UTF-8"?>
    <Plan>
        <Control type="sequential" >
            <Runner interface="capabilities2_runner/GetCapabilitySpecsRunner" />
            <Runner interface="prompt_capabilities/PromptCapabilityRunner" flush="false"  uuid="prompt-test-uuid"/>
            <Runner interface="nav2_capabilities/RobotPoseRunner" provider="nav2_capabilities/RobotPoseRunner" map="map" odom="odom" robot="base_link"/>
            <Runner interface="prompt_capabilities/PromptPoseRunner" flush="false" uuid="prompt-test-uuid"/>
            <Runner interface="prompt_capabilities/PromptPlanRunner" replan="false" flush="true" uuid="prompt-test-uuid" task="move to (2.0, -0.5) position" />
            <Runner interface="fabric_capabilities/FabricSetPlanRunner"/>
        </Control>
    </Plan>

    Target is to reduce complexity and length of the execution plan

  3. KalanaRatnayake commented on Apr 14, 2026

    @KalanaRatnayake
    CollaboratorAuthor

    Current interface.yaml on two linked capabilities

    nav2_capabilities/RobotPoseRunner

    %YAML 1.1
    ---
    name: RobotPoseRunner
    spec_version: 1.1
    spec_type: interface
    description: "This capability depends on the navigation stack functionalities and allows the extraction of the pose of the robot from 
                  the odoemtry or localization system. This extracted robot pose can be used by the decision making authority to understand 
                  the position and orientation of the robot. This capability can be triggered with an xml command as
                  '<Runner interface=nav2_capabilities/RobotPoseRunner provider=nav2_capabilities/RobotPoseRunner  map=map odom=odom robot=base_link/>'.  
                  Upon the successful execution of this capability, another capability that allows robot pose prompting needs to be triggered 
                  for transfer of robot pose data to the decision making authority for future decision making. 
                  '<Runner interface=nav2_capabilities/PromptPoseRunner provider=nav2_capabilities/PromptPoseRunner  />' can be used 
                  as an robot pose prompting capability for this."
    interface:
      topics:
        "/pose":
          type: "geometry_msgs::msg::PoseWithCovarianceStamped"
          description: "Standard ros2 message interface containing position and orientation of the robot"

    prompt_capabilities/PromptPoseRunner

    %YAML 1.1
    ---
    name: PromptPoseRunner
    spec_version: 1.1
    spec_type: interface
    description: "This capability allows an decision making authority such as an LLM to recieve robot pose and orientation data from the robot. This capability 
                  can be trigged with the xml command '<Runner interface=prompt_capabilities/PromptPoseRunner provider=prompt_capabilities/PromptPoseRunner />'. This will 
                  prompt the geometry_msgs/Pose msg in the xml format and would allow the decision making authority to understand the position of the robot. Data for this is generated by 
                  a capability such as nav2_capabilities/RobotPoseRunner which needs to be triggered always before the prompt_capabilities/PromptPoseRunner using an xml 
                  command such as '<Runner interface=nav2_capabilities/RobotPoseRunner provider=nav2_capabilities/RobotPoseRunner  map=map odom=odom robot=base_link/>'"
    interface:
      services:
        "/prompt":
          type: "prompt_msgs/srv/Prompt"
          description: "This service focuses on capturing pose (position and orientation) of the robot and transfering them to decision making authority."

    Proposed interface.yaml files

    nav2_capabilities/RobotPoseRunner

    %YAML 1.1
    ---
    name: RobotPoseRunner
    spec_version: 1.1
    spec_type: interface
    description: "This capability depends on the navigation stack functionalities and allows the extraction of the pose of the robot from 
                  the odometry or localisation system. This extracted robot pose can be used by the decision-making authority to understand 
                  the position and orientation of the robot."
    parameters:
      #list: ["map", "odom", "robot"]
      - map:
          type: string
          default: map
          description: the robot's frame of localisation
      - odom:
          type: string
          default: odom
          description: the robot's frame of odometry
      - robot:
          type: string
          default: base_link
          description: the robot's core frame
    interface:
      topics:
        "/pose":
          type: "geometry_msgs::msg::PoseWithCovarianceStamped"
          description: "Standard ros2 message interface containing position and orientation of the robot"

    prompt_capabilities/PromptPoseRunner

    %YAML 1.1
    ---
    name: PromptPoseRunner
    spec_version: 1.1
    spec_type: interface
    description: "This capability allows a decision-making authority, such as an LLM, to receive robot pose and orientation data from the robot. 
                  This capability. This will generate a geometry_msgs/Pose message in XML format and allow the decision-making authority to 
                  understand the robot's position."
    relations:
      - subject: prompt_capabilities/PromptPoseRunner
        predicate: "depends on"
        object: nav2_capabilities/PromptPoseRunner
    interface:
      services:
        "/prompt":
          type: "prompt_msgs/srv/Prompt"
          description: "This service focuses on capturing pose (position and orientation) of the robot and transfering them to decision making authority."

    Target is to breakdown information into relevant sub components and allow the other systems to pull only the required information such as trigger xml snippet or just description. Focused as a optimization towards LLM integration. Does not drop fields but adds them

  4. KalanaRatnayake commented on Apr 14, 2026

    @KalanaRatnayake
    CollaboratorAuthor

    Current provider yaml on two linked capabilities

    nav2_capabilities/RobotPoseRunner

    %YAML 1.1
    ---
    name: RobotPoseRunner
    spec_type: provider
    spec_version: 1.1
    description: "The capability provider for the robot's odometry interface"
    implements: nav2_capabilities/RobotPoseRunner
    runner: capabilities2_runner::RobotPoseRunner

    prompt_capabilities/PromptPoseRunner

    %YAML 1.1
    ---
    name: PromptPoseRunner
    spec_type: provider
    spec_version: 1.1
    description: "The capability provider for the prompting interface from prompt tools. This can be used for prompting pose of the robot."
    implements: prompt_capabilities/PromptPoseRunner
    runner: capabilities2_runner::PromptPoseRunner

    Proposed provider yaml files

    nav2_capabilities/RobotPoseRunner

    %YAML 1.1
    ---
    name: RobotPoseRunner
    spec_type: provider
    spec_version: 1.1
    default: true
    description: "The capability provider for the robot's odometry interface"
    implements: nav2_capabilities/RobotPoseRunner
    runner: capabilities2_runner::RobotPoseRunner

    prompt_capabilities/PromptPoseRunner

    %YAML 1.1
    ---
    name: PromptPoseRunner
    spec_type: provider
    spec_version: 1.1
    default: true
    description: "The capability provider for the prompting interface from prompt tools. This can be used for prompting pose of the robot."
    implements: prompt_capabilities/PromptPoseRunner
    runner: capabilities2_runner::PromptPoseRunner

    https://github.com/CollaborativeRoboticsLab/capabilities2/blob/develop/docs/providers.md

    Target is to breakdown information into relevant sub components and allow the other systems to pull only the required information such as description. Focused as a optimization towards LLM integration. Does not drop fields but adds them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions