Replies: 1 comment
-
We have a prototype for pytorch and also jax backends as well (mostly for fun - haven't done any profiling). Especially the jax backend could be significantly faster if we jit the dynamics. This might be a cleaner and more useful way than bindings to math3d, because we also get a differentiable physics model "for free" this way and we can still make use of vectorization in a subsequent step or GPU acceleration (for large teams). Btw., another reason for the slowness is the small timestep (default of 0.0005s). At least with the Lee controller it's possible to have larger timesteps and still get reasonable results. A proper ODE or RK4 rather than our basic Euler might also help in having larger timesteps. |
Beta Was this translation helpful? Give feedback.
-
I am trying out your SIL simulator for firmware dev. It is great, exactly what I wanted for so long!
I noticed it is fairly slow - less than 5x realtime. I profiled the code and found it's spending over 80% of the time doing quaternion ops in the Rowan library.
Would you accept a PR replacing Rowan with some other quaternion library? Perhaps our own math3d.h via the bindings? Or some other package - I notice that Rowan is calling
np.cross
, which I have found to be absurdly slow in the past.Beta Was this translation helpful? Give feedback.
All reactions