unilab.tasks.motion_tracking.common.tensor_state_store.DeviceStateStore

class unilab.tasks.motion_tracking.common.tensor_state_store.DeviceStateStore[source]

Bases: object

Read qpos/qvel, scalar sensors, and tracked body state on one device.

Parameters:

Methods

__init__(*, backend, device, num_envs, ...)

apply_reset(reset_mask, qpos, qvel)

Apply a fixed-width reset through the public mask boundary.

qviews()

Return the current backend qpos/qvel views after a full read.

read([rows])

refresh_named_sensors()

Cross the backend's named-sensor projection boundary.

step_tensor(ctrl, nsteps)

Step through the negotiated packed plan when one is available.

validate_finite()

__init__(*, backend, device, num_envs, joint_qpos_ids, joint_qvel_ids, body_names, body_ids)[source]
Parameters:
qviews()[source]

Return the current backend qpos/qvel views after a full read.

Return type:

tuple[Tensor, Tensor]

read(rows=None)[source]
Parameters:

rows (Tensor | None)

Return type:

None

step_tensor(ctrl, nsteps)[source]

Step through the negotiated packed plan when one is available.

Parameters:
Return type:

dict | None

refresh_named_sensors()[source]

Cross the backend’s named-sensor projection boundary.

DEVICE_RESIDENT adapters may recompute derived projections when a named sensor view is requested. Unlike read(), this method performs no row validation, state-view negotiation, or task-buffer copy.

Return type:

None

apply_reset(reset_mask, qpos, qvel)[source]

Apply a fixed-width reset through the public mask boundary.

Parameters:
Return type:

dict | None

validate_finite()[source]
Return type:

None