Files
ros-raspbot-v2/docker-compose.yml
T

65 lines
1.7 KiB
YAML

# Both containers share the host network so ROS 2 DDS discovery works without
# any extra multicast configuration. Each container is given access only to
# the specific device it needs rather than running in privileged mode.
services:
robot:
build:
context: .
dockerfile: robot/Dockerfile
platforms:
- linux/arm64
image: raspbot_v2:latest
network_mode: host
ipc: host
devices:
- /dev/i2c-1:/dev/i2c-1
environment:
- ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-0}
restart: unless-stopped
lidar:
build:
context: .
dockerfile: lidar/Dockerfile
platforms:
- linux/amd64
- linux/arm64
image: raspbot_v2_lidar:latest
network_mode: host
ipc: host
devices:
- ${LIDAR_PORT:-/dev/ttyUSB0}:${LIDAR_PORT:-/dev/ttyUSB0}
environment:
- ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-0}
command:
- ros2
- launch
- sllidar_ros2
- sllidar_a1_launch.py
- serial_port:=${LIDAR_PORT:-/dev/ttyUSB0}
- frame_id:=${LIDAR_FRAME_ID:-laser}
- serial_baudrate:=115200
- angle_compensate:=true
- scan_qos_depth:=${LIDAR_QOS_DEPTH:-2}
- scan_qos_reliability:=${LIDAR_QOS_RELIABILITY:-best_effort}
restart: unless-stopped
webui:
build:
context: webui
dockerfile: Dockerfile
platforms:
- linux/arm64
args:
# Hostname of the GStreamer signaling server, baked into the frontend bundle.
# Override with: VITE_WEBRTC_HOST=raspbot-v2.local
VITE_WEBRTC_HOST: ${VITE_WEBRTC_HOST:-}
image: raspbot_v2_webui:latest
network_mode: host
ipc: host
environment:
- ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-0}
restart: unless-stopped