Introduction to ROS 2 Development with Docker
Acknowledgment
This guide is a community contribution. Docker would like to thank Shakirth Anisha for her contribution to this guide.
ROS 2 is a set of software libraries and tools for building robot applications. It uses Data Distribution Service (DDS) for real-time, secure communication between distributed nodes, making it ideal for robotics and autonomous systems.
What will you learn?
In this guide, you'll learn how to:
- Use official ROS 2 base images from Docker Hub
- Run ROS 2 in an Ubuntu container
- Install ROS 2 packages and dependencies
- Set up a development container for local development
- Run a complete end-to-end example with Turtlesim
Prerequisites
Before you begin, make sure you're familiar with the following:
- Docker Desktop: You must have Docker Desktop installed and running.
- Docker concepts: You must understand core Docker concepts, such as images and containers.
- ROS 2 concepts: Basic understanding of concepts like nodes, packages, topics, and services.
What's next?
Start by setting up your ROS 2 development environment using Docker and dev containers.
Modules
- Run ROS 2
Run ROS 2 in an isolated Docker container using official ROS 2 images and install additional ROS 2 packages.
- Set Up ROS 2 workspace
Learn how to develop ROS 2 applications using a Docker based workspace and development containers.
- Turtlesim example
Run a complete end-to-end ROS 2 example with Turtlesim.