Microduck Obstacle Avoidance: A Sim2Real Workflow with Isaac Lab and Newton
TL;DR
An NVIDIA post on the Hugging Face blog describes a Microduck sim2real workflow that adds a separate ToF-driven obstacle-avoidance controller on top of a frozen walking policy, trains it in Isaac Lab with Newton physics and sensor simulation, exports it to ONNX, and deploys it for supervised gamepad navigation on a real Microduck. The workflow matters because it shows a practical modular pattern: keep a validated locomotion controller fixed, train only the perception-to-command layer, and test the resulting module on hardware with an operator in the loop.
What the workflow adds to Microduck
The post adds local obstacle avoidance as a modular layer rather than retraining the robot's walking behavior. Microduck's walking policy can keep the robot balanced, but it does not tell the robot how to steer around an obstacle in its path. The tutorial reuses the walking policy from the first Microduck tutorial and keeps its weights fixed. A separate avoidance controller uses time-of-flight sensing to adjust the velocity command before that command reaches the walking policy.
The operator chooses a direction with a gamepad. The controller modifies the requested forward, lateral, and yaw motion around obstacles. The walking policy then converts the adjusted command into joint actions. This separation is the central design choice: obstacle avoidance is learned without changing the frozen walking policy.
Architecture: a frozen walking policy plus a 50 Hz navigation controller
The obstacle-avoidance task is named IsaacContrib-ObstacleAvoidance-Flat-MicroDuck. It separates obstacle avoidance from balance. A navigation policy uses ToF sensing to adjust forward, lateral, and yaw commands at 50 Hz. The frozen walking policy converts those commands into joint actions.
During training, the navigation policy's actor receives ToF history and body and controller state that are available on the real robot. The critic has access to additional simulation state to guide learning, but that additional state is not needed for deployment. This actor-critic arrangement keeps the deployed input set aligned with what the real robot can provide.
The obstacle-avoidance task lives in isaaclab_tasks.contrib.microduck_obstacle. Its configuration is in obstacle_avoidance_env_cfg.py, ToF sensing is in sensors.py, and actions, commands, observations, and rewards are organized under mdp. The work uses the exp/microduck branch of the Isaac Lab repository.
Simulated ToF sensing and domain randomization
The simulated sensor is MicroDuckToFCamera, which extends Newton's LegacyMultiMeshRayCasterCamera to model the VL53L5CX. The VL53L5CX is a compact time-of-flight sensor on Microduck that measures distance across an 8x8 grid at 15 Hz. The simulated sensor has a 45-degree field of view and a 0.12-4 m range. It follows the duck's head, with placement similar to the sensor on the real duck.
Real recordings informed the sensor placement and floor readings in simulation. Training adds noise, delays, and missing measurements, including near the grid's edges, to expose the policy to imperfect data. Selected sensor settings randomize mount pitch between -10 and 10 degrees, mount height between -0.02 and 0.02 m, floor validity midpoint offset between 0 and 0.13 m, and near-floor edge impairment probability of 0.5.
This sensor model matters because the navigation policy depends on depth measurements, not on a clean geometric map. The randomization is intended to make the learned controller tolerate mounting variation, noisy readings, delayed readings, and gaps at the edges of the 8x8 grid.
Obstacle-course generation with SimReady assets
The simulation environment combines simple primitives with OpenUSD assets available through SimReady Central on Hugging Face. The post uses a cardboard box, an office bin, and a bedside cabinet alongside cones. The asset packages are downloaded at a pinned revision into assets/simready.
At each episode reset, the environment code samples a layout, shuffles the props, and varies their placement and rotation. Most courses scatter obstacles ahead of the duck, with a smaller mix of clear paths, barriers, and passages. The code also mirrors layouts and mixes aligned and staggered rows. Goals start ahead of the duck, and movement commands guide the robot toward the goal while the policy adjusts those commands around obstacles.
Rewards and PPO training
The navigation policy is trained with PPO across 16,384 parallel environments for 1,500 training iterations. Its actor, critic, normalizers, and optimizer start fresh. The task configuration loads the fixed walking checkpoint, the robot model, and the obstacle assets.
The 16,384 environments are configurable, not a minimum requirement. Lowering the number of environments fits the workflow to available GPU memory. With fewer environments collecting experience in parallel, reaching comparable policy performance may require more training iterations and longer training time. The post also reports training the policy on NVIDIA DGX Spark in approximately 6 hours using 4,096 parallel environments for 3,000 PPO updates, demonstrating a smaller-scale configuration for the same workflow.
Rewards encourage progress toward the goal, safe arrivals, and movement around obstacles. Following a movement command earns credit only when the robot makes progress with sufficient clearance; risky approaches reduce that credit. Penalties discourage fast approaches, abrupt command changes, collisions, and falls.
Playback, evaluation, and ONNX export
Playback uses the same props, primitives, frozen walker, and sensor randomization as training, with a different seed for new obstacle arrangements. Navigation checkpoints are saved under logs/rsl_rl/microduck_obstacle_avoidance_tof_flat_backlash/
Playback saves TorchScript and ONNX models in the checkpoint's exported folder. The ONNX data file must be kept alongside the model. The post's cone-course evaluation figure overlays the head-mounted ToF sensor, the 8x8 depth grid, and requested versus policy-steered motion.
Real-robot deployment and supervised gamepad control
The deployment tools run the navigation model on a laptop and send adjusted gamepad commands to the walking policy on the robot. The same walking policy used during navigation training must be used on the robot. The walking policy is loaded using Pollen's policy-loading guide, and the deployment README includes transfer steps, including how to package an ONNX export that uses an external data file.
A dry-run mode copies the helpers and streams sensor data but sends no movement commands. The operator watches the proposed commands as obstacles enter the sensor's view. After those checks pass, supervised gamepad navigation starts. Holding the stick forward requests movement, and the policy adjusts the command to avoid obstacles. Releasing the stick stops the robot, pressing X toggles navigation, and Ctrl-C ends the session.
Forward speed is capped at 0.15 m/s by default, with an additional close-obstacle brake and stale-input stopping. The post recommends starting in a clear area and verifying stopping before testing a course.
Why the sim2real pattern matters
The workflow is useful because it isolates the perception-to-command layer from locomotion. The walking policy remains a fixed, validated component, while the navigation controller learns to adjust velocity commands using simulated ToF sensing and randomized obstacle layouts. Because the deployed actor uses inputs available on the real robot, the export path from Isaac Lab to ONNX to laptop-based inference stays aligned with the training interface.
The setup is supervised rather than fully autonomous. The operator requests direction with a gamepad, and the policy modifies that request around obstacles. The deployment includes conservative measures such as a default speed cap, a close-obstacle brake, and stale-input stopping. The post presents the workflow as a tutorial and does not report a benchmark score or a safety certification.
Other Microduck locomotion tasks
The Microduck task collection in Isaac Lab includes velocity tracking on flat and rough terrain; stand-up recovery, sit-stand transitions, and walking with fall recovery under VelStand; ball kicking, ground picking, and forward rolls under Roulade. Roller-skating tasks add velocity tracking and swizzle motion, crouch-gliding, slope descent, standing up on skates, and spins. The post shows fifteen Microduck task views spanning walking, recovery, object interaction, and roller-skating motions.
The recommended path is to start with the first Microduck tutorial, then choose a task from the collection and change commands, rewards, or environments to build a new policy. The post advises evaluating a policy on scenes outside the training set before testing it on the robot.