omimo / PyMO

A library for machine learning research on motion capture data
https://omid.al/projects/pymo/
MIT License
350 stars 71 forks source link

add rotation-ordering util #7

Closed demul closed 4 years ago

demul commented 5 years ago

When I tried to transform some BVH files, There was a problem that the positions of joints are located very strangely.

Now I find the reason, there is a problem in 'rotation_tools.py' The problem is that you only considered about BVH file that have 'XYZ-order' in rotation channel. Actually, there are BVH file that have 'ZYX-order' or 'ZXY-order' or etc... too.

As you know, in rotation matrix, the joining order of single-axis rotation matrix is very important(commutative law is not valid).

So, I just add one parameter named 'rotation_order' at class 'Rotation', and add a simple 'For Clause' at 'rotation_tools.py' to make a correct order. And, to give argument to 'Rotation', I modify 'preprocessin.py' very a little bit.

I wish your 'PyMO' contributing to more people. Thank you for sharing good open-source.

-demul

omimo commented 4 years ago

Thanks @demul ! Sorry for the delay. I'm back at working on PyMO!

demul commented 3 years ago

@omimo Welcome back! :>