unilab.envs.mdp.events.RandomizeBodyMassInertia¶
- class unilab.envs.mdp.events.RandomizeBodyMassInertia[source]¶
Bases:
ManagerTermBaseStartup-style mass+inertia scaling via one shared per-env factor.
NumPy adapter for the alpha-only slice of mjlab’s
dr.pseudo_inertia: mass and principal inertia of the selected bodies are multiplied by the same factor s = e^{2α} with α ~ U(ln(lo)/2, ln(hi)/2) — i.e. s is log-uniform inscale_range; the CoM (body_ipos) and the principal frame (body_iquat) stay untouched.Upstream runs this as a startup event (fixed per env for the whole run). UniLab startup events have no reset-transaction write path, so this term runs in reset mode but samples the factor only once — at the first reset — and reapplies the cached per-env values on every later reset. Both writes re-derive from immutable compile-time defaults, so reapplication is idempotent and non-accumulating.
- Parameters:
cfg (
EventTermCfg)env (
ManagerBasedRlEnv)
Methods
Attributes