{"slug": "microduck-obstacle-avoidance-a-sim2real-workflow-with-isaac-lab-and-newton", "title": "Microduck Obstacle Avoidance: A Sim2Real Workflow with Isaac Lab and Newton", "summary": "NVIDIA published a tutorial on Hugging Face detailing a sim-to-real workflow that adds local obstacle avoidance to the Pollen Robotics Microduck quadruped while keeping its existing walking policy weights fixed. The workflow trains a separate avoidance controller in NVIDIA Isaac Lab using time-of-flight (ToF) depth sensing simulated by Newton's raycaster, then adjusts gamepad velocity commands before passing them to the walking policy. The tutorial covers building varied obstacle courses from SimReady OpenUSD assets, training, evaluation, export, and deployment to the physical robot.", "body_md": "[Updated   •  1.75M  •  1.77k](https://huggingface.co/datasets/nvidia/simready-assets)  \n\n# \n\t\tMicroduck Obstacle Avoidance: A Sim2Real Workflow with Isaac Lab and Newton\n\t\n\n [Enterprise + Article](https://huggingface.co/blog)\n\n## \n\t\tTL;DR\n\t\n\nAdd local obstacle avoidance to [Microduck](https://pollen-robotics.com/microduck/) while keeping its walking policy fixed. Build varied courses with reusable [SimReady](https://www.nvidia.com/en-us/glossary/simready/) assets, model ToF sensing with Newton’s raycaster, and train a controller in [Isaac Lab](https://developer.nvidia.com/isaac/lab) to adjust gamepad velocity commands around obstacles. This tutorial covers simulation training, evaluation, export, and real-robot deployment.\n\n## \n\t\tIntroduction\n\t\n\nA walking policy can keep Microduck balanced, but it does not tell the robot how to steer around an obstacle in its path. In this workflow, we reuse the walking policy from our [first Microduck tutorial](https://huggingface.co/blog/nvidia/microduck-isaac-lab-sim-to-real) and keep its weights fixed. This follow-up trains a separate avoidance controller using time-of-flight (ToF) sensing. You choose a direction with a gamepad; the controller adjusts the velocity command before passing it to the walking policy.\n\n[NVIDIA Isaac Lab](https://isaac-sim.github.io/IsaacLab/main/index.html) is an open-source framework for training policies across thousands of GPU-parallel simulations and it provides the robot-learning environment. [Newton](https://github.com/newton-physics/newton) simulates physics and the sensor’s depth measurements. We will cover the control architecture, train on varied obstacle layouts, evaluate the resulting policies, and prepare the interface for hardware testing.\n\n## \n\t\t1. Set Microduck obstacle avoidance in Isaac Lab\n\t\n\nFor simulation and training, prepare:\n\n- A Linux system with a compatible NVIDIA GPU and driver. See the [Isaac Lab installation guide](https://isaac-sim.github.io/IsaacLab/main/source/setup/installation/index.html) for platform requirements.\n- Git with Git LFS, and the uv package manager.\n\nFor physical-robot testing, prepare:\n\n- A configured Microduck. Load the same backlash walking-policy export used by the navigation task.\n- A supported ToF sensor with its configuration recorded.\n- A paired gamepad and a level test area with obstacles.\n\n### \n\t\tQuick install\n\t\n\nInstall [uv](https://docs.astral.sh/uv/getting-started/installation/) if it is not already installed. Then clone the exp/microduck branch of the Isaac Lab repository and install its dependencies:\n\n```\ngit lfs install\ngit clone --branch exp/microduck https://github.com/isaac-sim/IsaacLab.git\ncd IsaacLab\nuv sync --frozen\n```\n\nOnce setup is complete, list the available Microduck environments and presets:\n\n```\nuv run isaaclab list_envs --keyword MicroDuck --show_presets\n```\n\n### \n\t\tDownload the walking policy\n\t\n\nDownload and export the [upstream backlash walking checkpoint](https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.2/Isaac/IsaacLab/PretrainedCheckpoints/rsl_rl/IsaacContrib-Velocity-Rough-MicroDuck_backlash_newtonmjwarp_none_rsl_rl.pt) once before training. The obstacle avoidance task loads the exported walking policy automatically.\n\n```\nuv run isaaclab play \\\n  --task IsaacContrib-Velocity-Rough-MicroDuck \\\n  --rl_library rsl_rl --checkpoint pretrained \\\n  --num_envs 1 --visualizer none \\\n  --video newton_gl --video_length 1 \\\n  presets=backlash\n```\n\n## \n\t\t2. Build the obstacle course\n\t\n\nThe environment combines simple primitives with [OpenUSD](https://www.nvidia.com/en-us/glossary/openusd/) assets available through [SimReady Central](https://huggingface.co/spaces/nvidia/simready-central) on Hugging Face. We use a [cardboard box](https://huggingface.co/datasets/nvidia/simready-assets/tree/main/box_cardboard_a01), [office bin](https://huggingface.co/datasets/nvidia/simready-assets/tree/main/trashCan_office_black_a03), [bedside cabinet](https://huggingface.co/datasets/nvidia/simready-assets/tree/main/table_bedside_b01) alongside cones. From the IsaacLab repository root, download the pinned box, bin and cabinet packages into assets/simready.\n\n```\nuvx --from huggingface-hub hf download nvidia/simready-assets \\\n  --repo-type dataset \\\n  --revision 9d4556bfe80868c1d27a7a7ba1c2774e63e8cedd \\\n  --include \"box_cardboard_a01/*\" \\\n  --include \"trashCan_office_black_a03/*\" \\\n  --include \"table_bedside_b01/*\" \\\n  --local-dir ./assets/simready\n```\n\nAt each episode reset, the environment code automatically 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.\n\nGoals start ahead of the duck. Movement commands guide it toward the goal while the policy adjusts them around obstacles.\n\nFigure 1. Varied obstacle-course layouts with SimReady assets and primitive geometry.\n\n## \n\t\t3. Understand how ToF sensing guides the walking policy\n\t\n\nThe `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 then converts those commands into joint actions, allowing the robot to learn obstacle avoidance without retraining its walking behavior.\n\nDuring training, the navigation policy’s actor receives ToF history and body and controller state available on the real robot. Its critic has access to additional simulation state to guide learning, but is not needed for deployment.\n\nRewards 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.\n\nThe obstacle-avoidance task lives in [`isaaclab_tasks.contrib.microduck_obstacle`](https://github.com/isaac-sim/IsaacLab/tree/exp/microduck/source/isaaclab_tasks/isaaclab_tasks/contrib/microduck_obstacle). Its configuration is in [`obstacle_avoidance_env_cfg.py`](https://github.com/isaac-sim/IsaacLab/blob/exp/microduck/source/isaaclab_tasks/isaaclab_tasks/contrib/microduck_obstacle/obstacle_avoidance_env_cfg.py), ToF sensing is in [`sensors.py`](https://github.com/isaac-sim/IsaacLab/blob/exp/microduck/source/isaaclab_tasks/isaaclab_tasks/contrib/microduck_obstacle/sensors.py), and actions, commands, observations and rewards are organized under [`mdp/`](https://github.com/isaac-sim/IsaacLab/tree/exp/microduck/source/isaaclab_tasks/isaaclab_tasks/contrib/microduck_obstacle/mdp).\n\n### \n\t\tModel the ToF sensor\n\t\n\nMicroDuckToFCamera extends Newton’s LegacyMultiMeshRayCasterCamera to model the VL53L5CX—a compact time-of-flight (ToF) sensor on the microduck that measures distance across an 8×8 grid at 15Hz. The simulated sensor has a 45° 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.\n\nReal 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. The excerpt below shows selected sensor settings already included in the task configuration. You do not need to edit or run this code separately.\n\n```\n# Selected settings; mount and raycast targets omitted.\nhead_tof = MicroDuckToFCameraCfg(\n    prim_path=MICRODUCK_HEAD_BODY_PATH,\n    update_period=1.0 / 15.0,\n    pattern_cfg=patterns.PinholeCameraPatternCfg(\n        focal_length=1.0, width=8, height=8,\n        horizontal_aperture=_TOF_APERTURE,\n        vertical_aperture=_TOF_APERTURE,\n    ),\n    randomization=ToFRandomizationCfg(\n        mount_pitch_degrees=(-10.0, 10.0),\n        mount_height_m=(-0.02, 0.02),\n        floor_validity_midpoint_offset_m=(0.0, 0.13),\n        near_floor_edge_impairment_probability=0.5,\n    ),\n    data_types=[\"distance_to_image_plane\", \"distance_to_camera\"],\n    max_distance=TOF_MAX_RANGE,\n    depth_clipping_behavior=\"zero\",\n)\n```\n\n## \n\t\t4. Train the Microduck policy across parallel environments\n\t\n\nTrain the navigation policy 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, robot model, and obstacle assets.\n\nThe 16,384 environments shown here are configurable, not a minimum requirement. Lower `--num_envs` to fit your GPU’s available memory. With fewer environments collecting experience in parallel, reaching comparable policy performance may require more training iterations and longer training time. We also trained this 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.\n\nRun this command to train the policy:\n\n```\nuv run isaaclab train \\\n  --task IsaacContrib-ObstacleAvoidance-Flat-MicroDuck \\\n  --rl_library rsl_rl \\\n  --num_envs 16384 \\\n  --max_iterations 1500 \\\n  --seed 42 \\\n  --device cuda:0 \\\n  --visualizer none \\\n  presets=backlash\n```\n\nFigure 2. Parallel MicroDuck obstacle-avoidance simulation\n\n## \n\t\t5. Inspect behavior and export the policy to ONNX\n\t\n\nPlayback uses the same props, primitives, frozen walker and sensor randomization as training, with a different seed for new obstacle arrangements.\n\nNavigation checkpoints are saved under `logs/rsl_rl/microduck_obstacle_avoidance_tof_flat_backlash/<timestamp>/` relative to the repository root. Choose a `model_<iteration>.pt` file from your run and replace `/absolute/path/to/model.pt` below with its path. This plays the policy, opens the Newton viewer and records 20 seconds of simulation. Set --viz to none for headless recording.\n\n```\nuv run --extra video isaaclab play \\\n  --task IsaacContrib-ObstacleAvoidance-Flat-MicroDuck \\\n  --rl_library rsl_rl \\\n  --checkpoint /absolute/path/to/model.pt \\\n  --num_envs 1 \\\n  --seed 6173 \\\n  --device cuda:0 \\\n  --viz newton_gl \\\n  --video newton_gl \\\n  --video_length 1000 \\\n  presets=backlash\n```\n\nPlayback saves TorchScript and ONNX models in the checkpoint’s exported folder. Keep the ONNX data file alongside the model.\n\nFigure 3. Cone-course evaluation with requested motion, policy steering, and ToF input overlays.\n\n## \n\t\t6. Test obstacle avoidance on a real Microduck\n\t\n\nThese [deployment tools](https://github.com/isaac-sim/IsaacLab/tree/exp/microduck/scripts/deploy/microduck_tof_nav) run the navigation model on a laptop and send adjusted gamepad commands to the walking policy on the robot. Use the same walking policy that was used during navigation training.\n\nSection 1 saves the walker’s ONNX export to `.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`, relative to the Isaac Lab repository root.\n\nLoad that walking policy using [Pollen’s policy-loading guide](https://github.com/pollen-robotics/microduck/blob/main/docs/robot/cheatsheet.md#trying-your-own-file). The deployment README includes the transfer steps, including how to package an ONNX export that uses an external data file.\n\nFrom your Isaac Lab checkout, set up SSH access and check inference with the robot standing upright and still:\n\n```\ncd scripts/deploy/microduck_tof_nav\nssh-copy-id microduck@ROBOT_HOST\nuv run nav_pad.py --robot ROBOT_HOST \\\n  --model /absolute/path/to/navigation/exported/policy.onnx \\\n  --dry-run --seconds 30\n```\n\nDry-run copies the helpers and streams sensor data, but sends no movement commands. Watch the proposed commands as obstacles enter the sensor’s view. Keep the navigation ONNX and any companion .data file together.\n\nOnce those checks pass, start supervised gamepad navigation:\n\n```\nuv run nav_pad.py --robot ROBOT_HOST \\\n  --model /absolute/path/to/navigation/exported/policy.onnx\n```\n\nHold 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, with an additional close-obstacle brake and stale-input stopping. Start in a clear area and verify stopping before testing a course.\n\nSee the [deployment README](https://github.com/isaac-sim/IsaacLab/blob/exp/microduck/scripts/deploy/microduck_tof_nav/README.md) for controls, logs and troubleshooting.\n\nFigure 4. Microduck steers around cones using its 8×8 ToF sensor, with real footage on the left and a 3D rebuild from its logs on the right. Blue shows the policy steering, purple shows the operator intervention.\n\n## \n\t\t7. Explore other locomotion skills for Microduck in Isaac Lab\n\t\n\nThe [Microduck task collection](https://github.com/isaac-sim/IsaacLab/tree/exp/microduck/source/isaaclab_tasks/isaaclab_tasks/contrib/microduck) includes velocity tracking on flat and rough terrain; stand-up recovery, sit–stand transitions, and walking with fall recovery (VelStand); ball kicking, ground picking, and forward rolls (Roulade). Roller-skating tasks add velocity tracking and swizzle motion, crouch-gliding, slope descent, standing up on skates, and spins.\n\nFigure 5. Fifteen Microduck task views: flat and rough-terrain walking, recovery, object interaction, and roller-skating motions.\n\n## \n\t\tBuild your next policy\n\t\n\nStart with the [first Microduck tutorial](https://huggingface.co/blog/nvidia/microduck-isaac-lab-sim-to-real), then choose a task from the [Microduck task collection](https://github.com/isaac-sim/IsaacLab/tree/exp/microduck/source/isaaclab_tasks/isaaclab_tasks/contrib/microduck) to build your next policy in Isaac Lab with Newton. Explore new behaviors by changing commands, rewards, or environments—from rough-terrain walking to perception-driven obstacle avoidance. Evaluate your policy on scenes outside the training set before testing on the robot.\n\n## \n\t\tResources\n\t\n\n## \n\t\tAcknowledgments\n\t\n\nThis workflow builds on Pollen Robotics’ Microduck hardware and software, the original [Microduck reinforcement-learning project](https://github.com/pollen-robotics/microduck_rl), [BAM actuator modeling work](https://github.com/Rhoban/bam), and the Isaac Lab and Newton integrations.", "url": "https://wpnews.pro/news/microduck-obstacle-avoidance-a-sim2real-workflow-with-isaac-lab-and-newton", "canonical_source": "https://huggingface.co/blog/nvidia/microduck-obstacle-avoidance", "published_at": "2026-11-24 16:34:13+00:00", "updated_at": "2026-11-24 16:48:37.533114+00:00", "lang": "en", "topics": ["robotics", "ai-research", "machine-learning", "ai-tools"], "entities": ["NVIDIA", "Pollen Robotics", "Microduck", "Isaac Lab", "Newton", "Hugging Face", "SimReady", "OpenUSD"], "also_reported_by": [], "takeaway": "Keep the walking policy's weights fixed and train a separate controller that adjusts gamepad velocity commands using Newton-raycast ToF depth readings, so obstacle avoidance can be added without retraining locomotion.", "recommendation": {"advice": "Layer a separate avoidance controller on top of a frozen walking policy: feed it simulated ToF depth from Newton's raycaster and have it modify velocity commands before they reach the locomotion policy.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/microduck-obstacle-avoidance-a-sim2real-workflow-with-isaac-lab-and-newton", "markdown": "https://wpnews.pro/news/microduck-obstacle-avoidance-a-sim2real-workflow-with-isaac-lab-and-newton.md", "text": "https://wpnews.pro/news/microduck-obstacle-avoidance-a-sim2real-workflow-with-isaac-lab-and-newton.txt", "jsonld": "https://wpnews.pro/news/microduck-obstacle-avoidance-a-sim2real-workflow-with-isaac-lab-and-newton.jsonld"}}