Rapid Motor Adaptation: Inferring the Ground from the Way You Move
Published:
Ashish Kumar, Zipeng Fu, Deepak Pathak et al.
Read the paper (PDF)
The same command can reveal a different world
Intuition first. A quadruped commands a step. On firm ground its body advances; on a slippery surface the foot moves but the body hardly follows. That mismatch contains information about the environment, even if the robot has no sensor that directly measures friction.
One instantaneous joint configuration may fit both situations. Recent motion together with the commands that caused it is more informative. The question becomes: what part of that history matters for choosing the next action?
Privileged training, observable deployment
Let \(e_t\) contain simulator-only environmental factors. An encoder \(\mu\) maps them to a compact latent \(z_t\). During initial training, a base policy uses this context. An adaptation network \(\phi\) then learns to predict it from observable history:
Here \(x_t\) is the observable robot state and \(a_t\) the policy action. Adaptation training includes trajectories generated using the predicted context, exposing the estimator to its own errors. This two-stage procedure is described in Kumar et al..
The latent need not equal friction, mass, or another interpretable physical parameter. Its purpose is to carry information useful to the policy.
Worked example: why action history matters
Consider a toy scalar system where commanded input \(u_t\) produces displacement \(\Delta x_t=b u_t\). The unknown gain \(b\) summarises how effectively the command moves the system. This is an illustration of identification, not RMA’s physical model.
Given commands \([1,2]\) and measured displacements \([0.4,0.8]\), least squares estimates
But the same displacements under commands \([0.5,1]\) imply \(\hat b=0.8\). Observed motion alone does not distinguish these gains. The input–response relationship does.
Now set both commands to zero. The denominator vanishes: the history contains no information about how strongly the system would respond. A learned estimator cannot reliably recover distinctions that the observations never reveal.
Adaptation is not necessarily retraining
At deployment, a new history changes \(\hat z_t\), and the same policy weights produce a different action. No gradient step is needed for that change. Calling this online adaptation is appropriate, but calling it online policy optimisation would describe a different mechanism.
A deployment can also update the context less often than the motor policy. The control loop then uses the most recent estimate. This saves computation but introduces a delay between a physical change and the context used for control; the original RMA system uses this asynchronous arrangement. Kumar et al.
Evaluate the transition, not just the final gait
An informative experiment changes a payload or surface during a rollout and measures both immediate degradation and recovery. A good final gait can hide a long period of poor control after the change.
Compare an oracle-context policy, the inferred-context policy, and a fixed-context baseline. Keep command sequences and initial conditions comparable. Log failures as well as recovery times, and specify which perturbations were represented during training.
For another way to incorporate experience into future control, see learned MPC. For learning a direct correction around a controller, see residual RL.
References
- Kumar, A., Fu, Z., Pathak, D., & Malik, J. RMA: Rapid Motor Adaptation for Legged Robots. RSS 2021.
