ROS2X is a Docker-first ROS 2 development toolbox focused on reproducible, robotics-friendly workflows. It provides one entrypoint script for image build, workspace build, launch/run, micro-ROS bootstrap, and built-in app launchers.
|
|
|
|
|
|
./ROS2X bridge |
./ROS2X rviz |
./ROS2X gazebo |
./ROS2X app groot |
./ROS2X app qgc |
- Ubuntu 22.04 base image (
docker/Dockerfile) - Host UID/GID mapping for correct file ownership
- X11 GUI support for RViz and AppImage tools
- Integrated micro-ROS bootstrap flow (
scripts/install_micro_ros.sh) - Built-in app launchers for Foxglove Bridge, RViz2, Gazebo, Groot2 and QGroundControl
- Persistent project config via
config/ros2x.conf
./ROS2X --help
./ROS2X config init
./ROS2X build
./ROS2X enter| Command | Purpose |
|---|---|
./ROS2X build |
Build workspace in container (colcon build --symlink-install) |
./ROS2X run |
Run LAUNCH_COMMAND (auto-build if workspace not ready) |
./ROS2X bridge |
Run Foxglove Bridge |
./ROS2X rviz |
Launch RViz2 |
./ROS2X gazebo |
Launch Gazebo (ros2 launch ros_gz_sim gz_sim.launch.py) |
./ROS2X app groot |
Launch Groot2 AppImage |
./ROS2X app qgroundcontrol |
Launch QGroundControl AppImage |
./ROS2X enter |
Enter running container shell |
./ROS2X --command "<cmd>" |
Execute one command in container |
./ROS2X image-build |
Build/update Docker image only |
./ROS2X close |
Stop container |
./ROS2X config ... |
Show or manage persistent config |
./ROS2X writes docker/.env on every invocation.
Do not edit docker/.env directly.
Recommended ways to configure values:
- One-off command:
ROS_DISTRO=humble ROS_INSTALL_TYPE=desktop ./ROS2X build - Persistent project defaults:
./ROS2X config set <KEY> <VALUE>
Precedence order:
inline env vars > config/ros2x.conf > script defaults
Useful config commands:
./ROS2X config init
./ROS2X config list
./ROS2X config keys
./ROS2X config get ROS_DISTRO
./ROS2X config set INSTALL_MICRO_ROS true
./ROS2X config unset GROOT_SHA256Main keys:
ROS_DISTRO(default:humble)ROS_INSTALL_TYPE(ros-base|desktop|development, default:ros-base)ROS_DOMAIN_ID(default:0)PROJECT_NAME(default:ros2x)INSTALL_MICRO_ROS(default:false)LAUNCH_COMMANDIMAGE_NAME(default:ghcr.io/seanchangx/ros2x:${ROS_DISTRO}-<flavor>)- flavor mapping:
ros-base -> base,desktop -> desktop,development -> dev
- flavor mapping:
IMAGE_STRATEGY(auto|pull|build, default:auto)GROOT_VERSION,GROOT_FALLBACK_VERSIONS,GROOT_APPIMAGE_URL,GROOT_SHA256QGC_VERSION(latestor e.g.5.0.8),QGC_APPIMAGE_URL,QGC_SHA256FOXGLOVE_PORT(default:8765),FOXGLOVE_ADDRESS(default:0.0.0.0)
Run each utility independently with --command:
./ROS2X --command "ros2 launch rosbridge_server rosbridge_websocket_launch.xml"./ROS2X --command "ros2 launch teleop_twist_joy teleop-launch.py joy_config:=xbox joy_vel:=cmd_vel"./ROS2X --command "ros2 run image_tools cam2image --ros-args --log-level WARN -p video_device:=/dev/video0"Enable micro-ROS bootstrap and build:
./ROS2X config set INSTALL_MICRO_ROS true
./ROS2X buildRun agent example:
./ROS2X --command "ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyUSB0 -b 115200 -v6"./ROS2X bridgeCustom bind:
./ROS2X config set FOXGLOVE_ADDRESS 0.0.0.0
./ROS2X config set FOXGLOVE_PORT 8765
./ROS2X bridge./ROS2X rviz./ROS2X gazebo./ROS2X app grootAppImage target path:
apps/groot/groot.AppImage
./ROS2X app qgroundcontrolAppImage target path:
apps/qgroundcontrol/qgroundcontrol.AppImage
ROS2Xresolves config and writes compose env.image-buildbuilds image only.buildruns workspace build inside container.- If
INSTALL_MICRO_ROS=true, bootstrap runs first, then workspace build still runs.
- If
runauto-builds only when workspace is not built, then executesLAUNCH_COMMAND.bridge,rviz,gazebo,app groot, andapp qgroundcontrolkeep the container running after the GUI/process exits. Use./ROS2X closewhen you want to stop it.
- Host OS: Linux (Docker Engine + Docker Compose v2 required)
- CPU arch:
x86_64,aarch64 - ROS distro:
- Script supports configurable distro values.
- Docker image base is Ubuntu 22.04, so Jammy-aligned distros are the primary path.
- macOS and Windows hosts are not first-class targets for this repo's default setup.
Use the same installer script outside Docker on Ubuntu:
chmod +x scripts/install_ros2.sh
./scripts/install_ros2.sh --ros-distro humble --install-type developmentCommon flags:
--non-interactive--configure-bashrc yes|no|ask--skip-upgrade--no-install-recommends--allow-root--force-unsupported
ROS2X
├── ROS2X
├── docker
│ ├── Dockerfile
│ ├── docker-compose.yaml
│ ├── entrypoint.sh
│ └── .bashrc
├── apps
│ ├── gazebo
│ ├── groot
│ └── qgroundcontrol
├── ros2_ws
│ └── src
├── config
│ └── ros2x.conf.example
└── scripts
├── install_ros2.sh
├── install_micro_ros.sh
├── install_groot2.sh
└── install_qgroundcontrol.sh
network_mode: hostandprivileged: trueare enabled for robotics use cases.- If hardware passthrough is not required, tighten container privileges accordingly.
- For multi-robot LAN scenarios, assign distinct
ROS_DOMAIN_IDvalues.