LocalGuidance
A library that generates velocity references to follow a path.
math.hpp File Reference
#include <cmath>
#include <Eigen/Core>
#include <kindr/phys_quant/PhysicalQuantities.hpp>
#include <boost/math/special_functions/pow.hpp>
Include dependency graph for math.hpp:
This graph shows which files directly or indirectly include this file:

Namespaces

 robot_utils
 

Functions

void robot_utils::boundToRange (double *v, double min, double max)
 
void robot_utils::boundToRange (int *v, int min, int max)
 
double robot_utils::boundToRange (double v, double min, double max)
 
double robot_utils::mapTo01Range (double v, double min, double max)
 
double robot_utils::mapToUniformRange (double v, double min, double max)
 
double robot_utils::linearlyInterpolate (double v1, double v2, double t1, double t2, double t)
 
Eigen::Vector3d robot_utils::linearlyInterpolate (const Eigen::Vector3d &v1, const Eigen::Vector3d &v2, double t1, double t2, double t)
 
kindr::Position3D robot_utils::linearlyInterpolate (const kindr::Position3D &v1, const kindr::Position3D &v2, double t1, double t2, double t)
 
template<typename T >
robot_utils::mapInRange (T x, T in_min, T in_max, T out_min, T out_max)
 
int robot_utils::intmod (int n, int b)
 Map an integer n to the periodic interval (0, b-1). More...
 
int robot_utils::intmodRange (int n, int a, int b)
 Map an integer n to the interval [a, b]. More...
 
bool robot_utils::areNear (double a, double b, double tol=1e-6)
 Check if two values are numerically close. More...
 
bool robot_utils::isEqualOrLargerThan (double a, double b, double tol=1e-6)
 True if a is equal or larger than the b. More...
 
bool robot_utils::isEqualOrSmallerThan (double a, double b, double tol=1e-6)
 True if a is equal or smaller than the b. More...
 
bool robot_utils::isLargerThan (double a, double b, double tol=1e-6)
 True if a is larger than the b. More...
 
bool robot_utils::isSmallerThan (double a, double b, double tol=1e-6)
 True if a smaller than the b. More...
 
double robot_utils::computeNorm (double x, double y)
 
double robot_utils::computeNorm (double x, double y, double z)
 
void robot_utils::mapToUnitInterval (double &phase, double tol=1e-6)
 map a phase event to the interval [0,1). More...
 
void robot_utils::mapToInterval (double &phase, double interval_start, double tol=1e-6)
 map a phase event to the interval [start,start+1.0]. More...
 
double robot_utils::getPhaseDifference (double phase1, double phase2, double tol=1e-6)
 Assuming that phase1 happens before phase2, this function will return. More...
 
void robot_utils::alphaFilter (Eigen::Vector3d &vector, const Eigen::Vector3d &vectorRef, double weight, double weightRef)
 
template<typename Scalar >
Scalar robot_utils::fastPow (const Scalar x, int y)