This repository provides a ROS 2–based control interface for Dodo robot sim-to-real deployment.
The goal of this repository is to bridge trained reinforcement learning (RL) policies from simulation (e.g., PPO) to real hardware by providing:
- ROS 2 control pipeline
- Hardware-agnostic CAN interface (mock ↔ real)
- Minimal and reproducible Docker-based development environment
This repository does not focus on simulation or visualization. Instead, it focuses on reliable control, inference, and hardware interfacing for sim2real transfer.
docker build -t dodo_ros_control:humble -f docker/Dockerfile .
./scripts/dodo_run.sh
cd /ros2_ws && colcon build
ros2 run dodo_ros_control inference_nodedodo-ros-control/
├── docker/ # Dockerfiles and container entrypoint
├── scripts/ # Convenience scripts (container run, attach)
├── isaac_sim/ # Isaac Sim launch and controller code
├── mujoco/ # Host-side MuJoCo sim2sim validation (optional)
├── ros2_ws/ # ROS 2 workspace (mounted into container)
│ └── src/
│ └── dodo_ros_control/
│ ├── can/ # CAN interfaces (mock / real)
│ ├── config/ # Runtime configuration (backend selection)
│ ├── dummy_node.py
│ ├── inference_node.py
│ └── interface_node.py
├── models/ # Trained RL policies (not tracked by git)
├── assets/ # Robot-specific assets (URDF, calib, etc.)
├── docker-compose.yml
└── README.md
-
can/
Abstracts hardware communication.
MockCANInterfaceallows testing without hardware, while real CAN backends can be added without changing control logic. -
inference_node
Loads a trained policy and produces joint-level torque commands. -
interface_node
Acts as the boundary between control logic and hardware communication. -
models/
Stores trained RL policies from simulation (e.g., PPO).
This folder is intentionally excluded from version control.
This repository is designed to be used inside a Docker container.
- OS: Linux (Ubuntu recommended), WSL, macOS (GUI / visualization support is limited)
- ROS 2: Humble
- Python: 3.10
- Architecture: amd64 / arm64 (auto-detected)
- ROS base image:
osrf/ros:humble - ROS GUI image:
osrf/ros:humble-desktop-full - Isaac Sim image:
nvcr.io/nvidia/isaac-sim:5.1.0
Build the base (headless) image:
docker build -t dodo_ros_control:humble -f docker/Dockerfile .Build the GUI-enabled image (optional):
docker build -t dodo_ros_control:humble-gui -f docker/Dockerfile.gui .Run or attach to the container:
./scripts/dodo_run.shRun with GUI support (optional):
./scripts/dodo_run.sh --guiscripts/dodo_run.sh [--gui]--gui: usesdocker/Dockerfile.guiimage (dodo_ros_control:humble-gui)
scripts/run_isaac_sim.sh- no CLI options; runs Isaac Sim GUI container
scripts/run_isaac_ros.sh- no CLI options; attaches if container is running, otherwise starts a new one
Inside the container, the ROS 2 workspace is mounted at:
/ros2_ws
Build and source the workspace:
cd /ros2_ws
colcon build
source install/setup.bashList available packages:
ros2 pkg list | grep dodoRun example nodes:
ros2 run dodo_ros_control dummy_node
ros2 run dodo_ros_control inference_node- Nodes
dodo_inference_node(console:ros2 run dodo_ros_control inference_node)dummy_node(console:ros2 run dodo_ros_control dummy_node)
- Topics / services
- None defined yet (mock CAN only; no ROS pub/sub/service calls in code)
- Parameters / options (current hard-coded defaults)
num_joints = 6publish_rate_hz = 50.0- CAN defaults in interface:
channel = can0,bitrate = 1000000
- Nodes
dodo_mujoco_hello(console:ros2 run dodo_mujoco_bridge hello_node)
- Topics / services
- None (placeholder node only)
Start Isaac Sim GUI container:
./scripts/run_isaac_sim.shExample app script (runs in Isaac Sim Python environment):
isaac_sim/launch/run_dodo_rl.py
Key options (current hard-coded defaults):
policy_name = "stand"action_scale = 0.5headless = Falsedodo_usd_pathis hard-coded in the script
ROS topics/services are not used in the Isaac Sim pipeline in this repo.
The intended sim-to-real pipeline is:
- Train a control policy in simulation (e.g., PPO)
- Export the trained policy (weights, config)
- Load the policy inside
inference_node - Convert policy output to joint torque commands
- Send torques via CAN interface to real hardware
This repository covers steps 3–5.
Place trained RL policies in:
models/
Example:
- Neural network weights
- Normalization statistics
- Policy configuration files
Place robot-specific files in:
assets/
Example:
- Joint ordering definitions
- Hardware calibration parameters
- Motor limits and scaling
- Robot-specific configuration files
The control pipeline is designed so that policy logic does not depend on hardware details.
Make sure the ROS environment is sourced:
source /opt/ros/humble/setup.bash
source /ros2_ws/install/setup.bashClean and rebuild the workspace:
rm -rf build install log
colcon buildRemove and recreate the container:
docker rm -f dodo_ros_control
./scripts/dodo_run.sh- This repository intentionally avoids simulation and visualization tooling.
- CAN backends are designed to be swappable without modifying control logic.
- Real hardware communication should be implemented inside
can/.
This repository is intended to be a stable sim2real control backbone, not an experiment playground.