unilab.envs.mdp.terminations.nan_detection

unilab.envs.mdp.terminations.nan_detection(env, asset_cfg=SceneEntityCfg(name='robot', joint_names=None, joint_ids=slice(None, None, None), body_names=None, body_ids=slice(None, None, None), geom_names=None, geom_ids=slice(None, None, None), site_names=None, site_ids=slice(None, None, None), actuator_names=None, actuator_ids=slice(None, None, None), tendon_names=None, tendon_ids=slice(None, None, None), camera_names=None, camera_ids=slice(None, None, None), light_names=None, light_ids=slice(None, None, None), material_names=None, material_ids=slice(None, None, None), texture_names=None, texture_ids=slice(None, None, None), pair_names=None, pair_ids=slice(None, None, None), preserve_order=False))[source]

Terminate environments whose entity physics state contains NaN or Inf.

mjlab checks the raw physics state (qpos/qvel/qacc) through its nan guard; the UniLab term checks the equivalent base-owned entity state (root pose and velocity, joint position and velocity) so a non-finite physics state terminates the episode explicitly instead of relying on the optional global nan guard.

Parameters:
  • env (ManagerBasedRlEnv)

  • asset_cfg (SceneEntityCfg)

Return type:

ndarray