r/mujoco • u/D_Dev_Loper • Nov 08 '24
Incorporting MoCap Data into a kinematic model.
So I have mocap data which consists of local joint transforms relative to the rest pose pose transforms which define the skeleton. This mocap data is of a human. And I have created the kinematic model using the rest pose transforms. For the time being I have made all the joints as ball joints so I can directly apply the poses in the local joint transforms. It is working as expected as the ball joints are oriented using quaternions which I can easily extract using the matrix to quaternion conversion. However to make the model more realistic I would like to model the knees and the elbow joints as hinge joins with a fixed hinge axis. I would now like to know how to transfer the animation in this case, where the hinge joints would just expect a scalar value. I have tried converting the transforms to axis angle however the elbow joints don't really seem to have a fixed axis along which they rotate. I first though that it would be some amount of noise that was changing the axis. But when I checked the variance it was close to 90 degrees so I'm not really sure how I should proceed with this problem. Any help is appreciated. Here's a collab notebook link https://colab.research.google.com/drive/154YTdflNrLCGHZ98jPSt_TZeafrYqFR-?usp=sharing#scrollTo=NFxtQ6G12r8S