-
Notifications
You must be signed in to change notification settings - Fork 0
[Sim Theme E] ROS 2 integration for Gazebo (ros_gz) #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
6ac72aa
Update Gazebo and ROS configurations for Kilted and Ionic releases
jmservera 33bfeda
Add Product Requirements Document for UbeROS Simulation and Visualiza…
jmservera c22ca52
docs(prd): approve Simulation and Visualization PRD v1.0.0
jmservera e6420c5
docs(sim-theme-a): seed pluggable framework plan (FR-A1..A4)
jmservera 6bb43ea
feat(sim-theme-a): pluggable simulator registry + GET /simulators + d…
jmservera 95c331e
docs(sim-theme-c): seed Turtlesim visualizer plan (FR-C1..C4)
jmservera 3974135
feat(sim-theme-c): turtlesim service (Xvfb+x11vnc+websockify) + /sim/…
jmservera 4dfb12f
docs(sim-theme-f): seed Gazebo gzweb web viz plan (FR-F1..F5)
jmservera 389336f
feat(sim-theme-f): headless gz sim -s + WebsocketServer + gzweb clien…
jmservera 56720e5
docs(sim-theme-e): seed ROS 2 integration plan (FR-E1..E6)
jmservera b4ae2ec
feat(sim-theme-e): co-located ros_gz_bridge with /clock default + dis…
jmservera 9519915
Merge branch 'main' into jmservera/sim-theme-f-gzweb
jmservera 92b5194
merge turtlesim
jmservera 12bc293
Merge branch 'jmservera/sim-theme-f-gzweb' into jmservera/sim-theme-e…
jmservera 16f9fa4
Improve shell script linting by dynamically finding scripts and handl…
jmservera e57130e
Merge branch 'jmservera/sim-theme-f-gzweb' into jmservera/sim-theme-e…
jmservera 16b7814
Refactor acceptance tests and CI configuration for gzweb integration
jmservera 5608494
Merge branch 'jmservera/sim-theme-f-gzweb' into jmservera/sim-theme-e…
jmservera c8b6b96
Enhance CI integration and smoke tests for Turtlesim support
jmservera b67cef7
Update CI integration workflow: enhance Playwright acceptance tests a…
jmservera 9cc4ecc
Refactor CI configuration and update documentation for Gazebo and Tur…
jmservera 904b6d6
Merge branch 'jmservera/sim-theme-f-gzweb' into jmservera/sim-theme-e…
jmservera 7f3ad93
Update documentation across multiple files: enhance README, BRDs, ADR…
jmservera d5b576b
Update UBEROS_SERVICES to include turtlesim and enhance documentation…
jmservera eac28a6
Merge branch 'jmservera/sim-theme-f-gzweb' into jmservera/sim-theme-e…
jmservera 335aaff
Merge branch 'main' into jmservera/sim-theme-e-ros-integration
jmservera 4e3c6b9
Enhance ros_gz bridge startup behavior to reconnect when /clock is av…
jmservera a8ae89c
Add verified test procedure for ros_gz_bridge connectivity with Gazebo
jmservera 9afd947
Fix documentation typos in sim-theme-e-ros-integration and update Doc…
jmservera d8835ba
Update Dockerfile to use bash with pipefail for RUN commands
jmservera 4f2c9a8
Add FASTDDS_DEFAULT_PROFILES_FILE environment variable for DDS config…
jmservera 6ed26a2
Update environment variable for Fast DDS configuration to reflect dep…
jmservera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Theme E — ROS 2 integration for Gazebo (ros_gz) | ||
|
|
||
| > Plan stub. Source of truth: [Simulation & Visualization PRD](../prds/uberos-simulation-visualization.md) §7.5. | ||
|
|
||
| ## Scope — FR-E1 … FR-E6 | ||
| - FR-E1 — `ros_gz_bridge` runs co-located with `gz sim` in the Gazebo container. | ||
| - FR-E2 — Default bridge for `/clock` (`rosgraph_msgs/msg/Clock`) via a bridge config file; further per-world bridges additive. | ||
| - FR-E3 — Bridge reaches ROS via the Fast DDS discovery server (unicast, no multicast); gz-transport stays intra-container. | ||
| - FR-E4 — Gazebo entrypoint sources `/opt/ros/${ROS_DISTRO}` and provides the DDS discovery config. | ||
| - FR-E5 — `ROS_DISTRO` ↔ `GZ_RELEASE` pinned to a compatible pair (kilted ↔ ionic). | ||
| - FR-E6 — Remove the now-redundant `ros-gz` from the `ros` image (bridge lives only in the Gazebo container). | ||
|
|
||
| ## Dependency / lane | ||
| - **Lane 2 (Gazebo backend).** Coordinate with **Theme F** (both reshape the Gazebo container/service); sequence E after F's container reshape or share the lane. | ||
| - Architecture rationale: two discovery systems (gz-transport vs DDS) — see PRD §6. | ||
|
|
||
| ## Likely files | ||
| - `services/simulator|gazebo/` entrypoint + `ros_gz` bridge config (`/clock`) | ||
| - `services/ros/Dockerfile` (drop `ros-gz`) | ||
|
|
||
| ## Tasks | ||
| - [ ] Research: ros_gz_bridge config format for the pinned pair; discovery-server env vs XML in the Gazebo container | ||
| - [ ] Plan: bridge launch + `/clock` config + entrypoint ROS sourcing | ||
| - [ ] Implement: co-located bridge, `/clock`, ros-image cleanup | ||
| - [ ] Tests: `ros2 topic echo /clock rosgraph_msgs/msg/Clock --once` returns a clock sample; no multicast | ||
| - [ ] Acceptance (PRD §7.5) | ||
|
|
||
| ## Verified test procedure (2026-07-24) | ||
|
|
||
| Use this from the ROS shell (web terminal in the `ros` container) to verify that Gazebo is reachable from ROS through `ros_gz_bridge`: | ||
|
|
||
| ```bash | ||
| source /opt/ros/${ROS_DISTRO}/setup.bash | ||
| export ROS_DOMAIN_ID=42 | ||
| export RMW_IMPLEMENTATION=rmw_fastrtps_cpp | ||
| export ROS_DISCOVERY_SERVER=discovery-server:11811 | ||
| export FASTDDS_DEFAULT_PROFILES_FILE=/etc/ros/dds_discovery.xml | ||
| ros2 topic echo /clock rosgraph_msgs/msg/Clock --once | ||
| ``` | ||
|
|
||
| Expected result: one `clock` message is printed. | ||
|
|
||
| Notes: | ||
| - In this stack, `ros2 topic list` may not show `/clock` even when the bridge is working. | ||
| - The explicit type in `ros2 topic echo` is required for a reliable check. | ||
| - `ROS_DISCOVERY_SERVER` must be `discovery-server:11811` with no spaces around `:`. | ||
| - Use `--once` (no space), not `-- once`. | ||
| - Fast DDS deprecates `FASTRTPS_DEFAULT_PROFILES_FILE`; use `FASTDDS_DEFAULT_PROFILES_FILE`. |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <!-- | ||
| Fast DDS Discovery Server client profile (PRD Theme E, FR-E4). | ||
|
|
||
| This is the Gazebo container's copy of the shared discovery-client profile | ||
| (kept aligned with services/ros/config/dds_discovery.xml for behavior). The ros_gz bridge that | ||
| runs in this container joins the ROS graph through the central | ||
| discovery-server over UNICAST — Docker bridge networks do not reliably carry | ||
| the multicast that default DDS discovery relies on (research RISK-4). | ||
|
|
||
| Only the bridge's DDS side uses this profile; gz sim's own gz-transport | ||
| discovery stays intra-container and is unaffected. | ||
| --> | ||
| <dds xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles"> | ||
| <profiles> | ||
| <participant profile_name="uberos_discovery_client" is_default_profile="true"> | ||
| <rtps> | ||
| <builtin> | ||
| <discovery_config> | ||
| <discoveryProtocol>CLIENT</discoveryProtocol> | ||
| <discoveryServersList> | ||
| <!-- Fast DDS 3.x (ROS Kilted): discoveryServersList children are | ||
| <locator> elements directly. The pre-3.x | ||
| <RemoteServer prefix="GUID"> form was removed and makes the | ||
| parser treat the list as empty ("without content"). --> | ||
| <locator> | ||
| <udpv4> | ||
| <address>discovery-server</address> | ||
| <port>11811</port> | ||
| </udpv4> | ||
| </locator> | ||
| </discoveryServersList> | ||
| </discovery_config> | ||
| </builtin> | ||
| </rtps> | ||
| </participant> | ||
| </profiles> | ||
| </dds> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # UbeROS ros_gz bridge config (PRD Theme E, FR-E2). | ||
| # | ||
| # Consumed by ros_gz_bridge's `parameter_bridge` (`--ros-args -p config_file:=`), | ||
| # which runs co-located with `gz sim` in THIS container (FR-E1). The bridge is | ||
| # the only component that speaks both transports: it reads gz-transport topics | ||
| # over localhost (intra-container, reliable) and republishes them on the ROS | ||
| # graph, which is discovered over the Fast DDS discovery server via unicast | ||
| # (FR-E3). gz sim itself never joins DDS. | ||
| # | ||
| # Default topic set is intentionally minimal: only the simulation clock, so ROS | ||
| # nodes can run on simulated time. Additional per-world/per-model topics | ||
| # (e.g. /cmd_vel, /odom, joint states, TF) are ADDITIVE — append more list | ||
| # entries here (or supply a world-specific config via UBEROS_BRIDGE_CONFIG) | ||
| # without changing the entrypoint. | ||
| # | ||
| # Entry schema (ros_gz_bridge): each list item maps one ROS topic to one gz | ||
| # topic with an explicit message-type pair and a direction. Directions are | ||
| # GZ_TO_ROS, ROS_TO_GZ, or BIDIRECTIONAL. | ||
|
|
||
| # /clock — simulation time published by gz sim's physics; bridged into ROS as | ||
| # rosgraph_msgs/msg/Clock so `use_sim_time` consumers follow the simulator. | ||
| # One-way (GZ_TO_ROS): nothing in ROS should drive the simulator's clock. | ||
| - ros_topic_name: "/clock" | ||
| gz_topic_name: "/clock" | ||
| ros_type_name: "rosgraph_msgs/msg/Clock" | ||
| gz_type_name: "gz.msgs.Clock" | ||
| direction: GZ_TO_ROS |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.