unilab.tasks.manipulation.allegro_inhand.manager_terms

Manager-Based terms for Allegro in-hand ball rotation.

Hydra owns the production task declaration. These terms use only the public Entity facade and the community manager lifecycle; they do not inspect backend objects or physical state layouts.

Functions

dropped(env, state_term_name)

estimated_torque_l2(env, state_term_name)

estimated_work_l2(env, state_term_name)

hand_pose_deviation_l2(env, state_term_name)

object_linear_velocity_l1(env, state_term_name)

Classes

AllegroDropTermination

Termination-owned drop state, computed before reward terms.

AllegroHandBallReset

Reset hand joints and the ball root without exposing qpos layout.

AllegroIncrementalPositionAction

Integrate clipped policy deltas into bounded hand-joint targets.

AllegroIncrementalPositionActionCfg

Incremental position targets used by the original Allegro policy.

AllegroRotateReward

Reward angular velocity projected onto a cold-path-normalized axis.

AllegroRotationObservation

One 35-D frame plus state shared by termination and reward terms.

class unilab.tasks.manipulation.allegro_inhand.manager_terms.AllegroDropTermination[source]

Bases: ManagerTermBase

Termination-owned drop state, computed before reward terms.

Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (_AllegroEnv)

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

  • env (_AllegroEnv)

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

Resets the manager term.

Parameters:

env_ids (ndarray | slice | None)

Return type:

None

class unilab.tasks.manipulation.allegro_inhand.manager_terms.AllegroHandBallReset[source]

Bases: ManagerTermBase

Reset hand joints and the ball root without exposing qpos layout.

Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (ManagerBasedRlEnv)

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

  • env (ManagerBasedRlEnv)

class unilab.tasks.manipulation.allegro_inhand.manager_terms.AllegroIncrementalPositionAction[source]

Bases: ActionTerm

Integrate clipped policy deltas into bounded hand-joint targets.

Parameters:
cfg: AllegroIncrementalPositionActionCfg
__init__(cfg, env)[source]
Parameters:
property action_dim: int
property raw_action: ndarray
property target: ndarray
property ctrl_lower: ndarray
property ctrl_upper: ndarray
property joint_ids: ndarray
process_actions(actions)[source]
Parameters:

actions (ndarray)

Return type:

None

apply_actions()[source]
Return type:

None

reset(env_ids=None)[source]

Resets the manager term.

Parameters:

env_ids (ndarray | slice | None)

Return type:

None

class unilab.tasks.manipulation.allegro_inhand.manager_terms.AllegroIncrementalPositionActionCfg[source]

Bases: ActionTermCfg

Incremental position targets used by the original Allegro policy.

Parameters:
actuator_names: tuple[str, ...] | list[str]
action_scale: float
raw_action_clip: tuple[float, float] | list[float]
build(env)[source]

Build the action term from this config.

Parameters:

env (ManagerBasedRlEnv)

Return type:

AllegroIncrementalPositionAction

__init__(*, entity_name, clip=None, actuator_names, action_scale, raw_action_clip)
Parameters:
class unilab.tasks.manipulation.allegro_inhand.manager_terms.AllegroRotateReward[source]

Bases: ManagerTermBase

Reward angular velocity projected onto a cold-path-normalized axis.

Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (_AllegroEnv)

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

  • env (_AllegroEnv)

class unilab.tasks.manipulation.allegro_inhand.manager_terms.AllegroRotationObservation[source]

Bases: ManagerTermBase

One 35-D frame plus state shared by termination and reward terms.

Parameters:
  • cfg (ManagerTermBaseCfg)

  • env (_AllegroEnv)

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

  • env (_AllegroEnv)

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

Resets the manager term.

Parameters:

env_ids (ndarray | slice | None)

Return type:

None

snapshot(env)[source]
Parameters:

env (_AllegroEnv)

Return type:

AllegroRotationObservation

unilab.tasks.manipulation.allegro_inhand.manager_terms.dropped(env, state_term_name)[source]
Parameters:
  • env (_AllegroEnv)

  • state_term_name (str)

Return type:

ndarray

unilab.tasks.manipulation.allegro_inhand.manager_terms.estimated_torque_l2(env, state_term_name)[source]
Parameters:
  • env (_AllegroEnv)

  • state_term_name (str)

Return type:

ndarray

unilab.tasks.manipulation.allegro_inhand.manager_terms.estimated_work_l2(env, state_term_name)[source]
Parameters:
  • env (_AllegroEnv)

  • state_term_name (str)

Return type:

ndarray

unilab.tasks.manipulation.allegro_inhand.manager_terms.hand_pose_deviation_l2(env, state_term_name)[source]
Parameters:
  • env (_AllegroEnv)

  • state_term_name (str)

Return type:

ndarray

unilab.tasks.manipulation.allegro_inhand.manager_terms.object_linear_velocity_l1(env, state_term_name)[source]
Parameters:
  • env (_AllegroEnv)

  • state_term_name (str)

Return type:

ndarray