Skip to content

Instantly share code, notes, and snippets.

@walkoncross
Created August 4, 2021 21:03
Show Gist options
  • Save walkoncross/984ca3aef41595b23741b8a8233d1aeb to your computer and use it in GitHub Desktop.
Save walkoncross/984ca3aef41595b23741b8a8233d1aeb to your computer and use it in GitHub Desktop.
从smplx轴角到bvh文件
from scipy.spatial.transform import Rotation as R
r = R.from_rotvec(np.pi/2 * np.array([0, 0, 1]))
euler = r.as_euler(‘ZYX’, degrees=True) # 大写表示intrinsic rotation
write_order_string = ‘Zrotation Yrotation Xrotation’
write_euler_string = ‘ ’.join([str(euler[I] for I in range(3)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment