utils Namespace Reference

Utility functions and classes. More...

Classes

struct  CubicHermitePolynomial
 Cubic Hermite polynomial. More...
 
struct  CubicPolynomial
 
struct  CubicPolynomial< double >
 
struct  CubicPolynomialBase
 Cubic polynomial curve. More...
 
struct  ExponentialMovingAverage
 Exponential Moving Average. More...
 
struct  HoubaPolynomial
 Hermite polynomial with Overall Uniformly-Bounded Accelerations (HOUBA). More...
 
struct  LeakyIntegrator
 Leaky integrator. More...
 
struct  LowPassVelocityFilter
 Compute velocity by finite difference of position measurements, applying a low-pass filter to it. More...
 
struct  PolynomialBase
 Polynomial function. More...
 
struct  QuinticHermitePolynomial
 Quintic polynomial with zero velocity and zero acceleration at 0 and 1. More...
 
struct  QuinticPolynomial
 Quintic polynomial over vectors. More...
 
struct  QuinticPolynomial< double >
 Quintic polynomial over floating-point numbers. More...
 
struct  QuinticPolynomialBase
 Quintic polynomial. More...
 
struct  RetimedPolynomial
 Polynomial whose argument \(s \in [0, 1]\) is retimed to \(t \in [0, T]\) by \( s(t) = t / T \). More...
 
struct  SE2d
 SE2 transform. More...
 
struct  StationaryOffsetFilter
 Remove stationary offset from an input signal. More...
 

Functions

double clamp (double v, double vMin, double vMax)
 Clamp a value in a given interval. More...
 
void clampInPlace (double &v, double vMin, double vMax)
 Clamp a value in a given interval. More...
 
double clamp (double v, double vMin, double vMax, const char *label)
 Clamp a value in a given interval, issuing a warning when bounds are hit. More...
 
void clampInPlace (double &v, double vMin, double vMax, const char *label)
 Clamp a value in a given interval, issuing a warning when bounds are hit. More...
 
Eigen::Matrix3d slerp (const Eigen::Matrix3d &from, const Eigen::Matrix3d &to, double t)
 Spherical linear interpolation between two rotation matrices. More...
 

Detailed Description

Utility functions and classes.

Function Documentation

double utils::clamp ( double  v,
double  vMin,
double  vMax 
)
inline

Clamp a value in a given interval.

Parameters
vValue.
vMinLower bound.
vMaxUpper bound.

Definition at line 47 of file clamp.h.

double utils::clamp ( double  v,
double  vMin,
double  vMax,
const char *  label 
)
inline

Clamp a value in a given interval, issuing a warning when bounds are hit.

Parameters
vValue.
vMinLower bound.
vMaxUpper bound.
labelName of clamped value.

Definition at line 95 of file clamp.h.

void utils::clampInPlace ( double &  v,
double  vMin,
double  vMax 
)
inline

Clamp a value in a given interval.

Parameters
vReference to value.
vMinLower bound.
vMaxUpper bound.

Definition at line 72 of file clamp.h.

void utils::clampInPlace ( double &  v,
double  vMin,
double  vMax,
const char *  label 
)
inline

Clamp a value in a given interval, issuing a warning when bounds are hit.

Parameters
vReference to value.
vMinLower bound.
vMaxUpper bound.
labelName of clamped value.

Definition at line 124 of file clamp.h.

Eigen::Matrix3d utils::slerp ( const Eigen::Matrix3d &  from,
const Eigen::Matrix3d &  to,
double  t 
)
inline

Spherical linear interpolation between two rotation matrices.

Parameters
fromFirst rotation matrix.
toSecond rotation matrix.
tInterpolation index.
Returns
R Interpolation between those two matrices.

See https://en.wikipedia.org/wiki/Slerp.

Definition at line 48 of file slerp.h.