Use MoveIt Pro without the CLI
If the moveit_pro
CLI verb is inaccessible for your use case, such as in a CI/CD Pipeline, docker compose
can be used to run all the services associated with the MoveIt Pro Runtime, including the UI.
You will need your workspace docker-compose.yaml
to extend the services found in the docker-compose.yaml
installed by MoveIt Pro (default location:/opt/moveit_pro
)
The docker-compose.yaml
We recommend following the below template when extending docker-compose.yaml
.
# Docker Compose file that will be merged with /opt/moveit_pro/docker-compose.yaml.
# For more details on how merging works, see https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/#merging-rules.
# Services that are listed under `/opt/moveit_pro/docker-compose.yaml` are mirrored here for merging.
# Feel free to remove services here that are unmodified.
services:
# The base image that all MoveIt Pro services extend off of. Builds the user workspace.
base:
build:
# List any arguments for building the user workspace here.
args:
# Starts the MoveIt Pro Agent and the Bridge between the Agent and the Web UI.
agent_bridge:
# Starts the robot drivers.
drivers:
# Starts the web UI frontend.
web_ui:
# Developer specific configuration when running `moveit_pro dev`.
dev:
With the correct environment, docker compose build
will build packages in your workspace that launch MoveIt Pro.
Creating an envfile
Run moveit_pro configure
and moveit_pro envfile
to generate a .env
file that has the same required parameters for a build
environment that Docker will use.
You can alternatively write all the necessary environment variables yourself into the .env
file for more advanced users.
Running with Docker commands
Upon crafting your build arguments and specifications in your docker-compose.yaml
, you can use the following to build and run the Docker services:
Relative paths are used for your docker-compose.yaml
in the following commands, so they must be executed from the same location.
docker compose -f /opt/moveit_pro/docker-compose.yaml -f ./docker-compose.yaml build
docker compose -f /opt/moveit_pro/docker-compose.yaml -f ./docker-compose.yaml run --rm base
Inside the container (~/user_ws
), make sure to build your workspace:
colcon build
From the host, launch the agent_bridge
and drivers
services to start the MoveIt Pro runtime:
docker compose -f /opt/moveit_pro/docker-compose.yaml -f ./docker-compose.yaml up --build agent_bridge drivers
You can alternatively launch the dev
service if you want to run the container without launching the MoveIt Pro runtime:
docker compose -f /opt/moveit_pro/docker-compose.yaml -f ./docker-compose.yaml up --build dev
Launching the Web UI
You can launch the web_ui
in a separate container after following the above instructions by calling:
docker compose -f /opt/moveit_pro/docker-compose.yaml -f ./docker-compose.yaml up --build web_ui
From here, go to localhost
in your browser of choice, and you can access the MoveIt Pro UI.
To simply these commands, we recommend the following alias:
alias moveit-pro-compose="docker compose -f /opt/moveit_pro/docker-compose.yaml -f ./docker-compose.yaml"
Alternative Setup
One other option is to copy the system compose configuration found at /opt/moveit_pro/docker-compose.yaml
into your workspace and work with a single file. Creating an envfile is still necessary with this setup.
This will simplify the docker commands above as you will no longer need to specify -f /opt/moveit_pro/docker-compose.yaml -f ./docker-compose.yaml
with each command, but you must manually replicate any changes to the system docker-compose.yaml
in future releases.
Please contact [email protected]
if you need assistance with creating and running this docker-compose.yaml
.