255 lines
5.8 KiB
YAML
255 lines
5.8 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
# Base image containing dependencies.
|
|
base:
|
|
image: ghcr.io/bjoernellens1/ros2_rmp/rmp:base
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
args:
|
|
ROS_DISTRO: humble
|
|
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
|
|
devices:
|
|
- /dev/input/js0:/dev/input/js0
|
|
|
|
# Overlay image containing the project specific source code.
|
|
overlay:
|
|
extends: base
|
|
image: ghcr.io/bjoernellens1/ros2_rmp/rmp:overlay
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
tags:
|
|
- ghcr.io/bjoernellens1/ros2_rmp/rmp:overlay
|
|
target: overlay
|
|
x-bake:
|
|
platforms:
|
|
- linux/arm64
|
|
- linux/amd64
|
|
volumes:
|
|
- .:/repo
|
|
command: >
|
|
/bin/bash
|
|
|
|
# Additional dependencies for GUI applications
|
|
guis:
|
|
extends: overlay
|
|
image: ghcr.io/bjoernellens1/ros2_rmp/rmp:guis
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
tags:
|
|
- ghcr.io/bjoernellens1/ros2_rmp/rmp:guis
|
|
target: guis
|
|
x-bake:
|
|
platforms:
|
|
- linux/arm64
|
|
- linux/amd64
|
|
#entrypoint: /bin/bash
|
|
command: >
|
|
/bin/bash
|
|
|
|
# Robot State Publisher
|
|
rsp:
|
|
extends: overlay
|
|
command: >
|
|
ros2 launch cps_rmp220_support rsp.launch.py
|
|
stdin_open: true
|
|
tty: true
|
|
# Networking and IPC for ROS 2
|
|
network_mode: host
|
|
ipc: host
|
|
environment:
|
|
- ROS_DOMAIN_ID=5
|
|
|
|
# Controller
|
|
controller:
|
|
extends: base
|
|
command: >
|
|
ros2 run segwayrmp SmartCar --ros-args -r cmd_vel:=cmd_vel_out -p serial_full_name:=/dev/ttyUSB0
|
|
devices:
|
|
- /dev/ttyUSB0:/dev/ttyUSB0
|
|
# 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
|
|
# depends_on:
|
|
# - robot_state_publisher
|
|
environment:
|
|
- ROS_DOMAIN_ID=5
|
|
restart: unless-stopped
|
|
|
|
# teleop
|
|
teleop:
|
|
extends: base
|
|
command: >
|
|
ros2 launch rmp220_teleop robot_joystick.launch.py
|
|
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
|
|
environment:
|
|
- ROS_DOMAIN_ID=5
|
|
|
|
# lidar
|
|
lidar:
|
|
extends: overlay
|
|
command: >
|
|
ros2 launch cps_rmp220_support robot_lidar.launch.py serial_port:=/dev/ttyUSB0
|
|
|
|
stdin_open: true
|
|
tty: true
|
|
# Networking and IPC for ROS 2
|
|
network_mode: host
|
|
ipc: host
|
|
# depends_on:
|
|
# - robot_state_publisher
|
|
environment:
|
|
- ROS_DOMAIN_ID=5
|
|
devices:
|
|
- /dev/ttyUSB1:/dev/ttyUSB1
|
|
- /dev/ttyUSB0:/dev/ttyUSB0
|
|
|
|
# localiaztion by ekf node
|
|
ekf:
|
|
extends: overlay
|
|
command: >
|
|
ros2 launch cps_rmp220_support robot_localization.launch.py
|
|
# Interactive shell
|
|
stdin_open: true
|
|
tty: true
|
|
# Networking and IPC for ROS 2
|
|
network_mode: host
|
|
ipc: host
|
|
environment:
|
|
- ROS_DOMAIN_ID=5
|
|
|
|
# mapping
|
|
mapping:
|
|
extends: overlay
|
|
command: >
|
|
ros2 launch cps_rmp220_support robot_mapping.launch.py
|
|
# Interactive shell
|
|
stdin_open: true
|
|
tty: true
|
|
# Networking and IPC for ROS 2
|
|
network_mode: host
|
|
ipc: host
|
|
environment:
|
|
- ROS_DOMAIN_ID=5
|
|
|
|
# slam_localization
|
|
localization:
|
|
extends: overlay
|
|
command: >
|
|
ros2 launch cps_rmp220_support robot_mapping_localization.launch.py map:=/repo/maps/map.yaml
|
|
# Interactive shell
|
|
stdin_open: true
|
|
tty: true
|
|
# Networking and IPC for ROS 2
|
|
network_mode: host
|
|
ipc: host
|
|
environment:
|
|
- ROS_DOMAIN_ID=5
|
|
|
|
# amcllocalization
|
|
amcl:
|
|
extends: overlay
|
|
command: >
|
|
ros2 launch cps_rmp220_support robot_amcl.launch.py map_file_name:=/repo/maps/map.yaml
|
|
# Interactive shell
|
|
stdin_open: true
|
|
tty: true
|
|
# Networking and IPC for ROS 2
|
|
network_mode: host
|
|
ipc: host
|
|
environment:
|
|
- ROS_DOMAIN_ID=5
|
|
|
|
# navigation
|
|
navigation:
|
|
extends: overlay
|
|
command: >
|
|
ros2 launch cps_rmp220_support robot_navigation.launch.py
|
|
map_subscribe_transient_local:=true
|
|
stdin_open: true
|
|
tty: true
|
|
# Networking and IPC for ROS 2
|
|
network_mode: host
|
|
ipc: host
|
|
environment:
|
|
- ROS_DOMAIN_ID=5
|
|
|
|
# bash
|
|
bash:
|
|
extends: overlay
|
|
command: >
|
|
/bin/bash
|
|
stdin_open: true
|
|
tty: true
|
|
# Networking and IPC for ROS 2
|
|
network_mode: host
|
|
ipc: host
|
|
devices:
|
|
- /dev/input/js0:/dev/input/js0
|
|
environment:
|
|
- ROS_DOMAIN_ID=5
|
|
|
|
# rviz2
|
|
rviz2:
|
|
extends: guis
|
|
# command: >
|
|
# ros2 launch cps_rmp220_support robot_rviz2.launch.py
|
|
command: >
|
|
ros2 launch cps_rmp220_support rviz.launch.py
|
|
# 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
|
|
volumes:
|
|
# Allows graphical programs in the container.
|
|
- /tmp/.X11-unix:/tmp/.X11-unix:rw
|
|
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority |