Skip to content

Drive CD objectives over the Foxglove web bridge (Node)#6

Draft
nbbrooks wants to merge 1 commit into
mainfrom
feat/cd-objective-foxglove-node
Draft

Drive CD objectives over the Foxglove web bridge (Node)#6
nbbrooks wants to merge 1 commit into
mainfrom
feat/cd-objective-foxglove-node

Conversation

@nbbrooks

@nbbrooks nbbrooks commented Jul 3, 2026

Copy link
Copy Markdown
Member

[written by AI]

What

Replace the roslibpy/rosbridge CD objective runner with a Node runner that speaks the Foxglove WebSocket protocol to the always-on MoveIt Pro web bridge (foxglove_bridge, port 3201) via foxglove-ros-adapter. No --enable-rosbridge sidecar is needed.

  • example_scripts/cd_objective_lib.mjs — Node runner (runObjective, runObjectivesForever); connects to 3201, waits for /do_objective via ros.waitForAction(), sends the goal with ActionClient, and on timeout/bridge failure notifies + stops the unit.
  • example_scripts/{3-waypoint-pick-and-place,ml-segment-image,move-all-boxes}.mjs — wrappers (was .py).
  • example_scripts/package.json + ws-polyfill.mjs — deps (foxglove-ros-adapter, @foxglove/rosmsg*, zod, ws) and the WebSocket global shim for Node 18–21.
  • install.sh — installs Node 18+ (NodeSource if absent) and npm installs the runner deps, instead of pip install roslibpy.
  • bin/notify_lib.py — added a --title/--reason CLI shim so the Node runner reuses the existing Slack/GitHub notifier unchanged.
  • Removed the old .py runner + wrappers; refreshed README.md, QUICK_START.md; added .gitignore.

Why

Since MoveIt Pro 9.4, 3201 is foxglove_bridge (Foxglove binary protocol) and rosbridge_server is an opt-in sidecar. Driving the smoke test over 3201 uses the default transport with no extra flag. roslibpy (Python) has no Foxglove-native client, so the runner moves to Node where foxglove-ros-adapter provides a roslib-compatible ActionClient. notify_lib.py carries no ROS dependency, so it stays Python and is invoked via a small CLI shim rather than rewritten.

Validation status

Local checks (host): all .mjs pass node --check; install.sh passes bash -n; notify_lib.py compiles, its 12 existing tests pass, and the new CLI shim works in --dry-run.

Not yet validated against a live bridge — this environment has no running MoveIt Pro backend and the npm deps are not installed here. Before merge, on a target with the web bridge up:

  • npm install under example_scripts/ resolves foxglove-ros-adapter + peers.
  • MOVEIT_WEB_BRIDGE_URL=ws://<host>:3201 node cd_objective_lib.mjs path: connects, waitForAction("/do_objective") resolves, sendGoal/waitGoal drive an Objective end-to-end.
  • Confirm the adapter's action goal field name matches { objective_name } for moveit_studio_sdk_msgs/action/DoObjectiveSequence (assumed from the roslibpy payload).
  • Confirm waitForAction/waitGoal reject on timeout (the retry/fail logic depends on it).
  • install.sh end-to-end on a clean Ubuntu target (Node bootstrap + npm install --prefix).

Pairs with the docs update in moveit_pro PR (CI/CD guide → Node/3201, no sidecar).

Replace the roslibpy/rosbridge objective runner with a Node runner
(cd_objective_lib.mjs) that uses foxglove-ros-adapter over the always-on web
bridge on port 3201 — no --enable-rosbridge sidecar. Rewrite the three example
wrappers as .mjs, add package.json + a Node<22 WebSocket polyfill, install Node
and npm deps in install.sh instead of pip roslibpy, and add a CLI shim to
notify_lib.py so the Node runner reuses the existing Slack/GitHub notifier.
Update README and QUICK_START.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 79ca2ce0-a109-49e7-b766-f3fb6883eaf6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

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