-
Notifications
You must be signed in to change notification settings - Fork 36
/
docker-compose.yaml
77 lines (73 loc) · 2.3 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Docker Compose file for pyrobosim
#
# Usage:
#
# To build the images:
# docker compose build
#
# To run a specific service by name:
# docker compose run <service_name>
#
# To open an interactive shell to a running container:
# docker exec -it <container_name> bash
services:
base:
image: pyrobosim_ros:${ROS_DISTRO:-humble}
build:
context: .
dockerfile: docker/Dockerfile
target: pyrobosim_ros
args:
ROS_DISTRO: ${ROS_DISTRO:-humble}
# Ensures signals are actually passed and reaped in the container for shutdowns.
# https://docs.docker.com/compose/compose-file/compose-file-v3/#init
init: true
# Interactive shell
stdin_open: true
tty: true
# Networking and IPC for ROS 2
network_mode: host
ipc: host
# Allows graphical programs in the container.
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- NVIDIA_DRIVER_CAPABILITIES=all
volumes:
# Mount the source code and testing utilities.
- ./pyrobosim/:/pyrobosim_ws/src/pyrobosim/:rw
- ./pyrobosim_msgs/:/pyrobosim_ws/src/pyrobosim_msgs/:rw
- ./pyrobosim_ros/:/pyrobosim_ws/src/pyrobosim_ros/:rw
- ./test/:/pyrobosim_ws/src/test/:rw
- ./pytest.ini:/pyrobosim_ws/pytest.ini:rw
# Allows graphical programs in the container.
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority
command: sleep infinity
test:
extends: base
command: src/test/run_tests.bash ${ROS_DISTRO:-humble}
###############
# Basic demos #
###############
demo:
extends: base
command: python3 src/pyrobosim/examples/demo.py
demo_multirobot:
extends: base
command: python3 src/pyrobosim/examples/demo.py --multirobot
demo_ros:
extends: base
command: ros2 launch pyrobosim_ros demo.launch.py
demo_multirobot_ros:
extends: base
command: ros2 launch pyrobosim_ros demo_commands_multirobot.launch.py
##################################
# Task and Motion Planning demos #
##################################
demo_pddl:
extends: base
command: python3 src/pyrobosim/examples/demo_pddl.py --example 01_simple --verbose
demo_pddl_ros:
extends: base
command: ros2 launch pyrobosim_ros demo_pddl.launch.py example:=01_simple subscribe:=true verbose:=true