"""Inspect a H2 reference motion: python load_motion.py motions/.npz""" import sys import numpy as np with np.load(sys.argv[1], allow_pickle=False) as clip: qpos = clip['qpos'] fps = float(clip['fps']) print(f'{len(qpos)} frames, {fps:g} fps, {len(qpos)/fps:.2f} seconds') root_xyz, root_wxyz, joints = qpos[:, :3], qpos[:, 3:7], qpos[:, 7:] print('root XYZ:', root_xyz.shape, 'root WXYZ:', root_wxyz.shape, 'joint radians:', joints.shape) print('joints:', [str(n) for n in clip['joint_names']])