Drive CD objectives over the Foxglove web bridge (Node)#6
Draft
nbbrooks wants to merge 1 commit into
Draft
Conversation
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>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[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, port3201) viafoxglove-ros-adapter. No--enable-rosbridgesidecar is needed.example_scripts/cd_objective_lib.mjs— Node runner (runObjective,runObjectivesForever); connects to3201, waits for/do_objectiveviaros.waitForAction(), sends the goal withActionClient, 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 theWebSocketglobal shim for Node 18–21.install.sh— installs Node 18+ (NodeSource if absent) andnpm installs the runner deps, instead ofpip install roslibpy.bin/notify_lib.py— added a--title/--reasonCLI shim so the Node runner reuses the existing Slack/GitHub notifier unchanged..pyrunner + wrappers; refreshedREADME.md,QUICK_START.md; added.gitignore.Why
Since MoveIt Pro 9.4,
3201isfoxglove_bridge(Foxglove binary protocol) androsbridge_serveris an opt-in sidecar. Driving the smoke test over3201uses the default transport with no extra flag.roslibpy(Python) has no Foxglove-native client, so the runner moves to Node wherefoxglove-ros-adapterprovides aroslib-compatibleActionClient.notify_lib.pycarries no ROS dependency, so it stays Python and is invoked via a small CLI shim rather than rewritten.Validation status
Local checks (host): all
.mjspassnode --check;install.shpassesbash -n;notify_lib.pycompiles, 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 installunderexample_scripts/resolvesfoxglove-ros-adapter+ peers.MOVEIT_WEB_BRIDGE_URL=ws://<host>:3201 node cd_objective_lib.mjspath: connects,waitForAction("/do_objective")resolves,sendGoal/waitGoaldrive an Objective end-to-end.{ objective_name }formoveit_studio_sdk_msgs/action/DoObjectiveSequence(assumed from the roslibpy payload).waitForAction/waitGoalreject on timeout (the retry/fail logic depends on it).install.shend-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).