unilab.envs.mdp.commands.velocity_command.UniformVelocityCommand¶
- class unilab.envs.mdp.commands.velocity_command.UniformVelocityCommand[source]¶
Bases:
CommandTermSample planar velocity commands and update frame-dependent components.
- Parameters:
env (
ManagerBasedRlEnv)
Methods
__init__(cfg, env)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.
Refresh state that depends on committed command-side simulation writes.
refresh_reset(reset_mask)reset([env_ids, publish_metrics])Attributes
IMU sensors used by per-step command tracking metrics.
- property tensor_sensor_names: tuple[str, ...]¶
IMU sensors used by per-step command tracking metrics.
- packed_sensor_aliases = {'pelvis_local_linvel': ('pelvis_local_linvel', 'local_linvel'), 'torso_gyro': ('torso_gyro', 'gyro')}¶
- bind_read_phase()¶
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:
- clear_episode_metrics(reset_mask)¶
Clear command metrics without a host metric reduction.
- 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.
- post_compute()¶
Refresh state that depends on committed command-side simulation writes.
- Return type:
- reset(env_ids=None, *, publish_metrics=True)¶