Connecting to trickfire-urc

Bridge ROS 2 topics between this simulator and the trickfire-urc rover container.

The rover's main codebase, trickfire-urc, always runs in its own Docker container. This simulator runs either natively through pixi or in its own Docker container. Either way, ROS 2 discovers nodes over DDS multicast, and multicast can't cross a Docker boundary, so neither side can see the other's topics by default.

To fix that, one zenoh bridge runs next to each side. Each bridge discovers its local ROS 2 graph normally and forwards topics, services and actions to the other bridge over a single TCP port (7447, bound to 127.0.0.1 only). The urc-side bridge runs as a background process inside the trickfire-urc devcontainer itself, so no extra container is needed there. Neither repository's RMW or packages change.

Text
 this repo: simulations (native or container)           trickfire-urc devcontainer
 Gazebo ─DDS─ sim-side bridge ── tcp 127.0.0.1:7447 ──► urc-side bridge ─DDS─ robot

The bridge scripts themselves live in trickfire-urc, under simulation/ - sim-bridge.sh (sim side) and start-sim-bridge.sh (urc side, started automatically). This repository doesn't need any scripts or config of its own to use it.

Which mode to use

How this sim runsOSSim-side bridge
Native with pixi run sim ...macOS, Linux, WSL2simulation/sim-bridge.sh native
In its devcontainer (simulations container)Windows, macOSsimulation/sim-bridge.sh docker
In its devcontainer on Linux Docker EngineLinuxnative is recommended instead (see troubleshooting)

Steps

Host terminal, not a devcontainer

simulation/sim-bridge.sh runs on the host (a regular terminal on your machine, outside VS Code's devcontainer terminal) - not inside this repo's devcontainer, and not inside trickfire-urc's. The sim-side bridge has to see this sim's traffic, and devcontainers have no Docker access. Running it inside either devcontainer exits with an error.

Start this simulator as usual, e.g. sim gazebo viator (or pixi run sim gazebo viator).

Open trickfire-urc in its devcontainer. The urc-side bridge starts inside it automatically (simulation/start-sim-bridge.sh, logging to /tmp/sim-bridge.log).

In a host terminal, from the trickfire-urc repo root, start the sim-side bridge and leave it running:

Host terminal
$ simulation/sim-bridge.sh native   # or: docker

Back in the trickfire-urc devcontainer, this sim's topics are now available:

trickfire-urc devcontainer
$ ros2 topic list
$ ros2 topic echo /clock --once

If the trickfire-urc devcontainer was built before the bridge was added to it, run Dev Containers: Rebuild Container once there. The first native run downloads the bridge (~20 MB) into ~/.cache/trickfire/.

Windows without WSL

sim-bridge.sh works from Git Bash. From PowerShell, run the sim-side bridge directly:

powershell
docker run --rm -it --network container:simulations -e ROS_DISTRO=jazzy eclipse/zenoh-bridge-ros2dds:1.10.1 client -e tcp/host.docker.internal:7447 --no-multicast-scouting

Limits

Only topics that someone subscribes to on the other side are forwarded. Control, odometry, TF, GPS and /clock arrive at full rate. Raw camera streams are heavy: the ZED depth image and point cloud (around 22 MB per message at 24-30 Hz) are much more than the TCP link can carry through Docker Desktop, so expect them at a reduced rate. To cap a topic's rate so it doesn't crowd out the rest, pass a flag such as --pub-max-frequency '.*/point_cloud/.*=2' after native or docker (extra arguments go straight to the bridge).

Troubleshooting

On this page