140 lines
3.4 KiB
YAML
140 lines
3.4 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
|
|
restart: unless-stopped
|
|
|
|
oled:
|
|
build:
|
|
context: .
|
|
dockerfile: oled/Dockerfile
|
|
platforms:
|
|
- linux/arm64
|
|
image: raspbot_v2_oled:latest
|
|
network_mode: host
|
|
ipc: host
|
|
devices:
|
|
- /dev/i2c-1:/dev/i2c-1
|
|
environment:
|
|
- ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-0}
|
|
restart: unless-stopped
|
|
|
|
wifi:
|
|
build:
|
|
context: wifi
|
|
dockerfile: Dockerfile
|
|
platforms:
|
|
- linux/arm64
|
|
image: raspbot_v2_wifi:latest
|
|
network_mode: host
|
|
cap_add:
|
|
- NET_ADMIN
|
|
volumes:
|
|
- /run/dbus/system_bus_socket:/run/dbus/system_bus_socket
|
|
environment:
|
|
- WIFI_SSID=${WIFI_SSID:-}
|
|
- HOTSPOT_SSID=${HOTSPOT_SSID:-raspbot-hotspot}
|
|
- HOTSPOT_PASSWORD=${HOTSPOT_PASSWORD:-raspbot1234}
|
|
- HOTSPOT_BAND=${HOTSPOT_BAND:-bg}
|
|
- WIFI_IFACE=${WIFI_IFACE:-}
|
|
- WIFI_TIMEOUT=${WIFI_TIMEOUT:-30}
|
|
- POLL_INTERVAL=${POLL_INTERVAL:-15}
|
|
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
|
|
|
|
camera_publisher:
|
|
build:
|
|
context: ./camera_publisher
|
|
platforms:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
image: ${REGISTRY:-camera-publisher}:${TAG:-latest}
|
|
restart: unless-stopped
|
|
network_mode: host
|
|
ipc: host
|
|
devices:
|
|
- /dev/video0:/dev/video0
|
|
- /dev/video1:/dev/video1
|
|
- /dev/media0:/dev/media0
|
|
environment:
|
|
VIDEO_DEVICE: /dev/video0
|
|
WIDTH: 640
|
|
HEIGHT: 480
|
|
FPS: 30
|
|
CAMERA_FORMAT: mjpeg
|
|
CAMERA_NAMESPACE: /camera
|
|
FASTDDS_BUILTIN_TRANSPORTS: LARGE_DATA
|
|
|
|
webrtc_streamer:
|
|
build:
|
|
context: ./webrtc_streamer
|
|
platforms:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
image: ${REGISTRY:-webrtc-streamer}:${TAG:-latest}
|
|
restart: unless-stopped
|
|
network_mode: host
|
|
ipc: host
|
|
environment:
|
|
IMAGE_TOPIC: /camera/image_raw
|
|
PORT: 8443
|
|
BITRATE: 2000000
|
|
FASTDDS_BUILTIN_TRANSPORTS: LARGE_DATA
|
|
|