feat(sim): split sim container into gazebo + robot - #14
Merged
Conversation
Pulls the simulator out of the bundled "sim" container into its own
service. The robot's always-on ROS infrastructure (bridge_node +
sim_battery) moves into a sibling "robot" service. The OTA-swappable
robot software (sim/controllers/*) is unchanged — those images still
run as agent-managed containers on the lab network.
Three services, all on the same lab network and ROS DDS domain
(ROS_DOMAIN_ID=42, RMW=cyclonedds):
gazebo - ign gazebo + ros_gz_bridge + Xvfb/x11vnc/noVNC GUI
stack. Subscribes to /cmd_vel on ROS DDS and forwards
to the gz diff_drive plugin. Now also bridges
/perseverance/contacts so collision events are visible
ROS-side (groundwork for the Temporal collision-response
workflow).
robot - bridge_node (rclpy → gRPC) + sim_battery. The agent's
persistent peer.
agent - unchanged otherwise. BRIDGE_ADDR moves from a Unix
socket on a shared volume to TCP `robot:50051` over
the lab network. BROKER_URL stays on tcp://mqtt:1883
(lab broker, port 14883 host-side).
bridge_node/server.py: new --listen flag accepting either bare
host:port (TCP) or unix://path. --socket retained for back-compat.
moon.sdf: a 0.9 m boulder at x=8 directly in the rover's forward
path. Rover deck has a contact sensor (`bumper`) tied to the
gz-sim contact system; it emits Contacts messages on
/perseverance/contacts whenever the deck collides.
docker/sim/ removed; replaced by docker/gazebo/ + docker/robot/.
Worlds + models live under docker/gazebo/ now.
Verified locally on Apple Silicon + podman:
- gazebo, robot, agent all Up
- robot: "bridge listening on 0.0.0.0:50051"
- agent: "bridge connected addr=robot:50051"
- ros_gz_bridge: 6 bidirectional bridges including
/perseverance/contacts ↔ ignition.msgs.Contacts
- Lab MQTT, Postgres, Temporal, Registry all healthy
5 tasks
6 tasks
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.
Pulls the simulator into its own service. The robot's always-on ROS infrastructure (bridge_node + sim_battery) moves into a sibling
robotservice. The OTA-swappable robot software (sim/controllers/*from PR #7) is unchanged.Three services
Other changes
--listenflag accepting either barehost:port(TCP) orunix://path.--socketretained for back-compat.x=8directly in the rover's forward path.bumpercontact sensor tied to the gz-sim contact system. Emitsignition.msgs.Contactson/perseverance/contactswhen it touches anything.Verified locally
Pre-push hook ran the full CI smoke; all checks passed.
Follow-up (separate PR)
/events/{robot_id}/collision/cmd/{robot_id}/twist→ ROS/cmd_velCollisionResponseworkflow