Skip to content

Add Example 19 for an end-to-end demo of the InferenceBridgeController - #1159

Open
vedh1234 wants to merge 16 commits into
ros-controls:masterfrom
vedh1234:feat/example_19_inference_bridge
Open

Add Example 19 for an end-to-end demo of the InferenceBridgeController#1159
vedh1234 wants to merge 16 commits into
ros-controls:masterfrom
vedh1234:feat/example_19_inference_bridge

Conversation

@vedh1234

@vedh1234 vedh1234 commented Jul 5, 2026

Copy link
Copy Markdown

Description

Add Example 19: an end-to-end demo of the InferenceBridgeController on a mock 2-DOF RRBot.

Background

The InferenceBridgeController (PR#2443) upsamples positions-only action chunks into smooth C2 cubic-spline trajectories. This demo exercises it on mock hardware, so users can see the controller in action and verify its smoothness properties with zero setup cost.

What the demo includes

  • Mock 2-DOF RRBot (mock_components/GenericSystem) with position + velocity command/state interfaces.
  • Mock VLA policy node (mock_vla_policy.py) that streams positions-only JointTrajectory chunks at a configurable replan period, mimicking a learned policy's action-chunk output.
  • Smoothness verification script (verify_smoothness.py) that runs three scenarios (single chunk, sequential chunks, overlapping chunks) and reports C1/C2 continuity metrics and cross-chunk seam analysis.
  • Launch test that verifies both controllers (joint_state_broadcaster + inference_bridge) come up active and /joint_states is published.

How to run

# build
colcon build --packages-up-to ros2_control_demo_example_19 joint_trajectory_controller
source install/setup.bash

# run (RViz + mock policy)
ros2 launch ros2_control_demo_example_19 bridge_demo.launch.py

# verify smoothness (headless)
ros2 launch ros2_control_demo_example_19 bridge_demo.launch.py run_policy:=false gui:=false
ros2 run ros2_control_demo_example_19 verify_smoothness.py

Is this a user-facing change?

No. This is a new demo package.

Did you use Generative AI?

Yes, Google Gemini and Claude were used for code and review. All code was reviewed, modified, and verified by the author.

Test Results

Single Chunk (C2 intra-chunk) Sequential Chunks (stop-and-go) Overlapping Chunks (cross-chunk seam)

ros2_control_demo

TODOs

  • Fork the repository.
  • Modify the source; please focus on the specific change you are contributing.
  • Ensure local tests pass. (colcon test and pre-commit run)
  • Commit to your fork using clear commit messages.
  • Send a pull request, answering any default questions in the pull request interface.
  • Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

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