forked from sea-bass/pyrobosim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
73 lines (69 loc) · 2.06 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
# 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_DISTRO:-humble}
build:
context: .
dockerfile: docker/Dockerfile
args:
ROS_DISTRO: ${ROS_DISTRO:-humble}
# 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
- ./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/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: /bin/bash
test:
extends: base
command: 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