UniformInformedProlateSpheroidDistribution< RealType > Class Template Reference

Implements a distribution as required by Informed RRT*. More...

#include <RobotComponents/components/MotionPlanning/util/Samplers.h>

Public Member Functions

template<class T = std::size_t>
T getDimensionality () const
 Returns the distributions dimensionality.
 
RealType getVolume () const
 Returns the distributions volume.
 
bool isInBounds (const RealType *first) const
 Returns whether [first, first + dimensionality) is a point contained by the prolate hyper spheroid and the cuboid.
 
template<class Generator>
void operator() (RealType *first, Generator &gen)
 Fills [first, first + dimensionality) with a uniform sample of the intersection of the prolate hyper spheroid and cuboid space.
 
bool setMaximalCost (RealType max)
 Sets the maximal cost to max if the current maximal cost is higher.
 
template<class ValIter, class BoundsIter>
 UniformInformedProlateSpheroidDistribution (BoundsIter boundsFirst, BoundsIter boundsLast, ValIter focalAFirst, ValIter focalALast, ValIter focalBFirst)
 Constructs a uniform informed distribution containing a cuboid distribution (with the bounds [boundsFirst, boundsLast)) and a prolate hyper spheroid distribution (with the focal points [focalAFirst, focalALast) and [focalBFirst, focalBFirst + distance(focalAFirst, focalALast))).
 
template<class ValIter, class BoundsIter>
 UniformInformedProlateSpheroidDistribution (BoundsIter boundsFirst, BoundsIter boundsLast, ValIter focalAFirst, ValIter focalALast, ValIter focalBFirst, const std::vector< RealType > &rotationMatrix)
 Constructs a uniform informed distribution containing a cuboid distribution (with the bounds [boundsFirst, boundsLast)) and a prolate hyper spheroid distribution (with the focal points [focalAFirst, focalALast) and [focalBFirst, focalBFirst + distance(focalAFirst, focalALast)) and the given rotation matrix).
 

Protected Attributes

RealType cMax
 The current maximal cost.
 
UniformCuboidDistribution< RealType > cuboidDistribution
 The cuboid's distribution.
 
UniformProlateSpheroidDistribution< RealType > spheroidDistribution
 The prolate hyper spheroid's distribution.
 

Detailed Description

template<class RealType = float>
class armarx::UniformInformedProlateSpheroidDistribution< RealType >

Implements a distribution as required by Informed RRT*.

(as described in DOI>10.1109/IROS.2014.6942976)

Constructor & Destructor Documentation

◆ UniformInformedProlateSpheroidDistribution() [1/2]

template<class RealType = float>
template<class ValIter, class BoundsIter>
UniformInformedProlateSpheroidDistribution ( BoundsIter boundsFirst,
BoundsIter boundsLast,
ValIter focalAFirst,
ValIter focalALast,
ValIter focalBFirst,
const std::vector< RealType > & rotationMatrix )
inline

Constructs a uniform informed distribution containing a cuboid distribution (with the bounds [boundsFirst, boundsLast)) and a prolate hyper spheroid distribution (with the focal points [focalAFirst, focalALast) and [focalBFirst, focalBFirst + distance(focalAFirst, focalALast)) and the given rotation matrix).

Parameters
boundsFirstThe bounds for the first dimension.
boundsLastOne past the bounds for the last dimension.
focalAFirstThe first value of the first focal point.
focalALastOne past the last value of the first focal point.
focalBFirstThe first value of the second focal point.
rotationMatrixThe used rotation matrix (the values should be ordered to be conform with eigens mapping of matrices to vectors. (as defined by Eigen::Map<Eigen::Matrix<RealType, dimensionality, dimensionality>>)

◆ UniformInformedProlateSpheroidDistribution() [2/2]

template<class RealType = float>
template<class ValIter, class BoundsIter>
UniformInformedProlateSpheroidDistribution ( BoundsIter boundsFirst,
BoundsIter boundsLast,
ValIter focalAFirst,
ValIter focalALast,
ValIter focalBFirst )
inline

Constructs a uniform informed distribution containing a cuboid distribution (with the bounds [boundsFirst, boundsLast)) and a prolate hyper spheroid distribution (with the focal points [focalAFirst, focalALast) and [focalBFirst, focalBFirst + distance(focalAFirst, focalALast))).

Parameters
boundsFirstThe bounds for the first dimension.
boundsLastOne past the bounds for the last dimension.
focalAFirstThe first value of the first focal point.
focalALastOne past the last value of the first focal point.
focalBFirstThe first value of the second focal point.

Member Function Documentation

◆ getDimensionality()

template<class RealType = float>
template<class T = std::size_t>
T getDimensionality ( ) const
inline

Returns the distributions dimensionality.

Returns
The distributions dimensionality.

◆ getVolume()

template<class RealType = float>
RealType getVolume ( ) const
inline

Returns the distributions volume.

It is the minimum of the prolate hyper spheroid's and the cuboid's volumes.

Returns
The distributions volume.

◆ isInBounds()

template<class RealType = float>
bool isInBounds ( const RealType * first) const
inline

Returns whether [first, first + dimensionality) is a point contained by the prolate hyper spheroid and the cuboid.

Parameters
firstThe first value of the point to check.
Returns
Whether [first, first + dimensionality) is a point contained by the prolate hyper spheroid and the cuboid.

◆ operator()()

template<class RealType = float>
template<class Generator>
void operator() ( RealType * first,
Generator & gen )
inline

Fills [first, first + dimensionality) with a uniform sample of the intersection of the prolate hyper spheroid and cuboid space.

Parameters
firstThe first value to fill.
genThe used generator.

◆ setMaximalCost()

template<class RealType = float>
bool setMaximalCost ( RealType max)
inline

Sets the maximal cost to max if the current maximal cost is higher.

Parameters
maxThe new maximal cost to set.
Returns
Whether the new cost was lower than the old cost.

Member Data Documentation

◆ cMax

template<class RealType = float>
RealType cMax
protected

The current maximal cost.

◆ cuboidDistribution

template<class RealType = float>
UniformCuboidDistribution<RealType> cuboidDistribution
protected

The cuboid's distribution.

◆ spheroidDistribution

template<class RealType = float>
UniformProlateSpheroidDistribution<RealType> spheroidDistribution
protected

The prolate hyper spheroid's distribution.


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