Parasol Planning Library (PPL)
|
#include <Weight.h>
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 DefaultWeight & | operator= (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. More... | |
void | SetLPLabel (const std::string &_lpLabel) noexcept |
Set the string label value. More... | |
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. More... | |
void | SetIntermediates (std::vector< CfgType > &&_intermediates) noexcept |
Set the intermediate configurations corresponding to the current weight. More... | |
double | GetWeight () const noexcept |
Get the numerical weight value. More... | |
void | SetWeight (const double _w) noexcept |
Set the numerical weight value. More... | |
void | SetControl (const Control &_c) noexcept |
Set a singular control corresponding to the path given by the weight. More... | |
const ControlSet & | GetControlSet () const noexcept |
Get a vector of controls corresponding to the path given by the weight. More... | |
ControlSet & | GetControlSet () noexcept |
Get a vector of controls corresponding to the path given by the weight. More... | |
void | SetControlSet (const ControlSet &_c) noexcept |
Set a vector of controls corresponding to the path given by the weight. More... | |
bool | IsChecked (const int _mult) const noexcept |
Is the checked resolution multiple at most _mult? More... | |
void | SetChecked (const int _mult) noexcept |
bool | HasClearance () const noexcept |
double | GetClearance () const noexcept |
Get the clearance value of the current weight. More... | |
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. More... | |
double | m_weight {0.} |
The edge length. More... | |
std::vector< CfgType > | m_intermediates |
Intermediate configurations. More... | |
int | m_checkedMult {std::numeric_limits<int>::max()} |
The checked resolution multiple (for lazy query), or max if none. More... | |
double | m_clearance {std::numeric_limits<double>::infinity()} |
The clearance value, or inf if not evaluated. More... | |
ControlSet | m_controls |
The controls used. More... | |
size_t | m_timeSteps {0} |
The number of timesteps to apply the controls. More... | |
I/O | |
static Robot * | inputRobot = 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. More... | |
double | Weight () const noexcept |
static DefaultWeight | MaxWeight () noexcept |
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 @cspace. 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).
DefaultWeight< CfgType >::DefaultWeight | ( | const std::string & | _label = "" , |
const double | _w = 0 , |
||
const std::vector< CfgType > & | _intermediates = std::vector<CfgType>() |
||
) |
Construct a weight.
_label | An initial string label for identification. |
_w | An initial weight value. |
_intermediates | A vector of intermediate configurations. |
|
virtualdefault |
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.
|
noexcept |
Get the clearance value of the current weight.
|
noexcept |
Get a vector of controls corresponding to the path given by the weight.
|
noexcept |
Get a vector of controls corresponding to the path given by the weight.
|
noexcept |
Get a vector of intermediate configurations corresponding to the current weight.
|
noexcept |
Get a vector of intermediate configurations corresponding to the current weight.
|
noexcept |
Get the string label value.
|
noexcept |
Get the number of timesteps of the local plan corresponding to the weight's intermediates' path.
|
noexcept |
Get the numerical weight value.
|
noexcept |
|
noexcept |
Is the checked resolution multiple at most _mult?
|
staticnoexcept |
|
virtualnoexcept |
Check if the current and given weights are unequal.
_w | The given weight. |
|
virtual |
This only adds weights, it doesn't take intermediates into account.
|
virtualnoexcept |
Check if the current weight is less than a given weight by numerical weight value.
_w | The given weight. |
|
virtual |
Set the current weight to a copy of a given weight.
_w | The given weight. |
|
virtualnoexcept |
Check if the current and given weights are equal.
_w | The given weight. |
|
virtual |
Read an edge in from an input stream.
_is | The input stream to read from. |
@TODO an easy optimization would be to make coast controls not print the 0's signal, it could reduce some roadmaps significantly, I'd bet
|
noexcept |
Set the checked resolution multiple to a lesser value than current.
_mult | The new desired value. |
|
noexcept |
Set the clearance value of the current weight.
The | desired new clearance value. |
|
noexcept |
Set a singular control corresponding to the path given by the weight.
|
noexcept |
Set a vector of controls corresponding to the path given by the weight.
|
noexcept |
Set the intermediate configurations corresponding to the current weight.
|
noexcept |
Set the intermediate configurations corresponding to the current weight.
|
noexcept |
Set the string label value.
|
noexcept |
Set the number of timesteps of the local plan corresponding to the weight's intermediates' path.
|
noexcept |
Set the numerical weight value.
|
noexcept |
|
virtual |
Write an edge to an output stream.
_os | The output stream to write to. |
@TODO Now that we read/write the control signals for nonholonomic, we should remove the writing of intermediates for conciseness.
@TODO an easy optimization would be to make coast controls not print the 0 signal, it could reduce some roadmaps significantly, I'd bet.
|
static |
A static pointer to the current robot, which is needed to parse any intermediate configurations in the edge.
|
protected |
The checked resolution multiple (for lazy query), or max if none.
|
protected |
The clearance value, or inf if not evaluated.
|
protected |
The controls used.
|
protected |
Intermediate configurations.
|
protected |
Label of local planner that built this edge.
|
protected |
The number of timesteps to apply the controls.
|
protected |
The edge length.