And, I would keep your PMI fix rather than create_compatible_rigid_body.
The create_compatible_rigid_body
runs get_transformation_aligning_first_to_second so it seems to be more
computationally costly, am I correct Ben?.
Sure, but it's a one-time cost - I doubt you'd notice the difference.
I could imagine things could be slightly different but here the rb
rotations are not different only slightly
Looks like a simple inversion to me, a very slight difference giving a
very different result. e.g. -1e-16 and +1e-16 are only very slightly
different but are of opposite sign.
Maybe the create_rigid_body function
could use the PMI fix internally?
It's a workaround. The fix is to use create_compatible_rigid_body. You
can certainly use the PMI workaround but then your reference frame won't
align with the principal axes of the body, maybe not an issue in your
application.