This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Library implementation choices
Federico Bertani edited this page Jun 8, 2018
·
1 revision
Project initially started with moble/quaternion but then moved to KieranWynn/pyquaternion because of the following reason:
- moble/quaternion doesn't work on windows, as stated in the readme
- pyquaternion has a better documentation
- pyquaternion has more high-level methods
On the downside pyquaternion has performance disadvantages, as example the following code with numpy-quaternion
quaternions = np.array(
[np.exp(numpy_quaternion.quaternion(*np.asarray(delta_theta)) / 2) for delta_theta in delta_thetas]
)
run in 0.6654262542724609 milliseconds while the following code with pyquaternion
quaternions = np.array(
[Quaternion.exp(Quaternion(vector=delta_theta)/2) for delta_theta in delta_thetas]
)
run in 24.69182014465332 milliseconds both with an array of 100 records
numpy_quaternion has a method "integrate_angular_velocity" but use a Runge-Kutta method that is very slow and a bit obscure