The old MJCF parser used compose, but since compose is also used in chain.py, there the complexity of FK was factorial in the length of the tree/chain. To be completely honest, I never fully understood why, but this PR makes it 10x faster for long chains (9 joints). All the tests still pass, except for the humanoid one because I un-implemented it. It could be re-implemented if someone was interested.
I changed a bunch of places to use float64 because with float32 it was actually off by 1e-4 and so the tests failed. Not sure what I did that made this change, but I think just using float64 is fine.
This PR also makes chain work with batched inputs, addressing #7
The old MJCF parser used
compose
, but sincecompose
is also used inchain.py
, there the complexity of FK was factorial in the length of the tree/chain. To be completely honest, I never fully understood why, but this PR makes it 10x faster for long chains (9 joints). All the tests still pass, except for the humanoid one because I un-implemented it. It could be re-implemented if someone was interested.I changed a bunch of places to use float64 because with float32 it was actually off by 1e-4 and so the tests failed. Not sure what I did that made this change, but I think just using float64 is fine.
This PR also makes chain work with batched inputs, addressing #7