Open dj-kefir-siorbacz opened 8 months ago
Good catch. I will take a look when I have a spare moment. Can you share the XYZ values (locations) on which you applied the IK?
Sure, here is the .npy
:
https://drive.google.com/file/d/1qIdf4H8w0QNmomaTUBcjyGC7HtsU3yi_/view?usp=sharing
Unfortunately not yet. Please ensure that the links to the npy and bvh files remain accessible.
I'm converting .npy to .bvh using the methods described here: https://github.com/GuyTevet/motion-diffusion-model/issues/32#issuecomment-1853388120 with
BasicInverseKinematics
class from this repo. For animations that turn around, i.e. root rotates about global vertical axis more than 180deg, some glitches are produced. Switching to Jacobian class doesn't eliminate the problem eithergenerated .bvh files with glitches
1 iteration .bvh: https://drive.google.com/file/d/1md9nnL1hm3KxeQObYoIhkvMo8pNuQRGL/view?usp=sharing
50 iteration .bvh: https://drive.google.com/file/d/1qx87mFa_w3Z4UVV-1AVWsQ3fozD6Vm1y/view?usp=sharing
higher iteration counts don't really improve the error, so I don't include them.
Video illustrating the problem for 50 iterations .bvh:
https://github.com/sigal-raab/Motion/assets/135321152/7d137594-f5e8-463d-97e1-9dad28bb817d
=> some joints change their twist (more than 90deg) rapdily during frames 180-185
my guess
maybe there is some issue with Quaternions being discontinuous at 180degs?
I also don't really know the math behind![image](https://github.com/sigal-raab/Motion/assets/135321152/066cfec5-b80d-4eb2-bbcf-b5c0ba76d76b)
log
,exp
andmean
of quaternions, so no idea if the code below is ok: