maliput
|
Namespace to group basic mathematical and geometric support to maliput
.
Namespaces | |
details | |
Classes | |
class | AxisAlignedBox |
Implements BoundingRegion abstract class for axis-aligned-box-shaped bounding regions. More... | |
class | BoundingBox |
Implements BoundingRegion abstract class for non-axis-aligned-box-shaped bounding regions. More... | |
class | BoundingRegion |
Abstract API for bounding description. More... | |
class | KDTree |
N-Dimension KDTree. More... | |
class | KDTree3D |
3-Dimensional KDTree. More... | |
class | Matrix |
A squared N-dimensional matrix. More... | |
class | Quaternion |
A Quaternion representation. More... | |
class | RollPitchYaw |
This class represents the orientation between two arbitrary frames A and D associated with a Space-fixed (extrinsic) X-Y-Z rotation by "roll-pitch-yaw" angles [r, p, y] , which is equivalent to a Body-fixed (intrinsic) Z-Y-X rotation by "yaw-pitch-roll" angles [y, p, r] . More... | |
class | Vector |
A N-dimensional vector. More... | |
class | Vector2 |
A 2-dimensional vector. More... | |
class | Vector3 |
A 3-dimensional vector. More... | |
class | Vector4 |
A 4-dimensional vector. More... | |
class | VectorBase |
Base class for an N-dimensional vector. More... | |
Typedefs | |
using | Matrix2 = Matrix< 2 > |
Convinient alias declaration. More... | |
using | Matrix3 = Matrix< 3 > |
using | Matrix4 = Matrix< 4 > |
Enumerations | |
enum | CompareType { kAbsolute, kRelative } |
enum | OverlappingType : unsigned int { kDisjointed = 0, kIntersected = 1, kContained = 3 } |
Holds the possible overlapping types between regions. More... | |
Functions | |
template<std::size_t N, typename Derived > | |
common::ComparisonResult< math::VectorBase< N, Derived > > | CompareVectors (const math::VectorBase< N, Derived > &v1, const math::VectorBase< N, Derived > &v2, double tolerance=0.0, CompareType compare_type=CompareType::kAbsolute) |
Evaluate that two vectors v1 and v2 are equal down to a certain tolerance . More... | |
template<std::size_t N> | |
common::ComparisonResult< math::Matrix< N > > | CompareMatrices (const math::Matrix< N > &m1, const math::Matrix< N > &m2, double tolerance=0.0, CompareType compare_type=CompareType::kAbsolute) |
Evaluate that two matrices m1 and m2 are equal down to a certain tolerance . More... | |
Vector2 | ComputeFresnelCosineAndSine (double t) |
Computes the value the Fresnel cosine and sine as a vector. More... | |
double | FresnelSpiralHeading (double t, double k_dot) |
Computes the unwrapped heading angle of a Fresnel (Cornu) spiral. More... | |
double | FresnelSpiralHeadingDot (double t, double k_dot) |
Computes the derivative of the heading angle of a Fresnel (Cornu) spiral. More... | |
template<std::size_t N, typename Derived > | |
Derived | operator* (const Matrix< N > &matrix, const VectorBase< N, Derived > vector) |
Product operator overload between a Matrix<N> and a VectorBase<N, Derived>. More... | |
OverlappingType | operator| (const OverlappingType &first, const OverlappingType &second) |
OverlappingType | operator& (const OverlappingType &first, const OverlappingType &second) |
std::ostream & | operator<< (std::ostream &os, const Quaternion &q) |
Serialization operator overload. More... | |
double | saturate (double x, double min, double max) |
When x is less than min , it returns min . More... | |
template<std::size_t N_> | |
Matrix< N_ > | operator* (const Matrix< N_ > &matrix, double k) |
template<std::size_t N_> | |
Matrix< N_ > | operator* (double k, const Matrix< N_ > &matrix) |
template<std::size_t N_> | |
std::ostream & | operator<< (std::ostream &os, const Matrix< N_ > &matrix) |
template Matrix< 2 > | operator* (const Matrix< 2 > &, double) |
template Matrix< 3 > | operator* (const Matrix< 3 > &, double) |
template Matrix< 4 > | operator* (const Matrix< 4 > &, double) |
template Matrix< 2 > | operator* (double, const Matrix< 2 > &) |
template Matrix< 3 > | operator* (double, const Matrix< 3 > &) |
template Matrix< 4 > | operator* (double, const Matrix< 4 > &) |
template std::ostream & | operator<< (std::ostream &, const Matrix< 2 > &) |
template std::ostream & | operator<< (std::ostream &, const Matrix< 3 > &) |
template std::ostream & | operator<< (std::ostream &, const Matrix< 4 > &) |
template Vector2 | operator* (const Matrix< 2 > &matrix, const VectorBase< 2, Vector2 > vector) |
template Vector3 | operator* (const Matrix< 3 > &matrix, const VectorBase< 3, Vector3 > vector) |
template Vector4 | operator* (const Matrix< 4 > &matrix, const VectorBase< 4, Vector4 > vector) |
template<std::size_t N_, typename Derived_ > | |
Derived_ | operator* (const VectorBase< N_, Derived_ > &vector, double scalar) |
template<std::size_t N_, typename Derived_ > | |
Derived_ | operator* (double scalar, const VectorBase< N_, Derived_ > &vector) |
template<std::size_t N_, typename Derived_ > | |
std::ostream & | operator<< (std::ostream &os, const VectorBase< N_, Derived_ > &vector) |
template Vector< 1 > | operator* (const VectorBase< 1, Vector< 1 >> &, double) |
template Vector< 1 > | operator* (double, const VectorBase< 1, Vector< 1 >> &) |
template Vector< 2 > | operator* (const VectorBase< 2, Vector< 2 >> &, double) |
template Vector< 2 > | operator* (double, const VectorBase< 2, Vector< 2 >> &) |
template Vector< 3 > | operator* (const VectorBase< 3, Vector< 3 >> &, double) |
template Vector< 3 > | operator* (double, const VectorBase< 3, Vector< 3 >> &) |
template Vector< 4 > | operator* (const VectorBase< 4, Vector< 4 >> &, double) |
template Vector< 4 > | operator* (double, const VectorBase< 4, Vector< 4 >> &) |
template std::ostream & | operator<< (std::ostream &, const VectorBase< 1, Vector< 1 >> &) |
template std::ostream & | operator<< (std::ostream &, const VectorBase< 2, Vector< 2 >> &) |
template std::ostream & | operator<< (std::ostream &, const VectorBase< 3, Vector< 3 >> &) |
template std::ostream & | operator<< (std::ostream &, const VectorBase< 4, Vector< 4 >> &) |
template Vector2 | operator* (const VectorBase< 2, Vector2 > &, double) |
template Vector2 | operator* (double, const VectorBase< 2, Vector2 > &) |
template std::ostream & | operator<< (std::ostream &, const VectorBase< 2, Vector2 > &) |
template Vector3 | operator* (const VectorBase< 3, Vector3 > &, double) |
template Vector3 | operator* (double, const VectorBase< 3, Vector3 > &) |
template std::ostream & | operator<< (std::ostream &, const VectorBase< 3, Vector3 > &) |
template Vector4 | operator* (const VectorBase< 4, Vector4 > &, double) |
template Vector4 | operator* (double, const VectorBase< 4, Vector4 > &) |
template std::ostream & | operator<< (std::ostream &, const VectorBase< 4, Vector4 > &) |
|
strong |
|
strong |
Holds the possible overlapping types between regions.
Given two sets A
and B
:
A
intersects B
iff A
and B
have at least one point in common.A
contains B
iff A
contains all the points of B
.A
disjoints B
iff A
and B
have no points in common.Enumerator | |
---|---|
kDisjointed | No overlapping between bounding regions. |
kIntersected | Bounding regions are intersected. |
kContained | Bounding regions are contained. |
common::ComparisonResult< math::Matrix< N > > CompareMatrices | ( | const math::Matrix< N > & | m1, |
const math::Matrix< N > & | m2, | ||
double | tolerance = 0.0 , |
||
CompareType | compare_type = CompareType::kAbsolute |
||
) |
Evaluate that two matrices m1
and m2
are equal down to a certain tolerance
.
Instantiations for comparing Matrix2, Matrix3 and Matrix4 are provided.
m1 | The first matrix to compare. |
m2 | The second matrix to compare. |
tolerance | The tolerance for determining equivalence. |
compare_type | Whether the tolerance is absolute or relative. |
common::ComparisonResult< math::VectorBase< N, Derived > > CompareVectors | ( | const math::VectorBase< N, Derived > & | v1, |
const math::VectorBase< N, Derived > & | v2, | ||
double | tolerance = 0.0 , |
||
CompareType | compare_type = CompareType::kAbsolute |
||
) |
Evaluate that two vectors v1
and v2
are equal down to a certain tolerance
.
Instantiations for comparing Vector2, Vector3 and Vector4 are provided.
v1 | The first vector to compare. |
v2 | The second vector to compare. |
tolerance | The tolerance for determining equivalence. |
compare_type | Whether the tolerance is absolute or relative. |
Computes the value the Fresnel cosine and sine as a vector.
This function wraps a Cephes Mathematical Library based implementation of the Fresnel cosine and sine functions. This code can be found in various libraries, such as the scipy.special.fresnel function and many others. For ease of use and compatibility with the expected use as a tool of curves in the plane (i.e. z=0), the output of this function is provided as a Vector2.
Note that the algorithm takes 3 ranges of values of t:
t
is infinity: the returned vector is (0.5, 0.5).t
is less than ~ 1.13: a power series expansion is used.t:
a combination of power series with auxiliary functions is used.t | The argument of the Fresnel cosine and sine functions. |
Computes the unwrapped heading angle of a Fresnel (Cornu) spiral.
t | The parameter of the Fresnel sine and cosine. |
k_dot | The rate in curvature of the spiral. |
Computes the derivative of the heading angle of a Fresnel (Cornu) spiral.
t | The parameter of the Fresnel sine and cosine. |
k_dot | The rate in curvature of the spiral. |
OverlappingType operator& | ( | const OverlappingType & | first, |
const OverlappingType & | second | ||
) |
template Vector2 maliput::math::operator* | ( | const Matrix< 2 > & | matrix, |
const VectorBase< 2, Vector2 > | vector | ||
) |
template Vector3 maliput::math::operator* | ( | const Matrix< 3 > & | matrix, |
const VectorBase< 3, Vector3 > | vector | ||
) |
template Vector4 maliput::math::operator* | ( | const Matrix< 4 > & | matrix, |
const VectorBase< 4, Vector4 > | vector | ||
) |
Derived operator* | ( | const Matrix< N > & | matrix, |
const VectorBase< N, Derived > | vector | ||
) |
Product operator overload between a Matrix<N> and a VectorBase<N, Derived>.
template Vector<1> maliput::math::operator* | ( | const VectorBase< 1, Vector< 1 >> & | , |
double | |||
) |
template Vector2 maliput::math::operator* | ( | const VectorBase< 2, Vector2 > & | , |
double | |||
) |
template Vector<2> maliput::math::operator* | ( | const VectorBase< 2, Vector< 2 >> & | , |
double | |||
) |
template Vector3 maliput::math::operator* | ( | const VectorBase< 3, Vector3 > & | , |
double | |||
) |
template Vector<3> maliput::math::operator* | ( | const VectorBase< 3, Vector< 3 >> & | , |
double | |||
) |
template Vector4 maliput::math::operator* | ( | const VectorBase< 4, Vector4 > & | , |
double | |||
) |
template Vector<4> maliput::math::operator* | ( | const VectorBase< 4, Vector< 4 >> & | , |
double | |||
) |
Derived_ maliput::math::operator* | ( | const VectorBase< N_, Derived_ > & | vector, |
double | scalar | ||
) |
Derived_ maliput::math::operator* | ( | double | scalar, |
const VectorBase< N_, Derived_ > & | vector | ||
) |
template Vector<1> maliput::math::operator* | ( | double | , |
const VectorBase< 1, Vector< 1 >> & | |||
) |
template Vector2 maliput::math::operator* | ( | double | , |
const VectorBase< 2, Vector2 > & | |||
) |
template Vector<2> maliput::math::operator* | ( | double | , |
const VectorBase< 2, Vector< 2 >> & | |||
) |
template Vector3 maliput::math::operator* | ( | double | , |
const VectorBase< 3, Vector3 > & | |||
) |
template Vector<3> maliput::math::operator* | ( | double | , |
const VectorBase< 3, Vector< 3 >> & | |||
) |
template Vector4 maliput::math::operator* | ( | double | , |
const VectorBase< 4, Vector4 > & | |||
) |
template Vector<4> maliput::math::operator* | ( | double | , |
const VectorBase< 4, Vector< 4 >> & | |||
) |
template std::ostream& maliput::math::operator<< | ( | std::ostream & | , |
const Matrix< 2 > & | |||
) |
template std::ostream& maliput::math::operator<< | ( | std::ostream & | , |
const Matrix< 3 > & | |||
) |
template std::ostream& maliput::math::operator<< | ( | std::ostream & | , |
const Matrix< 4 > & | |||
) |
template std::ostream& maliput::math::operator<< | ( | std::ostream & | , |
const VectorBase< 1, Vector< 1 >> & | |||
) |
template std::ostream& maliput::math::operator<< | ( | std::ostream & | , |
const VectorBase< 2, Vector2 > & | |||
) |
template std::ostream& maliput::math::operator<< | ( | std::ostream & | , |
const VectorBase< 2, Vector< 2 >> & | |||
) |
template std::ostream& maliput::math::operator<< | ( | std::ostream & | , |
const VectorBase< 3, Vector3 > & | |||
) |
template std::ostream& maliput::math::operator<< | ( | std::ostream & | , |
const VectorBase< 3, Vector< 3 >> & | |||
) |
template std::ostream& maliput::math::operator<< | ( | std::ostream & | , |
const VectorBase< 4, Vector4 > & | |||
) |
template std::ostream& maliput::math::operator<< | ( | std::ostream & | , |
const VectorBase< 4, Vector< 4 >> & | |||
) |
std::ostream& maliput::math::operator<< | ( | std::ostream & | os, |
const Matrix< N_ > & | matrix | ||
) |
std::ostream & operator<< | ( | std::ostream & | os, |
const Quaternion & | q | ||
) |
Serialization operator overload.
os | The output stream to serialize q into. |
q | A Quaternion. |
os
. std::ostream& maliput::math::operator<< | ( | std::ostream & | os, |
const VectorBase< N_, Derived_ > & | vector | ||
) |
OverlappingType operator| | ( | const OverlappingType & | first, |
const OverlappingType & | second | ||
) |
When x
is less than min
, it returns min
.
When x
is greater than max
, it returns max
. Otherwise, it returns x
.
common::assertion_error | When min is greater than max . |