Public Member Functions | Static Public Member Functions
convenience_math_functions::MathFunctions Class Reference

#include <MathFunctions.h>

List of all members.

Public Member Functions

 MathFunctions ()
 ~MathFunctions ()

Static Public Member Functions

static double angleDistance (const double _f1, const double _f2)
static double capToPI (const double value)
template<typename Flt >
static void capToPI (std::vector< Flt > &v)
static bool equalFloats (const std::vector< float > &first, const std::vector< float > &second, float tolerance)
static bool equalFlt (float first, float second, float tolerance)
static Eigen::Quaterniond getRotationFromTo (const Eigen::Quaterniond &q1, const Eigen::Quaterniond &q2)
static double limitsToTwoPI (const double value, const double lowLimit, const double highLimit)
static double quatAngularDistance (const geometry_msgs::Quaternion &_q1, const geometry_msgs::Quaternion &_q2)
static double quatAngularDistance (const Eigen::Quaterniond &_q1, const Eigen::Quaterniond &_q2)
static double vecAngularDistance (const Eigen::Vector3d &_v1, const Eigen::Vector3d &_v2)

Detailed Description

A collection of helper math functions

Author:
Jennifer Buehler

Definition at line 15 of file MathFunctions.h.


Constructor & Destructor Documentation

Definition at line 21 of file MathFunctions.h.

Definition at line 23 of file MathFunctions.h.


Member Function Documentation

double MathFunctions::angleDistance ( const double  _f1,
const double  _f2 
) [static]

Returns shortest distace between two angles (in rad), specifically when going from _f2 to _f1

Definition at line 39 of file MathFunctions.cpp.

double MathFunctions::capToPI ( const double  value) [static]

enforces the bound of the angle to be between -PI and PI this is a useful helper for lots of places because the native jaco joint angles may go beyond PI.

Definition at line 7 of file MathFunctions.cpp.

template<typename Flt >
static void convenience_math_functions::MathFunctions::capToPI ( std::vector< Flt > &  v) [inline, static]

Definition at line 35 of file MathFunctions.h.

bool MathFunctions::equalFloats ( const std::vector< float > &  first,
const std::vector< float > &  second,
float  tolerance 
) [static]

equalFlt(float, float, float) returns true for all in vector

Definition at line 89 of file MathFunctions.cpp.

bool MathFunctions::equalFlt ( float  first,
float  second,
float  tolerance 
) [static]

Definition at line 84 of file MathFunctions.cpp.

Eigen::Quaterniond MathFunctions::getRotationFromTo ( const Eigen::Quaterniond &  q1,
const Eigen::Quaterniond &  q2 
) [static]

Definition at line 31 of file MathFunctions.cpp.

double MathFunctions::limitsToTwoPI ( const double  value,
const double  lowLimit,
const double  highLimit 
) [static]

Transforms a value between -PI and PI to a value between -2*PI and +2*PI such that the joint limits are respected. It is assumed all values i have to be between between lower bound l and higher bound h, and always l <= i <= h. So e.g. l=-3.9 .. h=0.8 instead of l=2.38 .. h=0.8. So lowLimit can *always* be smaller than highlimit, and there never is a jump from PI to -PI or the other way round.

Definition at line 22 of file MathFunctions.cpp.

double MathFunctions::quatAngularDistance ( const geometry_msgs::Quaternion &  _q1,
const geometry_msgs::Quaternion &  _q2 
) [static]

Definition at line 55 of file MathFunctions.cpp.

double MathFunctions::quatAngularDistance ( const Eigen::Quaterniond &  _q1,
const Eigen::Quaterniond &  _q2 
) [static]

Definition at line 64 of file MathFunctions.cpp.

double MathFunctions::vecAngularDistance ( const Eigen::Vector3d &  _v1,
const Eigen::Vector3d &  _v2 
) [static]

Definition at line 74 of file MathFunctions.cpp.


The documentation for this class was generated from the following files:


convenience_math_functions
Author(s): Jennifer Buehler
autogenerated on Sat Mar 2 2019 03:21:39