Class rotation_t

Inheritance Relationships

Base Type

  • public Eigen::Quaterniond

Class Documentation

class rotation_t : public Eigen::Quaterniond

Quaternion type, using Eigen Quaterniond.

Public Functions

inline point3d_t operator*(const point3d_t &point_) const

Applies this rotation to a 3D point.

Parameters:

point_ – Point coordinates to rotate with this quaternion.

Returns:

The rotated point.

inline translation_t operator*(const translation_t &translation_) const

Applies this rotation to a translation vector.

Parameters:

translation_ – Translation vector expressed in the source frame.

Returns:

The rotated translation.

inline rotation_t operator*(const rotation_t &other_) const

Composes this rotation with another rotation.

Parameters:

other_ – Rotation applied after this rotation in the composition.

Returns:

The result of applying this rotation followed by the other.

inline Eigen::Vector3d operator*(const Eigen::Vector3d &vec_) const

Applies this rotation to a 3D Eigen vector.

Parameters:

vec_ – 3D vector to rotate using this quaternion.

Returns:

The rotated 3D vector.

inline rotation_t inverse() const

Computes and returns the inverse of this rotation.

Returns:

The inverse of the current rotation.

inline Eigen::Matrix3f to_rerun() const

Rerun wants to get the rotation as a set of floats. To ease the conversion, we provide this function, which outputs the rotation matrix as 3x3 matrix of floats.

Returns:

Rotation matrix as floats.

inline array4D_t get_quaternions() const

Set the rotation in the quaternion format.

Returns:

The rotation as a quaternion (x, y, z, w).

Public Static Functions

static inline double computeError(const rotation_t &rotation1_, const rotation_t &rotation2_)

Computes the angular error (in degrees) between two rotations.

Note

The error is defined as the angle of the relative rotation between rotation1 and rotation2.

Parameters:
  • rotation1_ – Source rotation used as the reference orientation.

  • rotation2_ – Rotation compared against rotation1_.

Returns:

The rotation error in degrees.