cps_loki/docker-compose.yaml

177 lines
4.2 KiB
YAML
Raw Normal View History

2023-08-02 14:18:54 +00:00
version: "3.9"
services:
# Base image containing dependencies.
base:
2023-08-02 14:36:47 +00:00
image: ghcr.io/bjoernellens1/ros2-base:humble
2023-08-02 14:18:54 +00:00
build:
context: .
dockerfile: docker/Dockerfile
2023-08-02 14:36:47 +00:00
tags:
- ghcr.io/bjoernellens1/ros2-base:humble
2023-08-02 14:18:54 +00:00
args:
ROS_DISTRO: humble
2023-08-02 17:12:24 +00:00
UNDERLAY_WS: cps_bot_mini_ws
OVERLAY_WS: overlay_ws
2023-08-02 14:18:54 +00:00
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
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
2023-08-02 14:36:47 +00:00
image: ghcr.io/bjoernellens1/cps_bot_mini_ws/bot:overlay
2023-08-02 14:18:54 +00:00
build:
context: .
dockerfile: docker/Dockerfile
tags:
2023-08-02 14:36:47 +00:00
- ghcr.io/bjoernellens1/cps_bot_mini_ws/bot:overlay
2023-08-02 14:18:54 +00:00
target: overlay
x-bake:
platforms:
- linux/arm64
- linux/amd64
volumes:
- .:/repo
# Additional dependencies for GUI applications
guis:
extends: overlay
2023-08-02 14:36:47 +00:00
image: ghcr.io/bjoernellens1/cps_bot_mini_ws/bot:guis
2023-08-02 14:18:54 +00:00
build:
context: .
dockerfile: docker/Dockerfile
tags:
2023-08-02 14:36:47 +00:00
- ghcr.io/bjoernellens1/cps_bot_mini_ws/bot:guis
2023-08-02 14:18:54 +00:00
target: guis
x-bake:
platforms:
- linux/arm64
- linux/amd64
command: >
/bin/bash
# Robot State Publisher
robot_state_publisher:
extends: overlay
command: >
2023-08-02 14:36:47 +00:00
ros2 launch bot_mini_bringup rsp.launch.py
2023-08-02 14:18:54 +00:00
stdin_open: true
tty: true
# Networking and IPC for ROS 2
network_mode: host
ipc: host
# Controller
controller:
extends: overlay
command: >
2023-08-02 14:36:47 +00:00
ros2 launch bot_mini_bringup robot_controller.launch.py
2023-08-02 14:18:54 +00:00
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
- /dev/ttyACM0:/dev/ttyACM0
# 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
# teleop
teleop:
extends: overlay
command: >
2023-08-02 14:36:47 +00:00
ros2 launch bot_mini_bringup robot_joy_teleop.launch.py
2023-08-02 14:18:54 +00:00
devices:
- /dev/input/js0:/dev/input/js0
# 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
# lidar
lidar:
extends: overlay
command: >
2023-08-02 14:36:47 +00:00
ros2 launch cbot_mini_bringup robot_lidar.launch.py
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
- /dev/ttyUSB1:/dev/ttyUSB1
- /dev/ttyACM0:/dev/ttyACM0
2023-08-02 14:18:54 +00:00
stdin_open: true
tty: true
# Networking and IPC for ROS 2
network_mode: host
ipc: host
# mapping
mapping:
extends: overlay
command: >
2023-08-02 14:36:47 +00:00
ros2 launch bot_mini_bringup robot_mapper.launch.py
2023-08-02 14:18:54 +00:00
# Interactive shell
stdin_open: true
tty: true
# Networking and IPC for ROS 2
network_mode: host
ipc: host
# navigation
navigation:
extends: overlay
command: >
2023-08-02 14:36:47 +00:00
ros2 launch cbot_mini_bringup robot_navigation.launch.py
2023-08-02 14:18:54 +00:00
map_subscribe_transient_local:=true
stdin_open: true
tty: true
# Networking and IPC for ROS 2
network_mode: host
ipc: host
# rviz2
rviz2:
extends: guis
command: >
rviz2
# 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
volumes:
# Allows graphical programs in the container.
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority