version: '3.8' services: # Main ROS2 container with Nav2, SLAM, and RPLidar ros2_nav: build: context: . dockerfile: Dockerfile image: autocar:jazzy container_name: autocar_ros2 network_mode: host ipc: host privileged: true # RPLidar A1M8 device (uses udev symlink for stability) devices: - /dev/rplidar:/dev/rplidar # Add user to dialout group for serial access group_add: - dialout volumes: - /dev/shm:/dev/shm - ./src:/ros2_ws/src - ./config:/ros2_ws/config - ./maps:/ros2_ws/maps - ./.bashrc:/root/.bashrc environment: - ROS_DOMAIN_ID=0 - RMW_IMPLEMENTATION=rmw_fastrtps_cpp - ROS_STATIC_PEERS=192.168.8.117 - RCUTILS_COLORIZED_OUTPUT=1 working_dir: /ros2_ws stdin_open: true tty: true networks: default: driver: bridge