![]() |
Parasol Planning Library (PPL)
|
#include <Path.h>
Public Types | |
Motion Planning Types | |
typedef GenericStateGraph< Cfg, DefaultWeight< Cfg > > | RoadmapType |
typedef RoadmapType::VID | VID |
Public Member Functions | |
Construction | |
Path (RoadmapType *const _r=nullptr) | |
Path Interface | |
Robot * | GetRobot () const noexcept |
Get the robot which travels this path. More... | |
RoadmapType * | GetRoadmap () 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... | |
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< Cfg > & | Cfgs () const |
const std::vector< Cfg > | FullCfgs (MPLibrary *const _lib) const |
const std::vector< Cfg > | FullCfgsWithWait (MPLibrary *const _lib) const |
size_t | TimeSteps () const |
void | SetTimeSteps (size_t _timesteps) |
Hardcode number of timesteps in the path. More... | |
void | ResetTimeSteps () |
Reset the number of timesteps to 0. More... | |
Path & | operator+= (const Path &_p) |
Path | operator+ (const Path &_p) const |
Path & | operator+= (const std::vector< VID > &_vids) |
Path | operator+ (const std::vector< VID > &_vids) const |
Path & | operator= (const Path &_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 | SetFinalWaitTimeSteps (const size_t &_timeSteps) |
const size_t | GetFinalWaitTimeSteps () const |
Get the number of timesteps to wait after traversal of the path. More... | |
void | SetWaitTimes (std::vector< size_t > _waitTimes) |
std::vector< size_t > | GetWaitTimes () |
Get the wait time at each vertex index in the path. More... | |
std::pair< std::pair< size_t, size_t >, std::pair< size_t, size_t > > | GetEdgeAtTimestep (size_t _timestep) |
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.
typedef GenericStateGraph<Cfg, DefaultWeight<Cfg> > Path::RoadmapType |
typedef RoadmapType::VID Path::VID |
Path::Path | ( | RoadmapType *const | _r = nullptr | ) |
Construct an empty path.
_r | The roadmap used by this path. |
const std::vector< Cfg > & Path::Cfgs | ( | ) | const |
Get a copy of the Cfgs in the path.
void Path::Clear | ( | ) |
Clear all data in the path.
|
noexcept |
Check if the path is empty.
void Path::FlushCache | ( | ) |
Clear cached data, but leave the VIDs.
Get the current full Cfg path with steps spaced one environment resolution apart. This is not cached due to its size and infrequent usage.
_lib | The planning library to use. |
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.
_lib | The planning library to use. |
std::pair< std::pair< size_t, size_t >, std::pair< size_t, size_t > > Path::GetEdgeAtTimestep | ( | size_t | _timestep | ) |
Get the (source,target) of the path at the input timestep.
_timestep | The timestep to find the corresponding edge. |
const size_t Path::GetFinalWaitTimeSteps | ( | ) | const |
Get the number of timesteps to wait after traversal of the path.
|
noexcept |
Get the roadmap used by this path.
|
noexcept |
Get the robot which travels this path.
std::vector< size_t > Path::GetWaitTimes | ( | ) |
Get the wait time at each vertex index in the path.
double Path::Length | ( | ) | const |
Get the total edge weight.
Add another path to the end of this one and return the result.
_p | The path to add. |
Add a new set of VIDs to the end of this path and return the result.
_vids | The VIDs to add. |
Append another path to the end of this one.
_p | The path to append. |
Append a new set of VIDs to the end of this path.
_vids | The VIDs to append. |
void Path::ResetTimeSteps | ( | ) |
Reset the number of timesteps to 0.
void Path::SetFinalWaitTimeSteps | ( | const size_t & | _timeSteps | ) |
Set the number of timesteps to wait after traversal of the path.
_timeSteps | The number of desired timesteps. |
void Path::SetTimeSteps | ( | size_t | _timesteps | ) |
Hardcode number of timesteps in the path.
void Path::SetWaitTimes | ( | std::vector< size_t > | _waitTimes | ) |
Set the wait times at each vertex in path Used in Safe Interval Path Planning
|
noexcept |
Get the number of cfgs in the path.
size_t Path::TimeSteps | ( | ) | const |
Get the number of timesteps calculated to traverse the path, including waiting times.
|
noexcept |
Get the VIDs in the path.
|
noexcept |
Get the VIDs and timesteps waiting in the path.