unilab.envs.motion_tracking.g1.motion_box_loader¶
Motion loading with object state support for box tracking tasks.
Classes
Motion data with optional object state. |
|
Motion loader that also loads object state from NPZ files. |
- class unilab.envs.motion_tracking.g1.motion_box_loader.BoxMotionData[source]¶
Bases:
MotionDataMotion data with optional object state.
- Parameters:
- __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)¶
- class unilab.envs.motion_tracking.g1.motion_box_loader.BoxMotionLoader[source]¶
Bases:
MotionLoaderMotion 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:
- Returns:
MotionData at specified frames