Docker Installation#
This page walks you through running the simulation inside a Docker container. This approach isolates Gazebo Harmonic from any Gazebo Classic installation on your host machine.
The pre-built Docker image includes:
ROS 2 Jazzy desktop installation
Gazebo Harmonic simulator
Husarion ROSbot simulation packages (robot model with LiDAR, camera, and IMU sensors)
Throughout this guide, two terms are used to distinguish between your machine and the Docker container:
Host – your physical Ubuntu machine (where Docker is installed and where you run
dockercommands).Container (or remote) – the isolated Docker environment where ROS 2, Gazebo, and the simulation packages run. When VS Code is attached to the container, it refers to it as a remote environment.
Step 1: Install Docker Engine#
Step 2: Pull the Docker Image#
Step 3: Create and Start the Container#
Step 4: Verify the Setup#
Once inside the container, verify that everything works by launching a quick test simulation.
Working Inside the Container#
When you are inside the container, your home directory is
/home/zeid/. The main workspace is:
|
Your workspace (mounted from the host at
|
|
The ROSbot simulation packages (robot model, Gazebo worlds, launch files). Do not modify these packages. |
|
Create your own ROS 2 packages here alongside
|
Container Lifecycle#
Connecting with VS Code#
VS Code can attach directly to the running container, giving you a full editor with IntelliSense, integrated terminal, and file browsing – all running inside the Docker environment.
The following diagram shows the complete pipeline:
Launching the Simulation#
Once your environment is set up (and verified with the quick test in Step 4), launch the full simulation using the shared instructions on the Launching the Simulation page.