Microduck Obstacle Avoidance Sim2Real Workflow
An overview of the Hugging Face blog post detailing a Sim2Real workflow for training obstacle-avoidance navigation on a robot using NVIDIA Isaac Lab.
According to the Hugging Face blog post, developers can implement a simulation-to-reality workflow for robot navigation by separating the control architecture. The workflow keeps a base walking policy's weights fixed while training a separate obstacle-avoidance navigation controller.
Control Architecture Separation
The navigation policy takes time-of-flight (ToF) sensor data and gamepad inputs, adjusting velocity commands at 50 Hz before passing them to the frozen walking policy.
- Why it matters: Developers can add perception-driven behaviors like obstacle steering without retraining or destabilizing foundational balance and walking mechanics.
- Limitations: The separation relies on the upstream walking policy executing modified velocity commands accurately. If the base policy fails to handle specific adjusted commands, avoidance performance will degrade.
Sensor Simulation and Parallel Training
The simulation uses NVIDIA Isaac Lab and the Newton physics engine to model an 8x8 grid ToF sensor operating at 15 Hz. The blog post states that policies are trained using PPO across 16,384 parallel environments for 1,500 training iterations, or 4,096 parallel environments for 3,000 iterations over roughly 6 hours on an NVIDIA DGX Spark.
- Why it matters: Massively parallel simulation reduces training time, allowing developers to iterate on navigation policies across thousands of diverse obstacle layouts simultaneously.
- Limitations: Running 16,384 parallel environments requires a compatible high-end NVIDIA GPU with sufficient VRAM. Developers with constrained hardware must lower the environment count, which requires more training iterations and time.
Policy Export and Deployment
After training, policy playback saves models into TorchScript and ONNX formats. Deployment on a physical robot involves running a deployment script (nav_pad.py) on a laptop connected via SSH, which streams sensor data and feeds the exported ONNX navigation model while sending adjusted gamepad commands to the physical robot.
- Why it matters: It provides a concrete bridge from simulation to hardware, allowing heavy inference computations to run on a host computer while the robot executes velocity adjustments.
- Limitations: The deployment pipeline requires strict maintenance of file dependencies, specifically keeping the navigation ONNX file alongside its companion
.datafile during transfer.