Agent ROS Bridge supports connecting to multiple ROS endpoints simultaneously, including mixed ROS1/ROS2 environments and remote robots over the network.
python run_bridge.pyCreate config/bridge.yaml:
bridge:
connectors:
ros:
auto_detect: false # Disable auto-detection
endpoints:
# Local ROS2
- id: "local_ros2"
ros_type: "ros2"
ros_distro: "jazzy"
host: "localhost"
domain_id: 0
# Remote ROS2 robot
- id: "warehouse_bot_01"
ros_type: "ros2"
ros_distro: "humble"
host: "192.168.1.100"
domain_id: 42
topics:
- "/cmd_vel"
- "/odom"
- "/scan"
# Remote ROS1 robot
- id: "legacy_arm"
ros_type: "ros1"
ros_distro: "noetic"
host: "192.168.1.101"
port: 11311Then run:
python run_bridge.py
# Or with explicit config:
BRIDGE_CONFIG=config/bridge.yaml python run_bridge.py| Option | Description | Default |
|---|---|---|
id |
Unique identifier for this endpoint | (required) |
ros_type |
"ros2" |
(required) |
ros_distro |
"jazzy", "humble", "iron" |
"jazzy" |
host |
Hostname or IP address | "localhost" |
domain_id |
ROS_DOMAIN_ID for this endpoint | 0 |
auto_discover |
Auto-discover topics | true |
topics |
List of topics to subscribe to | [] |
| Option | Description | Default |
|---|---|---|
id |
Unique identifier for this endpoint | (required) |
ros_type |
"ros1" |
(required) |
ros_distro |
"noetic", "melodic" |
"noetic" |
host |
Hostname or IP address | "localhost" |
port |
ROS_MASTER port | 11311 |
auto_discover |
Auto-discover topics | true |
topics |
List of topics to subscribe to | [] |
Run multiple bridge instances with different ROS versions:
# ROS1 bridge
docker-compose --profile ros1 up ros1-bridge
# ROS2 bridge (different port)
docker-compose --profile ros2 up ros2-bridgeOr use a single bridge with configured endpoints:
# Edit config/bridge.yaml with your endpoints
docker-compose --profile multi up multi-bridgeROS2 uses DDS for discovery. For remote robots:
- Same Domain ID: Ensure
ROS_DOMAIN_IDmatches on both sides - Multicast: DDS requires multicast (or use Discovery Server)
- Firewall: Open ports for DDS (typically 7400-7500)
Example for remote ROS2:
- id: "remote_bot"
ros_type: "ros2"
host: "192.168.1.100"
domain_id: 42ROS1 uses a central master. For remote robots:
- ROS_MASTER_URI: Point to the remote roscore
- ROS_HOSTNAME: Set to this machine's IP
- Port 11311: Default ROS master port
Example for remote ROS1:
- id: "remote_arm"
ros_type: "ros1"
host: "192.168.1.101"
port: 11311Once connected, query all robots:
wscat -c ws://localhost:8765
# List all robots across all endpoints
> {"command": {"action": "list_robots"}}
# Get topics from a specific robot
> {"command": {"action": "get_topics", "parameters": {"endpoint_id": "warehouse_bot_01"}}}
# Send command to specific robot
> {"command": {"action": "publish", "parameters": {"endpoint_id": "legacy_arm", "topic": "/joint_states", "data": {...}}}}- 10x ROS2 Humble AMRs (domain_id 0-9)
- 1x bridge connecting to all via domain-specific endpoints
- 3x ROS1 Noetic UR arms
- 2x ROS2 Humble mobile bases
- 1x bridge managing both generations
- Bridge running in cloud (AWS/GCP)
- Connected to robots in warehouse via VPN
- Operators control from anywhere
- Check
ROS_DOMAIN_IDmatches - Verify multicast is enabled:
ros2 multicast receive/ros2 multicast send - Use Discovery Server for WAN: ROS2 Discovery Server
- Verify
roscoreis running on remote host - Check firewall:
telnet 192.168.1.101 11311 - Ensure
ROS_MASTER_URIandROS_HOSTNAMEare set correctly
- Each bridge needs unique WebSocket port
- Use config:
transports.websocket.port: 8766for second bridge