TL;DR observe 61 numbers → the actor outputs 14 means → in training, add Gaussian noise (σ starts at 1.0) → target = home + action, never clipped → each XL330 servo pushes towards it, at most 0.64 Nm, 15–30 ms late. On the real duck the noise is gone: only the mean is used.
Interactive demoDrive the Microduck: 61 numbers in, 14 targets out, liveOpen →This is part 1 of my series taking PPO (Proximal Policy Optimization) apart, one stage of a training iteration per post. Part 0 showed that one sample is one robot during one control step, and that 98,304 of them make one batch. This post opens the first thing that happens inside a sample: the robot acts.
Every 20 ms, the Microduck by Pollen Robotics (training code) reads 61 numbers, its policy network turns them into 14 numbers, and 14 servos turn those into torque. The network in every figure is Pollen's own trained walking policy.
| Term | Definition | Microduck value |
|---|---|---|
| Observation | Everything the policy reads at one control step: what the duck's IMU and servo encoders measure, its own previous action, and what we ask it to do | 61 numbers |
| Mean | The actor network's output: one number per joint, the action it considers best right now, as an offset from home | 14 numbers (rad) |
| Standard deviation (σ) | How wide the noise around each mean is during training. One learned number per joint, the same for every duck and every state | 14 numbers, starting at 1.0 rad |
| Home | The default standing pose: one fixed angle per joint, chosen so the duck stands balanced. It is the policy's origin, not the servo's — joint positions are observed as angle − home, actions are offsets from it, and the target sent to the servo is home + action. The servo itself only sees absolute angles | 14 angles (HOME_FRAME): hip pitch ∓0.458 · ankle ±0.453 · hip roll ∓0.087 · knee ∓0.005 · neck pitch, head pitch +0.349 · hip yaw, head yaw, head roll 0 rad (left/right signs mirrored) |
| Action | What the policy actually sends: the mean plus a random draw in training, the mean alone on the real duck. An offset from home | 14 numbers (rad) |
| Position target | The absolute angle the servo is told to reach | home + action |
| Δq | The gap the servo has to close: target − joint angle, in rad. How hard the servo pushes depends only on Δq and the joint's speed | 0.1 rad → 0.056 Nm · current limit binds from 1.14 rad (0.64 Nm) |
| Log-probability | How likely the drawn action was under the Gaussian it came from. Stored with every sample; the update compares it with the new policy's (post 5) | ≈ −19.9 for a typical draw at σ 1.0 (14 joints × −1.42) |
Interactive figure: PPO: acting. The Microduck walking live in your browser with Pollen's policy: steer it, switch to training and raise σ until it falls, and watch every stage of this post (plus the inside of the servo) update every 20 ms.
Every control step starts with an observation. Microduck's policy reads 61 numbers, all from sensors on the robot or from us:
There is no camera and no position in the world. The duck does not know where it is, only how it is moving and how its joints are bent.

The 61 numbers live on very different scales: gravity sits near ±1, angular velocity near ±0.01 when standing. Before the network sees them, each one is normalized: minus a running mean, divided by a running standard deviation, both collected during training and frozen into the exported policy.
The normalized observation goes through the actor: a multilayer perceptron (MLP) with three hidden layers of 512, 256 and 128 neurons and ELU activations. It returns 14 numbers, one per joint: the means. Each one is an offset from home, in radians.

In the figure the duck has stood still for 1 s with a zero command, and every mean is small: the largest, neck pitch, is −0.096 rad, about 5°. Standing is a steady state: each mean is almost exactly the last action (all 14 within 0.002 rad), so the policy keeps sending what it sent before.
In training, the mean is not sent as it is. rsl_rl treats it as the centre of a Gaussian and draws the action from it, one draw per joint, every control step:
action = mean + σ × noise, with noise ~ Normal(0, 1)
σ is the standard deviation: 14 learnable numbers, one per joint, shared by every duck and every state. They start at 1.0 rad, and the update tunes them like any other weight. Nothing squashes or clips the draw, and nothing in rsl_rl stops σ from shrinking towards zero except a small bonus for keeping the noise wide (the entropy bonus in the loss).
This noise is how PPO explores. If every duck in the same state did exactly the same thing, the batch could never show that another action works better.
The cost shows in joint 2, the left hip roll, the tightest joint on the duck at ±0.38 rad. At the start of training the mean is about 0 and σ is 1.0, so the bell sits on home and spreads far past both limits: 70.2 % of targets land outside the joint's range. At σ 0.3 that drops to 21.9 %, at σ 0.1 to 0.2 %.

With every draw, rsl_rl stores its log-probability: how likely that action was under the Gaussian it came from. For 14 independent joints it is a sum:
log π(a | s) = Σ over joints of [ −½ ((a − mean) / σ)² − ln σ − ½ ln 2π ]
At σ = 1.0, a typical draw scores about −1.42 per joint, so −19.9 for the whole duck. That number goes into the sample from part 0 and comes back in post 5, where the update compares it with how likely the same action is under the new policy.
The action is still an offset. The servo is told an absolute angle:
target = home + action
The scale is 1.0 and there is no clip: neither rsl_rl nor mjlab clips the action. Joint limits do not clip it either. They limit the joint in the simulator, not the target, so the joint stops at its limit while the target can sit far past it.

One draw at σ 1.0 for all 14 joints: 5 of 14 targets land past the limit, and the right knee is told to go to about −2.3 rad, on a joint that stops at −1.57.
The gap between the target and where the joint actually is, Δq = target − joint angle, is the only thing the servo works with.
All 14 joints use the same servo, a Dynamixel XL330. It is a position servo: given a target, it pushes the joint towards it, harder the further away it is. Pollen trains with a model of the real servo (BAM, by Rhoban) that follows what the XL330's firmware and motor do:
Worked through for a joint at rest, 0.1 rad from its target, on a 7.5 V battery: duty 0.058 → 0.43 V → 0.15 A → 0.056 Nm. That is a soft servo, about 0.56 Nm per radian. From Δq = 1.14 rad on, the current limit caps it at 0.64 Nm, so a target 3 rad away pulls no harder than one 1.2 rad away. Pollen also draws the battery voltage between 6.5 and 8.2 V per duck, which moves the stiffness between 0.49 and 0.61 Nm/rad.
A soft servo also means a joint under load never quite reaches its target. In our replay, standing, the left knee sits 0.14 rad short of its target, and that gap is what holds the duck up.
The target also arrives late. The policy sends a new target every control step (20 ms = 4 substeps), and the servo's torque is recomputed every substep. But in training, at every substep the servo uses the target from 3 to 6 substeps ago: 15 to 30 ms late, with the lag drawn again at every substep. Nothing keeps the order, so now and then the servo steps back to an older target for one substep. After a reset, the delay history is filled with the episode's first target.

The right half of the figure replays Pollen's policy walking forward and applies this delay rule to joint 4, the left knee. Each shaded block is the servo still working on an old target. Training against a random delay means the policy cannot count on a target arriving at a fixed moment.
On the real duck the draw is gone. The exported policy (velstand.onnx) contains the observation normalizer and the network, and outputs the 14 means only: the Gaussian exists only in training. The loop is otherwise the same: observe, 14 means, target = home + mean, 50 times a second.
One detail closes the loop. The last action in the next observation is the raw action, before home is added. At deployment that is the mean; in training it is the noisy draw, so during training the policy sees its own noise come back as an input.
Every stage of the act ends up in the sample from part 0. The observation, the action, its log-probability, the mean and σ are stored for the update; the reward that follows is post 2.
Two choices here shape all of training. The draw is PPO's only source of exploration: σ starts wide, at 1.0, and the update usually narrows it as the policy becomes sure of itself. And the servo and its delay are part of the environment, not of the policy. The policy never outputs a torque, only targets, and it learns to walk through whatever the servo does with them. Pollen models the XL330 in this much detail so that what the duck learns in simulation holds on the real servos.
velstand.onnx), Pollen Robotics (2026)Reinforcement LearningRoboticsLocomotion
SOMA is our ECCV 2026 paper. A physics-informed network takes skeletal motion and predicts how muscles, fat and skin deform underneath, which standard skinning misses. It learns from motion capture of the skin surface alone. Physics losses on volume, smoothness and stretch keep the inner layers plausible.
v2 is the cleanup release. The SKIM dataset got rebuilt rigs (hands are finally skinned), fixed forearm twist and skeleton alignment, and new pretrained models for all five subjects. On held-out shots the marker error is 58% lower than with linear blend skinning (10.7 vs 25.5 mm), and muscles stay inside the skin (0.06% interpenetration).
The video below is the cut I made for the release, with the x-ray lens and pixel HUD. Code, data and models are all open.
AvatarsSoft TissueMotion Capture
TL;DR one sample = one Microduck, one control step. Everything else is a stack of samples: sample → rollout → batch → minibatch → epoch → iteration.
Interactive demoExplore the batch in 3D: 98,304 samplesOpen →PPO (Proximal Policy Optimization) is the workhorse behind most of today's learned locomotion controllers. The main open simulation frameworks for robotics (e.g., Isaac Lab, MuJoCo Playground, mjlab) all use it as their default trainer. In this blog series, I take PPO apart to show how this actor-critic Reinforcement Learning (RL) method teaches a robot to walk.
The first post covers the first building block: batches. What is one sample, and how do thousands of simulated robots turn into a single PPO update? The running example is the Microduck by Pollen Robotics (training code).
Our simulator, MuJoCo (here through mjlab, which runs MuJoCo Warp on the GPU), works in substeps. Robots operate in control steps. Learning works on batches of what the robots recorded. Every unit used in this post, smallest to largest:
| Unit | Definition | Microduck value | Robot time |
|---|---|---|---|
| Substep | One physics step | — | 0.005 s |
| Control step | One full control cycle: observe → act → reward | 4 substeps | 0.02 s |
| Sample | What one robot records during one control step | 1 duck × 1 control step | 0.02 s |
| Rollout | A fixed run of consecutive control steps of one robot: what one robot adds per iteration | 24 control steps = 24 samples | 0.48 s |
| Episode | One life, from reset to fall or timeout | ≤ 1,000 control steps, up to ~42 rollouts (1,000 / 24 = 41.7) | ≤ 20 s |
| Batch | Every robot's rollout from one iteration | 4,096 ducks × 24 steps = 98,304 samples | ≈ 33 min |
| Minibatch | One slice of the batch | ¼ of the batch = 24,576 samples | ≈ 8 min |
| Gradient step | One update of the network weights, computed from one minibatch | 1 per minibatch | — |
| Epoch | One pass through the entire batch, i.e. all minibatches | 4 gradient steps | — |
| Update | All epochs on one batch | 5 epochs = 20 gradient steps | — |
| Iteration | Collect one batch, then update on it | 98,304 samples + 20 gradient steps | ≈ 33 min |

Interactive figure: PPO: the batch. The whole batch as a 3D grid of ducks × control steps, where you can highlight one sample, one robot, one control step, one minibatch or the whole batch, and cut it both ways described below.
Take one sample: robot #6 at control step 8, from t = 0.14 s to t = 0.16 s of its 0.48 s rollout. For those 0.02 s of robot time, rsl_rl stores:

One rollout strings 24 of these samples together:

Now we take the whole batch: 4,096 robots, each with one rollout of 24 samples. 4,096 × 24 = 98,304 samples = one iteration's data.

We need to use this data to train, but how? The batch is cut into minibatches, and there are two common ways to do it. Which one a library uses comes down to when it computes the advantages (post 4), because advantages run along each duck's timeline.
brax-style: whole rollouts. brax recomputes the advantages inside each minibatch, with the current critic, so every duck's 24 steps have to stay together and in order. The entire rollout goes to one minibatch: in the demo, each duck's row is one colour. If Microduck's batch were cut the brax way (hypothetically, since Microduck trains with rsl_rl), we would build 4 minibatches of 1,024 ducks each, every duck with all its 24 steps. Our own brax run, OP3 in MuJoCo Playground, collected 8,192 robots × 20 steps = 163,840 samples per iteration and cut them into 32 minibatches, with 4 passes.
rsl_rl: single samples. rsl_rl computes the advantages once, along each duck's rollout, before the cut, so a duck's steps can be scattered afterwards. All 98,304 samples are shuffled as one list, ignoring which duck they came from, and cut into 4 minibatches of 24,576 samples. The minibatch size is the same in both styles (1,024 × 24 = 24,576); only what goes in together changes.

Finally, we train using epochs. Each epoch is a pass through the entire batch, or all minibatches. Each minibatch gives one gradient step: 1 epoch, 4 gradient steps. An update, or 5 epochs in this case, gives 20 gradient steps. rsl_rl reuses the same 4-way split in all 5 epochs; brax reshuffles every pass.
Then, the batch is discarded. The data came from the old policy, and after 20 gradient steps the policy has changed, so the data is stale: PPO is on-policy. Reusing it for 5 epochs is only safe because of the clip (post 5).
A rollout is not an episode. A duck that falls mid-rollout is reset inside the same batch, and its done flag marks where one episode ends and the next begins.
How much robot experience do we collect per iteration? 98,304 × 0.02 s ≈ 33 min of duck time.
We need data. If we collected with one Microduck at a time, one iteration's data would take 4,096 × 0.48 s ≈ 33 min of real time, plus picking the duck up after every fall. Microduck's training config caps training at 50,000 iterations: up to around 4.9 billion samples, or 3.1 years of robot time, which we cannot collect in real time. The cap is a ceiling, not what is needed: Pollen's README reports a usable gait after ~1–2 h of training with 4,096 parallel robots.
We use parallelization: one GPU steps many robots in parallel. For example, 1 control step can be simulated for all 4,096 robots at once (one batched GPU call per physics substep). Pollen trains Microduck this way, on MuJoCo Warp. For a number from our own machine, with a different robot and simulator: on our RTX 5080, the OP3 (MuJoCo Playground on MJX, MuJoCo's JAX backend) collected 6,553,600 samples (≈36 h of robot time) in ≈3 min including compilation, about 700× real time. Microduck itself doesn't fit in MJX's memory.
One iteration, in order:
Steps 1–2 repeat 24 times to fill the batch, one control step at a time for all 4,096 ducks. Steps 3–4 run once on the full batch. Steps 5–6 are the update. Every later post zooms into one slice of the batch grid: posts 1–2 fill it one column (control step) at a time, posts 3–4 run along each row (one duck's timeline), and posts 5–6 work on the whole grid, minibatch by minibatch.
Reinforcement LearningRoboticsLocomotion
Google put out their new GNM head, a parametric 3D head. I wanted to understand what’s actually inside it, so started a small project for face tracking. Probably existed already, but not bad to learn a couple of new things 🙂
Identity Fit -> MediaPipe (Face Tracking) -> GNM forward pass.
The subject fit was tricky. I had to run MediaPipe on the plain GNM head, record where it puts the landmarks, and then compare that with the real-face tracked counterparts. Still rough – but fun to play with.
Face TrackingAvatars3D Head Modeling