|
selfdriving
|
#include <mpp/ptgs/DiffDriveCollisionGridBased.h>
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 ¤t_robotShape) |
| const TCollisionCell & | getTPObstacle (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 |
An internal class for storing the collision grid
|
inline |
|
overridedefault |
| 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
| bool mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid::loadFromFile | ( | mrpt::serialization::CArchive * | fil, |
| const mrpt::math::CPolygon & | current_robotShape | ||
| ) |
Load from file, true = OK
| bool mpp::ptg::DiffDriveCollisionGridBased::CCollisionGrid::saveToFile | ( | mrpt::serialization::CArchive * | fil, |
| const mrpt::math::CPolygon & | computed_robotShape | ||
| ) | const |
Save to file, true = OK
| 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:
| cellInfo | The index of the cell |
| k | The path index (alpha discreet value) |
| d | The distance (in TP-Space, range 0..1) to collision. |
|
private |
1.8.13