Overview
This guide will walk you through installing Docker, VS Code, and setting up the TurtleBot3 ROS2 Jazzy Dev Container on your system.Installation typically takes 30-45 minutes including download time. The container build itself takes 10-15 minutes on first run.
Step 1: Install Docker
Docker provides the containerization platform for the development environment.Windows/macOS installation details
Download Docker Desktop
Visit docker.com/products/docker-desktop and download the installer for your platform
Start Docker Desktop
Launch Docker Desktop from your applications menu and wait for it to fully start
Linux post-installation
After installing Docker on Linux, you must add your user to thedocker group to run containers without sudo:
For other Linux distributions, see the official Docker installation guide.
Step 2: Install VS Code
Visual Studio Code is the recommended editor for working with dev containers.Download VS Code
Visit code.visualstudio.com and download the installer for your platform
Step 3: Install Dev Containers extension
The Dev Containers extension enables VS Code to work with Docker containers.Open Extensions view
In VS Code, click the Extensions icon in the sidebar or press
Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS)Step 4: Get the project
You can either clone the repository with Git or download it as a ZIP file.Choose a location with sufficient disk space (at least 20 GB free, 50 GB recommended).
Step 5: Open in VS Code
Open the project folder in VS Code:- Click File → Open Folder
- Navigate to the
turtlebot3_jazzy_devcontainerfolder - Click Select Folder
Step 6: Build and start the container
Reopen in Container
VS Code will detect the dev container configuration and show a notification. Click “Reopen in Container”If you don’t see the notification, press
F1 and select “Dev Containers: Reopen in Container”Wait for build
The container build process will start. This takes 10-15 minutes on first run:
- Downloads Ubuntu 24.04 base image (~1 GB)
- Installs ROS2 Jazzy packages (~2 GB)
- Installs Gazebo Harmonic (~500 MB)
- Clones TurtleBot3 repositories
- Builds ROS2 workspace with colcon
Build process details
The container build performs these steps automatically: Dockerfile build:- Pulls
osrf/ros:jazzy-desktop-full-noblebase image - Installs Gazebo Harmonic from OSRF repositories
- Installs Navigation2 and Cartographer packages
- Installs development tools (colcon, vcstool, etc.)
- Configures OpenGL/Mesa for graphics support
- Sources ROS2 Jazzy environment
- Configures
.bashrcwith ROS2 setup and aliases - Clones TurtleBot3 repositories:
DynamixelSDK(motor control)turtlebot3_msgs(message definitions)turtlebot3(core packages)turtlebot3_simulations(Gazebo packages)
- Initializes and updates rosdep
- Installs package dependencies
- Builds the workspace with
colcon build --symlink-install - Verifies build success
- Displays quick start instructions
Step 7: Verify the setup
After the container starts, verify everything is working correctly:- ROS2 Jazzy installed
- Gazebo Harmonic installed
- Python 3 available
- colcon build tool
- TurtleBot3 packages
- Navigation2 packages
- Cartographer packages
- Environment variables configured
- Directory structure created
- Workspace built successfully
If any checks fail, review the error messages and refer to the troubleshooting section. Most issues are resolved by rebuilding the container.
Configuration options
Adjust Docker resources
If the container runs slowly, allocate more resources in Docker Desktop:Increase allocations
Adjust these settings:
- CPUs: 4-6 cores recommended
- Memory: 8-16 GB recommended
- Disk: 50 GB recommended
On Linux, Docker uses system resources directly without limits. No configuration needed.
Change robot model
To use a different TurtleBot3 model, edit.devcontainer/devcontainer.json:
- Press
F1in VS Code - Select “Dev Containers: Rebuild Container”
- Wait for the rebuild to complete
Change VNC port
If port 6080 is already in use, edit.devcontainer/devcontainer.json:
http://localhost:6081
Troubleshooting installation
Build fails with network errors
Solution:Build fails with disk space errors
Solution:Container starts but packages missing
Solution:Port forwarding not working
Solution:- In VS Code, open the Ports tab (View → Ports)
- Verify port 6080 is listed and forwarded
- Click the port number to open in browser
- If needed, manually forward: Click “Forward a Port” and enter 6080