version: "3.9" services: # Base image containing dependencies. base: image: ghcr.io/bjoernellens1/cps_bot_mini_ws/base build: context: . dockerfile: docker/Dockerfile tags: - ghcr.io/bjoernellens1/cps_bot_mini_ws/base args: ROS_DISTRO: humble UNDERLAY_WS: cps_bot_mini_ws OVERLAY_WS: overlay_ws target: base x-bake: platforms: - linux/arm64 - linux/amd64 # Interactive shell stdin_open: true tty: true # Networking and IPC for ROS 2 network_mode: host ipc: host # Needed to display graphical applications #privileged: true environment: # Allows graphical programs in the container. - DISPLAY=${DISPLAY} - QT_X11_NO_MITSHM=1 - NVIDIA_DRIVER_CAPABILITIES=all - ROS_DOMAIN_ID=5 - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp volumes: # Allows graphical programs in the container. - /tmp/.X11-unix:/tmp/.X11-unix:rw - ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority # Overlay image containing the project specific source code. overlay: extends: base image: ghcr.io/bjoernellens1/cps_bot_mini_ws/overlay build: context: . dockerfile: docker/Dockerfile tags: - ghcr.io/bjoernellens1/cps_bot_mini_ws/overlay target: overlay x-bake: platforms: - linux/arm64 - linux/amd64 volumes: - .:/repo # Additional dependencies for GUI applications guis: extends: overlay image: ghcr.io/bjoernellens1/cps_bot_mini_ws/guis build: context: . dockerfile: docker/Dockerfile tags: - ghcr.io/bjoernellens1/cps_bot_mini_ws/guis target: guis x-bake: platforms: - linux/arm64 - linux/amd64 command: | /bin/bash # Robot State Publisher robot_state_publisher: extends: overlay command: | ros2 launch cps_loki_bringup rsp.launch.py # Controller controller: extends: overlay command: | ros2 launch cps_loki_bringup robot_controller.launch.py privileged: true devices: - /dev/ttyUSB0:/dev/ttyUSB0 - /dev/ttyACM0:/dev/ttyACM0 restart: unless-stopped # teleop teleop: extends: overlay command: | ros2 launch cps_loki_bringup robot_joy_teleop.launch.py devices: - /dev/input:/dev/input restart: unless-stopped # scan filter node lidar_filter: extends: overlay command: | ros2 launch cps_loki_bringup robot_scan_filter.launch.py # lidar lidar: extends: overlay depends_on: - lidar_filter command: | ros2 launch cps_loki_bringup robot_lidar.launch.py devices: - /dev/ttyUSB0:/dev/ttyUSB0 - /dev/ttyACM0:/dev/ttyACM0 # mapping mapping: extends: overlay command: | ros2 launch cps_loki_bringup robot_mapper.launch.py # navigation navigation: extends: overlay #command: > # ros2 launch cbot_mini_bringup robot_navigation.launch.py # map_subscribe_transient_local:=true command: > ros2 launch nav2_bringup bringup_launch.py slam:=True map:=/repo/map.yaml use_sim_time:=False use_composition:=True params_file:=/repo/config/nav2_params.yaml depends_on: - lidar - controller - teleop # camera cam: extends: overlay command: > ros2 launch ffmpeg_image_transport cam.launch.py privileged: true devices: - /dev/dri:/dev/dri ################################################################################################################################### # Webgui Supervision via Foxglove Studio # ################################################################################################################################### # config: # container_name: olivetin # image: ghcr.io/bjoernellens1/cps_bot_mini_ws/olivetin # build: # context: . # dockerfile: docker/Dockerfile # tags: # - ghcr.io/bjoernellens1/cps_bot_mini_ws/olivetin # target: olivetin # x-bake: # platforms: # #- linux/arm64 # - linux/amd64 # #user: root # privileged: true # volumes: # - ./config/olivetin.yaml:/config/config.yaml # replace host path or volume as needed # # - .:/repo # - /var/run/docker.sock:/var/run/docker.sock # # - /var/lib/docker:/var/lib/docker # ports: # - "80:1337" # restart: unless-stopped olivetin: container_name: olivetin image: jamesread/olivetin #image: ghcr.io/bjoernellens1/cps_bot_mini_ws/olivetin build: context: . dockerfile: docker/Dockerfile tags: - ghcr.io/bjoernellens1/cps_bot_mini_ws/olivetin target: olivetin x-bake: platforms: #- linux/arm64 - linux/amd64 user: root privileged: true volumes: - ./config/olivetin/:/config/ # here is config.yaml and icons located - ./config/olivetin/icons:/var/www/olivetin/customIcons - .:/repo - /var/run/docker.sock:/var/run/docker.sock # - /var/lib/docker:/var/lib/docker - ~/.ssh/id_rsa:/root/.ssh/id_rsa ports: - "80:1337" restart: unless-stopped portainer: container_name: portainer #image: jamesread/olivetin image: portainer/portainer-ce:latest volumes: - ./config/olivetin/:/config/ # here is config.yaml and icons located - ./config/olivetin/icons:/var/www/olivetin/customIcons - .:/repo - /var/run/docker.sock:/var/run/docker.sock - portainer_data:/data # - /var/lib/docker:/var/lib/docker - ~/.ssh/id_rsa:/root/.ssh/id_rsa ports: - "8000:8000" - "9443:9443" restart: unless-stopped ################################################################################################################################ # This section is mostly for supervision from PC # ################################################################################################################################ # foxglove-bridge: # image: husarion/foxglove-bridge:humble # # Interactive shell # stdin_open: true # tty: true # # Networking and IPC for ROS 2 # network_mode: host # ipc: host # # Needed to display graphical applications # #privileged: true # environment: # # Allows graphical programs in the container. # - DISPLAY=${DISPLAY} # - QT_X11_NO_MITSHM=1 # - NVIDIA_DRIVER_CAPABILITIES=all # - ROS_DOMAIN_ID=5 # - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp # Foxglove Studio Bridge foxglove_bridge: extends: overlay command: > ros2 launch foxglove_bridge foxglove_bridge_launch.xml port:=8765 stdin_open: true tty: true # Networking and IPC for ROS 2 #network_mode: host ipc: host environment: - ROS_DOMAIN_ID=5 - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp foxglove: #image: husarion/foxglove image: ghcr.io/foxglove/studio:latest depends_on: - foxglove_bridge ports: - 8080:8080 volumes: - ./config/foxglove/extensions:/src/extensions - ./config/foxglove/foxglove-layout.json:/foxglove/default-layout.json # rviz2 rviz2: extends: guis command: | rviz2 # Needed to display graphical applications privileged: true ################################################################################################################################ # Core Services for Web Management # ################################################################################################################################ npm: # nginx proxy manager for reverse proxying the webservices #user "bjoern.ellensohn@unileoben.ac.at" #password "cpsloki_npm" image: 'jc21/nginx-proxy-manager:latest' restart: always #unless-stopped ports: - '80:80' - '81:81' - '443:443' volumes: - ./config/npm:/data - ./letsencrypt:/etc/letsencrypt management: depends_on: - npm - foxglove - olivetin ################################################################################################################################ # Docker related extra stuff # ################################################################################################################################ networks: {} volumes: portainer_data: