|
MIRA
|
For detailed information see Math.
More...
|
Classes | |
| class | SignedDegree< T > |
| Signed angle that is represented using degrees. More... | |
| class | Degree< T > |
| Unsigned angle that is represented using degrees. More... | |
| class | SignedRadian< T > |
| Signed angle that is represented using radians. More... | |
| class | Radian< T > |
| Unsigned angle that is represented using radians. More... | |
| class | SignedAngle< T > |
| Signed angle that is represented using radians. More... | |
| class | Angle< T > |
| Unsigned angle that is represented using radians. More... | |
| class | CRSplineInterpolator |
| 1D cubic Hermite spline interpolator. More... | |
| class | IntervalFilter |
| Concept and base class for all Interpolators and Filters. More... | |
| class | LinearInterpolator |
| 1D linear interpolator. More... | |
| class | LinearInterpolatorNoExtrapolation |
| 1D linear interpolator. More... | |
| class | LinearInterpolatorNearestNeighbourExtrapolator |
| 1D linear interpolator. More... | |
| class | LinearInterpolatorExtrapolationLimit |
| 1D linear interpolator. More... | |
| class | NearestNeighborInterpolator |
| 1D nearest neighbor interpolator. More... | |
| class | NormalRandomDistribution< D, T > |
| Random distribution for drawing samples from univariate or multivariate normal distributions. More... | |
| class | NormalRandomGenerator< D, T > |
| Random generator for drawing samples from univariate or multivariate normal distributions. More... | |
| struct | TPower< base, exponent > |
| Computes the power base^exponent at compile time. More... | |
| class | RandomGeneratorSingleton |
| Singleton class for generating random numbers. More... | |
| class | RandomGenerator< Distribution, Engine > |
| Template class to easily generate random generators using the boost::random distributions and generators. More... | |
| class | SchmittTriggerHysteresis< T > |
| Class realizing a Schmitt trigger. More... | |
| class | UniformRandomGenerator< T > |
| A random generator that samples random numbers within the interval that is passed to the constructor. More... | |
Typedefs | |
| typedef SignedDegree< int > | SignedDegreei |
| Integer precision signed angle. More... | |
| typedef SignedDegree< float > | SignedDegreef |
| Float precision signed angle. More... | |
| typedef SignedDegree< double > | SignedDegreed |
| Double precision signed angle. More... | |
| typedef Degree< int > | Degreei |
| Integer precision angle. More... | |
| typedef Degree< float > | Degreef |
| Float precision angle. More... | |
| typedef Degree< double > | Degreed |
| Double precision angle. More... | |
| typedef SignedRadian< float > | SignedRadianf |
| Float precision signed angle. More... | |
| typedef SignedRadian< double > | SignedRadiand |
| Double precision signed angle. More... | |
| typedef Radian< float > | Radianf |
| Float precision angle. More... | |
| typedef Radian< double > | Radiand |
| Double precision angle. More... | |
| typedef SignedAngle< float > | SignedAnglef |
| Float precision signed angle. More... | |
| typedef SignedAngle< double > | SignedAngled |
| Double precision signed angle. More... | |
| typedef Angle< float > | Anglef |
| Float precision angle. More... | |
| typedef Angle< double > | Angled |
| Double precision angle. More... | |
Functions | |
| template<typename T > | |
| T | smallestAngleDifference (const T &a, const T &b) |
| Returns the signed difference angle between the specified angles (in radian) that has the smallest absolute value. More... | |
| template<typename T > | |
| bool | isInAngleInterval (T value, T min, T max) |
| Returns true, if the given angle (in radian) is in the given interval [min,max]. More... | |
| template<typename T > | |
| Getter< T > | rad2degGetter (const T &cref) |
| Create a getter for serializing radians as degrees. More... | |
| template<typename T > | |
| Setter< T > | deg2radSetter (T &ref) |
| Create setter for deserializing radians from degrees. See rad2degGetter. More... | |
| template<typename T > | |
| Setter< T > | deg2radSetter (T &ref, Deg2RadNonNegativeType) |
| Create a setter for deserializing radians from degrees. More... | |
| template<typename T > | |
| Accessor< Getter< T >, Setter< T > > | radAsDegAccessor (T &ref) |
| Create an accessor consisting of getter + setter for serializing radians as degrees. More... | |
| template<typename T > | |
| Accessor< Getter< T >, Setter< T > > | radAsDegAccessor (T &ref, Deg2RadNonNegativeType) |
| Create a complete accessor consisting of getter + setter for serializing radians as degrees. More... | |
| template<typename Derived > | |
| TEigenFormat< Derived > | format (Eigen::MatrixBase< Derived > &matrix, Eigen::IOFormat format=EigenFormat::matlab()) |
| Function for formatting an Eigen matrix using a special format. More... | |
| template<typename T , typename U > | |
| bool | isApprox (const T &a, const T &b, const U &tol) |
| Returns true, if the value a has approximately the same value as b. More... | |
| template<typename T , typename S > | |
| T | lerp (const T &a, const T &b, S alpha) |
| Linear interpolation of different types like scalars, angles and rotations, vectors, etc. More... | |
| template<typename T > | |
| T | modulo (T x, T y) |
| Computes x modulo y, i.e. More... | |
| float | normcdf (float x, float mu=0.0, float sigma=1.0) |
| Computes the normal cumulative distribution function at the value x using the specified mean mu and standard deviation sigma. More... | |
| template<int exponent, typename T > | |
| T | pow (T base) |
| Computes the power of 'base' with a constant integral exponent. More... | |
| template<typename T > | |
| T | pow2 (T base) |
| Computes base^2. More... | |
| template<typename T > | |
| T | pow3 (T base) |
| Computes base^3. More... | |
| template<typename T > | |
| const T & | saturate (const T &value, const T &minValue, const T &maxValue) |
| Saturate a value by limiting it to a certain interval. More... | |
| template<typename T > | |
| T | truncate (T value, uint32 decimals) |
| Truncates a floating point value to a given number of decimals. More... | |
| template<typename T > | |
| Eigen::Quaternion< T > | quaternionFromYawPitchRoll (T yaw, T pitch, T roll) |
| Converts yaw, pitch and roll angles to a quaternion. More... | |
| template<typename T > | |
| void | quaternionCovFromYawPitchRollCov (const Eigen::Matrix< T, 6, 6 > &eulerCovariance, float yaw, float pitch, float roll, Eigen::Quaternion< T > &oOrientation, Eigen::Matrix< T, 7, 7 > &oCovariance) |
Converts 6x6 dimensional covariance matrix (3D + yaw, pitch and roll) angles to a 7x7 dimensional quaternion covariance matrix (3D + Quaternion) Our convention for the order of rotations is as follows:
| |
| template<typename T > | |
| Eigen::Matrix< T, 7, 7 > | quaternionCovFromYawPitchRollCov (const Eigen::Matrix< T, 6, 6 > &eulerCovariance, float yaw, float pitch, float roll) |
Converts 6x6 dimensional covariance matrix (3D + yaw, pitch and roll) angles to a 7x7 dimensional quaternion covariance matrix (3D + Quaternion) Our convention for the order of rotations is as follows:
| |
| template<typename T > | |
| boost::tuples::tuple< T, T, T > | quaternionToYawPitchRoll (const Eigen::Quaternion< T > &q) |
| Converts a quaternion back to yaw, pitch, roll angles. More... | |
| template<typename T > | |
| Eigen::Matrix< T, 6, 6 > | quaternionCovToYawPitchRollCov (const Eigen::Matrix< T, 7, 7 > &covariance, const Eigen::Quaternion< T > &q) |
| Converts a 7x7 dimensional quaternion covariance (3D + Quaternion) back to a 6x6 dimensional euler covariance (3D + Yaw, Pitch, Roll). More... | |
| template<typename T > | |
| Eigen::Matrix< T, 3, 3 > | matrixFromYawPitchRoll (T yaw, T pitch, T roll) |
| Converts yaw, pitch and roll angles to a rotation matrix. More... | |
| template<typename T > | |
| Eigen::Matrix< T, 3, 3 > | matrixFromYawPitchRoll (const boost::tuples::tuple< T, T, T > &ypr) |
| Same as the above method, that takes the yaw,pitch,roll angles as 3-tuple. More... | |
| template<typename T > | |
| boost::tuples::tuple< T, T, T > | matrixToYawPitchRoll (const Eigen::Matrix< T, 3, 3 > &r) |
| Converts a rotation matrix back to yaw, pitch, roll angles. More... | |
| template<typename T > | |
| void | derivMatricesFromYawPitchRoll (T yaw, T pitch, T roll, Eigen::Matrix< T, 3, 3 > &oR_dyaw, Eigen::Matrix< T, 3, 3 > &oR_dpitch, Eigen::Matrix< T, 3, 3 > &oR_droll) |
| Returns the 3 derivates of the above rotation matrix, i.e. More... | |
For detailed information see Math.
| typedef SignedDegree<int> SignedDegreei |
Integer precision signed angle.
| typedef SignedDegree<float> SignedDegreef |
Float precision signed angle.
| typedef SignedDegree<double> SignedDegreed |
Double precision signed angle.
| typedef SignedRadian<float> SignedRadianf |
Float precision signed angle.
| typedef SignedRadian<double> SignedRadiand |
Double precision signed angle.
| typedef SignedAngle<float> SignedAnglef |
Float precision signed angle.
| typedef SignedAngle<double> SignedAngled |
Double precision signed angle.
|
inline |
Returns the signed difference angle between the specified angles (in radian) that has the smallest absolute value.
|
inline |
Returns true, if the given angle (in radian) is in the given interval [min,max].
| Getter<T> mira::rad2degGetter | ( | const T & | cref | ) |
Create a getter for serializing radians as degrees.
Usage:
rad2degGetter/deg2radSetter must be used together for symmetric serialization/deserialization
| Setter<T> mira::deg2radSetter | ( | T & | ref | ) |
Create setter for deserializing radians from degrees. See rad2degGetter.
| Setter<T> mira::deg2radSetter | ( | T & | ref, |
| Deg2RadNonNegativeType | |||
| ) |
Create a setter for deserializing radians from degrees.
This setter variant throws XInvalidParameter when trying to set a negative value.
Usage:
Create an accessor consisting of getter + setter for serializing radians as degrees.
Usage:
| Accessor<Getter<T>, Setter<T> > mira::radAsDegAccessor | ( | T & | ref, |
| Deg2RadNonNegativeType | |||
| ) |
Create a complete accessor consisting of getter + setter for serializing radians as degrees.
The setter from this variant throws XInvalidParameter when trying to set a negative value
Usage:
|
inline |
Function for formatting an Eigen matrix using a special format.
This function can be used for writing and even reading a matrix to or from a stream in the given format.
Predefined formats are:
Usage:
| matrix | The matrix that gets serialized. |
| format | The format to use. |
|
inline |
Returns true, if the value a has approximately the same value as b.
The tolerance is given as third parameter. More precisely, the method returns true, if b is in the interval [a-tol,a+tol).
|
inline |
Linear interpolation of different types like scalars, angles and rotations, vectors, etc.
Rotations are interpolated via spherical linear interpolation (slerp).
The parameter alpha can vary between 0 and 1, where alpha=0 will return a and alpha=1 will return b. For values between 0 and 1 an interpolated value is returned. For some types alpha is allowed to be <0 or >1. In this case the method will extrapolate.
|
inline |
Computes x modulo y, i.e.
the remainder of the division operation x/y. This function is specialized for integral and floating point types. For integral types, the built in % operator is used. For floating point types the std::fmod() method is used.
|
inline |
Computes the normal cumulative distribution function at the value x using the specified mean mu and standard deviation sigma.
Note: sigma must be > 0.
|
inline |
Computes the power of 'base' with a constant integral exponent.
Instead of:
you can now write:
which is much better to read and produces exactly the same code. Hence, the second variant is exactly as fast as the first one.
|
inline |
Computes base^2.
|
inline |
Computes base^3.
|
inline |
Saturate a value by limiting it to a certain interval.
| [in] | value | The value to saturate |
| [in] | minValue | The minimum value of the interval |
| [in] | maxValue | The maximum value of the interval |
| T mira::truncate | ( | T | value, |
| uint32 | decimals | ||
| ) |
Truncates a floating point value to a given number of decimals.
| value | Value to truncate |
| decimals | Decimals that should be kept |
|
inline |
Converts yaw, pitch and roll angles to a quaternion.
Our convention for the order of rotations is as follows:
| [in] | yaw | The yaw angle |
| [in] | pitch | The pitch angle |
| [in] | roll | The roll angle |
|
inline |
Converts 6x6 dimensional covariance matrix (3D + yaw, pitch and roll) angles to a 7x7 dimensional quaternion covariance matrix (3D + Quaternion) Our convention for the order of rotations is as follows:
Our convention for the order of the quaternion is
| [in] | eulerCovariance | The 3D+Yaw,Pitch,Roll covaraiance matrix |
| [in] | yaw | The covariance matrix's orientation |
| [in] | pitch | The covariance matrix's orientation |
| [in] | roll | The covariance matrix's orientation |
| [out] | oOrientation | The computed quaternion from euler angles |
| [out] | oCovariance | The computed 7x7 covariance matrix in quaternion space |
|
inline |
Converts 6x6 dimensional covariance matrix (3D + yaw, pitch and roll) angles to a 7x7 dimensional quaternion covariance matrix (3D + Quaternion) Our convention for the order of rotations is as follows:
Our convention for the order of the quaternion is
| [in] | eulerCovariance | The 3D+Yaw,Pitch,Roll covaraiance matrix |
| [in] | yaw | The covariance matrix's orientation |
| [in] | pitch | The covariance matrix's orientation |
| [in] | roll | The covariance matrix's orientation |
|
inline |
Converts a quaternion back to yaw, pitch, roll angles.
This operation is the opposite of quaternionFromYawPitchRoll().
Please note: If a quaternion was created using quaternionFromYawPitchRoll() this method may return yaw,pitch,roll angles that may differ from the values used in the quaternionFromYawPitchRoll() call. The reason is that a single rotation can be described by different combinations of yaw, pitch and roll angles.
For details see quaternionFromYawPitchRoll().
| [in] | q | The quaternion with yaw, pitch and roll angles. |
|
inline |
Converts a 7x7 dimensional quaternion covariance (3D + Quaternion) back to a 6x6 dimensional euler covariance (3D + Yaw, Pitch, Roll).
This operation is the opposite of quaternionCovFromYawPitchRollCov().
| [in] | covariance | The 3D+Quaternion covariance matrix |
| [in] | q | The covariance matrix's orientation |
|
inline |
Converts yaw, pitch and roll angles to a rotation matrix.
Our convention for the order of rotations is as follows:
| [in] | yaw | The yaw angle |
| [in] | pitch | The pitch angle |
| [in] | roll | The roll angle |
|
inline |
Same as the above method, that takes the yaw,pitch,roll angles as 3-tuple.
|
inline |
Converts a rotation matrix back to yaw, pitch, roll angles.
This is operation is the opposite of matrixFromYawPitchRoll().
Our convention for the order of rotations is as follows:
| [in] | r | The rotation matrix. |
|
inline |
Returns the 3 derivates of the above rotation matrix, i.e.
3 matrices that are derived to yaw, pitch and roll respectively.
Our convention for the order of rotations is as follows:
| [in] | yaw | The yaw angle |
| [in] | pitch | The pitch angle |
| [in] | roll | The roll angle |
| [out] | oR_dyaw | The matrixe derivated to yaw |
| [out] | oR_dpitch | The matrixe derivated to pitch |
| [out] | oR_droll | The matrixe derivated to roll |
1.8.14