PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
DefaultWeight< CfgType > Class Template Reference

Public Member Functions

Construction
 DefaultWeight (const std::string &_label="", const double _w=0, const std::vector< CfgType > &_intermediates=std::vector< CfgType >())
 
virtual ~DefaultWeight ()=default
 
Assignment
virtual const DefaultWeightoperator= (const DefaultWeight &_w)
 
Ordering and Equality
virtual bool operator== (const DefaultWeight &_w) const noexcept
 
virtual bool operator!= (const DefaultWeight &_w) const noexcept
 
virtual bool operator< (const DefaultWeight &_other) const noexcept
 
Properties
const std::string & GetLPLabel () const noexcept
 Get the string label value.
 
void SetLPLabel (const std::string &_lpLabel) noexcept
 Set the string label value.
 
std::vector< CfgType > & GetIntermediates () noexcept
 
const std::vector< CfgType > & GetIntermediates () const noexcept
 
void SetIntermediates (const std::vector< CfgType > &_intermediates) noexcept
 Set the intermediate configurations corresponding to the current weight.
 
void SetIntermediates (std::vector< CfgType > &&_intermediates) noexcept
 Set the intermediate configurations corresponding to the current weight.
 
double GetWeight () const noexcept
 Get the numerical weight value.
 
void SetWeight (const double _w) noexcept
 Set the numerical weight value.
 
void SetControl (const Control &_c) noexcept
 Set a singular control corresponding to the path given by the weight.
 
const ControlSet & GetControlSet () const noexcept
 Get a vector of controls corresponding to the path given by the weight.
 
ControlSet & GetControlSet () noexcept
 Get a vector of controls corresponding to the path given by the weight.
 
void SetControlSet (const ControlSet &_c) noexcept
 Set a vector of controls corresponding to the path given by the weight.
 
bool IsChecked (const int _mult) const noexcept
 Is the checked resolution multiple at most _mult?
 
void SetChecked (const int _mult) noexcept
 
bool HasClearance () const noexcept
 
double GetClearance () const noexcept
 Get the clearance value of the current weight.
 
void SetClearance (const double _c) noexcept
 
size_t GetTimeSteps () const noexcept
 
void SetTimeSteps (std::size_t _steps) noexcept
 

Protected Attributes

Internal State
std::string m_lpLabel
 Label of local planner that built this edge.
 
double m_weight {0.}
 The edge length.
 
std::vector< CfgType > m_intermediates
 Intermediate configurations.
 
int m_checkedMult {std::numeric_limits<int>::max()}
 The checked resolution multiple (for lazy query), or max if none.
 
double m_clearance {std::numeric_limits<double>::infinity()}
 The clearance value, or inf if not evaluated.
 
ControlSet m_controls
 The controls used.
 
size_t m_timeSteps {0}
 The number of timesteps to apply the controls.
 

I/O

static RobotinputRobot = nullptr
 
virtual void Read (std::istream &_is)
 
virtual void Write (std::ostream &_os) const
 
void Clear ()
 Clear all of the contents of the object to a reinitialized state. More...
 

Stuff for stapl graph interface

virtual DefaultWeight operator+ (const DefaultWeight &_other) const
 This only adds weights, it doesn't take intermediates into account.
 
double Weight () const noexcept
 
static DefaultWeight MaxWeight () noexcept
 

Detailed Description

template<class CfgType>
class DefaultWeight< CfgType >

Default weight class for roadmap edges. Defined as a value and a set of intermediate configurations.

Weight is the concept for what is stored on the graph edges. Essentially, edges are defined as polygonal chains I = {q_1, q_2, ..., q_n} through $\mathcal{C}_{space}$. They have two essential properties: a weight value representing some idea of distance between the two end points of the edge and a set of intermediate configurations defining the polygonal chain (not including the start and goal configurations).

Constructor & Destructor Documentation

◆ DefaultWeight()

template<typename CfgType >
DefaultWeight< CfgType >::DefaultWeight ( const std::string &  _label = "",
const double  _w = 0,
const std::vector< CfgType > &  _intermediates = std::vector<CfgType>() 
)

Construct a weight.

Parameters
_labelAn initial string label for identification.
_wAn initial weight value.
_intermediatesA vector of intermediate configurations.

Member Function Documentation

◆ operator=()

template<class CfgType >
const DefaultWeight< CfgType > & DefaultWeight< CfgType >::operator= ( const DefaultWeight< CfgType > &  _w)
virtual

Set the current weight to a copy of a given weight.

Parameters
_wThe given weight.

◆ operator==()

template<typename CfgType >
bool DefaultWeight< CfgType >::operator== ( const DefaultWeight< CfgType > &  _w) const
virtualnoexcept

Check if the current and given weights are equal.

Parameters
_wThe given weight.
Returns
True is equal, false otherwise.

◆ operator!=()

template<typename CfgType >
bool DefaultWeight< CfgType >::operator!= ( const DefaultWeight< CfgType > &  _w) const
virtualnoexcept

Check if the current and given weights are unequal.

Parameters
_wThe given weight.
Returns
True is unequal, false otherwise.

◆ operator<()

template<typename CfgType >
bool DefaultWeight< CfgType >::operator< ( const DefaultWeight< CfgType > &  _other) const
virtualnoexcept

Check if the current weight is less than a given weight by numerical weight value.

Parameters
_wThe given weight.
Returns
True is current weight value is less, false otherwise.

◆ GetIntermediates() [1/2]

template<typename CfgType >
std::vector< CfgType > & DefaultWeight< CfgType >::GetIntermediates
noexcept

Get a vector of intermediate configurations corresponding to the current weight.

◆ GetIntermediates() [2/2]

template<typename CfgType >
const std::vector< CfgType > & DefaultWeight< CfgType >::GetIntermediates
noexcept

Get a vector of intermediate configurations corresponding to the current weight.

◆ SetChecked()

template<typename CfgType >
void DefaultWeight< CfgType >::SetChecked ( const int  _mult)
noexcept

Set the checked resolution multiple to a lesser value than current.

Parameters
_multThe new desired value.

◆ SetClearance()

template<typename CfgType >
void DefaultWeight< CfgType >::SetClearance ( const double  _c)
noexcept

Set the clearance value of the current weight.

Parameters
Thedesired new clearance value.

◆ GetTimeSteps()

template<typename CfgType >
std::size_t DefaultWeight< CfgType >::GetTimeSteps
noexcept

Get the number of timesteps of the local plan corresponding to the weight's intermediates' path.

◆ SetTimeSteps()

template<typename CfgType >
void DefaultWeight< CfgType >::SetTimeSteps ( std::size_t  _steps)
noexcept

Set the number of timesteps of the local plan corresponding to the weight's intermediates' path.

◆ Read()

template<typename CfgType >
void DefaultWeight< CfgType >::Read ( std::istream &  _is)
virtual

Read an edge in from an input stream.

Parameters
_isThe input stream to read from.

◆ Write()

template<typename CfgType >
void DefaultWeight< CfgType >::Write ( std::ostream &  _os) const
virtual

Write an edge to an output stream.

Parameters
_osThe output stream to write to.

◆ Clear()

template<typename CfgType >
void DefaultWeight< CfgType >::Clear

Clear all of the contents of the object to a reinitialized state.

Clears out the contents of all vectors and zeros out all member values. Intended to reinitialize an object to its default-constructed state. This was found to be required by Read(), due to stapl's reuse of a temp obj.

Member Data Documentation

◆ inputRobot

template<typename CfgType >
Robot * DefaultWeight< CfgType >::inputRobot = nullptr
static

A static pointer to the current robot, which is needed to parse any intermediate configurations in the edge.


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