9
$\begingroup$

I am currently googling on this topic but I would like to hear your opinion.

What is the best self-contained SE3 library that offers interconversion between quaternion, rotation vector, transformation matrix?

Those are the functions that I often use for my projects and all implemented in Matlab. And I am looking for an alternative to avoid re-implementing them all in python.

Quaternion2RotVector and its inverse

Quaternion2RotMatrix and its inverse

RotMatrix2RotVector and its inverse

SE3 inverse, the inverse function of each rotation representation

$\endgroup$
5
$\begingroup$

ROS's tf.transformations.py has self-contained code for doing these functions and can be used without installing ros. In fact, the python code only depends on numpy!

transformations.py

$\endgroup$
5
$\begingroup$

Writing your own package is always the best way to learn. If you want to try something premade here are a few packages to choose from:

  • Spatial Math Toolbox for Python Python3+numpy+scipy, also available from PyPy, with classes and functions. This is a Python port of my Robotics/Spatial Math Toolbox for MATLAB
  • Sophus C++/Eigen with Python wrappers
$\endgroup$
3
$\begingroup$

I wrote my own and learned useful things about numpy and python object initialization in the process. I don't regret it.

$\endgroup$
3
$\begingroup$

Klampt Library by Kris Hauser is very good and implement a lot of distances functions including SE3 (R3 + SO3). I use Klampt for some robotic arms applications

$\endgroup$
1
  • $\begingroup$ Welcome to Robotics hugosc. Thanks for your answer but we are looking for comprehensive answers that provide some explanation and context. Very short answers cannot do this, so please edit your answer to explain why it is right, ideally with citations. Answers that don't include explanations may be removed. See How to Answer for more info. $\endgroup$
    – Ben
    May 13 at 14:59
2
$\begingroup$

I'm surpised nobody mentioned Scipy. Easy to use, mature, great docs, huge community.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.