CGasConcentrationGridMap2D represents a PDF of gas concentrations over a 2D area. More...
#include <mrpt/slam/CGasConcentrationGridMap2D.h>


Classes | |
| struct | TInsertionOptions |
| Parameters related with inserting observations into the map: More... | |
Public Types | |
| enum | TMapRepresentation { mrAchim = 0, mrKalmanFilter, mrKalmanApproximate, mrKalmanApproximate_deconv } |
The type of map representation to be used. More... | |
Public Member Functions | |
| float | cell2float (const TGasConcentrationCell &c) const |
| CGasConcentrationGridMap2D (TMapRepresentation mapType=mrAchim, float x_min=-2, float x_max=2, float y_min=-2, float y_max=2, float resolution=0.1) | |
| Constructor. | |
| void | clear () |
| Erase all the contents of the map. | |
| bool | isEmpty () const |
| Returns true if the map is empty/no observation has been inserted. | |
| bool | insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL) |
| Insert the observation information into this map. | |
| double | computeObservationLikelihood (const CObservation *obs, const CPose3D &takenFrom) |
| Computes the likelihood that a given observation was taken from a given pose in the world being modeled with this map. | |
| void | saveAsBitmapFile (const std::string &filName) const |
| Save the current map as a graphical file (BMP,PNG,...). | |
| void | resize (float new_x_min, float new_x_max, float new_y_min, float new_y_max, const TGasConcentrationCell &defaultValueNewCells, float additionalMarginMeters=1.0f) |
| Changes the size of the grid, maintaining previous contents. | |
| float | compute3DMatchingRatio (const CMetricMap *otherMap, const CPose3D &otherMapPose, float minDistForCorr=0.10f, float minMahaDistForCorr=2.0f) const |
| Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps. | |
| void | saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const |
| The implementation in this class just calls all the corresponding method of the contained metric maps. | |
| void | saveAsMatlab3DGraph (const std::string &filName) const |
| Save a matlab ".m" file which represents as 3D surfaces the mean and a given confidence level for the concentration of each cell. | |
| void | getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const |
| Returns a 3D object representing the map. | |
| void | auxParticleFilterCleanUp () |
| This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation". | |
| TMapRepresentation | getMapType () |
| Return the type of the gas distribution map, according to parameters passed on construction. | |
| void | predictMeasurement (const double &x, const double &y, double &out_predict_response, double &out_predict_response_variance) |
| Returns the prediction of the measurement at some (x,y) coordinates, and its certainty (in the form of the expected variance). | |
| void | getMeanAndCov (vector_double &out_means, CMatrixDouble &out_cov) const |
| Return the mean and covariance vector of the full Kalman filter estimate (works for all KF-based methods). | |
Public Attributes | |
| mrpt::slam::CGasConcentrationGridMap2D::TInsertionOptions | insertionOptions |
| Parameters related with inserting observations into the map: | |
Protected Member Functions | |
| void | insertObservation_Achim (float normReading, const CPose3D &sensorPose) |
| The implementation of "insertObservation" for the Achim's map model. | |
| void | insertObservation_KF (float normReading, const CPose3D &sensorPose) |
| The implementation of "insertObservation" for the (whole) Kalman Filter map model. | |
| void | insertObservation_KF2 (float normReading, const CPose3D &sensorPose) |
| The implementation of "insertObservation" for the Efficient Kalman Filter map model. | |
| void | insertObservation_KF3 (float normReading, const CPose3D &sensorPose, const CObservationGasSensors::TObservationENose *o, const mrpt::system::TTimeStamp timestamp) |
| The implementation of "insertObservation" for the Efficient Kalman Filter map model with estimation of real gas concentration using sensor model. | |
| float | CGasConcentration_estimation (float reading, const CObservationGasSensors::TObservationENose *o, const mrpt::system::TTimeStamp timestamp) |
| Estimates the gas concentration based on readings and sensor model. | |
| float | getReadingsNorm (const CObservationGasSensors::TObservationENose *o) |
| Return the sensor reading according to KF_sensorType after being normallized. | |
| void | recoverMeanAndCov () const |
| In the KF2 implementation, takes the auxiliary matrices and from them update the cells' mean and std values. | |
Static Protected Member Functions | |
| static float | computeAchimCellValue (const TGasConcentrationCell *cell) |
| Computes the average cell concentration, or 0 if it has never been observed: | |
Protected Attributes | |
| TMapRepresentation | m_mapType |
| The map representation type of this map. | |
| CMatrixD | m_cov |
| The whole covariance matrix, used for the Kalman Filter map representation. | |
| CMatrixD | m_stackedCov |
| The compressed band diagonal matrix for the KF2 implementation. | |
| bool | m_hasToRecoverMeanAndCov |
| Only for the KF2 implementation. | |
Private Types | |
| typedef utils::CDynamicGrid < TGasConcentrationCell > | BASE |
CGasConcentrationGridMap2D represents a PDF of gas concentrations over a 2D area.
Definition at line 77 of file CGasConcentrationGridMap2D.h.
typedef utils::CDynamicGrid<TGasConcentrationCell> mrpt::slam::CGasConcentrationGridMap2D::BASE [private] |
Definition at line 79 of file CGasConcentrationGridMap2D.h.
The type of map representation to be used.
Definition at line 93 of file CGasConcentrationGridMap2D.h.
| mrpt::slam::CGasConcentrationGridMap2D::CGasConcentrationGridMap2D | ( | TMapRepresentation | mapType = mrAchim, |
|
| float | x_min = -2, |
|||
| float | x_max = 2, |
|||
| float | y_min = -2, |
|||
| float | y_max = 2, |
|||
| float | resolution = 0.1 | |||
| ) |
Constructor.
| void mrpt::slam::CGasConcentrationGridMap2D::auxParticleFilterCleanUp | ( | ) |
This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation".
This method should normally do nothing, but in some cases can be used to free auxiliary cached variables.
| float mrpt::slam::CGasConcentrationGridMap2D::cell2float | ( | const TGasConcentrationCell & | c | ) | const [inline] |
Definition at line 85 of file CGasConcentrationGridMap2D.h.
| float mrpt::slam::CGasConcentrationGridMap2D::CGasConcentration_estimation | ( | float | reading, | |
| const CObservationGasSensors::TObservationENose * | o, | |||
| const mrpt::system::TTimeStamp | timestamp | |||
| ) | [protected] |
Estimates the gas concentration based on readings and sensor model.
| void mrpt::slam::CGasConcentrationGridMap2D::clear | ( | ) |
Erase all the contents of the map.
Reimplemented from mrpt::utils::CDynamicGrid< TGasConcentrationCell >.
| float mrpt::slam::CGasConcentrationGridMap2D::compute3DMatchingRatio | ( | const CMetricMap * | otherMap, | |
| const CPose3D & | otherMapPose, | |||
| float | minDistForCorr = 0.10f, |
|||
| float | minMahaDistForCorr = 2.0f | |||
| ) | const |
Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps.
This method always return 0 for grid maps.
| otherMap | [IN] The other map to compute the matching with. | |
| otherMapPose | [IN] The 6D pose of the other map as seen from "this". | |
| minDistForCorr | [IN] The minimum distance between 2 non-probabilistic map elements for counting them as a correspondence. | |
| minMahaDistForCorr | [IN] The minimum Mahalanobis distance between 2 probabilistic map elements for counting them as a correspondence. |
| static float mrpt::slam::CGasConcentrationGridMap2D::computeAchimCellValue | ( | const TGasConcentrationCell * | cell | ) | [static, protected] |
Computes the average cell concentration, or 0 if it has never been observed:
| double mrpt::slam::CGasConcentrationGridMap2D::computeObservationLikelihood | ( | const CObservation * | obs, | |
| const CPose3D & | takenFrom | |||
| ) |
Computes the likelihood that a given observation was taken from a given pose in the world being modeled with this map.
| takenFrom | The robot's pose the observation is supposed to be taken from. | |
| obs | The observation. |
| void mrpt::slam::CGasConcentrationGridMap2D::getAs3DObject | ( | mrpt::opengl::CSetOfObjectsPtr & | outObj | ) | const |
Returns a 3D object representing the map.
| TMapRepresentation mrpt::slam::CGasConcentrationGridMap2D::getMapType | ( | ) |
Return the type of the gas distribution map, according to parameters passed on construction.
| void mrpt::slam::CGasConcentrationGridMap2D::getMeanAndCov | ( | vector_double & | out_means, | |
| CMatrixDouble & | out_cov | |||
| ) | const |
Return the mean and covariance vector of the full Kalman filter estimate (works for all KF-based methods).
| float mrpt::slam::CGasConcentrationGridMap2D::getReadingsNorm | ( | const CObservationGasSensors::TObservationENose * | o | ) | [protected] |
Return the sensor reading according to KF_sensorType after being normallized.
| bool mrpt::slam::CGasConcentrationGridMap2D::insertObservation | ( | const CObservation * | obs, | |
| const CPose3D * | robotPose = NULL | |||
| ) |
Insert the observation information into this map.
This method must be implemented in derived classes.
| obs | The observation | |
| robotPose | The 3D pose of the robot mobile base in the map reference system, or NULL (default) if you want to use CPose2D(0,0,deg) |
| void mrpt::slam::CGasConcentrationGridMap2D::insertObservation_Achim | ( | float | normReading, | |
| const CPose3D & | sensorPose | |||
| ) | [protected] |
The implementation of "insertObservation" for the Achim's map model.
| normReading | Is a [0,1] normalized concentration reading. | |
| sensorPose | Is the sensor pose |
| void mrpt::slam::CGasConcentrationGridMap2D::insertObservation_KF | ( | float | normReading, | |
| const CPose3D & | sensorPose | |||
| ) | [protected] |
The implementation of "insertObservation" for the (whole) Kalman Filter map model.
| normReading | Is a [0,1] normalized concentration reading. | |
| sensorPose | Is the sensor pose |
| void mrpt::slam::CGasConcentrationGridMap2D::insertObservation_KF2 | ( | float | normReading, | |
| const CPose3D & | sensorPose | |||
| ) | [protected] |
The implementation of "insertObservation" for the Efficient Kalman Filter map model.
| normReading | Is a [0,1] normalized concentration reading. | |
| sensorPose | Is the sensor pose |
| void mrpt::slam::CGasConcentrationGridMap2D::insertObservation_KF3 | ( | float | normReading, | |
| const CPose3D & | sensorPose, | |||
| const CObservationGasSensors::TObservationENose * | o, | |||
| const mrpt::system::TTimeStamp | timestamp | |||
| ) | [protected] |
The implementation of "insertObservation" for the Efficient Kalman Filter map model with estimation of real gas concentration using sensor model.
| normReading | Is a [0,1] normalized concentration reading. | |
| sensorPose | Is the sensor pose |
| bool mrpt::slam::CGasConcentrationGridMap2D::isEmpty | ( | ) | const |
Returns true if the map is empty/no observation has been inserted.
| void mrpt::slam::CGasConcentrationGridMap2D::predictMeasurement | ( | const double & | x, | |
| const double & | y, | |||
| double & | out_predict_response, | |||
| double & | out_predict_response_variance | |||
| ) |
Returns the prediction of the measurement at some (x,y) coordinates, and its certainty (in the form of the expected variance).
This methods is implemented differently for the different gas map types.
| void mrpt::slam::CGasConcentrationGridMap2D::recoverMeanAndCov | ( | ) | const [protected] |
In the KF2 implementation, takes the auxiliary matrices and from them update the cells' mean and std values.
| void mrpt::slam::CGasConcentrationGridMap2D::resize | ( | float | new_x_min, | |
| float | new_x_max, | |||
| float | new_y_min, | |||
| float | new_y_max, | |||
| const TGasConcentrationCell & | defaultValueNewCells, | |||
| float | additionalMarginMeters = 1.0f | |||
| ) |
Changes the size of the grid, maintaining previous contents.
| void mrpt::slam::CGasConcentrationGridMap2D::saveAsBitmapFile | ( | const std::string & | filName | ) | const |
Save the current map as a graphical file (BMP,PNG,...).
The file format will be derived from the file extension (see CImage::saveToFile ) It depends on the map representation model: mrAchim: Each pixel is the ratio
mrKalmanFilter: Each pixel is the mean value of the Gaussian that represents each cell. mrInformationFilter: Id.
| void mrpt::slam::CGasConcentrationGridMap2D::saveAsMatlab3DGraph | ( | const std::string & | filName | ) | const |
Save a matlab ".m" file which represents as 3D surfaces the mean and a given confidence level for the concentration of each cell.
This method can only be called in a KF map model.
| void mrpt::slam::CGasConcentrationGridMap2D::saveMetricMapRepresentationToFile | ( | const std::string & | filNamePrefix | ) | const |
The implementation in this class just calls all the corresponding method of the contained metric maps.
| mrpt::slam::CGasConcentrationGridMap2D::TInsertionOptions mrpt::slam::CGasConcentrationGridMap2D::insertionOptions |
Parameters related with inserting observations into the map:
The whole covariance matrix, used for the Kalman Filter map representation.
Definition at line 296 of file CGasConcentrationGridMap2D.h.
bool mrpt::slam::CGasConcentrationGridMap2D::m_hasToRecoverMeanAndCov [mutable, protected] |
Only for the KF2 implementation.
Definition at line 362 of file CGasConcentrationGridMap2D.h.
The map representation type of this map.
Definition at line 292 of file CGasConcentrationGridMap2D.h.
The compressed band diagonal matrix for the KF2 implementation.
The format is a Nx(W^2+2W+1) matrix, one row per cell in the grid map with the cross-covariances between each cell and half of the window around it in the grid.
Definition at line 360 of file CGasConcentrationGridMap2D.h.
| Page generated by Doxygen 1.7.1 for MRPT 0.8.1 SVN:exported at Sun Sep 19 14:53:45 UTC 2010 |