Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xXThanatosXx/MobileRobot/llms.txt

Use this file to discover all available pages before exploring further.

The Docker installation path lets you run ROS2 Humble on Windows, macOS, or any Linux distribution without modifying your host operating system. Everything runs inside an isolated container, making it straightforward to start fresh, share environments with teammates, or run multiple ROS2 versions side-by-side. GUI tools such as RViz2 and Gazebo are supported on Windows via X11 forwarding using Xming/Xlaunch.

Prerequisites

Docker Desktop

Install Docker Desktop for your platform (Windows, macOS, or Linux). Ensure the Docker daemon is running before executing any docker commands.

Xlaunch / Xming

Required on Windows for GUI display forwarding. Install Xming and launch Xlaunch before starting the container to enable tools like RViz2 to render their windows on your desktop.

Container Setup

The fastest way to get started is to pull the pre-built ROS2 Humble image published to Docker Hub. Open a terminal (CMD, PowerShell, or bash) and run the following commands.Pull the image:
docker pull xxthanatosxx/ros2-humble:1.0.0
Verify the image was downloaded:
docker images
You should see xxthanatosxx/ros2-humble listed with tag 1.0.0 in the output.Create and start an interactive container:
docker run -it --name ros2-humble-container xxthanatosxx/ros2-humble:1.0.0 /bin/bash
This drops you directly into a bash shell inside the container. The --name flag assigns a memorable name so you can manage the container easily.Start the container again after stopping it:
docker start ros2-humble-container
Stop the running container:
docker stop ros2-humble-container

ROS2 Configuration Inside the Container

Once you have a running container (from either tab above), complete the following steps to configure the ROS2 environment and verify the GUI stack.
1

Source the ROS2 setup file

In the container’s bash shell, source the ROS2 environment for the current session:
source /opt/ros/humble/setup.bash
2

Persist the source line in .bashrc

Open .bashrc with nano so the environment is loaded automatically in every new shell:
nano .bashrc
Add the following line at the end of the file, then save with Ctrl + O and exit with Ctrl + X:
source /opt/ros/humble/setup.bash
3

Reload the shell configuration

source ~/.bashrc
4

Install RViz2

sudo apt-get install ros-humble-rviz2
5

Reload .bashrc again

After installing new packages it is good practice to reload the environment:
source ~/.bashrc
6

Launch RViz2

With Xlaunch running on your host, launch RViz2 to confirm that GUI forwarding is working correctly:
rviz2
The RViz2 window should appear on your host desktop, rendered through Xming. If the window does not appear, ensure Xlaunch is running and that the DISPLAY variable inside the container is set to host.docker.internal:0.

File Transfer Between Host and Container

You can copy files and folders in both directions between your Windows host and the running container using docker cp. Copy from host to container:
docker cp "C:\Users\UNIMAR\Documents\Docker\shared_folder" ros2-humble:/home/user/test
Copy from container to host:
docker cp ros2-humble:/ruta/dentro/del/contenedor "C:\Users\UNIMAR\Documents\Docker\local_folder"
The docker cp command works regardless of whether the container is running or stopped, making it a reliable way to extract build artifacts or log files after a session ends.

Build docs developers (and LLMs) love