selfdriving
Public Member Functions | Private Attributes | List of all members
mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid Class Reference

#include <mpp/ptgs/DiffDriveCollisionGridBased.h>

Inheritance diagram for mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid:

Public Member Functions

 CCollisionGrid (float x_min, float x_max, float y_min, float y_max, float resolution, DiffDriveCollisionGridBased *parent)
 
 ~CCollisionGrid () override=default
 
bool saveToFile (mrpt::serialization::CArchive *fil, const mrpt::math::CPolygon &computed_robotShape) const
 
bool loadFromFile (mrpt::serialization::CArchive *fil, const mrpt::math::CPolygon &current_robotShape)
 
const TCollisionCellgetTPObstacle (const float obsX, const float obsY) const
 
void updateCellInfo (const unsigned int icx, const unsigned int icy, const uint16_t k, const float dist)
 

Private Attributes

DiffDriveCollisionGridBased const * m_parent
 

Detailed Description

An internal class for storing the collision grid

Constructor & Destructor Documentation

◆ CCollisionGrid()

mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid::CCollisionGrid ( float  x_min,
float  x_max,
float  y_min,
float  y_max,
float  resolution,
DiffDriveCollisionGridBased parent 
)
inline

◆ ~CCollisionGrid()

mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid::~CCollisionGrid ( )
overridedefault

Member Function Documentation

◆ getTPObstacle()

const TCollisionCell& mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid::getTPObstacle ( const float  obsX,
const float  obsY 
) const

For an obstacle (x,y), returns a vector with all the pairs (a,d) such as the robot collides

◆ loadFromFile()

bool mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid::loadFromFile ( mrpt::serialization::CArchive *  fil,
const mrpt::math::CPolygon &  current_robotShape 
)

Load from file, true = OK

◆ saveToFile()

bool mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid::saveToFile ( mrpt::serialization::CArchive *  fil,
const mrpt::math::CPolygon &  computed_robotShape 
) const

Save to file, true = OK

◆ updateCellInfo()

void mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid::updateCellInfo ( const unsigned int  icx,
const unsigned int  icy,
const uint16_t  k,
const float  dist 
)

Updates the info into a cell: It updates the cell only if the distance d for the path k is lower than the previous value:

Parameters
cellInfoThe index of the cell
kThe path index (alpha discreet value)
dThe distance (in TP-Space, range 0..1) to collision.

Member Data Documentation

◆ m_parent

DiffDriveCollisionGridBased const* mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid::m_parent
private

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