-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
106 lines (97 loc) · 3.39 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Docker Compose file for user overlays of the MoveIt Pro images.
services:
# Sets common properties for other services. Should not be instantiated directly.
base:
# Extend the installed MoveIt Pro docker compose file.
# Change this to match your environment, if MoveIt Pro was installed to a different location.
extends:
file: /opt/moveit_pro/docker-compose.yaml
service: base
image: moveit-pro-overlay
build:
context: .
target: user-overlay
args:
- USER_UID=${STUDIO_USER_UID:-1000}
- USER_GID=${STUDIO_USER_GID:-1000}
- USERNAME=${STUDIO_USERNAME:-studio-user}
- MOVEIT_STUDIO_BASE_IMAGE=picknikciuser/moveit-studio:${STUDIO_DOCKER_TAG:-main}
# Starts the MoveIt Pro Agent and the Bridge between the Agent and the Web UI
agent_bridge:
extends: base
privileged: true
# This service relies on cgroup_rules defined in base which allow the user to use the host's network video4linux and usb_device devices.
depends_on:
rest_api:
condition: service_healthy
volumes:
# Allow the user to run graphical programs from within the docker container.
- /tmp/.X11-unix:/tmp/.X11-unix:ro
# Allow access to host hardware e.g. RealSense cameras
- /dev:/dev
deploy:
restart_policy:
condition: any
delay: 2s
command: agent_bridge.app
# Starts the REST API for the Web UI.
rest_api:
extends: base
healthcheck:
test: "curl -f http://localhost:3200/objectives"
interval: 5s
timeout: 1m
command: rest_api.app
# Starts the robot drivers.
drivers:
extends: base
privileged: true
# Ensures the drivers container has RT priority
ulimits:
rtprio: 99
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0" # Allow access to the gripper.
command: robot.app
# Starts the web UI frontend.
web_ui:
image: picknikciuser/moveit-studio-frontend:${STUDIO_DOCKER_TAG:-main}
ports:
- "80:80"
network_mode: host
# Starts RViz for visualization.
rviz:
extends: base
profiles:
- rviz
command: bash -c "ros2 launch moveit_studio_agent developer_rviz.launch.py"
# Starts MoveIt Setup Assistant for creating MoveIt configurations.
setup_assistant:
extends: base
profiles:
- setup_assistant
command: bash -c "ros2 launch moveit_setup_assistant setup_assistant.launch.py"
# Developer specific configuration
dev:
extends: base
build:
target: user-overlay-dev
image: moveit-studio-overlay-dev
stdin_open: true
tty: true
privileged: true
volumes:
# Mount the source code, colcon generated artifacts, and ccache
- ./src/:/home/${STUDIO_USERNAME:-studio-user}/user_ws/src:rw
- ./build/:/home/${STUDIO_USERNAME:-studio-user}/user_ws/build:rw
- ./install/:/home/${STUDIO_USERNAME:-studio-user}/user_ws/install:rw
- ./log/:/home/${STUDIO_USERNAME:-studio-user}/user_ws/log:rw
- ./.ccache/:/home/${STUDIO_USERNAME:-studio-user}/.ccache:rw
- ${HOME}/.ros/log_moveit_pro:/home/${STUDIO_USERNAME:-studio-user}/.ros/log
# Allow access to host hardware e.g. RealSense cameras
- /dev:/dev
command: sleep infinity
# Making a separate profile prevents this service from being built when using `docker compose build`
# and launched when using `docker compose up`.
profiles: ["dev"]
volumes:
ignition_resources: