This repository provides Docker images designed to simplify ROS 2 development. These images come pre-configured with the necessary ROS 2 packages and tools, allowing you to get started with your robotics projects quickly and efficiently.
The following Docker images are available:
humble
: Based onubuntu:jammy
, this image includes ROS 2 Humble Hawksbill packages and a non-root user for enhanced security.humble-garden
: Extends thehumble
image and includes Gazebo Garden, a powerful 3D robotics simulator.iron
: Based onubuntu:jammy
, this image includes ROS 2 Iron Irwini packages and a non-root user.iron-garden
: Extends theiron
image and includes Gazebo Garden.
Important Note: The iron
and iron-garden
images are currently under development and have not been heavily tested. They may be unstable or contain significant bugs.
To download a pre-built image from GitHub Container Registry (ghcr.io), use the following command:
docker pull ghcr.io/soham2560/<image_name>:latest
Replace <image_name>
with the desired image name (e.g., humble
, humble-garden
, iron
, iron-garden
). For example:
docker pull ghcr.io/soham2560/humble-garden:latest
If you prefer to build the image locally from the Dockerfile, clone this repository and navigate to the root directory. Then, use the following command:
docker build -t ghcr.io/soham2560/<image_name> -f <image_name>/Dockerfile <image_name>
Again, replace <image_name>
with the appropriate image name. For example, to build the humble-garden
image:
docker build -t ghcr.io/soham2560/humble-garden -f humble-garden/Dockerfile humble-garden
Explanation of the docker build
command:
docker build
: The command to build a Docker image.-t ghcr.io/soham2560/<image_name>
: Tags the image with the specified name and registry path.-f <image_name>/Dockerfile
: Specifies the path to the Dockerfile to use for building the image.<image_name>
: The build context, which is the directory containing the Dockerfile and any other files needed for the build.
If you have made changes to the Dockerfile and want to contribute by pushing the updated image to the registry, use the following command:
docker push ghcr.io/soham2560/<image_name>:latest
Note: You need to be authenticated with ghcr.io
and have the appropriate permissions to push images to the soham2560
repository.
The following repositories demonstrate how to use these Docker images in real-world ROS 2 projects with Dev Containers. Each repository includes a .devcontainer
folder for easy setup.
-
LiDAR_Camera_Calibration: Demonstrates LiDAR-Camera calibration in ROS 2 using the
humble
image within a Dev Container. -
6DOF_ObjectFollowing: Implements a 6-DOF object following system using ROS 2 and the
humble-garden
image within a Dev Container. -
ros2_tutorial_repo: A basic ROS 2 tutorial repository demonstrating fundamental concepts, configured with the
humble
image within a Dev Container.
Contributions to this project are welcome! If you have improvements or suggestions, please submit a pull request.
This work is inspired by the work of rahulkatiyar19955. Check out his profile for more interesting and cool robotics projects.
Please consider giving appropriate credit when using these images in your work.