cps_loki/docker-compose.yaml

252 lines
6.9 KiB
YAML
Raw Normal View History

2023-08-02 14:18:54 +00:00
version: "3.9"
services:
# Base image containing dependencies.
base:
2023-11-30 10:53:19 +00:00
image: ghcr.io/bjoernellens1/cps_bot_mini_ws/base
2023-08-02 14:18:54 +00:00
build:
context: .
dockerfile: docker/Dockerfile
2023-08-02 14:36:47 +00:00
tags:
2023-11-30 10:53:19 +00:00
- ghcr.io/bjoernellens1/cps_bot_mini_ws/base
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
2023-11-27 07:58:33 +00:00
#privileged: true
2023-08-02 14:18:54 +00:00
environment:
# Allows graphical programs in the container.
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- NVIDIA_DRIVER_CAPABILITIES=all
2023-11-20 10:32:30 +00:00
- ROS_DOMAIN_ID=5
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
2023-08-02 14:18:54 +00:00
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-11-30 10:53:19 +00:00
image: ghcr.io/bjoernellens1/cps_bot_mini_ws/overlay
2023-08-02 14:18:54 +00:00
build:
context: .
dockerfile: docker/Dockerfile
tags:
2023-11-30 10:53:19 +00:00
- ghcr.io/bjoernellens1/cps_bot_mini_ws/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-11-30 10:53:19 +00:00
image: ghcr.io/bjoernellens1/cps_bot_mini_ws/guis
2023-08-02 14:18:54 +00:00
build:
context: .
dockerfile: docker/Dockerfile
tags:
2023-11-30 10:53:19 +00:00
- ghcr.io/bjoernellens1/cps_bot_mini_ws/guis
2023-08-02 14:18:54 +00:00
target: guis
x-bake:
platforms:
- linux/arm64
- linux/amd64
2023-11-30 08:13:22 +00:00
command: |
2023-08-02 14:18:54 +00:00
/bin/bash
# Robot State Publisher
robot_state_publisher:
extends: overlay
2023-11-30 08:13:22 +00:00
command: |
2023-11-20 07:49:07 +00:00
ros2 launch cps_loki_bringup rsp.launch.py
2023-08-02 14:18:54 +00:00
# Controller
controller:
2023-11-30 08:13:22 +00:00
extends: overlay
command: |
2023-11-20 07:49:07 +00:00
ros2 launch cps_loki_bringup robot_controller.launch.py
2023-12-04 08:38:08 +00:00
privileged: true
2023-08-02 14:18:54 +00:00
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
- /dev/ttyACM0:/dev/ttyACM0
2023-10-16 15:49:45 +00:00
restart: unless-stopped
2023-08-02 14:18:54 +00:00
# teleop
teleop:
2023-11-30 08:13:22 +00:00
extends: overlay
command: |
2023-11-20 07:49:07 +00:00
ros2 launch cps_loki_bringup robot_joy_teleop.launch.py
2023-08-02 14:18:54 +00:00
devices:
2023-11-20 07:49:07 +00:00
- /dev/input:/dev/input
2023-10-16 15:49:45 +00:00
restart: unless-stopped
2023-11-24 08:53:30 +00:00
# scan filter node
lidar_filter:
extends: overlay
2023-11-30 08:13:22 +00:00
command: |
2023-11-24 08:53:30 +00:00
ros2 launch cps_loki_bringup robot_scan_filter.launch.py
2023-08-02 14:18:54 +00:00
# lidar
lidar:
extends: overlay
2023-11-24 08:54:23 +00:00
depends_on:
- lidar_filter
2023-11-30 08:13:22 +00:00
command: |
2023-11-20 07:49:07 +00:00
ros2 launch cps_loki_bringup robot_lidar.launch.py
2023-08-02 14:36:47 +00:00
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
- /dev/ttyACM0:/dev/ttyACM0
2023-08-02 14:18:54 +00:00
# mapping
mapping:
extends: overlay
2023-11-30 08:13:22 +00:00
command: |
2023-11-20 07:49:07 +00:00
ros2 launch cps_loki_bringup robot_mapper.launch.py
2023-08-02 14:18:54 +00:00
# navigation
navigation:
extends: overlay
2023-11-16 13:41:30 +00:00
#command: >
# ros2 launch cbot_mini_bringup robot_navigation.launch.py
# map_subscribe_transient_local:=true
2023-08-02 14:18:54 +00:00
command: >
2023-11-30 08:13:22 +00:00
ros2 launch nav2_bringup bringup_launch.py slam:=True map:=/repo/map.yaml
use_sim_time:=False use_composition:=True
2023-12-07 10:56:06 +00:00
params_file:=/overlay_ws/src/cps_loki_bringup/config/nav2.yaml
2023-11-20 09:01:05 +00:00
depends_on:
- lidar
- controller
- teleop
2023-11-27 07:51:20 +00:00
# camera
cam:
extends: overlay
command: >
2023-11-27 16:53:28 +00:00
ros2 launch ffmpeg_image_transport cam.launch.py
2023-11-27 09:40:15 +00:00
privileged: true
2023-11-27 16:53:46 +00:00
devices:
- /dev/dri:/dev/dri
2023-11-27 07:51:20 +00:00
2023-12-04 09:09:55 +00:00
###################################################################################################################################
# Webgui Supervision via Foxglove Studio #
###################################################################################################################################
2023-11-30 10:40:14 +00:00
# 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
2024-01-11 15:07:52 +00:00
# # - .:/repo
2023-11-30 10:40:14 +00:00
# - /var/run/docker.sock:/var/run/docker.sock
2024-01-11 15:07:52 +00:00
# # - /var/lib/docker:/var/lib/docker
2023-11-30 10:40:14 +00:00
# ports:
2024-01-11 15:07:52 +00:00
# - "80:1337"
2023-11-30 10:40:14 +00:00
# restart: unless-stopped
2023-11-30 08:16:57 +00:00
2024-01-11 15:07:52 +00:00
config:
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
2023-11-27 07:51:20 +00:00
################################################################################################################################
# This section is mostly for supervision from PC #
################################################################################################################################
2023-12-04 09:09:55 +00:00
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
2023-12-04 09:51:41 +00:00
foxglove:
image: husarion/foxglove
depends_on:
- foxglove-bridge
ports:
- 8080:8080
2023-12-04 09:09:55 +00:00
2023-08-02 14:18:54 +00:00
# rviz2
rviz2:
extends: guis
2023-11-30 08:13:22 +00:00
command: |
2023-08-02 14:18:54 +00:00
rviz2
# Needed to display graphical applications
privileged: true
2023-11-30 08:13:22 +00:00
networks: {}
2024-01-11 15:07:52 +00:00
volumes:
portainer_data: