unilab.tasks.motion_tracking.common.manager_terms.MotionCommand

class unilab.tasks.motion_tracking.common.manager_terms.MotionCommand[source]

Bases: CommandTerm

Device-resident motion reference command for Manager owners.

Parameters:

Methods

__init__(cfg, env)

bind_read_phase()

Bind command state that requires the scene's tensor read phase.

clear_episode_metrics(reset_mask)

Clear command metrics without a host metric reduction.

compute(dt)

Advance the command state by dt.

post_compute()

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

post_compute_reset()

Run full-width post-compute after reset.

refresh_reset(reset_mask)

Consume the full-width reset mask without row comparison.

reset([env_ids, publish_metrics])

Selected-row motion command reset.

sampler_reset_diagnostics()

Attributes

cfg: MotionCommandCfg
__init__(cfg, env)[source]
Parameters:
last_step_timing_ms: dict[str, float]
last_post_compute_timing_ms: dict[str, float]
last_reset_timing_ms: dict[str, float]
bind_read_phase()[source]

Bind command state that requires the scene’s tensor read phase.

The default command owns no scene reads. Device-resident terms may override this hook to obtain stable public views after the Manager has compiled its packed read plan, avoiding construction-order coupling to EntityScene.read_plan.

Return type:

None

property tensor_carrier: bool
property tensor_body_names: tuple[str, ...]
property tensor_current_clip_end_frames: Tensor
property robot_joint_pos: Tensor
property robot_joint_vel: Tensor
property robot_body_pos_w: Tensor
property robot_body_quat_w: Tensor
property robot_body_lin_vel_w: Tensor
property robot_body_ang_vel_w: Tensor
property robot_anchor_pos_w: Tensor
property robot_anchor_quat_w: Tensor
property robot_anchor_lin_vel_w: Tensor
property robot_anchor_ang_vel_w: Tensor
property command: Tensor
property joint_pos: Tensor
property joint_vel: Tensor
property body_pos_w: Tensor
property body_quat_w: Tensor
property body_lin_vel_w: Tensor
property body_ang_vel_w: Tensor
property anchor_pos_w: Tensor
property anchor_quat_w: Tensor
property anchor_lin_vel_w: Tensor
property anchor_ang_vel_w: Tensor
reset(env_ids=None, *, publish_metrics=True)[source]

Selected-row motion command reset.

Parameters:
Return type:

dict[str, float]

sampler_reset_diagnostics()[source]
Return type:

dict[str, float]

property last_reset_payload_validated: bool

Whether the current reset payload already passed owner validation.

refresh_reset(reset_mask)[source]

Consume the full-width reset mask without row comparison.

Parameters:

reset_mask (Tensor)

Return type:

None

post_compute_reset()[source]

Run full-width post-compute after reset.

Return type:

None

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

clear_episode_metrics(reset_mask)

Clear command metrics without a host metric reduction.

Parameters:

reset_mask (Tensor)

Return type:

None

compute(dt)

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.

Full-command and metric finite diagnostics run only on the per-step full-batch path. The reset refresh is row-scoped; the immediately preceding command reset or reset-owner transaction remains the authoritative validation boundary for freshly reset rows.

Parameters:

dt (float | Tensor)

Return type:

None

property name: str
property num_envs: int
metrics: dict[str, Tensor]