Microduck Obstacle Avoidance: A Sim-to-Real Workflow with Isaac Lab and Newton
Microduck Obstacle Avoidance: A Sim to Real Workflow with Isaac Lab and Newton Published November 24, 2026 TL;DR This workflow adds local obstacle avoidance to Microduck while k...
By AI Engineering Team
Microduck Obstacle Avoidance: A Sim-to-Real Workflow with Isaac Lab and Newton
Published November 24, 2026
TL;DR
This workflow adds local obstacle avoidance to Microduck while keeping its walking policy fixed. It uses varied courses built from reusable SimReady assets, models time-of-flight (ToF) sensing with Newton’s raycaster, and trains a controller in Isaac Lab to adjust gamepad velocity commands around obstacles. The process covers simulation training, evaluation, model export, and deployment on a physical robot.
Introduction
A walking policy can keep Microduck balanced, but it does not determine how the robot should steer around an obstacle. This workflow reuses the walking policy from the first Microduck tutorial and keeps its weights fixed. A separate avoidance controller is trained using ToF sensing. An operator selects a direction with a gamepad, and the controller adjusts the velocity command before passing it to the walking policy.
NVIDIA Isaac Lab is an open-source framework for training policies across thousands of GPU-parallel simulations. It provides the robot-learning environment, while Newton simulates physics and the sensor’s depth measurements. The workflow covers the control architecture, randomized obstacle layouts, policy training, evaluation, export, and hardware testing.
1. Set up Microduck obstacle avoidance in Isaac Lab
For simulation and training, prepare:
- A Linux system with a compatible NVIDIA GPU and driver. Platform requirements are listed in the Isaac Lab installation guide.
- Git with Git LFS and the
uvpackage manager.
For physical-robot testing, prepare:
- A configured Microduck with the same backlash walking-policy export used by the navigation task.
- A supported ToF sensor with its configuration recorded.
- A paired gamepad and a level test area containing obstacles.
Quick installation
Install uv if it is not already available. Then clone the exp/microduck branch of the Isaac Lab repository and install its dependencies:
git lfs install
git clone --branch exp/microduck https://github.com/isaac-sim/IsaacLab.git
cd IsaacLab
uv sync --frozen
After setup, list the available Microduck environments and presets:
uv run isaaclab list_envs --keyword MicroDuck --show_presets
Download the walking policy
Download and export the upstream backlash walking checkpoint before training. The obstacle-avoidance task loads the exported walking policy automatically.
uv run isaaclab play \
--task IsaacContrib-Velocity-Rough-MicroDuck \
--rl_library rsl_rl --checkpoint pretrained \
--num_envs 1 --visualizer none \
--video newton_gl --video_length 1 \
presets=backlash
2. Build the obstacle course
The environment combines simple primitives with OpenUSD assets available through SimReady Central on Hugging Face. The example uses a cardboard box, office bin, bedside cabinet, and cones. From the Isaac Lab repository root, download the pinned box, bin, and cabinet packages into assets/simready:
uvx --from huggingface-hub hf download nvidia/simready-assets \
--repo-type dataset \
--revision 9d4556bfe80868c1d27a7a7ba1c2774e63e8cedd \
--include "box_cardboard_a01/*" \
--include "trashCan_office_black_a03/*" \
--include "table_bedside_b01/*" \
--local-dir ./assets/simready
At every episode reset, the environment samples a layout, shuffles the props, and varies their position and rotation. Most courses place obstacles ahead of the robot, with smaller groups containing clear paths, barriers, and passages. Layouts are mirrored, and both aligned and staggered rows are used.
Goals begin ahead of Microduck. Movement commands guide the robot toward a goal while the policy modifies those commands to navigate around obstacles.
3. Understand how ToF sensing guides the walking policy
The IsaacContrib-ObstacleAvoidance-Flat-MicroDuck task 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 the adjusted commands into joint actions, allowing the robot to learn avoidance without retraining its walking behavior.
During training, the navigation actor receives ToF history together with body and controller state available on the real robot. The critic receives additional simulation state to guide learning, but that information is not required during deployment.
Rewards encourage progress toward the goal, safe arrivals, and movement around obstacles. A movement command receives credit when the robot makes progress with sufficient clearance. Risky approaches reduce that credit. Additional penalties discourage fast approaches, abrupt command changes, collisions, and falls.
The obstacle-avoidance task is located in isaaclab_tasks.contrib.microduck_obstacle. Its configuration is defined in obstacle_avoidance_env_cfg.py, ToF sensing is implemented in sensors.py, and actions, commands, observations, and rewards are organized under mdp/.
Model the ToF sensor
MicroDuckToFCamera extends Newton’s LegacyMultiMeshRayCasterCamera to model the VL53L5CX, a compact ToF sensor on Microduck. The sensor measures distance across an 8×8 grid at 15 Hz. The simulated sensor has a 45° field of view and a 0.12 to 4 m range. It follows the robot’s head and is positioned similarly to the sensor on the physical robot.
Real recordings informed the simulated sensor placement and floor readings. Training adds noise, delays, and missing measurements, including missing values near the grid edges, so the policy encounters imperfect data.
The task configuration includes settings similar to these:
head_tof = MicroDuckToFCameraCfg(
prim_path=MICRODUCK_HEAD_BODY_PATH,
update_period=1.0 / 15.0,
pattern_cfg=patterns.PinholeCameraPatternCfg(
focal_length=1.0, width=8, height=8,
horizontal_aperture=_TOF_APERTURE,
vertical_aperture=_TOF_APERTURE,
),
randomization=ToFRandomizationCfg(
mount_pitch_degrees=(-10.0, 10.0),
mount_height_m=(-0.02, 0.02),
floor_validity_midpoint_offset_m=(0.0, 0.13),
near_floor_edge_impairment_probability=0.5,
),
data_types=["distance_to_image_plane", "distance_to_camera"],
max_distance=TOF_MAX_RANGE,
depth_clipping_behavior="zero",
)
4. Train the Microduck policy across parallel environments
The navigation policy is trained with PPO across 16,384 parallel environments for 1,500 iterations. The actor, critic, normalizers, and optimizer start from new states. The task configuration loads the fixed walking checkpoint, robot model, and obstacle assets.
The 16,384-environment configuration is adjustable rather than a minimum requirement. Reduce --num_envs to fit the available GPU memory. With fewer environments collecting experience in parallel, comparable performance may require more iterations and a longer training period.
The same policy was also trained on NVIDIA DGX Spark in approximately 6 hours using 4,096 parallel environments for 3,000 PPO updates. This provides a smaller-scale configuration for the workflow.
Run training with:
uv run isaaclab train \
--task IsaacContrib-ObstacleAvoidance-Flat-MicroDuck \
--rl_library rsl_rl \
--num_envs 16384 \
--max_iterations 1500 \
--seed 42 \
--device cuda:0 \
--visualizer none \
presets=backlash
5. Inspect behavior and export the policy to ONNX
Playback uses the same props, primitives, frozen walking policy, and sensor randomization as training, but uses a different seed to create new obstacle arrangements.
Navigation checkpoints are saved under:
logs/rsl_rl/microduck_obstacle_avoidance_tof_flat_backlash/<timestamp>/
Choose a model_<iteration>.pt file from the training run and replace /absolute/path/to/model.pt in the following command. This runs the policy, opens the Newton viewer, and records 20 seconds of simulation. Use --viz none for headless recording.
uv run --extra video isaaclab play \
--task IsaacContrib-ObstacleAvoidance-Flat-MicroDuck \
--rl_library rsl_rl \
--checkpoint /absolute/path/to/model.pt \
--num_envs 1 \
--seed 6173 \
--device cuda:0 \
--viz newton_gl \
--video newton_gl \
--video_length 1000 \
presets=backlash
Playback saves TorchScript and ONNX models in the checkpoint’s exported folder. The ONNX data file must remain alongside the model.
6. Test obstacle avoidance on a real Microduck
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 physical Microduck.
The earlier setup saves the walking policy’s ONNX export to the following path relative to the Isaac Lab repository root:
.pretrained_checkpoints/rsl_rl/https/omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.2/Isaac/IsaacLab/PretrainedCheckpoints/rsl_rl/exported/policy.onnx
Load that walking policy using Pollen Robotics’ policy-loading procedure. The deployment README describes the transfer steps, including how to package an ONNX export that uses an external data file.
From the Isaac Lab checkout, configure SSH access and check inference while the robot is standing upright and still:
cd scripts/deploy/microduck_tof_nav
ssh-copy-id microduck@ROBOT_HOST
uv run nav_pad.py --robot ROBOT_HOST \
--model /absolute/path/to/navigation/exported/policy.onnx \
--dry-run --seconds 30
Dry-run copies the helper files and streams sensor data without sending movement commands. Observe the proposed commands as obstacles enter the sensor’s view. Keep the navigation ONNX model and any companion .data file together.
After those checks pass, start supervised gamepad navigation:
uv run nav_pad.py --robot ROBOT_HOST \
--model /absolute/path/to/navigation/exported/policy.onnx
Hold the stick forward to request movement. The policy adjusts the command to avoid obstacles. Release the stick to stop, press X to toggle navigation, and use Ctrl-C to end the session.
Forward speed is capped at 0.15 m/s by default. The deployment also includes close-obstacle braking and stopping when input becomes stale. Begin in a clear area and verify that the robot stops before testing an obstacle course.
7. Explore other Microduck locomotion skills in Isaac Lab
The Microduck task collection includes velocity tracking on flat and rough terrain, stand-up recovery, sit-to-stand transitions, and walking with fall recovery through VelStand. Roulade tasks cover ball kicking, ground picking, and forward rolls.
Roller-skating tasks include velocity tracking, swizzle motion, crouch-gliding, slope descent, standing up on skates, and spins.
Build another policy
The workflow can be extended by selecting another task from the Microduck collection and building a policy in Isaac Lab with Newton. New behaviors can be explored by changing commands, rewards, or environments, including rough-terrain walking and perception-driven obstacle avoidance.
Policies should be evaluated on scenes outside the training set before they are tested on a physical robot.
Resources
- Microduck home page
- Train a Microduck in Isaac Lab
- Train Robots to Navigate with AI agents, NVIDIA Isaac Lab and RTX Spark
- Train in Simulation, Deploy on a Real Robot: Microduck with Isaac Lab 3.0
- Isaac Lab installation guide
- Microduck training environments and configuration
- Newton-based BAM actuator documentation
- Microduck Arena and ONNX submission guide
- SimReady Central assets
- Build a Robot Pick-and-Place Simulation with SimReady Assets
- Microduck robot software and deployment guide
Acknowledgments
This workflow builds on Pollen Robotics’ Microduck hardware and software, the original Microduck reinforcement-learning project, BAM actuator modeling work, and the Isaac Lab and Newton integrations.