Parasol Planning Library (PPL)
CDInfo Struct Reference

#include <CDInfo.h>

Collaboration diagram for CDInfo:
Collaboration graph
[legend]

Public Types

Local Types
typedef std::pair< int, int > CollisionPair
 

Public Member Functions

Construction
 CDInfo (const bool _retAllInfo=false)
 
void ResetVars (const bool _retAllInfo=false)
 
Ordering
bool operator< (const CDInfo &_cdInfo) const noexcept
 

Data Fields

Internal State
bool m_retAllInfo
 Consider all collisions or only the first? More...
 
int m_collidingObstIndex
 Index for first discovered obstacle collision. More...
 
int m_nearestObstIndex
 Index for closest obstacle. More...
 
double m_minDist
 Distance between Robot and closest obstacle. More...
 
mathtool::Vector3d m_robotPoint
 Closest point on Robot to closest obstacle. More...
 
mathtool::Vector3d m_objectPoint
 Closest point on closest obstacle to Robot. More...
 
std::vector< CollisionPairm_trianglePairs
 All colliding triangle pairs. More...
 
CDClearanceMap m_clearanceMap
 Map of detected clearances. More...
 

Detailed Description

Information returned by validity checkers, e.g., distance from obstacles.

Todo:
Generalize this object to store collisions with obstacles, boundaries, and other robots in a uniform way. It should contain a vector of 'Collision' structures which describe the object type, indexes, and distance for each detected collision.
Examples
CollisionDetection_UseCase.cpp, and ValidityCheckers_UseCase.cpp.

Member Typedef Documentation

◆ CollisionPair

typedef std::pair<int, int> CDInfo::CollisionPair

A pair of triangle indexes on the robot (first) and obstacle (second) in a discovered collision.

Constructor & Destructor Documentation

◆ CDInfo()

CDInfo::CDInfo ( const bool  _retAllInfo = false)
Parameters
_retAllInfoCompute distance information if possible

Member Function Documentation

◆ operator<()

bool CDInfo::operator< ( const CDInfo _cdInfo) const
noexcept

Order these objects according to the minimum distance from closest colliding obstacle.

Parameters
_cdInfoOther CDInfo
Returns
True if minimum distance is less than other's minimum distance.

◆ ResetVars()

void CDInfo::ResetVars ( const bool  _retAllInfo = false)

Reset object to default state.

Parameters
_retAllInfoCompute distance information if possible

Field Documentation

◆ m_clearanceMap

CDClearanceMap CDInfo::m_clearanceMap

Map of detected clearances.

◆ m_collidingObstIndex

int CDInfo::m_collidingObstIndex

Index for first discovered obstacle collision.

◆ m_minDist

double CDInfo::m_minDist

Distance between Robot and closest obstacle.

◆ m_nearestObstIndex

int CDInfo::m_nearestObstIndex

Index for closest obstacle.

◆ m_objectPoint

mathtool::Vector3d CDInfo::m_objectPoint

Closest point on closest obstacle to Robot.

◆ m_retAllInfo

bool CDInfo::m_retAllInfo

Consider all collisions or only the first?

◆ m_robotPoint

mathtool::Vector3d CDInfo::m_robotPoint

Closest point on Robot to closest obstacle.

◆ m_trianglePairs

std::vector<CollisionPair> CDInfo::m_trianglePairs

All colliding triangle pairs.


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