bdaiinstitute / spatialmath-python

Create, manipulate and convert representations of position and orientation in 2D or 3D using Python
MIT License
519 stars 84 forks source link

Quaternion order #42

Closed jmount1992 closed 2 years ago

jmount1992 commented 2 years ago

What would be the thoughts around adding an ordering flag/argument to the function spatialmath.base.q2r? The spatialmath.base.r2q already as this flag/argument. While you have defined a quaternion to have the order (w,x,y,z) (documentation link). There other packages, like ROS, that work in an x,y,z,w order.

Even without that feature, I think the q2r documentation should be explicit about the quaternion order, as it is something that is easy to forget (that different packages use different quaternion orders).

petercorke commented 2 years ago

It's a good point, and worth adding to be symmetric. Agree also that the doco needs some work. Happy to have PRs :)

I'll put aside some time to integrate a bunch of small PRs and suggestions, and some of my uncommitted tweaks, and push a new release.

jmount1992 commented 2 years ago

Hopefully, I get some time in the near future, to create a PR for this.

petercorke commented 2 years ago

Done on master, to pypi soon