Disclaimer: This is not an official ROS2 distribution. This project provides convenient automation to install ROS2 using the official repositories. The owner of this project, platform, or service shall not be held liable for any loss, damage, or corruption of data, whether caused by system failures, user errors, or any other unforeseen circumstances. By using this service, you acknowledge and agree that you are solely responsible for backing up and protecting your data. No warranties are provided regarding the security, accuracy, or completeness of any data stored or processed through the service.
- 🐣 Beginners who want a guided ROS2 setup without memorizing commands
- 💼 Experienced developers needing a quick, repeatable installation
- 🦥 Anyone who doesn’t feel like copy-pasting commands from the ROS2 docs every time
Sl.No | Option | Status |
---|---|---|
1 | Python Package (pip) | Stable ✅ |
2 | Bash Script | Stable |
Tip: Read the source code or ask ChatGPT what the script does before running any installer.
PyPI Project Page: https://pypi.org/project/ros2-installer/
Install:
pip install ros2-installer
Run the installer :
ros2-installer
You will be prompted to select:
- Your desired ROS2 distro (
humble
,iron
, etc.) - Workspace name and location
- Whether to auto-source the environment
If you want to run everything non-interactively (e.g., in CI pipelines or Docker), you can pass all required arguments:
ros2-installer \
--distro humble \
--workspace ~/ros2_ws \
--yes \
--auto-source
Arguments:
Argument | Description |
---|---|
--distro |
ROS 2 distro to install (humble , iron ) |
--workspace |
Path to create the workspace |
--yes |
Automatically confirm all prompts |
--auto-source |
Automatically append sourcing commands to .bashrc |
Example:
ros2-installer --distro humble --workspace ~/ros2_ws --yes --auto-source
If you prefer a one-liner:
curl -sSL https://raw.githubusercontent.com/mohammedrashithkp/ros2-installer/stable/ros2-installer.sh | bash
This script performs the same installation logic in bash.
You can test the installer in a clean environment using Podman or Docker:
# Clone the repo
git clone https://github.com/mohammedrashithkp/ros2-installer.git
# Go into project root
cd ros2-installer
# If you are using docker
docker build -f test/Dockerfile -t ros2-installer .
docker run -it --rm ros2-installer
# If you are using podman
podman build -f test/Dockerfile -t ros2-installer .
podman run -it --rm ros2-installer
-
Ubuntu Codename Detection: The installer reads
/etc/os-release
to detect your codename (jammy
,noble
, etc.). -
Prompt for ROS2 Distro: You choose which ROS2 release to install.
-
Dependencies: Installs required system packages and ROS2 Desktop.
-
Workspace Creation:
- Prompts you for a workspace name/location.
- Initializes the workspace (
src
,build
,install
folders).
-
Environment Sourcing: Optionally appends
source /path/to/install/setup.bash
to your~/.bashrc
.
After installation, you can:
- Clone ROS2 packages into your
src
folder. - Build with
colcon build
. - Start working immediately.
For creating new packages, follow the official ROS2 tutorial.
If this saves you time, please star the repository! Happy ROS2 hacking!
See LICENSE for details.