|
1 | | -# Docker Compose file for user overlays of the MoveIt Pro images. |
| 1 | +# Docker Compose file that will be merged with /opt/moveit_pro/docker-compose.yaml. |
| 2 | +# For more details on how merging works, see https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/#merging-rules. |
2 | 3 |
|
| 4 | +# Services that are listed under `/opt/moveit_pro/docker-compose.yaml` are mirrored here for merging. |
| 5 | +# Feel free to remove services here that are unmodified. |
3 | 6 | services: |
4 | | - # Sets common properties for other services. Should not be instantiated directly. |
| 7 | + # The base image that all MoveIt Pro services extend off of. Builds the user workspace. |
5 | 8 | base: |
6 | | - # Extend the installed MoveIt Pro docker compose file. |
7 | | - # Change this to match your environment, if MoveIt Pro was installed to a different location. |
8 | | - extends: |
9 | | - file: /opt/moveit_pro/docker-compose.yaml |
10 | | - service: base |
11 | | - image: moveit-pro-overlay |
12 | 9 | build: |
13 | | - context: . |
14 | | - target: user-overlay |
| 10 | + # List any arguments for building the user workspace here. |
15 | 11 | args: |
16 | | - - USER_UID=${STUDIO_USER_UID:-1000} |
17 | | - - USER_GID=${STUDIO_USER_GID:-1000} |
18 | | - - USERNAME=${STUDIO_USERNAME:-studio-user} |
19 | | - - MOVEIT_STUDIO_BASE_IMAGE=picknikciuser/moveit-studio:${STUDIO_DOCKER_TAG:-main} |
20 | | - |
21 | | - # Starts the MoveIt Pro Agent and the Bridge between the Agent and the Web UI |
| 12 | + # IMPORTANT: Optionally install Nvidia drivers for improved simulator performance with Nvidia GPUs. |
| 13 | + # To do this you must |
| 14 | + # 1. Uncomment the BASE and NVIDIA_DRIVER_PACKAGE build args below |
| 15 | + # 2. Replace the 'nvidia-driver-555' apt package with the Nvidia driver version on your host, e.g. nvidia-driver-535, nvidia-driver-555. Use nvidia-smi on your host to determine the driver version. |
| 16 | + # After rebuilding via `moveit_pro build` verify the drivers are active in your container by running `nvidia_smi` inside of `moveit_pro shell`. |
| 17 | + - BASE=nvidia |
| 18 | + - NVIDIA_DRIVER_PACKAGE=nvidia-driver-555 |
| 19 | + |
| 20 | + # Starts the MoveIt Pro Agent and the Bridge between the Agent and the Web UI. |
22 | 21 | agent_bridge: |
23 | | - extends: base |
24 | | - privileged: true |
25 | | - # This service relies on cgroup_rules defined in base which allow the user to use the host's network video4linux and usb_device devices. |
26 | | - depends_on: |
27 | | - rest_api: |
28 | | - condition: service_healthy |
29 | | - volumes: |
30 | | - # Allow the user to run graphical programs from within the docker container. |
31 | | - - /tmp/.X11-unix:/tmp/.X11-unix:ro |
32 | | - # Allow access to host hardware e.g. RealSense cameras |
33 | | - - /dev:/dev |
34 | | - deploy: |
35 | | - restart_policy: |
36 | | - condition: any |
37 | | - delay: 2s |
38 | | - command: agent_bridge.app |
39 | | - |
40 | | - # Starts the REST API for the Web UI. |
41 | | - rest_api: |
42 | | - extends: base |
43 | | - healthcheck: |
44 | | - test: "curl -f http://localhost:3200/objectives" |
45 | | - interval: 5s |
46 | | - timeout: 1m |
47 | | - command: rest_api.app |
48 | 22 |
|
49 | 23 | # Starts the robot drivers. |
50 | 24 | drivers: |
51 | | - extends: base |
52 | | - privileged: true |
53 | | - # Ensures the drivers container has RT priority |
54 | | - ulimits: |
55 | | - rtprio: 99 |
56 | | - devices: |
57 | | - - "/dev/ttyUSB0:/dev/ttyUSB0" # Allow access to the gripper. |
58 | | - command: robot.app |
59 | 25 |
|
60 | 26 | # Starts the web UI frontend. |
61 | 27 | web_ui: |
62 | | - image: picknikciuser/moveit-studio-frontend:${STUDIO_DOCKER_TAG:-main} |
63 | | - ports: |
64 | | - - "80:80" |
65 | | - network_mode: host |
66 | | - |
67 | | - # Starts RViz for visualization. |
68 | | - rviz: |
69 | | - extends: base |
70 | | - profiles: |
71 | | - - rviz |
72 | | - command: bash -c "ros2 launch moveit_studio_agent developer_rviz.launch.py" |
73 | 28 |
|
74 | | - # Starts MoveIt Setup Assistant for creating MoveIt configurations. |
75 | | - setup_assistant: |
76 | | - extends: base |
77 | | - profiles: |
78 | | - - setup_assistant |
79 | | - command: bash -c "ros2 launch moveit_setup_assistant setup_assistant.launch.py" |
80 | | - |
81 | | - # Developer specific configuration |
| 29 | + # Developer specific configuration when running `moveit_pro dev`. |
82 | 30 | dev: |
83 | | - extends: base |
84 | | - build: |
85 | | - target: user-overlay-dev |
86 | | - image: moveit-studio-overlay-dev |
87 | | - stdin_open: true |
88 | | - tty: true |
89 | | - privileged: true |
90 | | - volumes: |
91 | | - # Mount the source code, colcon generated artifacts, and ccache |
92 | | - - ./src/:/home/${STUDIO_USERNAME:-studio-user}/user_ws/src:rw |
93 | | - - ./build/:/home/${STUDIO_USERNAME:-studio-user}/user_ws/build:rw |
94 | | - - ./install/:/home/${STUDIO_USERNAME:-studio-user}/user_ws/install:rw |
95 | | - - ./log/:/home/${STUDIO_USERNAME:-studio-user}/user_ws/log:rw |
96 | | - - ./.ccache/:/home/${STUDIO_USERNAME:-studio-user}/.ccache:rw |
97 | | - - ${HOME}/.ros/log_moveit_pro:/home/${STUDIO_USERNAME:-studio-user}/.ros/log |
98 | | - # Allow access to host hardware e.g. RealSense cameras |
99 | | - - /dev:/dev |
100 | | - command: sleep infinity |
101 | | - # Making a separate profile prevents this service from being built when using `docker compose build` |
102 | | - # and launched when using `docker compose up`. |
103 | | - profiles: ["dev"] |
104 | | - |
105 | | -volumes: |
106 | | - ignition_resources: |
0 commit comments