unilab.tasks.locomotion.go2w.manager_terms

Manager-Based terms owned by the Go2W flat task.

Functions

clipped_action_rate_l2(env, action_name)

constant_alive(env)

motor_torque(env, action_name)

motor_torque_l2(env, action_name)

randomize_motor_gains(env, env_ids, ...)

Sample owner-level motor gains without mutating backend actuator models.

upward_l2(env[, asset_cfg])

Classes

Go2WMixedAction

Convert one community action term into Go2W motor torques per substep.

Go2WMixedActionCfg

Configure the Go2W leg-position and wheel-velocity motor action.

Go2WVelocityCommand

Go2WVelocityCommandCfg

Velocity command with the legacy Go2W planar dead zone.

class unilab.tasks.locomotion.go2w.manager_terms.Go2WMixedAction[source]

Bases: ActionTerm

Convert one community action term into Go2W motor torques per substep.

Parameters:
requires_substep_state_feedback: ClassVar[bool] = True

Whether apply_actions needs state produced by the previous physics substep.

False declares that the generated control is invariant across all physics substeps in one control step, so the env may apply it once before a batched backend step. State-feedback terms must override this declaration with True.

cfg: Go2WMixedActionCfg
__init__(cfg, env)[source]
Parameters:
property action_dim: int
property raw_action: ndarray

Clipped policy action, matching the legacy observable action buffer.

property previous_raw_action: ndarray
property processed_action: ndarray
property motor_torque: ndarray
property leg_kp: ndarray
property leg_kd: ndarray
process_actions(actions)[source]
Parameters:

actions (ndarray)

Return type:

None

apply_actions()[source]
Return type:

None

set_motor_gain_multipliers(env_ids, kp_multiplier, kd_multiplier)[source]
Parameters:
Return type:

None

reset(env_ids=None)[source]

Resets the manager term.

Parameters:

env_ids (ndarray | slice | None)

Return type:

None

class unilab.tasks.locomotion.go2w.manager_terms.Go2WMixedActionCfg[source]

Bases: ActionTermCfg

Configure the Go2W leg-position and wheel-velocity motor action.

Parameters:
actuator_names: tuple[str, ...] | list[str]
leg_action_scale: float = 0.25
hip_action_scale: float | None = None
wheel_action_scale: float = 10.0
leg_kp: float = 35.0
leg_kd: float = 0.5
wheel_kd: float = 0.5
clip_actions: float = 1.0
simulate_action_latency: bool = False
build(env)[source]

Build the action term from this config.

Parameters:

env (ManagerBasedRlEnv)

Return type:

Go2WMixedAction

__init__(*, entity_name, clip=None, actuator_names, leg_action_scale=0.25, hip_action_scale=None, wheel_action_scale=10.0, leg_kp=35.0, leg_kd=0.5, wheel_kd=0.5, clip_actions=1.0, simulate_action_latency=False)
Parameters:
class unilab.tasks.locomotion.go2w.manager_terms.Go2WVelocityCommand[source]

Bases: UniformVelocityCommand

Parameters:
cfg: Go2WVelocityCommandCfg
__init__(cfg, env)[source]
Parameters:
class unilab.tasks.locomotion.go2w.manager_terms.Go2WVelocityCommandCfg[source]

Bases: UniformVelocityCommandCfg

Velocity command with the legacy Go2W planar dead zone.

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)

  • planar_dead_zone (float)

planar_dead_zone: float = 0.2
build(env)[source]

Build the command term from this config.

Parameters:

env (ManagerBasedRlEnv)

Return type:

Go2WVelocityCommand

__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>, planar_dead_zone=0.2)
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)

  • planar_dead_zone (float)

unilab.tasks.locomotion.go2w.manager_terms.clipped_action_rate_l2(env, action_name)[source]
Parameters:
  • env (ManagerBasedRlEnv)

  • action_name (str)

Return type:

ndarray

unilab.tasks.locomotion.go2w.manager_terms.constant_alive(env)[source]
Parameters:

env (ManagerBasedRlEnv)

Return type:

ndarray

unilab.tasks.locomotion.go2w.manager_terms.motor_torque(env, action_name)[source]
Parameters:
  • env (ManagerBasedRlEnv)

  • action_name (str)

Return type:

ndarray

unilab.tasks.locomotion.go2w.manager_terms.motor_torque_l2(env, action_name)[source]
Parameters:
  • env (ManagerBasedRlEnv)

  • action_name (str)

Return type:

ndarray

unilab.tasks.locomotion.go2w.manager_terms.randomize_motor_gains(env, env_ids, action_name, kp_multiplier_range, kd_multiplier_range)[source]

Sample owner-level motor gains without mutating backend actuator models.

Parameters:
Return type:

None

unilab.tasks.locomotion.go2w.manager_terms.upward_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]
Parameters:
  • env (ManagerBasedRlEnv)

  • asset_cfg (SceneEntityCfg)

Return type:

ndarray