[Documentation] [TitleIndex] [WordIndex

Rotations in ROS

Notation

Fixed Axis vs Euler Angles

In these APIs there are two notations.

C++

There are a number of math libraries including bullet and eigen and kdl. Bullet is the primary linear math library used in the system at the moment.

Bullet

There are two classes within bullet which deal with rotations, btMatrix3x3 and btQuaternion.

btMatrix3x3

Accessors

Mutators

btQuaternion

Accessors

To get angles out construct a btMatrix3x3 and use it's accessors. For example:  btQuaternion q; btMatrix3x3(q).getRPY(roll, pitch, yaw);

Mutators

Eigen

See Eigen's geometry tutorial.

KDL::Rotation

Constructors

Accessors

Python

Python euler angle support comes from transformations.py

transformations.py

The tf package also includes the popular transformations.py module. TransformerROS uses transformations.py to perform conversions between quaternions and matrices. transformations.py does has useful conversion on numpy matrices; it can convert between transformations as Euler angles, quaternions, and matrices.

To use these methods, include something similar to the following line:

   1 from tf.transformations import euler_from_quaternion

2024-11-30 14:38