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. More...
 
RealType getVolume () const
 Returns the distributions volume. More...
 
bool isInBounds (const RealType *first) const
 Returns whether [first, first + dimensionality) is a point contained by the prolate hyper spheroid and the cuboid. More...
 
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. More...
 
bool setMaximalCost (RealType max)
 Sets the maximal cost to max if the current maximal cost is higher. More...
 
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))). More...
 
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). More...
 

Protected Attributes

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

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)

Definition at line 626 of file Samplers.h.

Constructor & Destructor Documentation

◆ UniformInformedProlateSpheroidDistribution() [1/2]

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>>)

Definition at line 642 of file Samplers.h.

◆ UniformInformedProlateSpheroidDistribution() [2/2]

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.

Definition at line 669 of file Samplers.h.

Member Function Documentation

◆ getDimensionality()

T getDimensionality ( ) const
inline

Returns the distributions dimensionality.

Returns
The distributions dimensionality.

Definition at line 763 of file Samplers.h.

◆ getVolume()

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.

Definition at line 752 of file Samplers.h.

+ Here is the call graph for this function:

◆ isInBounds()

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.

Definition at line 773 of file Samplers.h.

◆ operator()()

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.

Definition at line 690 of file Samplers.h.

◆ setMaximalCost()

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.

Definition at line 725 of file Samplers.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ cMax

RealType cMax
protected

The current maximal cost.

Definition at line 790 of file Samplers.h.

◆ cuboidDistribution

UniformCuboidDistribution<RealType> cuboidDistribution
protected

The cuboid's distribution.

Definition at line 786 of file Samplers.h.

◆ spheroidDistribution

UniformProlateSpheroidDistribution<RealType> spheroidDistribution
protected

The prolate hyper spheroid's distribution.

Definition at line 782 of file Samplers.h.


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