Declares a class that represents a Probability Distribution function (PDF) of a 2D pose (x,y,phi).
This class implements that PDF using a 3D grid.
#include <mrpt/poses/CPosePDFGrid.h>

Public Types | |
| enum | { is_3D_val = 0 } |
| enum | { is_PDF_val = 1 } |
| typedef TDATA | type_value |
| The type of the state the PDF represents. | |
Public Member Functions | |
| CPosePDFGrid (double xMin=-1.0f, double xMax=1.0f, double yMin=-1.0f, double yMax=1.0f, double resolutionXY=0.5f, double resolutionPhi=DEG2RAD(180), double phiMin=-M_PIf, double phiMax=M_PIf) | |
| Constructor: Initializes a, uniform distribution over the whole given range. | |
| virtual | ~CPosePDFGrid () |
| Destructor. | |
| void | copyFrom (const CPosePDF &o) |
| Copy operator, translating if necesary (for example, between particles and gaussian representations) | |
| void | normalize () |
| Normalizes the PDF, such as all cells sum the unity. | |
| void | uniformDistribution () |
| Assigns the same value to all the cells in the grid, so the sum 1. | |
| void | getMean (CPose2D &mean_pose) const |
| Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF). | |
| void | getCovarianceAndMean (CMatrixDouble33 &cov, CPose2D &mean_point) const |
| Returns an estimate of the pose covariance matrix (3x3 cov matrix) and the mean, both at once. | |
| void | saveToTextFile (const std::string &dataFile) const |
| Save the contents of the 3D grid in one file, as a vertical concatenation of rectangular matrix for the different "PHI" discrete levels, and the size in X,Y,and PHI in another file named "<filename>_dims.txt". | |
| void | changeCoordinatesReference (const CPose3D &newReferenceBase) |
| This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf. | |
| void | bayesianFusion (const CPosePDF &p1, const CPosePDF &p2, const double &minMahalanobisDistToDrop=0) |
| Bayesian fusion of 2 densities (In the grid representation this becomes a pointwise multiplication) | |
| void | inverse (CPosePDF &o) const |
| Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF. | |
| void | drawSingleSample (CPose2D &outPart) const |
| Draws a single sample from the distribution (WARNING: weights are assumed to be normalized!) | |
| void | drawManySamples (size_t N, std::vector< vector_double > &outSamples) const |
| Draws a number of samples from the distribution, and saves as a list of 1x3 vectors, where each row contains a (x,y,phi) datum. | |
| template<class OPENGL_SETOFOBJECTSPTR > | |
| void | getAs3DObject (OPENGL_SETOFOBJECTSPTR &out_obj) const |
| Returns a 3D representation of this PDF. | |
| template<class OPENGL_SETOFOBJECTSPTR > | |
| OPENGL_SETOFOBJECTSPTR | getAs3DObject () const |
| Returns a 3D representation of this PDF. | |
| mrpt::utils::CObjectPtr | duplicateGetSmartPtr () const |
| Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). | |
| CObject * | clone () const |
| Cloning interface for smart pointers. | |
| virtual void | getMean (TDATA &mean_point) const =0 |
| Returns the mean, or mathematical expectation of the probability density distribution (PDF). | |
| virtual void | getCovarianceAndMean (CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &cov, TDATA &mean_point) const =0 |
| Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once. | |
| void | getCovarianceDynAndMean (CMatrixDouble &cov, TDATA &mean_point) const |
| Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once. | |
| TDATA | getMeanVal () const |
| Returns the mean, or mathematical expectation of the probability density distribution (PDF). | |
| void | getCovariance (CMatrixDouble &cov) const |
| Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix) | |
| void | getCovariance (CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &cov) const |
| Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix) | |
| CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > | getCovariance () const |
| Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix) | |
| virtual void | drawSingleSample (TDATA &outPart) const =0 |
| Draws a single sample from the distribution. | |
| double | getCovarianceEntropy () const |
| Compute the entropy of the estimated covariance matrix. | |
| size_t | x2idx (double x) const |
| Returns "indexes" from coordinates: | |
| size_t | y2idx (double y) const |
| Returns "indexes" from coordinates: | |
| size_t | phi2idx (double phi) const |
| Returns "indexes" from coordinates: | |
| double | idx2x (size_t x) const |
| Returns coordinates from "indexes": | |
| double | idx2y (size_t y) const |
| Returns coordinates from "indexes": | |
| double | idx2phi (size_t phi) const |
| Returns coordinates from "indexes": | |
| 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: | |
| const T * | getByPos (double x, double y, double phi) const |
| Reads the contents of a cell. | |
| T * | getByPos (double x, double y, double phi) |
| Reads the contents of a cell. | |
| const T * | getByIndex (size_t x, size_t y, size_t phi) const |
| Reads the contents of a cell. | |
| T * | getByIndex (size_t x, size_t y, size_t phi) |
| Reads the contents of a cell. | |
| void | getAsMatrix (const double &phi, CMatrixTemplate< T > &outMat) |
| Returns the whole grid as a matrix, for a given constant "phi" and where each row contains values for a fixed "y". | |
| double | getXMin () const |
| Get info about the grid: | |
| 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 |
Static Public Member Functions | |
| static bool | is_3D () |
| static bool | is_PDF () |
Static Public Attributes | |
| static const mrpt::utils::TRuntimeClassId | classCObject |
| static const size_t | state_length |
| The length of the variable, for example, 3 for a 3D point, 6 for a 3D pose (x y z yaw pitch roll). | |
RTTI stuff | |
| static const mrpt::utils::TRuntimeClassId | classCSerializable |
Protected Member Functions | |
| virtual void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const =0 |
| Introduces a pure virtual method responsible for writing to a CStream. | |
| virtual void | readFromStream (mrpt::utils::CStream &in, int version)=0 |
| Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori. | |
Protected Attributes | |
| double | m_xMin |
| The limits and resolution of the grid: | |
| 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. | |
| size_t | m_sizeY |
| size_t | m_sizePhi |
| size_t | m_sizeXY |
| int | m_idxLeftX |
| The indexes of the "left" borders: | |
| int | m_idxLeftY |
| int | m_idxLeftPhi |
| std::vector< T > | m_data |
| The data: | |
RTTI stuff | |
| static const mrpt::utils::TRuntimeClassId | classCPosePDF |
| class | mrpt::utils::CStream |
RTTI stuff | |
| typedef CPosePDFGridPtr | SmartPtr |
| static mrpt::utils::CLASSINIT | _init_CPosePDFGrid |
| static mrpt::utils::TRuntimeClassId | classCPosePDFGrid |
| static const mrpt::utils::TRuntimeClassId * | classinfo |
| static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
| virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
| Returns information about the class of an object in runtime. | |
| virtual mrpt::utils::CObject * | duplicate () const |
| Returns a copy of the object, indepently of its class. | |
| static mrpt::utils::CObject * | CreateObject () |
| static CPosePDFGridPtr | Create () |
A typedef for the associated smart pointer
Definition at line 53 of file CPosePDFGrid.h.
typedef TDATA mrpt::utils::CProbabilityDensityFunction::type_value [inherited] |
The type of the state the PDF represents.
Definition at line 54 of file CProbabilityDensityFunction.h.
anonymous enum [inherited] |
Definition at line 79 of file CPosePDF.h.
anonymous enum [inherited] |
Definition at line 81 of file CPosePDF.h.
| mrpt::poses::CPosePDFGrid::CPosePDFGrid | ( | double | xMin = -1.0f, |
| double | xMax = 1.0f, |
||
| double | yMin = -1.0f, |
||
| double | yMax = 1.0f, |
||
| double | resolutionXY = 0.5f, |
||
| double | resolutionPhi = DEG2RAD(180), |
||
| double | phiMin = -M_PIf, |
||
| double | phiMax = M_PIf |
||
| ) |
Constructor: Initializes a, uniform distribution over the whole given range.
| virtual mrpt::poses::CPosePDFGrid::~CPosePDFGrid | ( | ) | [virtual] |
Destructor.
| static const mrpt::utils::TRuntimeClassId* mrpt::poses::CPosePDFGrid::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::poses::CPosePDF.
| void mrpt::poses::CPosePDFGrid::bayesianFusion | ( | const CPosePDF & | p1, |
| const CPosePDF & | p2, | ||
| const double & | minMahalanobisDistToDrop = 0 |
||
| ) | [virtual] |
Bayesian fusion of 2 densities (In the grid representation this becomes a pointwise multiplication)
Implements mrpt::poses::CPosePDF.
| void mrpt::poses::CPosePDFGrid::changeCoordinatesReference | ( | const CPose3D & | newReferenceBase | ) | [virtual] |
This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf.
Result PDF substituted the currently stored one in the object.
Implements mrpt::utils::CProbabilityDensityFunction< CPose2D, 3 >.
| CObject* mrpt::utils::CObject::clone | ( | ) | const [inline, inherited] |
Cloning interface for smart pointers.
Reimplemented in mrpt::opengl::CRenderizable, and mrpt::opengl::CRenderizableDisplayList.
| void mrpt::poses::CPosePDFGrid::copyFrom | ( | const CPosePDF & | o | ) | [virtual] |
Copy operator, translating if necesary (for example, between particles and gaussian representations)
Implements mrpt::poses::CPosePDF.
| static CPosePDFGridPtr mrpt::poses::CPosePDFGrid::Create | ( | ) | [static] |
| static mrpt::utils::CObject* mrpt::poses::CPosePDFGrid::CreateObject | ( | ) | [static] |
| void mrpt::poses::CPosePDFGrid::drawManySamples | ( | size_t | N, |
| std::vector< vector_double > & | outSamples | ||
| ) | const [virtual] |
Draws a number of samples from the distribution, and saves as a list of 1x3 vectors, where each row contains a (x,y,phi) datum.
Reimplemented from mrpt::utils::CProbabilityDensityFunction< CPose2D, 3 >.
| void mrpt::poses::CPosePDFGrid::drawSingleSample | ( | CPose2D & | outPart | ) | const |
Draws a single sample from the distribution (WARNING: weights are assumed to be normalized!)
| virtual void mrpt::utils::CProbabilityDensityFunction::drawSingleSample | ( | TDATA & | outPart | ) | const [pure virtual, inherited] |
Draws a single sample from the distribution.
| virtual mrpt::utils::CObject* mrpt::poses::CPosePDFGrid::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
| mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr | ( | ) | const [inline, inherited] |
| void mrpt::poses::CPosePDF::getAs3DObject | ( | OPENGL_SETOFOBJECTSPTR & | out_obj | ) | const [inline, inherited] |
Returns a 3D representation of this PDF.
Definition at line 88 of file CPosePDF.h.
References mrpt::opengl::posePDF2opengl().
| OPENGL_SETOFOBJECTSPTR mrpt::poses::CPosePDF::getAs3DObject | ( | ) | const [inline, inherited] |
Returns a 3D representation of this PDF.
Definition at line 97 of file CPosePDF.h.
References mrpt::opengl::posePDF2opengl().
| void mrpt::poses::CPose2DGridTemplate::getAsMatrix | ( | const double & | phi, |
| CMatrixTemplate< T > & | outMat | ||
| ) | [inline, inherited] |
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 223 of file CPose2DGridTemplate.h.
References MRPT_START, mrpt::math::CMatrixTemplate::setSize(), mrpt::poses::CPose2DGridTemplate::m_sizeY, mrpt::poses::CPose2DGridTemplate::m_sizeX, mrpt::poses::CPose2DGridTemplate::phi2idx(), ASSERT_, mrpt::poses::CPose2DGridTemplate::m_sizePhi, Eigen::internal::y, mrpt::poses::CPose2DGridTemplate::m_data, mrpt::poses::CPose2DGridTemplate::m_sizeXY, and MRPT_END.
| const T* mrpt::poses::CPose2DGridTemplate::getByIndex | ( | size_t | x, |
| size_t | y, | ||
| size_t | phi | ||
| ) | const [inline, inherited] |
Reads the contents of a cell.
Definition at line 203 of file CPose2DGridTemplate.h.
References ASSERT_, mrpt::poses::CPose2DGridTemplate::m_sizeX, mrpt::poses::CPose2DGridTemplate::m_sizeY, mrpt::poses::CPose2DGridTemplate::m_sizePhi, mrpt::poses::CPose2DGridTemplate::m_data, and mrpt::poses::CPose2DGridTemplate::m_sizeXY.
| T* mrpt::poses::CPose2DGridTemplate::getByIndex | ( | size_t | x, |
| size_t | y, | ||
| size_t | phi | ||
| ) | [inline, inherited] |
Reads the contents of a cell.
Definition at line 213 of file CPose2DGridTemplate.h.
References ASSERT_, mrpt::poses::CPose2DGridTemplate::m_sizeX, mrpt::poses::CPose2DGridTemplate::m_sizeY, mrpt::poses::CPose2DGridTemplate::m_sizePhi, mrpt::poses::CPose2DGridTemplate::m_data, and mrpt::poses::CPose2DGridTemplate::m_sizeXY.
| const T* mrpt::poses::CPose2DGridTemplate::getByPos | ( | double | x, |
| double | y, | ||
| double | phi | ||
| ) | const [inline, inherited] |
Reads the contents of a cell.
Definition at line 189 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::getByIndex(), mrpt::poses::CPose2DGridTemplate::x2idx(), mrpt::poses::CPose2DGridTemplate::y2idx(), and mrpt::poses::CPose2DGridTemplate::phi2idx().
| T* mrpt::poses::CPose2DGridTemplate::getByPos | ( | double | x, |
| double | y, | ||
| double | phi | ||
| ) | [inline, inherited] |
Reads the contents of a cell.
Definition at line 196 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::getByIndex(), mrpt::poses::CPose2DGridTemplate::x2idx(), mrpt::poses::CPose2DGridTemplate::y2idx(), and mrpt::poses::CPose2DGridTemplate::phi2idx().
| void mrpt::utils::CProbabilityDensityFunction::getCovariance | ( | CMatrixDouble & | cov | ) | const [inline, inherited] |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
Definition at line 89 of file CProbabilityDensityFunction.h.
References mrpt::utils::CProbabilityDensityFunction::getCovarianceDynAndMean().
| void mrpt::utils::CProbabilityDensityFunction::getCovariance | ( | CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > & | cov | ) | const [inline, inherited] |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
Definition at line 98 of file CProbabilityDensityFunction.h.
References mrpt::utils::CProbabilityDensityFunction::getCovarianceAndMean().
| CMatrixFixedNumeric<double,STATE_LEN,STATE_LEN> mrpt::utils::CProbabilityDensityFunction::getCovariance | ( | ) | const [inline, inherited] |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
Definition at line 107 of file CProbabilityDensityFunction.h.
References mrpt::math::cov(), and mrpt::utils::CProbabilityDensityFunction::getCovarianceAndMean().
| virtual void mrpt::utils::CProbabilityDensityFunction::getCovarianceAndMean | ( | CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > & | cov, |
| TDATA & | mean_point | ||
| ) | const [pure virtual, inherited] |
Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.
| void mrpt::poses::CPosePDFGrid::getCovarianceAndMean | ( | CMatrixDouble33 & | cov, |
| CPose2D & | mean_point | ||
| ) | const |
Returns an estimate of the pose covariance matrix (3x3 cov matrix) and the mean, both at once.
| void mrpt::utils::CProbabilityDensityFunction::getCovarianceDynAndMean | ( | CMatrixDouble & | cov, |
| TDATA & | mean_point | ||
| ) | const [inline, inherited] |
Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.
Definition at line 69 of file CProbabilityDensityFunction.h.
References mrpt::utils::CProbabilityDensityFunction::getCovarianceAndMean().
| double mrpt::utils::CProbabilityDensityFunction::getCovarianceEntropy | ( | ) | const [inline, inherited] |
Compute the entropy of the estimated covariance matrix.
Definition at line 145 of file CProbabilityDensityFunction.h.
References mrpt::utils::CProbabilityDensityFunction::getCovariance(), and det().
| virtual void mrpt::utils::CProbabilityDensityFunction::getMean | ( | TDATA & | mean_point | ) | const [pure virtual, inherited] |
Returns the mean, or mathematical expectation of the probability density distribution (PDF).
| void mrpt::poses::CPosePDFGrid::getMean | ( | CPose2D & | mean_pose | ) | const |
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
| TDATA mrpt::utils::CProbabilityDensityFunction::getMeanVal | ( | ) | const [inline, inherited] |
Returns the mean, or mathematical expectation of the probability density distribution (PDF).
Definition at line 79 of file CProbabilityDensityFunction.h.
References mrpt::utils::CProbabilityDensityFunction::getMean().
| double mrpt::poses::CPose2DGridTemplate::getPhiMax | ( | ) | const [inline, inherited] |
Definition at line 242 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_phiMax.
| double mrpt::poses::CPose2DGridTemplate::getPhiMin | ( | ) | const [inline, inherited] |
Definition at line 241 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_phiMin.
| double mrpt::poses::CPose2DGridTemplate::getResolutionPhi | ( | ) | const [inline, inherited] |
Definition at line 244 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_resolutionPhi.
| double mrpt::poses::CPose2DGridTemplate::getResolutionXY | ( | ) | const [inline, inherited] |
Definition at line 243 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_resolutionXY.
| virtual const mrpt::utils::TRuntimeClassId* mrpt::poses::CPosePDFGrid::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::poses::CPosePDF.
| size_t mrpt::poses::CPose2DGridTemplate::getSizePhi | ( | ) | const [inline, inherited] |
Definition at line 247 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_sizePhi.
| size_t mrpt::poses::CPose2DGridTemplate::getSizeX | ( | ) | const [inline, inherited] |
Definition at line 245 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_sizeX.
| size_t mrpt::poses::CPose2DGridTemplate::getSizeY | ( | ) | const [inline, inherited] |
Definition at line 246 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_sizeY.
| double mrpt::poses::CPose2DGridTemplate::getXMax | ( | ) | const [inline, inherited] |
Definition at line 238 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_xMax.
| double mrpt::poses::CPose2DGridTemplate::getXMin | ( | ) | const [inline, inherited] |
Get info about the grid:
Definition at line 237 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_xMin.
| double mrpt::poses::CPose2DGridTemplate::getYMax | ( | ) | const [inline, inherited] |
Definition at line 240 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_yMax.
| double mrpt::poses::CPose2DGridTemplate::getYMin | ( | ) | const [inline, inherited] |
Definition at line 239 of file CPose2DGridTemplate.h.
References mrpt::poses::CPose2DGridTemplate::m_yMin.
| double mrpt::poses::CPose2DGridTemplate::idx2phi | ( | size_t | phi | ) | const [inline, inherited] |
Returns coordinates from "indexes":
Definition at line 112 of file CPose2DGridTemplate.h.
References ASSERT_, mrpt::poses::CPose2DGridTemplate::m_sizePhi, mrpt::poses::CPose2DGridTemplate::m_phiMin, and mrpt::poses::CPose2DGridTemplate::m_resolutionPhi.
| double mrpt::poses::CPose2DGridTemplate::idx2x | ( | size_t | x | ) | const [inline, inherited] |
Returns coordinates from "indexes":
Definition at line 96 of file CPose2DGridTemplate.h.
References ASSERT_, mrpt::poses::CPose2DGridTemplate::m_sizeX, mrpt::poses::CPose2DGridTemplate::m_xMin, and mrpt::poses::CPose2DGridTemplate::m_resolutionXY.
| double mrpt::poses::CPose2DGridTemplate::idx2y | ( | size_t | y | ) | const [inline, inherited] |
Returns coordinates from "indexes":
Definition at line 104 of file CPose2DGridTemplate.h.
References ASSERT_, mrpt::poses::CPose2DGridTemplate::m_sizeY, mrpt::poses::CPose2DGridTemplate::m_yMin, and mrpt::poses::CPose2DGridTemplate::m_resolutionXY.
| void mrpt::poses::CPosePDFGrid::inverse | ( | CPosePDF & | o | ) | const [virtual] |
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
Implements mrpt::poses::CPosePDF.
| static bool mrpt::poses::CPosePDF::is_3D | ( | ) | [inline, static, inherited] |
Definition at line 80 of file CPosePDF.h.
| static bool mrpt::poses::CPosePDF::is_PDF | ( | ) | [inline, static, inherited] |
Definition at line 82 of file CPosePDF.h.
| void mrpt::poses::CPosePDFGrid::normalize | ( | ) |
Normalizes the PDF, such as all cells sum the unity.
| size_t mrpt::poses::CPose2DGridTemplate::phi2idx | ( | double | phi | ) | const [inline, inherited] |
Returns "indexes" from coordinates:
Definition at line 87 of file CPose2DGridTemplate.h.
References mrpt::utils::round(), mrpt::poses::CPose2DGridTemplate::m_phiMin, mrpt::poses::CPose2DGridTemplate::m_resolutionPhi, ASSERT_, and mrpt::poses::CPose2DGridTemplate::m_sizePhi.
| virtual void mrpt::utils::CSerializable::readFromStream | ( | mrpt::utils::CStream & | in, |
| int | version | ||
| ) | [protected, pure virtual, inherited] |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.
| in | The input binary stream where the object data must read from. |
| version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
| std::exception | On any error, see CStream::ReadBuffer |
Implemented in mrpt::math::CMatrixD, and mrpt::math::CMatrix.
| void mrpt::poses::CPosePDFGrid::saveToTextFile | ( | const std::string & | dataFile | ) | const [virtual] |
Save the contents of the 3D grid in one file, as a vertical concatenation of rectangular matrix for the different "PHI" discrete levels, and the size in X,Y,and PHI in another file named "<filename>_dims.txt".
Implements mrpt::utils::CProbabilityDensityFunction< CPose2D, 3 >.
| void mrpt::poses::CPose2DGridTemplate::setSize | ( | double | xMin, |
| double | xMax, | ||
| double | yMin, | ||
| double | yMax, | ||
| double | resolutionXY, | ||
| double | resolutionPhi, | ||
| double | phiMin = -M_PIf, |
||
| double | phiMax = M_PIf |
||
| ) | [inline, inherited] |
Changes the limits and size of the grid, erasing previous contents:
Definition at line 146 of file CPose2DGridTemplate.h.
References ASSERT_, mrpt::poses::CPose2DGridTemplate::m_xMin, mrpt::poses::CPose2DGridTemplate::m_xMax, mrpt::poses::CPose2DGridTemplate::m_yMin, mrpt::poses::CPose2DGridTemplate::m_yMax, mrpt::poses::CPose2DGridTemplate::m_phiMin, mrpt::poses::CPose2DGridTemplate::m_phiMax, mrpt::poses::CPose2DGridTemplate::m_resolutionXY, mrpt::poses::CPose2DGridTemplate::m_resolutionPhi, mrpt::poses::CPose2DGridTemplate::m_idxLeftX, mrpt::utils::round(), mrpt::poses::CPose2DGridTemplate::m_idxLeftY, mrpt::poses::CPose2DGridTemplate::m_idxLeftPhi, mrpt::poses::CPose2DGridTemplate::m_sizeX, mrpt::poses::CPose2DGridTemplate::m_sizeY, mrpt::poses::CPose2DGridTemplate::m_sizePhi, mrpt::poses::CPose2DGridTemplate::m_sizeXY, and mrpt::poses::CPose2DGridTemplate::m_data.
| void mrpt::poses::CPosePDFGrid::uniformDistribution | ( | ) |
Assigns the same value to all the cells in the grid, so the sum 1.
| virtual void mrpt::utils::CSerializable::writeToStream | ( | mrpt::utils::CStream & | out, |
| int * | getVersion | ||
| ) | const [protected, pure virtual, inherited] |
Introduces a pure virtual method responsible for writing to a CStream.
This can not be used directly be users, instead use "stream << object;" for writing it to a stream.
| out | The output binary stream where object must be dumped. |
| getVersion | If NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data. |
| std::exception | On any error, see CStream::WriteBuffer |
Implemented in mrpt::math::CMatrixD, and mrpt::math::CMatrix.
| size_t mrpt::poses::CPose2DGridTemplate::x2idx | ( | double | x | ) | const [inline, inherited] |
Returns "indexes" from coordinates:
Definition at line 69 of file CPose2DGridTemplate.h.
References mrpt::utils::round(), mrpt::poses::CPose2DGridTemplate::m_xMin, mrpt::poses::CPose2DGridTemplate::m_resolutionXY, ASSERT_, and mrpt::poses::CPose2DGridTemplate::m_sizeX.
| size_t mrpt::poses::CPose2DGridTemplate::y2idx | ( | double | y | ) | const [inline, inherited] |
Returns "indexes" from coordinates:
Definition at line 78 of file CPose2DGridTemplate.h.
References mrpt::utils::round(), mrpt::poses::CPose2DGridTemplate::m_yMin, mrpt::poses::CPose2DGridTemplate::m_resolutionXY, ASSERT_, and mrpt::poses::CPose2DGridTemplate::m_sizeY.
friend class mrpt::utils::CStream [friend, inherited] |
Reimplemented from mrpt::utils::CSerializable.
Definition at line 60 of file CPosePDF.h.
mrpt::utils::CLASSINIT mrpt::poses::CPosePDFGrid::_init_CPosePDFGrid [static, protected] |
Definition at line 53 of file CPosePDFGrid.h.
const mrpt::utils::TRuntimeClassId mrpt::utils::CObject::classCObject [static, inherited] |
const mrpt::utils::TRuntimeClassId mrpt::poses::CPosePDF::classCPosePDF [static, inherited] |
Definition at line 60 of file CPosePDF.h.
Definition at line 53 of file CPosePDFGrid.h.
const mrpt::utils::TRuntimeClassId mrpt::utils::CSerializable::classCSerializable [static, inherited] |
Definition at line 56 of file CSerializable.h.
const mrpt::utils::TRuntimeClassId* mrpt::poses::CPosePDFGrid::classinfo [static] |
Definition at line 53 of file CPosePDFGrid.h.
std::vector<T> mrpt::poses::CPose2DGridTemplate::m_data [protected, inherited] |
The data:
Definition at line 64 of file CPose2DGridTemplate.h.
int mrpt::poses::CPose2DGridTemplate::m_idxLeftPhi [protected, inherited] |
Definition at line 60 of file CPose2DGridTemplate.h.
int mrpt::poses::CPose2DGridTemplate::m_idxLeftX [protected, inherited] |
The indexes of the "left" borders:
Definition at line 60 of file CPose2DGridTemplate.h.
int mrpt::poses::CPose2DGridTemplate::m_idxLeftY [protected, inherited] |
Definition at line 60 of file CPose2DGridTemplate.h.
double mrpt::poses::CPose2DGridTemplate::m_phiMax [protected, inherited] |
Definition at line 49 of file CPose2DGridTemplate.h.
double mrpt::poses::CPose2DGridTemplate::m_phiMin [protected, inherited] |
Definition at line 49 of file CPose2DGridTemplate.h.
double mrpt::poses::CPose2DGridTemplate::m_resolutionPhi [protected, inherited] |
Definition at line 49 of file CPose2DGridTemplate.h.
double mrpt::poses::CPose2DGridTemplate::m_resolutionXY [protected, inherited] |
Definition at line 49 of file CPose2DGridTemplate.h.
size_t mrpt::poses::CPose2DGridTemplate::m_sizePhi [protected, inherited] |
Definition at line 56 of file CPose2DGridTemplate.h.
size_t mrpt::poses::CPose2DGridTemplate::m_sizeX [protected, inherited] |
The size of "m_data" is m_sizeX ·m_sizeY ·m_sizePhi.
Definition at line 56 of file CPose2DGridTemplate.h.
size_t mrpt::poses::CPose2DGridTemplate::m_sizeXY [protected, inherited] |
Definition at line 56 of file CPose2DGridTemplate.h.
size_t mrpt::poses::CPose2DGridTemplate::m_sizeY [protected, inherited] |
Definition at line 56 of file CPose2DGridTemplate.h.
double mrpt::poses::CPose2DGridTemplate::m_xMax [protected, inherited] |
Definition at line 49 of file CPose2DGridTemplate.h.
double mrpt::poses::CPose2DGridTemplate::m_xMin [protected, inherited] |
The limits and resolution of the grid:
Definition at line 49 of file CPose2DGridTemplate.h.
double mrpt::poses::CPose2DGridTemplate::m_yMax [protected, inherited] |
Definition at line 49 of file CPose2DGridTemplate.h.
double mrpt::poses::CPose2DGridTemplate::m_yMin [protected, inherited] |
Definition at line 49 of file CPose2DGridTemplate.h.
const size_t mrpt::utils::CProbabilityDensityFunction::state_length [static, inherited] |
The length of the variable, for example, 3 for a 3D point, 6 for a 3D pose (x y z yaw pitch roll).
Definition at line 53 of file CProbabilityDensityFunction.h.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |