unilab.envs.mdp.terminations

Community-style termination terms for the NumPy manager runtime.

Functions

bad_orientation(env, limit_angle[, asset_cfg])

Terminate when the asset orientation exceeds limit_angle.

nan_detection(env[, asset_cfg])

Terminate environments whose entity physics state contains NaN or Inf.

root_height_below_minimum(env, minimum_height)

Terminate when the asset root height is below minimum_height.

time_out(env)

Terminate when the episode length reaches its maximum.

unilab.envs.mdp.terminations.bad_orientation(env, limit_angle, 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 when the asset orientation exceeds limit_angle.

Parameters:
  • env (ManagerBasedRlEnv)

  • limit_angle (float)

  • asset_cfg (SceneEntityCfg)

Return type:

ndarray

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

unilab.envs.mdp.terminations.root_height_below_minimum(env, minimum_height, 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 when the asset root height is below minimum_height.

Parameters:
  • env (ManagerBasedRlEnv)

  • minimum_height (float)

  • asset_cfg (SceneEntityCfg)

Return type:

ndarray

unilab.envs.mdp.terminations.time_out(env)[source]

Terminate when the episode length reaches its maximum.

Parameters:

env (ManagerBasedRlEnv)

Return type:

ndarray