Parasol Planning Library (PPL)
MedialAxisUtility Class Reference

#include <MedialAxisUtilities.h>

Inheritance diagram for MedialAxisUtility:
Inheritance graph
[legend]
Collaboration diagram for MedialAxisUtility:
Collaboration graph
[legend]

Public Member Functions

Construction
 MedialAxisUtility (string _vcLabel="", string _dmLabel="", bool _exactClearance=false, bool _exactPenetration=false, size_t _clearanceRays=10, size_t _penetrationRays=10, bool _useBBX=true, bool _positionalDofsOnly=true, bool _debug=false, double _epsilon=0.1, size_t _historyLength=5)
 
 MedialAxisUtility (XMLNode &_node)
 
virtual ~MedialAxisUtility ()=default
 
MPBaseObject Overrides
virtual void Print (ostream &_os) const override
 
void SetDebug (const bool _debug)
 
Property Accessors
double GetEpsilon () const
 Get the value of epsilon. More...
 
Medial Axis Functions
bool PushToMedialAxis (Cfg &_cfg, const Boundary *const _b)
 
bool PushFromInsideObstacle (Cfg &_cfg, const Boundary *const _b)
 
bool PushCfgToMedialAxisMidpointRule (Cfg &_cfg, const Boundary *const _b)
 
- Public Member Functions inherited from ClearanceUtility
 ClearanceUtility (string _vcLabel="", string _dmLabel="", bool _exactClearance=false, bool _exactPenetration=false, size_t _clearanceRays=10, size_t _penetrationRays=10, double _approxStepSize=MAX_DBL, double _approxResolution=MAX_DBL, bool _useBBX=true, bool _positionalDofsOnly=true, bool _debug=false)
 
 ClearanceUtility (XMLNode &_node)
 
virtual ~ClearanceUtility ()=default
 
virtual void Initialize () override
 
const string & GetDistanceMetricLabel () const
 
const string & GetValidityCheckerLabel () const
 
void SetValidityCheckerLabel (const string &_s)
 
bool GetExactClearance () const
 
double GetPositionResolution () const
 
double GetOrientationResolution () const
 
bool IsInitialized () const
 
bool CollisionInfo (Cfg &_cfg, Cfg &_clrCfg, const Boundary *const _b, CDInfo &_cdInfo, const bool &_useOppValidityWitness=true)
 
bool ExactCollisionInfo (Cfg &_cfg, Cfg &_clrCfg, const Boundary *const _b, CDInfo &_cdInfo, const bool _useOppValidityWitness=true)
 
bool ApproxCollisionInfo (Cfg &_cfg, Cfg &_clrCfg, const Boundary *const _b, CDInfo &_cdInfo, const bool &_useOppValidityWitness=true)
 
bool FindApproximateWitness (const std::size_t &_numRays, std::vector< Ray< Cfg > > &_rays, const Cfg &_sampledCfg, const bool &_initValidity, const Boundary *const _b, std::pair< size_t, Cfg > &_candidate, const bool &_useOppValidityWitness=true)
 
void MakeRays (const Cfg &_sampledCfg, const std::size_t &_numRays, std::vector< Ray< Cfg > > &_rays)
 
bool ValidateCandidate (const std::pair< size_t, Cfg > &_cand, const std::vector< Ray< Cfg > > &_rays, const Boundary *const _b, const bool &_useOppValidityWitness=true)
 
ClearanceStats RoadmapClearance ()
 
ClearanceStats PathClearance (vector< VID > &_path)
 
ClearanceStats PathClearance (vector< Cfg > &_path)
 
vector< double > EdgeClearance (const Cfg &_c1, const Cfg &_c2, const WeightType &_weight)
 
const bool GetNearestVertexWitness (Cfg &_cfg, CDInfo &_cdInfo, const Boundary *const _b)
 
void SetRobot (Robot *_robot)
 
- Public Member Functions inherited from MPBaseObject
 MPBaseObject (const std::string &_label="", const std::string &_name="", bool _debug=false)
 
 MPBaseObject (XMLNode &_node)
 
virtual ~MPBaseObject ()
 
const std::string & GetName () const
 Get the class name for this object. More...
 
const std::string & GetLabel () const
 Get the unique label for this object. More...
 
std::string GetNameAndLabel () const
 Get the unique string identifier for this object "m_name::m_label". More...
 
void SetLabel (const std::string &)
 Set the unique label for this object. More...
 
void SetMPLibrary (MPLibrary *) noexcept
 Set the owning MPLibrary. More...
 
MPLibraryGetMPLibrary () const noexcept
 Get the owning MPLibrary. More...
 
bool IsRunning () const noexcept
 Check the library's running flag. More...
 
MPProblemGetMPProblem () const noexcept
 Get the library's current MPProblem. More...
 
EnvironmentGetEnvironment () const noexcept
 Get the current environment. More...
 
MPTaskGetTask () const noexcept
 Get the current task. More...
 
GroupTaskGetGroupTask () const noexcept
 Get the current group task. More...
 
MPSolutionTypeGetMPSolution () const noexcept
 
RoadmapTypeGetRoadmap (Robot *const _r=nullptr) const noexcept
 Get the current free-space roadmap. More...
 
GroupRoadmapTypeGetGroupRoadmap (RobotGroup *const _g=nullptr) const noexcept
 Get the current free-space group roadmap. More...
 
RoadmapTypeGetBlockRoadmap (Robot *const _r=nullptr) const noexcept
 Get the current obstacle-space roadmap. More...
 
PathGetPath (Robot *const _r=nullptr) const noexcept
 
GroupPathGetGroupPath (RobotGroup *const _g=nullptr) const noexcept
 Get the current best group path. More...
 
StatClassGetStatClass () const noexcept
 Get the current StatClass. More...
 
LocalObstacleMapGetLocalObstacleMap () const noexcept
 Get the local obstacle map. More...
 

Additional Inherited Members

- Public Types inherited from ClearanceUtility
typedef MPBaseObject::WeightType WeightType
 
typedef MPBaseObject::RoadmapType RoadmapType
 
typedef RoadmapType::VID VID
 
- Public Types inherited from MPBaseObject
typedef DefaultWeight< CfgWeightType
 
typedef GenericStateGraph< Cfg, WeightTypeRoadmapType
 
typedef GroupCfg< RoadmapTypeGroupCfgType
 
typedef GroupLocalPlan< RoadmapTypeGroupWeightType
 
typedef GroupRoadmap< GroupCfgType, GroupWeightTypeGroupRoadmapType
 
- Protected Member Functions inherited from ClearanceUtility
bool AdjustWitnessToEnsureValidity (const Cfg &_cfg, const bool _initValidity, Cfg &_witnessCfg, const Boundary *const _b, const bool _useOppValidityWitness=true)
 
- Protected Member Functions inherited from MPBaseObject
void SetName (const std::string &_s)
 
const std::string & GetBaseFilename () const
 
- Protected Attributes inherited from ClearanceUtility
int abcd = 0
 
string m_vcLabel {"cd4"}
 Validity checker method label. More...
 
string m_dmLabel {"euclidean"}
 Distance metric method label. More...
 
bool m_useBBX {true}
 Use bounding box as obstacle? More...
 
bool m_positionalDofsOnly {true}
 Use only positional dofs? More...
 
bool m_exactClearance {false}
 Use exact clearance calculations? More...
 
bool m_exactPenetration {false}
 Use exact penetration calculations? More...
 
size_t m_clearanceRays {10}
 Number of rays for approximate clearance. More...
 
size_t m_penetrationRays {10}
 Number of rays for approximate penetration. More...
 
double m_rayTickResolution
 The resolution for rayTicks. More...
 
double m_orientationResolution
 The orientation resolution. More...
 
double m_maxRayMagnitude
 How far out a ray will be attempted. More...
 
size_t m_maxRayIterations
 The maximum number of ray iterations. More...
 
double m_orientationResFactor {1.}
 The orientation resolution factor. More...
 
double m_positionalResFactor {1.}
 The position resoluiton factor. More...
 
double m_maSearchResolutionFactor {1}
 The search resolution factor. More...
 
bool m_initialized {false}
 
Robotm_robot
 
- Protected Attributes inherited from MPBaseObject
bool m_debug
 Print debug info? More...
 

Detailed Description

Tool for pushing configurations to the medial axis.

Constructor & Destructor Documentation

◆ MedialAxisUtility() [1/2]

MedialAxisUtility::MedialAxisUtility ( string  _vcLabel = "",
string  _dmLabel = "",
bool  _exactClearance = false,
bool  _exactPenetration = false,
size_t  _clearanceRays = 10,
size_t  _penetrationRays = 10,
bool  _useBBX = true,
bool  _positionalDofsOnly = true,
bool  _debug = false,
double  _epsilon = 0.1,
size_t  _historyLength = 5 
)

Construct a MedialAxisUtility object

Parameters
_vcLabelThe validity checker to use.
_dmLabelThe distance metric to use.
_exactClearanceUse exact clearance or not.
_exactPenetrationUse exact penetration or not.
_clearanceRaysThe number of clearance rays to use.
_penetrationRaysThe number of penetration rays to use.
_useBBXUse BBX or not.
_positionalDofsOnlyUse only positional DOFs.
_debugSet to debug mode or not.
_epsilonThe epsilon value to use.
_historyLengthThe history length to use.

◆ MedialAxisUtility() [2/2]

MedialAxisUtility::MedialAxisUtility ( XMLNode _node)

Construct a MedialAxisUtility object from an XML node

Parameters
_nodeThe XML node to use.

◆ ~MedialAxisUtility()

virtual MedialAxisUtility::~MedialAxisUtility ( )
virtualdefault

Member Function Documentation

◆ GetEpsilon()

double MedialAxisUtility::GetEpsilon ( ) const
inline

Get the value of epsilon.

◆ Print()

void MedialAxisUtility::Print ( ostream &  _os) const
overridevirtual

Print the internal state of this object

Parameters
_osThe std::ostream to print to.

Reimplemented from ClearanceUtility.

◆ PushCfgToMedialAxisMidpointRule()

bool MedialAxisUtility::PushCfgToMedialAxisMidpointRule ( Cfg _cfg,
const Boundary *const  _b 
)

Push a configuration to the medial axis by stepping away from the nearest obstacle at the resolution until a second witness (invalid cfg) is found and then the midpoint of those two cfgs will be the MA cfg.

Parameters
_cfgThe configuration to push.
_bThe boundary to use.
Returns
Whether the config was pushed to the medial axis

◆ PushFromInsideObstacle()

bool MedialAxisUtility::PushFromInsideObstacle ( Cfg _cfg,
const Boundary *const  _b 
)

Push a configuration that is known to be inside an obstacle towards the free-space medial axis. It will be pushed until it is outside the obstacle.

Parameters
_cfgThe configuration to push.
_bThe boundary to use.
Returns
Whether the config was successfully pushed out of the obstacle.

◆ PushToMedialAxis()

bool MedialAxisUtility::PushToMedialAxis ( Cfg _cfg,
const Boundary *const  _b 
)

Push a configuration to the medial axis.

Parameters
_cfgThe configuration to push.
_bThe boundary to use.
Returns
Whether the config was successfully pushed to the medial axis.

◆ SetDebug()

void MedialAxisUtility::SetDebug ( const bool  _debug)
inline

Set to print debug statements or not

Parameters
_debugPrint debug statements or not.

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