ROS 2 Phase 2: bugbot_ros bridge + learned controller#2
Draft
Jerome-Graves wants to merge 1 commit into
Draft
Conversation
ament_python package: twist_bridge_node (/cmd_vel -> 4 wheel cmds via the X-omni mix), policy_node (sim-trained TorchScript policy -> wheel cmds with noisy sensor inputs), shared deploy.py (observation builder + PolicyController, obs layout kept identical to the sim), mixing.py (firmware-exact, unit-tested), launch file, and a mix-parity test. Targets ROS 2 Humble/Jazzy; mix verified, colcon build pending.
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.
Phase 2: a ROS 2 (
ament_python) package that bridges BugBot's holonomic drive into ROS 2 and runs the corrective policy from the simulation. Draft for review + acolcon build/ runtime pass on a ROS 2 install (Humble/Jazzy, Ubuntu/WSL 2).Package
bugbot_rostwist_bridge_node—/cmd_vel(geometry_msgs/Twist) → four wheel commands on/bugbot/wheel_cmdvia the firmware X-omni mix. Direct teleop / open-loop path.policy_node— loads a sim-trained TorchScript policy and maps [command + noisy measured motion + previous action] → wheel commands (the learned micro-correction controller). Zero-policy default = safe bring-up.deploy.py— shared observation builder +PolicyController, with the obs layout and normalisation constants kept identical to the simulation env, so a sim-trained policy runs unchanged on the real robot.mixing.py— firmware-exact X-omni mix (unit-tested).launch/bugbot.launch.py,package.xml,setup.py,test/test_mixing_parity.py./cmd_velis a fullTwist(holonomic):linear.xforward,linear.yleft (mapped to BugBot's right-positive lateral),angular.zyaw.Verified here
Not yet verified (needs a ROS 2 install)
colcon build, node startup, and topic wiring haven't been run. Build/run instructions are inros2/README.md. Final integration step: wire/bugbot/wheel_cmdto the firmware's command channel (WebSocket/UDP).Relationship to the sim PR
Independent of the simulation PR, but designed to consume its trained policy. The mix is duplicated (not cross-imported) so the ROS package builds standalone; a comment in each
mixing.pynotes they must stay in sync.