2023-08-02 14:18:54 +00:00
|
|
|
version: "3.9"
|
|
|
|
services:
|
|
|
|
# Base image containing dependencies.
|
|
|
|
base:
|
2023-11-20 10:21:40 +00:00
|
|
|
image: ghcr.io/bjoernellens1/cps_bot_mini_ws/bot: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-20 10:21:40 +00:00
|
|
|
- ghcr.io/bjoernellens1/cps_bot_mini_ws/bot: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-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
|
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-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
|
|
|
|
params_file:=/overlay_ws/src/cps_loki_bringup/config/nav2_params.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-11-30 08:16:57 +00:00
|
|
|
config:
|
|
|
|
container_name: olivetin
|
2023-11-30 08:47:57 +00:00
|
|
|
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:
|
2023-11-30 09:17:24 +00:00
|
|
|
#- linux/arm64
|
2023-11-30 08:47:57 +00:00
|
|
|
- linux/amd64
|
2023-11-30 08:22:09 +00:00
|
|
|
user: root
|
2023-11-30 08:16:57 +00:00
|
|
|
volumes:
|
2023-11-30 08:19:48 +00:00
|
|
|
- ./config/olivetin.yaml:/config/config.yaml # replace host path or volume as needed
|
2023-11-30 09:30:51 +00:00
|
|
|
- .:/repo
|
2023-11-30 08:18:48 +00:00
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2023-11-30 08:16:57 +00:00
|
|
|
ports:
|
|
|
|
- "88:1337"
|
|
|
|
restart: unless-stopped
|
|
|
|
|
2023-11-27 07:51:20 +00:00
|
|
|
################################################################################################################################
|
|
|
|
# This section is mostly for supervision from PC #
|
|
|
|
################################################################################################################################
|
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: {}
|