If you want to train a robot virtually with reinforcement learning, the sandbox it interacts with has to model the physics correctly. Gravity is the obvious example: if the simulated robot does not fall the way a real one would, the policy learns something that will not work on the hardware.

As a quick test I used the MicroDuck (Pollen Robotics / Hugging Face) in two short scenes:

  1. Power off: the servos hold the duck stiffly in its standing pose. After one second I switch the power off. The duck collapses limply.
  2. Push from behind: the power stays on, but the duck gets a small push from behind (2.5 N for 0.1 s). It tips over forward.

Both reactions look plausible, so the simulation passes this first sanity check.

Setup

  • The robot model and the training task come from pollen-robotics/microduck_rl, which is built on mjlab (MuJoCo-based, GPU-parallel simulation; PPO training with rsl_rl).
  • The two test scenes are rendered with the plain MuJoCo Python bindings. The “power off” is done by disabling actuation in the model, the push is an external force on the trunk body. The frames are encoded with ffmpeg.
  • Servo stiffness in these scenes is scaled up by a factor of 4 so that the duck stands stiffly.

3D parts: © Pollen Robotics, CC BY-NC-SA 4.0.