forked from PickNikRobotics/moveit_pro_empty_ws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from PickNikRobotics/revert-34-merge-compose
Revert "Remove `docker-compose.yaml`"
- Loading branch information
Showing
1 changed file
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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: |