unilab.tasks.motion_tracking

Hydra-owned motion tracking tasks on the NumPy Manager-Based runtime.

class unilab.tasks.motion_tracking.BoxMotionData[source]

Bases: MotionData

Motion data with optional object state.

Parameters:
object_pos_w: ndarray | None = None
object_quat_w: ndarray | None = None
object_lin_vel_w: ndarray | None = None
object_ang_vel_w: ndarray | None = None
__init__(joint_pos, joint_vel, body_pos_w, body_quat_w, body_lin_vel_w, body_ang_vel_w, object_pos_w=None, object_quat_w=None, object_lin_vel_w=None, object_ang_vel_w=None)
Parameters:
class unilab.tasks.motion_tracking.BoxMotionLoader[source]

Bases: MotionLoader

Motion loader that also loads object state from NPZ files.

__init__(motion_file, body_indices=None)[source]

Initialize motion loader.

Parameters:
  • motion_file – Path to one NPZ file, or a sequence of NPZ files

  • body_indices – Optional indices into the NPZ body axis. The exported motion files currently keep MuJoCo body-id layout, so these indices are expected to follow that convention.

make_motion_data_buffer(num_frames)[source]

Allocate a reusable MotionData buffer for frame-index gathers.

Parameters:

num_frames (int)

Return type:

BoxMotionData

get_motion_at_frame(frame_idx, out=None)[source]

Get motion data at specified frame indices.

Parameters:
  • frame_idx (ndarray) – Frame indices (N,)

  • out (MotionData | None) – Optional reusable output buffer.

Return type:

BoxMotionData

Returns:

MotionData at specified frames

Modules

common

Shared NumPy motion command, loader, and numeric manager helpers.

g1

G1 motion profiles on the shared NumPy Manager-Based runtime.

x2

AgiBot X2 motion profiles on the shared NumPy Manager-Based runtime.