Datasets:

Modalities:
Image
Text
ArXiv:
Libraries:
Datasets
License:
h2-dances / load_motion.py
Kyry10's picture
Add files using upload-large-folder tool
e0e6026 verified
Raw History Blame Contribute Delete
526 Bytes
"""Inspect a H2 reference motion: python load_motion.py motions/<clip>.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']])