mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
attitude_converter.h File Reference

Conversions between various representations of object attitude in 3D. Supports Quaternions, Euler angles, Angle-axis and Rotational matrices from tf, tf2, Eigen and geometry_msgs libraries. The default Euler angle notation is the extrinsic RPY. More...

#include <vector>
#include <cmath>
#include <Eigen/Dense>
#include <tuple>
#include <tf2_ros/transform_listener.h>
#include <tf2_ros/buffer.h>
#include <tf2_eigen/tf2_eigen.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#include <tf/transform_datatypes.h>
#include <tf_conversions/tf_eigen.h>
#include <mrs_lib/geometry/misc.h>
+ Include dependency graph for attitude_converter.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mrs_lib::EulerAttitude
 A small class for storing the Euler angles. More...
 
class  mrs_lib::Vector3Converter
 Converter of Vector3 representations. Instantiate it with any type of vector3 in constructor and convert it by assigning it to any other type of vector3 variable. More...
 
class  mrs_lib::AttitudeConverter
 The main convertor class. Instantiate with any type in constructor and get the value in any other type by assigning the instance to your variable, as: tf::Quaternion tf1_quaternion = AttitudeConverter(roll, pitch, yaw); All the default Euler angles are in the extrinsic RPY notation. More...
 
struct  mrs_lib::AttitudeConverter::GetHeadingException
 is thrown when calculating of heading is not possible due to atan2 exception More...
 
struct  mrs_lib::AttitudeConverter::MathErrorException
 is thrown when math breaks More...
 
struct  mrs_lib::AttitudeConverter::InvalidAttitudeException
 is thrown when the internal attitude becomes invalid More...
 
struct  mrs_lib::AttitudeConverter::EulerFormatException
 is thrown when the Euler angle format is set wrongly More...
 
struct  mrs_lib::AttitudeConverter::SetHeadingException
 is thrown when the heading cannot be set to an existing attitude More...
 
struct  std::tuple_size< mrs_lib::AttitudeConverter >
 
struct  std::tuple_element< 0, mrs_lib::AttitudeConverter >
 
struct  std::tuple_element< 1, mrs_lib::AttitudeConverter >
 
struct  std::tuple_element< 2, mrs_lib::AttitudeConverter >
 

Namespaces

 mrs_lib
 All mrs_lib functions, classes, variables and definitions are contained in this namespace.
 

Enumerations

enum  RPY_convention_t { RPY_INTRINSIC = 1, RPY_EXTRINSIC = 2 }
 

Detailed Description

Conversions between various representations of object attitude in 3D. Supports Quaternions, Euler angles, Angle-axis and Rotational matrices from tf, tf2, Eigen and geometry_msgs libraries. The default Euler angle notation is the extrinsic RPY.

Author
Tomas Baca