Closed ErikGartner closed 3 years ago
Thanks for the PR. Would it help to move the normalize into the matrix_to_quat function instead? Or are there other locations that need patching?
It seems to be sufficient for my use case to only normalize in world.hpp. I made a new PR that for.
https://github.com/google-research/tiny-differentiable-simulator/pull/135
During contact computation I have noticed that the collision geometry poses sometimes are not perfectly normalized. When we then call
rotate
we rotate a vector with an unnormalized quaternion. A quick fix would be to normalize here.I haven't dug into this deeper into the root cause but it seems like it might happen when we go from rotation matrices to quaternions here: https://github.com/google-research/tiny-differentiable-simulator/blob/a564170bef387522c7149bbaa843ba0125e1a900/src/world.hpp#L247