ASCO Aerial Autonomy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
math Namespace Reference

Math namespace to separate math functions from system functions if exist. More...

Functions

double angleWrap (double x)
 Wrap an angle to be in the range [-pi, pi) More...
 
double clamp (double x, double min, double max)
 Clip a number to bewteen a min and max value. More...
 
template<class T >
tf::Transform getTransformFromVector (const T &input)
 Generate a tf transform from a vector of xyzrpy. More...
 
template<class T >
std::vector< tf::Transform > getTransformsFromVector (const T &input)
 Generate a vector of tf transforms from a vector of xyzrpy. More...
 

Detailed Description

Math namespace to separate math functions from system functions if exist.

Function Documentation

double math::angleWrap ( double  x)

Wrap an angle to be in the range [-pi, pi)

Parameters
xAngle to wrap
Returns
Wrapped angle
double math::clamp ( double  x,
double  min,
double  max 
)

Clip a number to bewteen a min and max value.

Parameters
xNumber to clamp
minMinimum value
maxMaximum value
Returns
Clamped value
template<class T >
tf::Transform math::getTransformFromVector ( const T &  input)

Generate a tf transform from a vector of xyzrpy.

Template Parameters
TThe vector type can be Eigen, std vector, protobuf
Parameters
inputThe input vector containing x,y,z, r,p,y
Returns
tf transform
template<class T >
std::vector<tf::Transform> math::getTransformsFromVector ( const T &  input)

Generate a vector of tf transforms from a vector of xyzrpy.

Template Parameters
TThe vector type can be Eigen, std vector, protobuf
Parameters
inputThe input vector containing x,y,z, r,p,y
Returns
vector of tf::Transform
Todo:
(Matt) Add proto for transform and just process a list of the proto transforms here