unilab.tasks.motion_tracking.g1.manager_terms.BoxMotionCommand

class unilab.tasks.motion_tracking.g1.manager_terms.BoxMotionCommand[source]

Bases: MotionCommand

Parameters:

Methods

__init__(cfg, env)

compute(dt[, env_ids])

Advance the command state by dt.

post_compute()

Refresh state that depends on committed command-side simulation writes.

reset(env_ids)

Resets the manager term.

Attributes

cfg: BoxMotionCommandCfg
__init__(cfg, env)[source]
Parameters:
property box_motion: BoxMotionData
property object_pos_w: ndarray
property object_quat_w: ndarray
property object_state_b: ndarray
post_compute()[source]

Refresh state that depends on committed command-side simulation writes.

Return type:

None

__call__(*args, **kwargs)

Returns the value of the term required by the manager.

Return type:

Any

property anchor_ang_vel_w: ndarray
property anchor_lin_vel_w: ndarray
property anchor_pos_w: ndarray
property anchor_quat_w: ndarray
property body_ang_vel_w: ndarray
property body_lin_vel_w: ndarray
property body_pos_w: ndarray
property body_quat_w: ndarray
property command: ndarray
compute(dt, env_ids=None)

Advance the command state by dt.

With env_ids=None (the per-step path) all envs are updated; with env_ids (the reset path) timers and the command update are scoped to those envs. Metrics are refreshed each call; terms may scope per-row metric work to env_ids since other rows are unchanged since the per-step update, or defer row-wise metric work to reset() when reset is the only consumer (e.g. MotionCommand, issue #1355).

dt may be a scalar (all envs) or a per-env tensor (auto-reset path, where freshly reset envs get zero to keep their timers full). A tensor dt requires env_ids=None.

Parameters:
Return type:

None

property joint_pos: ndarray
property joint_vel: ndarray
property name: str
property num_envs: int
reset(env_ids)

Resets the manager term.

Parameters:

env_ids (ndarray | slice | None)

Return type:

dict[str, float]

property robot_anchor_ang_vel_w: ndarray
property robot_anchor_lin_vel_w: ndarray
property robot_anchor_pos_w: ndarray
property robot_anchor_quat_w: ndarray
property robot_body_ang_vel_w: ndarray
property robot_body_lin_vel_w: ndarray
property robot_body_pos_w: ndarray
property robot_body_quat_w: ndarray
property robot_joint_pos: ndarray
property robot_joint_vel: ndarray
metrics: dict[str, np.ndarray]