Parasol Planning Library (PPL)
Public Member Functions
GroupPath Class Referencefinal

#include <GroupPath.h>

Public Types

Motion Planning Types
typedef GenericStateGraph< Cfg, DefaultWeight< Cfg > > RoadmapType
 
typedef GroupCfg< RoadmapTypeGroupCfgType
 
typedef GroupRoadmap< GroupCfgType, GroupLocalPlan< RoadmapType > > GroupRoadmapType
 
typedef GroupRoadmapType::VID VID
 

Public Member Functions

template<typename MPLibrary >
const std::vector< typename GroupPath::GroupCfgTypeFullCfgs (MPLibrary *const _lib) const
 
template<typename MPLibrary >
const std::vector< typename GroupPath::GroupCfgTypeFullCfgsWithWait (MPLibrary *const _lib) const
 
Construction
 GroupPath (GroupRoadmapType *const _r=nullptr)
 
Path Interface
GroupRoadmapTypeGetRoadmap () const noexcept
 Get the roadmap used by this path. More...
 
size_t Size () const noexcept
 Get the number of cfgs in the path. More...
 
bool Empty () const noexcept
 Check if the path is empty. More...
 
double Length () const
 Get the total edge weight. More...
 
size_t TimeSteps () const
 
const std::vector< VID > & VIDs () const noexcept
 Get the VIDs in the path. More...
 
const std::pair< std::vector< VID >, std::vector< size_t > > VIDsWaiting () const noexcept
 Get the VIDs and timesteps waiting in the path. More...
 
const std::vector< GroupCfgType > & Cfgs () const
 
template<typename MPLibrary >
const std::vector< GroupCfgTypeFullCfgs (MPLibrary *const _lib) const
 
template<typename MPLibrary >
const std::vector< GroupCfgTypeFullCfgsWithWait (MPLibrary *const _lib) const
 
GroupPathoperator+= (const GroupPath &_p)
 
GroupPath operator+ (const GroupPath &_p) const
 
GroupPathoperator+= (const std::vector< VID > &_vids)
 
GroupPath operator+ (const std::vector< VID > &_vids) const
 
GroupPathoperator= (const GroupPath &_p)
 Copy assignment operator. More...
 
void Clear ()
 Clear all data in the path. More...
 
void FlushCache ()
 Clear cached data, but leave the VIDs. More...
 
void SetWaitTimes (std::vector< size_t > _waitTimes)
 
std::vector< size_t > GetWaitTimes ()
 Get the wait times at each vertex in the path. More...
 
std::pair< size_t, size_t > GetEdgeAtTimestep (size_t _timestep)
 

Detailed Description

A path of connected configurations from a given roadmap.

The implementation uses a vector of VID's as the primary representation. The corresponding configurations are computed lazily upon request.

Member Typedef Documentation

◆ GroupCfgType

◆ GroupRoadmapType

◆ RoadmapType

◆ VID

Constructor & Destructor Documentation

◆ GroupPath()

GroupPath::GroupPath ( GroupRoadmapType *const  _r = nullptr)

Construct an empty path.

Parameters
_rThe roadmap used by this path.

Member Function Documentation

◆ Cfgs()

const std::vector< typename GroupPath::GroupCfgType > & GroupPath::Cfgs ( ) const

Get a copy of the Cfgs in the path.

Warning
If the cfgs in the roadmap are later altered (i.e., if the DOF values or labels are edited), this copy will be out-of-date.

◆ Clear()

void GroupPath::Clear ( )

Clear all data in the path.

◆ Empty()

bool GroupPath::Empty ( ) const
noexcept

Check if the path is empty.

◆ FlushCache()

void GroupPath::FlushCache ( )

Clear cached data, but leave the VIDs.

◆ FullCfgs() [1/2]

template<typename MPLibrary >
const std::vector<GroupCfgType> GroupPath::FullCfgs ( MPLibrary *const  _lib) const

Get the current full Cfg path with steps spaced one environment resolution apart. This is not cached due to its size and infrequent usage.

Parameters
_libThe planning library to use.
Returns
The full path of configurations, including local-plan intermediates between the roadmap nodes.

◆ FullCfgs() [2/2]

template<typename MPLibrary >
const std::vector<typename GroupPath::GroupCfgType> GroupPath::FullCfgs ( MPLibrary *const  _lib) const

◆ FullCfgsWithWait() [1/2]

template<typename MPLibrary >
const std::vector<GroupCfgType> GroupPath::FullCfgsWithWait ( MPLibrary *const  _lib) const

Get the current full Cfg path with wait times. Steps are spaced one environment resolution apart. This is not cached due to its size and infrequent usage.

Parameters
_libThe planning library to use.
Returns
The full path of configurations, including local-plan intermediates between the roadmap nodes and waiting.

◆ FullCfgsWithWait() [2/2]

template<typename MPLibrary >
const std::vector<typename GroupPath::GroupCfgType> GroupPath::FullCfgsWithWait ( MPLibrary *const  _lib) const

◆ GetEdgeAtTimestep()

std::pair< size_t, size_t > GroupPath::GetEdgeAtTimestep ( size_t  _timestep)

Get the (source,target) of the path at the input timestep.

Parameters
_timestepThe timestep to find the corresponding edge.
Returns
The source and target of the corresponding edge.

◆ GetRoadmap()

GroupPath::GroupRoadmapType * GroupPath::GetRoadmap ( ) const
noexcept

Get the roadmap used by this path.

◆ GetWaitTimes()

std::vector< size_t > GroupPath::GetWaitTimes ( )

Get the wait times at each vertex in the path.

◆ Length()

double GroupPath::Length ( ) const

Get the total edge weight.

Todo:
This will be an error if we allow self-edges.

◆ operator+() [1/2]

GroupPath GroupPath::operator+ ( const GroupPath _p) const

Add another path to the end of this one and return the result.

Parameters
_pThe path to add.

◆ operator+() [2/2]

GroupPath GroupPath::operator+ ( const std::vector< VID > &  _vids) const

Add a new set of VIDs to the end of this path and return the result.

Parameters
_vidsThe VIDs to add.

◆ operator+=() [1/2]

GroupPath & GroupPath::operator+= ( const GroupPath _p)

Append another path to the end of this one.

Parameters
_pThe path to append.

◆ operator+=() [2/2]

GroupPath & GroupPath::operator+= ( const std::vector< VID > &  _vids)

Append a new set of VIDs to the end of this path.

Parameters
_vidsThe VIDs to append.

◆ operator=()

GroupPath & GroupPath::operator= ( const GroupPath _p)

Copy assignment operator.

◆ SetWaitTimes()

void GroupPath::SetWaitTimes ( std::vector< size_t >  _waitTimes)

Set the wait times at each vertex in path Used in Safe Interval Path Planning

◆ Size()

size_t GroupPath::Size ( ) const
noexcept

Get the number of cfgs in the path.

◆ TimeSteps()

size_t GroupPath::TimeSteps ( ) const
Todo:
This will be an error if we allow self-edges.

◆ VIDs()

const std::vector< typename GroupPath::VID > & GroupPath::VIDs ( ) const
noexcept

Get the VIDs in the path.

◆ VIDsWaiting()

const std::pair<std::vector<VID>,std::vector<size_t> > GroupPath::VIDsWaiting ( ) const
noexcept

Get the VIDs and timesteps waiting in the path.


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