unilab.envs.mdp¶
Community-style built-in MDP terms for UniLab’s NumPy manager runtime.
- class unilab.envs.mdp.JointPositionAction[source]¶
Bases:
BaseActionConvert policy actions into entity joint-position targets.
- Parameters:
cfg (
JointPositionActionCfg)env (
ManagerBasedRlEnv)
- cfg: JointPositionActionCfg¶
- __init__(cfg, env)[source]¶
- Parameters:
cfg (
JointPositionActionCfg)env (
ManagerBasedRlEnv)
- class unilab.envs.mdp.JointPositionActionCfg[source]¶
Bases:
BaseActionCfgConfiguration for joint-position control.
- Parameters:
- build(env)[source]¶
Build the action term from this config.
- Parameters:
env (
ManagerBasedRlEnv)- Return type:
- __init__(*, entity_name, clip=None, actuator_names, scale=1.0, offset=0.0, preserve_order=False, use_default_offset=True)¶
- class unilab.envs.mdp.JointEffortAction[source]¶
Bases:
BaseActionControl joints via effort targets.
- Parameters:
cfg (
BaseActionCfg)env (
ManagerBasedRlEnv)
- class unilab.envs.mdp.JointEffortActionCfg[source]¶
Bases:
BaseActionCfgConfiguration for joint effort (torque) control.
- Parameters:
- class unilab.envs.mdp.JointVelocityAction[source]¶
Bases:
BaseActionControl joints via velocity targets.
- Parameters:
cfg (
JointVelocityActionCfg)env (
ManagerBasedRlEnv)
- __init__(cfg, env)[source]¶
- Parameters:
cfg (
JointVelocityActionCfg)env (
ManagerBasedRlEnv)
- class unilab.envs.mdp.JointVelocityActionCfg[source]¶
Bases:
BaseActionCfgConfiguration for joint velocity control.
- Parameters:
- build(env)[source]¶
Build the action term from this config.
- Parameters:
env (
ManagerBasedRlEnv)- Return type:
- __init__(*, entity_name, clip=None, actuator_names, scale=1.0, offset=0.0, preserve_order=False, use_default_offset=True)¶
- class unilab.envs.mdp.LifecycleCounterRecorder[source]¶
Bases:
RecorderTermCount recorder lifecycle calls without performing I/O.
- Parameters:
cfg (
RecorderTermCfg)env (
ManagerBasedRlEnv)
- record_pre_reset(env_ids)[source]¶
Called in
env.step()before terminated environments are reset.What is available:
obs_bufcontains the observation from the end of the previous step (the input the agent used to choose the terminal action). It does not contain the post-action terminal observation (the state reached after applying the action), which is never computed for resetting environments.action_manager.actioncontains the action applied during this step. This is the correct terminal action. It will be zeroed for these environments by_reset_idximmediately after this hook returns, so capture it here if you need it later.reward_bufcontains the reward for this terminal step.reset_terminatedandreset_time_outsreflect why each environment is resetting.
This is the right hook to record the terminal transition
(obs_t, action_t, reward_t, done=True)for each resetting environment.
- record_post_reset(env_ids)[source]¶
Called after a reset completes with fresh observations computed.
Fires at the end of
env.reset()(covering all environments on the initial call) and withinenv.step()for each batch of environments that terminates, after state has been overwritten and new observations computed.At this point
obs_buf[env_ids]holds the initial observation of the new episode andaction_manager.action[env_ids]is zero (no action has been taken in the new episode yet).Use this hook to initialize per-episode state or record the first observation of a new episode.
- record_post_step()[source]¶
Called at the end of every
env.step()with fresh observations.At this point
obs_bufholds the new observation for every environment andaction_manager.actionholds the action that was applied during this step. Exception: for environments that reset during this step,action_manager.actionhas been zeroed by_reset_idxandobs_bufholds the initial observation of the new episode rather than the post-action terminal observation. Userecord_pre_resetto capture the terminal(obs, action)pair for those environments. Resetting environments are identified byself._env.reset_buf.- Return type:
- class unilab.envs.mdp.RelativeJointPositionAction[source]¶
Bases:
BaseActionControl joints via position targets relative to current positions.
- Parameters:
cfg (
BaseActionCfg)env (
ManagerBasedRlEnv)
- class unilab.envs.mdp.RelativeJointPositionActionCfg[source]¶
Bases:
BaseActionCfgJoint position targets relative to the current measured position.
target = current_joint_pos + action * scale. A fixed offset has no useful meaning for this transmission and is rejected during construction.- Parameters:
- class unilab.envs.mdp.UniformVelocityCommand[source]¶
Bases:
CommandTermSample planar velocity commands and update frame-dependent components.
- Parameters:
env (
ManagerBasedRlEnv)
- class unilab.envs.mdp.UniformVelocityCommandCfg[source]¶
Bases:
CommandTermCfgConfiguration for uniformly sampled planar velocity commands.
- Parameters:
resampling_time_range (tuple[float, float])
debug_vis (bool)
entity_name (str)
heading_command (bool)
heading_control_stiffness (float)
rel_standing_envs (float)
rel_heading_envs (float)
rel_world_envs (float)
rel_forward_envs (float)
init_velocity_prob (float)
ranges (Ranges)
viz (VizCfg)
- entity_name: str¶
- heading_command: bool = False¶
- heading_control_stiffness: float = 1.0¶
- rel_standing_envs: float = 0.0¶
- rel_heading_envs: float = 1.0¶
- rel_world_envs: float = 0.0¶
- rel_forward_envs: float = 0.0¶
- init_velocity_prob: float = 0.0¶
- class Ranges[source]¶
Bases:
objectRanges(lin_vel_x: ‘tuple[float, float]’, lin_vel_y: ‘tuple[float, float]’, ang_vel_z: ‘tuple[float, float]’, heading: ‘tuple[float, float] | None’ = None)
- Parameters:
- ranges: Ranges¶
- viz: VizCfg¶
- build(env)[source]¶
Build the command term from this config.
- Parameters:
env (
ManagerBasedRlEnv)- Return type:
- __init__(*, resampling_time_range, debug_vis=False, entity_name, heading_command=False, heading_control_stiffness=1.0, rel_standing_envs=0.0, rel_heading_envs=1.0, rel_world_envs=0.0, rel_forward_envs=0.0, init_velocity_prob=0.0, ranges, viz=<factory>)¶
- Parameters:
resampling_time_range (tuple[float, float])
debug_vis (bool)
entity_name (str)
heading_command (bool)
heading_control_stiffness (float)
rel_standing_envs (float)
rel_heading_envs (float)
rel_world_envs (float)
rel_forward_envs (float)
init_velocity_prob (float)
ranges (Ranges)
viz (VizCfg)
- class unilab.envs.mdp.UniformPoseCommand[source]¶
Bases:
CommandTermUniformly sampled vector command held until the next resample.
- Parameters:
cfg (
UniformPoseCommandCfg)env (
ManagerBasedRlEnv)
- __init__(cfg, env)[source]¶
- Parameters:
cfg (
UniformPoseCommandCfg)env (
ManagerBasedRlEnv)
- class unilab.envs.mdp.UniformPoseCommandCfg[source]¶
Bases:
CommandTermCfgSample a fixed-width pose vector independently per dimension.
- Parameters:
- unilab.envs.mdp.action_acc_l2(env)[source]¶
Penalize the second difference of raw policy actions.
- Parameters:
env (
ManagerBasedRlEnv)- Return type:
- unilab.envs.mdp.action_rate_l2(env)[source]¶
Penalize the first difference of raw policy actions.
- Parameters:
env (
ManagerBasedRlEnv)- Return type:
- unilab.envs.mdp.apply_body_impulse¶
alias of
ApplyBodyImpulse
- unilab.envs.mdp.base_ang_vel(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]¶
- Parameters:
env (
ManagerBasedRlEnv)asset_cfg (
SceneEntityCfg)
- Return type:
- class unilab.envs.mdp.base_ang_vel_imu_misaligned[source]¶
Bases:
_ImuMisalignedObservationBase angular velocity rotated by the per-env constant IMU misalignment.
- Parameters:
cfg (
ManagerTermBaseCfg)env (
ManagerBasedRlEnv)
- unilab.envs.mdp.base_lin_vel(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]¶
- Parameters:
env (
ManagerBasedRlEnv)asset_cfg (
SceneEntityCfg)
- Return type:
- class unilab.envs.mdp.builtin_sensor[source]¶
Bases:
_NamedSensorObservationRead one existing backend sensor through a cached NumPy view.
- Parameters:
cfg (
ManagerTermBaseCfg)env (
ManagerBasedRlEnv)
- unilab.envs.mdp.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.
- unilab.envs.mdp.body_angular_velocity_penalty(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]¶
Penalize roll/pitch angular velocity of one selected body.
- Parameters:
env (
ManagerBasedRlEnv)asset_cfg (
SceneEntityCfg)
- Return type:
- class unilab.envs.mdp.command_curriculum[source]¶
Bases:
objectUpdate a command term’s config fields and/or params based on training steps.
Command terms read their live
self.cfgat resample time, so mutating the resolved term config (e.g.rel_standing_envsorranges) takes effect on the next command resample. Stage semantics matchreward_curriculum: every stage whosestephas been reached is applied in order, so later stages win.Example owner YAML:
curriculum: standing_envs: func: unilab.envs.mdp.command_curriculum params: command_name: twist stages: - {step: 0, rel_standing_envs: 0.02} - {step: 12000, rel_standing_envs: 0.1}
- Parameters:
cfg (
CurriculumTermCfg)env (
ManagerBasedRlEnv)
- unilab.envs.mdp.dof_armature¶
alias of
JointArmature
- class unilab.envs.mdp.event_curriculum[source]¶
Bases:
objectUpdate an event term’s params and/or config fields based on training steps.
Event terms are invoked with their live
cfg.paramson every apply, so stagedparamsupdates (e.g. a widenedcom_range) take effect on the next event application. Stage semantics matchreward_curriculum.Example owner YAML:
curriculum: com_range: func: unilab.envs.mdp.event_curriculum params: event_name: base_com stages: - {step: 0, params: {com_range: {x: [-0.003, 0.003]}}} - {step: 24000, params: {com_range: {x: [-0.01, 0.01]}}}
- Parameters:
cfg (
CurriculumTermCfg)env (
ManagerBasedRlEnv)
- unilab.envs.mdp.flat_orientation_l2(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]¶
Penalize non-flat base orientation.
- Parameters:
env (
ManagerBasedRlEnv)asset_cfg (
SceneEntityCfg)
- Return type:
- unilab.envs.mdp.geom_friction¶
alias of
GeomFriction
- unilab.envs.mdp.joint_pos_rel(env, biased=False, 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]¶
- unilab.envs.mdp.joint_armature¶
alias of
JointArmature
- unilab.envs.mdp.joint_pos_limits(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]¶
Penalize joint positions if they cross the soft limits.
- Parameters:
env (
ManagerBasedRlEnv)asset_cfg (
SceneEntityCfg)
- Return type:
- unilab.envs.mdp.joint_vel_rel(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]¶
- Parameters:
env (
ManagerBasedRlEnv)asset_cfg (
SceneEntityCfg)
- Return type:
- unilab.envs.mdp.joint_vel_l2(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]¶
Penalize selected joint velocities with an L2-squared kernel.
- Parameters:
env (
ManagerBasedRlEnv)asset_cfg (
SceneEntityCfg)
- Return type:
- unilab.envs.mdp.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:
- class unilab.envs.mdp.posture[source]¶
Bases:
ManagerTermBasePenalize joint deviation from default pose with a per-joint-std Gaussian kernel.
params["std"]maps joint-name regexes to per-joint standard deviations; the reward isexp(-mean(error^2 / std^2))over the selected joints.- Parameters:
cfg (
ManagerTermBaseCfg)env (
ManagerBasedRlEnv)
- unilab.envs.mdp.push_by_setting_velocity¶
alias of
PushBySettingVelocity
- unilab.envs.mdp.randomize_body_mass_inertia¶
alias of
RandomizeBodyMassInertia
- unilab.envs.mdp.randomize_encoder_bias¶
alias of
RandomizeEncoderBias
- unilab.envs.mdp.randomize_physics_scene_gravity¶
alias of
RandomizePhysicsSceneGravity
- unilab.envs.mdp.randomize_rigid_body_com¶
alias of
RandomizeRigidBodyCom
- unilab.envs.mdp.randomize_rigid_body_mass¶
alias of
RandomizeRigidBodyMass
- unilab.envs.mdp.is_alive(env)[source]¶
Reward environments that have not reached a non-timeout termination.
- Parameters:
env (
ManagerBasedRlEnv)- Return type:
- unilab.envs.mdp.is_terminated(env)[source]¶
Return one for non-timeout terminations.
- Parameters:
env (
ManagerBasedRlEnv)- Return type:
- unilab.envs.mdp.projected_gravity(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]¶
- Parameters:
env (
ManagerBasedRlEnv)asset_cfg (
SceneEntityCfg)
- Return type:
- class unilab.envs.mdp.projected_gravity_from_sensor[source]¶
Bases:
_NamedSensorObservationNegate a cached 3-D up-vector sensor to obtain projected gravity.
- Parameters:
cfg (
ManagerTermBaseCfg)env (
ManagerBasedRlEnv)
- class unilab.envs.mdp.projected_gravity_imu_misaligned[source]¶
Bases:
_ImuMisalignedObservationProjected gravity rotated by the SAME per-env IMU misalignment as the gyro.
- Parameters:
cfg (
ManagerTermBaseCfg)env (
ManagerBasedRlEnv)
- unilab.envs.mdp.reset_root_state_uniform(env, env_ids, pose_range, velocity_range=None, 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]¶
Reset a floating root from defaults plus uniformly sampled SE(3) offsets.
This is the NumPy adaptation of the pinned mjlab event. UniLab currently has no public mocap-pose write contract, so fixed-base/mocap requests fail through the entity’s cached floating-root capability instead of falling back.
- unilab.envs.mdp.reset_scene_to_default(env, env_ids)[source]¶
Reset all materialized scene entities to backend default qpos/qvel.
- unilab.envs.mdp.resolve_env_ids(env, env_ids)[source]¶
Return concrete NumPy environment IDs, preserving community sentinel semantics.
- class unilab.envs.mdp.reward_curriculum[source]¶
Bases:
objectUpdate a reward term’s weight and/or params based on training steps.
Each stage specifies a
stepthreshold and optionally aweightand/orparamsdict. Whenenv.common_step_counterreaches a stage’sstep, the corresponding values are applied. Later stages take precedence when multiple thresholds are reached.Example owner YAML:
curriculum: action_rate_ramp: func: unilab.envs.mdp.reward_curriculum params: reward_name: action_rate stages: - {step: 0, weight: -0.1} - {step: 12000, weight: -0.4} - {step: 24000, weight: -1.0, params: {max_vel: 1.0}}
- Parameters:
cfg (
CurriculumTermCfg)env (
ManagerBasedRlEnv)
- unilab.envs.mdp.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.
- unilab.envs.mdp.root_height(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]¶
Return the world-frame root height as a scalar reward or metric term.
- Parameters:
env (
ManagerBasedRlEnv)asset_cfg (
SceneEntityCfg)
- Return type:
- class unilab.envs.mdp.termination_curriculum[source]¶
Bases:
objectUpdate a termination term’s params and/or time_out based on training steps.
Each stage specifies a
stepthreshold and optionally aparamsdict and/ortime_outflag. Whenenv.common_step_counterreaches a stage’sstep, the values are applied. Later stages take precedence.Example owner YAML:
curriculum: tilt_threshold: func: unilab.envs.mdp.termination_curriculum params: termination_name: tilt stages: - {step: 12000, params: {max_tilt_deg: 80.0}} - {step: 24000, params: {max_tilt_deg: 65.0}}
- Parameters:
cfg (
CurriculumTermCfg)env (
ManagerBasedRlEnv)
- unilab.envs.mdp.time_out(env)[source]¶
Terminate when the episode length reaches its maximum.
- Parameters:
env (
ManagerBasedRlEnv)- Return type:
- unilab.envs.mdp.track_angular_velocity(env, std, command_name, 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]¶
Reward commanded yaw rate while keeping roll/pitch rates near zero.
- unilab.envs.mdp.track_linear_velocity(env, std, command_name, 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]¶
Reward commanded base linear velocity, assuming commanded z is zero.
- unilab.envs.mdp.upright(env, std, 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]¶
Gaussian reward for keeping one selected body upright (mjlab
upright).The reward is
exp(-||pg_xy||^2 / std^2)wherepgis the world gravity vector expressed in the selected body’s link frame. Flat-ground form only: mjlab’s optional terrain-normal sensors are not ported.
- class unilab.envs.mdp.variable_posture[source]¶
Bases:
ManagerTermBaseposturewith speed-dependent tolerance: standing/walking/running std maps.The per-joint std is selected from
std_standing/std_walking/std_runningby the total command speed (planar norm plus yaw magnitude) againstwalking_thresholdandrunning_threshold.- Parameters:
cfg (
ManagerTermBaseCfg)env (
ManagerBasedRlEnv)
Modules
Built-in action terms supported by the NumPy runtime. |
|
Built-in command terms supported by the NumPy runtime. |
|
Generic stage-based curriculum terms for the NumPy manager runtime. |
|
Community-style reset event terms for UniLab's NumPy manager runtime. |
|
Community-style observation terms for the NumPy manager runtime. |
|
Reusable recorder terms for the NumPy Manager-Based runtime. |
|
Community-style reward terms for the NumPy manager runtime. |
|
Community-style termination terms for the NumPy manager runtime. |