ros2em is a CLI tool to create and manage isolated ROS2 environments.
Whether you're a robotics developer, student, or researcher, ros2em makes it easy to:
- 🧠 Spin up clean, persistent ROS 2 environments
- 🐳 Use Docker based containers
- 🖥 Access GUIs like Rviz or Gazebo via browser
- ✅ Support both
amd64andarm64architectures
- ⚡ One-line ROS 2 environment creation and access
- 🖥 Web-based GUI using tiryoh/ros2-desktop-vnc
- 🖥 GUI access using browser
- 🔐 No system pollution – nothing touches your host machine
- 💡 Powered by Typer (CLI) and Rich (colored output)
Before using ros2em, make sure you have Docker installed on your system:
- Install Docker Desktop from https://www.docker.com/products/docker-desktop
- Ensure WSL 2 is installed and configured (Docker Desktop will guide you).
- After install, verify Docker is working
docker version.
- Install Docker Desktop from https://www.docker.com/products/docker-desktop
- After installation, open Docker Desktop once to initialize.
- After install, verify Docker is working
docker version.
sudo apt update
sudo apt install -y docker.io docker-compose
sudo usermod -aG docker $USER
newgrp dockerThen test it docker version.
pipx install ros2empip install ros2emros2em init myenv --distro humbleCreates a .ros2em/myenv/ folder with a default docker-compose.yml, metadata, and port configuration.
You can customize it with advanced options.
| Option | Type | Default | Description |
|---|---|---|---|
--ports |
list[str] | None | Extra port mappings in host:container format (e.g., 9000:9000) |
--context |
str | "default" | Docker context to use (useful for remote or wsl contexts) |
Example:
ros2em init turtlebot4 humble --ports 11311:11311 --context wslros2em up myenvStarts the container if it exists, or creates it if not.
ros2em stop myenvStops the running container but retains it, including all manually installed packages.
ros2em delete myenvStops and removes the container. As well deletes .ros2em/myenv/ folder and all metadata.
ros2em open myenvClick on the link that looks something like this in the output: http://localhost:6080.
We welcome contributions, ideas, and feedback.
- Open issues for bugs and enhancements
- Fork and submit a pull request
- Share your use case via Discussions
Apache 2.0 — © 2025 Kodo Robotics