Dustin Spicuzza
Dustin Spicuzza
FWIW pyfrc's physics module includes a 'perfect' four motor swerve drivetrain object for simulation. https://github.com/robotpy/pyfrc/blob/b8472df58739031b60c384f3304c6cb56e582f19/pyfrc/physics/drivetrains.py#L318
This example works for me, thanks!
You're right, I was overthinking it. Now the extra overhead is just an single comparison.
Never mind, my local test environment was stale when I tested it. I'll take a closer look tonight.
Well, I got rid of the MRO stuff so it's a lot simpler now. I feel like the other performance improvement would be to convert this tp_call to vectorcall, but...
I believe this is the same issue as https://github.com/pybind/pybind11/pull/2839. The smart_holder branch fixes this problem, and will be merged as pybind11 v3.0. See https://github.com/pybind/pybind11/pull/5542
The tests aren't passing.
This morning I took a look since I thought it would be easy... but alas, it was more annoying than I expected.
That does not work.