An internal class for storing the collision grid.
Definition at line 184 of file CParameterizedTrajectoryGenerator.h.
#include <mrpt/reactivenav/CParameterizedTrajectoryGenerator.h>
Public Member Functions | |
CColisionGrid (float x_min, float x_max, float y_min, float y_max, float resolution) | |
virtual | ~CColisionGrid () |
bool | saveToFile (mrpt::utils::CStream *fil) |
Save to file, true = OK. | |
bool | loadFromFile (mrpt::utils::CStream *fil) |
Load from file, true = OK. | |
const TCollisionCell & | 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. | |
void | 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: |
mrpt::reactivenav::CParameterizedTrajectoryGenerator::CColisionGrid::CColisionGrid | ( | float | x_min, |
float | x_max, | ||
float | y_min, | ||
float | y_max, | ||
float | resolution | ||
) | [inline] |
Definition at line 187 of file CParameterizedTrajectoryGenerator.h.
virtual mrpt::reactivenav::CParameterizedTrajectoryGenerator::CColisionGrid::~CColisionGrid | ( | ) | [inline, virtual] |
Definition at line 191 of file CParameterizedTrajectoryGenerator.h.
const TCollisionCell& mrpt::reactivenav::CParameterizedTrajectoryGenerator::CColisionGrid::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 mrpt::reactivenav::CParameterizedTrajectoryGenerator::CColisionGrid::loadFromFile | ( | mrpt::utils::CStream * | fil | ) |
Load from file, true = OK.
bool mrpt::reactivenav::CParameterizedTrajectoryGenerator::CColisionGrid::saveToFile | ( | mrpt::utils::CStream * | fil | ) |
Save to file, true = OK.
void mrpt::reactivenav::CParameterizedTrajectoryGenerator::CColisionGrid::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 (alfa discreet value) |
d | The distance (in TP-Space, range 0..1) to collision. |
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN:exported at Tue Jan 25 21:56:31 UTC 2011 |