This is a template class for storing a 3D (2D+heading) grid containing any kind of data.
Definition at line 24 of file CPose2DGridTemplate.h.
#include <mrpt/poses/CPose2DGridTemplate.h>
Public Member Functions | |
size_t | x2idx (double x) const |
Returns "indexes" from coordinates: More... | |
size_t | y2idx (double y) const |
Returns "indexes" from coordinates: More... | |
size_t | phi2idx (double phi) const |
Returns "indexes" from coordinates: More... | |
double | idx2x (size_t x) const |
Returns coordinates from "indexes": More... | |
double | idx2y (size_t y) const |
Returns coordinates from "indexes": More... | |
double | idx2phi (size_t phi) const |
Returns coordinates from "indexes": More... | |
CPose2DGridTemplate (double xMin=-1.0f, double xMax=1.0f, double yMin=-1.0f, double yMax=1.0f, double resolutionXY=0.5f, double resolutionPhi=mrpt::utils::DEG2RAD(180), double phiMin=-M_PIf, double phiMax=M_PIf) | |
Default constructor: More... | |
virtual | ~CPose2DGridTemplate () |
void | setSize (double xMin, double xMax, double yMin, double yMax, double resolutionXY, double resolutionPhi, double phiMin=-M_PIf, double phiMax=M_PIf) |
Changes the limits and size of the grid, erasing previous contents: More... | |
const T * | getByPos (double x, double y, double phi) const |
Reads the contents of a cell. More... | |
T * | getByPos (double x, double y, double phi) |
Reads the contents of a cell. More... | |
const T * | getByIndex (size_t x, size_t y, size_t phi) const |
Reads the contents of a cell. More... | |
T * | getByIndex (size_t x, size_t y, size_t phi) |
Reads the contents of a cell. More... | |
template<class MATRIXLIKE > | |
void | getAsMatrix (const double &phi, MATRIXLIKE &outMat) |
Returns the whole grid as a matrix, for a given constant "phi" and where each row contains values for a fixed "y". More... | |
double | getXMin () const |
Get info about the grid: More... | |
double | getXMax () const |
double | getYMin () const |
double | getYMax () const |
double | getPhiMin () const |
double | getPhiMax () const |
double | getResolutionXY () const |
double | getResolutionPhi () const |
size_t | getSizeX () const |
size_t | getSizeY () const |
size_t | getSizePhi () const |
Protected Attributes | |
double | m_xMin |
The limits and resolution of the grid: More... | |
double | m_xMax |
double | m_yMin |
double | m_yMax |
double | m_phiMin |
double | m_phiMax |
double | m_resolutionXY |
double | m_resolutionPhi |
size_t | m_sizeX |
The size of "m_data" is m_sizeX * m_sizeY * m_sizePhi. More... | |
size_t | m_sizeY |
size_t | m_sizePhi |
size_t | m_sizeXY |
int | m_idxLeftX |
The indexes of the "left" borders: More... | |
int | m_idxLeftY |
int | m_idxLeftPhi |
std::vector< T > | m_data |
The data: More... | |
|
inline |
Default constructor:
Definition at line 100 of file CPose2DGridTemplate.h.
|
inlinevirtual |
Definition at line 121 of file CPose2DGridTemplate.h.
|
inline |
Returns the whole grid as a matrix, for a given constant "phi" and where each row contains values for a fixed "y".
Definition at line 200 of file CPose2DGridTemplate.h.
Referenced by mrpt::maps::CMultiMetricMapPDF::prediction_and_update_pfOptimalProposal().
|
inline |
Reads the contents of a cell.
Definition at line 183 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getByPos(), and mrpt::maps::CMultiMetricMapPDF::prediction_and_update_pfOptimalProposal().
|
inline |
Reads the contents of a cell.
Definition at line 191 of file CPose2DGridTemplate.h.
|
inline |
Reads the contents of a cell.
Definition at line 169 of file CPose2DGridTemplate.h.
|
inline |
Reads the contents of a cell.
Definition at line 176 of file CPose2DGridTemplate.h.
|
inline |
Definition at line 219 of file CPose2DGridTemplate.h.
|
inline |
Definition at line 218 of file CPose2DGridTemplate.h.
|
inline |
Definition at line 221 of file CPose2DGridTemplate.h.
|
inline |
Definition at line 220 of file CPose2DGridTemplate.h.
|
inline |
Definition at line 224 of file CPose2DGridTemplate.h.
|
inline |
Definition at line 222 of file CPose2DGridTemplate.h.
Referenced by mrpt::maps::CMultiMetricMapPDF::prediction_and_update_pfOptimalProposal().
|
inline |
Definition at line 223 of file CPose2DGridTemplate.h.
Referenced by mrpt::maps::CMultiMetricMapPDF::prediction_and_update_pfOptimalProposal().
|
inline |
Definition at line 215 of file CPose2DGridTemplate.h.
|
inline |
Get info about the grid:
Definition at line 214 of file CPose2DGridTemplate.h.
|
inline |
Definition at line 217 of file CPose2DGridTemplate.h.
|
inline |
Definition at line 216 of file CPose2DGridTemplate.h.
|
inline |
Returns coordinates from "indexes":
Definition at line 92 of file CPose2DGridTemplate.h.
|
inline |
Returns coordinates from "indexes":
Definition at line 76 of file CPose2DGridTemplate.h.
Referenced by mrpt::maps::CMultiMetricMapPDF::prediction_and_update_pfOptimalProposal().
|
inline |
Returns coordinates from "indexes":
Definition at line 84 of file CPose2DGridTemplate.h.
Referenced by mrpt::maps::CMultiMetricMapPDF::prediction_and_update_pfOptimalProposal().
|
inline |
Returns "indexes" from coordinates:
Definition at line 67 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getAsMatrix(), and mrpt::poses::CPose2DGridTemplate< double >::getByPos().
|
inline |
Changes the limits and size of the grid, erasing previous contents:
Definition at line 126 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::CPose2DGridTemplate().
|
inline |
Returns "indexes" from coordinates:
Definition at line 49 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getByPos().
|
inline |
Returns "indexes" from coordinates:
Definition at line 58 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getByPos().
|
protected |
The data:
Definition at line 44 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getAsMatrix(), mrpt::poses::CPose2DGridTemplate< double >::getByIndex(), and mrpt::poses::CPose2DGridTemplate< double >::setSize().
|
protected |
Definition at line 40 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::setSize().
|
protected |
The indexes of the "left" borders:
Definition at line 40 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::setSize().
|
protected |
Definition at line 40 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::setSize().
|
protected |
Definition at line 29 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getPhiMax(), and mrpt::poses::CPose2DGridTemplate< double >::setSize().
|
protected |
|
protected |
|
protected |
Definition at line 29 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getResolutionXY(), mrpt::poses::CPose2DGridTemplate< double >::idx2x(), mrpt::poses::CPose2DGridTemplate< double >::idx2y(), mrpt::poses::CPose2DGridTemplate< double >::setSize(), mrpt::poses::CPose2DGridTemplate< double >::x2idx(), and mrpt::poses::CPose2DGridTemplate< double >::y2idx().
|
protected |
Definition at line 36 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getAsMatrix(), mrpt::poses::CPose2DGridTemplate< double >::getByIndex(), mrpt::poses::CPose2DGridTemplate< double >::getSizePhi(), mrpt::poses::CPose2DGridTemplate< double >::idx2phi(), mrpt::poses::CPose2DGridTemplate< double >::phi2idx(), and mrpt::poses::CPose2DGridTemplate< double >::setSize().
|
protected |
The size of "m_data" is m_sizeX * m_sizeY * m_sizePhi.
Definition at line 36 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getAsMatrix(), mrpt::poses::CPose2DGridTemplate< double >::getByIndex(), mrpt::poses::CPose2DGridTemplate< double >::getSizeX(), mrpt::poses::CPose2DGridTemplate< double >::idx2x(), mrpt::poses::CPose2DGridTemplate< double >::setSize(), and mrpt::poses::CPose2DGridTemplate< double >::x2idx().
|
protected |
Definition at line 36 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getAsMatrix(), mrpt::poses::CPose2DGridTemplate< double >::getByIndex(), and mrpt::poses::CPose2DGridTemplate< double >::setSize().
|
protected |
Definition at line 36 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getAsMatrix(), mrpt::poses::CPose2DGridTemplate< double >::getByIndex(), mrpt::poses::CPose2DGridTemplate< double >::getSizeY(), mrpt::poses::CPose2DGridTemplate< double >::idx2y(), mrpt::poses::CPose2DGridTemplate< double >::setSize(), and mrpt::poses::CPose2DGridTemplate< double >::y2idx().
|
protected |
Definition at line 29 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getXMax(), and mrpt::poses::CPose2DGridTemplate< double >::setSize().
|
protected |
The limits and resolution of the grid:
Definition at line 29 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getXMin(), mrpt::poses::CPose2DGridTemplate< double >::idx2x(), mrpt::poses::CPose2DGridTemplate< double >::setSize(), and mrpt::poses::CPose2DGridTemplate< double >::x2idx().
|
protected |
Definition at line 29 of file CPose2DGridTemplate.h.
Referenced by mrpt::poses::CPose2DGridTemplate< double >::getYMax(), and mrpt::poses::CPose2DGridTemplate< double >::setSize().
|
protected |
Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019 |