Files
ros-raspbot-v2/docker-compose.yml
T
m5p3nc3r 0174cb599f Manage sllidar_ros2 as a git subtree and apply QoS fix
- Add m5p3nc3r/sllidar_ros2 fork as a git subtree at lidar/sllidar_ros2/
- Dockerfile now COPYs source from the workspace instead of cloning at
  build time; git is no longer a build dependency
- Set /scan publisher QoS to BEST_EFFORT (depth 2) for Nav2/RViz2 compat
- Add lidar/README.md documenting the subtree workflow
- Remove lidar/sllidar_ros2/ from .gitignore (no longer needed)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 11:54:06 +00:00

44 lines
1.1 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
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
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