unisim.backend.mujoco.motion_export.compute_tracking_fk¶
- unisim.backend.mujoco.motion_export.compute_tracking_fk(model_file, *, joint_names, base_poss, base_rots, base_lin_vels, base_ang_vels, dof_poss, dof_vels, progress=False, progress_desc=None)[source]¶
Replay a root+joint trajectory and return tracking FK arrays.
- Parameters:
model_file (
str) – MuJoCo XML scene file.track_*sensors are injected on a temporary copy; the source file is not modified.joint_names (
Sequence[str]) – Actuated joint names in the desired output column order.base_poss (
ndarray) – (N, 3) root positions, world frame.base_rots (
ndarray) – (N, 4) root quaternions, wxyz.base_lin_vels (
ndarray) – (N, 3) root linear velocities, world frame.base_ang_vels (
ndarray) – (N, 3) root angular velocities, world frame.dof_poss (
ndarray) – (N, len(joint_names)) joint positions.dof_vels (
ndarray) – (N, len(joint_names)) joint velocities.progress (
bool) – Show a tqdm progress bar over frames.
- Return type:
- Returns:
Dict with float32 arrays
joint_pos/joint_vel(N, len(joint_names)) andbody_pos_w/body_quat_w/body_lin_vel_w/body_ang_vel_w(N, nbody, …) in MuJoCo body-id layout, including the implicit world body 0.