unilab.tasks.locomotion.go2.footstand

Hydra-owned Manager-Based terms for the Go2 footstand task.

The task keeps its historical NumPy observation, action, reward, termination, and reset semantics while using only the public manager/entity facade.

Functions

frame_observation(env, action_name)

privileged_observation(env, action_name)

Classes

FootstandIncrementalAction

Integrate clipped policy deltas and write position targets each substep.

FootstandIncrementalActionCfg

Incremental position action in the historical actuator/policy order.

FootstandJointReset

Reset all Go2 joints to the home pose plus a uniform offset.

FootstandMassRandomization

Compose all-link mass scaling and torso additive mass in one reset write.

FootstandReward

Historical positive-clipped reward aggregate backed by one state snapshot.

FootstandState

One per-control-step snapshot shared by termination, reward, and observations.

FootstandTermination

Aggregate the historical non-timeout termination state before rewards.

class unilab.tasks.locomotion.go2.footstand.FootstandIncrementalAction[source]

Bases: ActionTerm

Integrate clipped policy deltas and write position targets each substep.

Parameters:
cfg: FootstandIncrementalActionCfg
__init__(cfg, env)[source]
Parameters:
property action_dim: int
property raw_action: ndarray
property previous_raw_action: ndarray
property target: ndarray
property joint_ids: ndarray
property joint_names: tuple[str, ...]
property actuator_names: tuple[str, ...]
property joint_lower: ndarray
property joint_upper: ndarray
property state: FootstandState
property entity: Entity
property estimated_torque: ndarray
process_actions(actions)[source]
Parameters:

actions (ndarray)

Return type:

None

apply_actions()[source]
Return type:

None

estimate_torque(joint_pos, joint_vel, out)[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.go2.footstand.FootstandIncrementalActionCfg[source]

Bases: ActionTermCfg

Incremental position action in the historical actuator/policy order.

Parameters:
actuator_names: tuple[str, ...] | list[str]
joint_names: tuple[str, ...] | list[str]
joint_position_limits: tuple[tuple[float, float], ...] | list[list[float]]
action_scale: float = 0.3
clip_actions: float = 1.0
kp: float = 35.0
kd: float = 0.5
simulate_action_latency: bool = False
build(env)[source]

Build the action term from this config.

Parameters:

env (ManagerBasedRlEnv)

Return type:

FootstandIncrementalAction

__init__(*, entity_name, clip=None, actuator_names, joint_names, joint_position_limits, action_scale=0.3, clip_actions=1.0, kp=35.0, kd=0.5, simulate_action_latency=False)
Parameters:
class unilab.tasks.locomotion.go2.footstand.FootstandJointReset[source]

Bases: ManagerTermBase

Reset all Go2 joints to the home pose plus a uniform offset.

Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (ManagerBasedRlEnv)

__init__(cfg, env)[source]
Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (ManagerBasedRlEnv)

class unilab.tasks.locomotion.go2.footstand.FootstandMassRandomization[source]

Bases: ManagerTermBase

Compose all-link mass scaling and torso additive mass in one reset write.

Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (ManagerBasedRlEnv)

__init__(cfg, env)[source]
Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (ManagerBasedRlEnv)

class unilab.tasks.locomotion.go2.footstand.FootstandReward[source]

Bases: ManagerTermBase

Historical positive-clipped reward aggregate backed by one state snapshot.

Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (ManagerBasedRlEnv)

__init__(cfg, env)[source]
Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (ManagerBasedRlEnv)

class unilab.tasks.locomotion.go2.footstand.FootstandState[source]

Bases: object

One per-control-step snapshot shared by termination, reward, and observations.

Parameters:
__init__(env, action)[source]
Parameters:
property last_counter: int
property default_joint_pos: ndarray
property action: FootstandIncrementalAction
reset(env_ids)[source]
Parameters:

env_ids (ndarray)

Return type:

None

snapshot(env)[source]
Parameters:

env (_FootstandEnv)

Return type:

FootstandState

frame(env)[source]
Parameters:

env (_FootstandEnv)

Return type:

ndarray

privileged(env)[source]
Parameters:

env (_FootstandEnv)

Return type:

ndarray

class unilab.tasks.locomotion.go2.footstand.FootstandTermination[source]

Bases: ManagerTermBase

Aggregate the historical non-timeout termination state before rewards.

Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (ManagerBasedRlEnv)

__init__(cfg, env)[source]
Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (ManagerBasedRlEnv)

property state: FootstandState
property last_counter: int
reset(env_ids=None)[source]

Resets the manager term.

Parameters:

env_ids (ndarray | slice | None)

Return type:

None

unilab.tasks.locomotion.go2.footstand.frame_observation(env, action_name)[source]
Parameters:
  • env (_FootstandEnv)

  • action_name (str)

Return type:

ndarray

unilab.tasks.locomotion.go2.footstand.privileged_observation(env, action_name)[source]
Parameters:
  • env (_FootstandEnv)

  • action_name (str)

Return type:

ndarray