Docker

If your operating system doesn't support ROS 2, Docker is a great alternative. You can use pre-built images from DockerHub or create your own custom images.

Building the Docker Image

To build the YASMIN Docker image from source, navigate to the YASMIN project directory and run the following command. This process will download the base ROS 2 image, install all YASMIN dependencies, and compile the packages. The build typically takes 5-10 minutes depending on your system:

docker build -t yasmin .

Alternatively, you can use the Makefile shortcut for a more convenient build process:

make docker_build

Note: The Dockerfile uses multi-stage builds to optimize the final image size. Ensure you have at least 10GB of free disk space for the build process.

Running the Docker Container

After building the image, start a Docker container with full GUI support and network access. The command below configures X11 forwarding for graphical applications like the YASMIN Viewer and Editor, enables host networking for ROS 2 communication, and provides necessary permissions:

docker run -it --net=host --ipc=host --privileged \
  --env="DISPLAY" \
  --env="QT_X11_NO_MITSHM=1" \
  --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
  --volume="${XAUTHORITY}:/root/.Xauthority" \
  --entrypoint /bin/bash yasmin

Or use the Makefile shortcut for a simpler command:

make docker_run

What the flags do:

Available Docker Images

Pre-built images are available for multiple ROS 2 distributions on DockerHub. These images include all YASMIN packages pre-compiled and ready to use, saving you build time:

Using Pre-built Images

Skip the build process entirely by using pre-built images. Simply pull the image for your desired ROS 2 distribution and run it. This is the fastest way to get started with YASMIN:

docker pull mgons/yasmin:humble
docker run -it --net=host mgons/yasmin:humble

Tip: Replace humble with any supported ROS 2 distribution tag (foxy, galactic, iron, jazzy, kilted, or rolling) to use a different version.

Notes