unilab.envs.motion_tracking.g1.motion_box_loader

Motion loading with object state support for box tracking tasks.

Classes

BoxMotionData

Motion data with optional object state.

BoxMotionLoader

Motion loader that also loads object state from NPZ files.

class unilab.envs.motion_tracking.g1.motion_box_loader.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.envs.motion_tracking.g1.motion_box_loader.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.

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