Main MRPT website > C++ reference for MRPT 1.9.9
CHeightGridMap2D_MRF.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #ifndef CHeightGridMap2D_MRF_MRF_H
11 #define CHeightGridMap2D_MRF_MRF_H
12 
15 
16 namespace mrpt
17 {
18 namespace maps
19 {
20 /** CHeightGridMap2D_MRF represents digital-elevation-model over a 2D area, with
21  * uncertainty, based on a Markov-Random-Field (MRF) estimator.
22  *
23  * There are a number of methods available to build the gas grid-map,
24  * depending on the value of
25  * "TMapRepresentation maptype" passed in the constructor (see base class
26  * mrpt::maps::CRandomFieldGridMap2D).
27  *
28  * Update the map with insertIndividualReading() or insertObservation()
29  *
30  * \sa mrpt::maps::CRandomFieldGridMap2D, mrpt::maps::CMetricMap,
31  * mrpt::utils::CDynamicGrid, The application icp-slam,
32  * mrpt::maps::CMultiMetricMap
33  * \note New in MRPT 1.4.0
34  * \ingroup mrpt_maps_grp
35  */
38 {
40  public:
41  /** Constructor */
43  TMapRepresentation mapType = mrGMRF_SD, double x_min = -2,
44  double x_max = 2, double y_min = -2, double y_max = 2,
45  double resolution = 0.5,
46  /** [in] Whether to call updateMapEstimation(). If false, make sure of
47  calling that function before accessing map contents. */
48  bool run_first_map_estimation_now = true);
49 
50  /** Parameters related with inserting observations into the map */
53  {
54  /** Default values loader */
56 
57  void loadFromConfigFile(
59  const std::string& section) override; // See base docs
60  void dumpToTextStream(
61  mrpt::utils::CStream& out) const override; // See base docs
63 
64  /** Returns a 3D object representing the map */
65  virtual void getAs3DObject(
66  mrpt::opengl::CSetOfObjects::Ptr& outObj) const override;
67 
68  /** Returns two 3D objects representing the mean and variance maps */
69  virtual void getAs3DObject(
71  mrpt::opengl::CSetOfObjects::Ptr& varObj) const override;
72 
73  virtual bool insertIndividualPoint(
74  const double x, const double y, const double z,
77  virtual double dem_get_resolution() const override;
78  virtual size_t dem_get_size_x() const override;
79  virtual size_t dem_get_size_y() const override;
80  virtual bool dem_get_z_by_cell(
81  const size_t cx, const size_t cy, double& z_out) const override;
82  virtual bool dem_get_z(
83  const double x, const double y, double& z_out) const override;
84  virtual void dem_update_map() override;
85 
86  /** Get the part of the options common to all CRandomFieldGridMap2D classes
87  */
90  {
91  return &insertionOptions;
92  }
93 
94  // See docs in base class
95  void internal_clear() override;
97  const mrpt::obs::CObservation* obs,
98  const mrpt::poses::CPose3D* robotPose = nullptr) override;
100  const mrpt::obs::CObservation* obs,
101  const mrpt::poses::CPose3D& takenFrom) override;
102 
104  /** Runs map estimation at start up (Default:true) */
105  bool run_map_estimation_at_ctor;
106  /** See CHeightGridMap2D_MRF::CHeightGridMap2D_MRF */
107  double min_x, max_x, min_y, max_y, resolution;
108  /** The kind of map representation (see
109  * CHeightGridMap2D_MRF::CHeightGridMap2D_MRF) */
111  /** Observations insertion options */
114 };
115 
116 } // End of namespace
117 } // End of namespace
118 #endif
Extra params for insertIndividualPoint()
#define MAP_DEFINITION_END(_CLASS_NAME_, _LINKAGE_)
GLdouble GLdouble z
Definition: glext.h:3872
virtual void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr &outObj) const override
Returns a 3D object representing the map.
#define MAP_DEFINITION_START(_CLASS_NAME_)
Add a MAP_DEFINITION_START() ...
TMapRepresentation
The type of map representation to be used, see CRandomFieldGridMap2D for a discussion.
CHeightGridMap2D_MRF represents digital-elevation-model over a 2D area, with uncertainty, based on a Markov-Random-Field (MRF) estimator.
This class allows loading and storing values and vectors of different types from a configuration text...
Parameters related with inserting observations into the map.
bool internal_insertObservation(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=nullptr) override
Internal method called by insertObservation()
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:41
void dumpToTextStream(mrpt::utils::CStream &out) const override
This method should clearly display all the contents of the structure in textual form, sending it to a CStream.
virtual size_t dem_get_size_y() const override
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string &section) override
This method load the options from a ".ini"-like file or memory-stored string list.
std::shared_ptr< CSetOfObjects > Ptr
Definition: CSetOfObjects.h:32
virtual size_t dem_get_size_x() const override
GLsizei const GLchar ** string
Definition: glext.h:4101
virtual void dem_update_map() override
Ensure that all observations are reflected in the map estimate.
virtual bool insertIndividualPoint(const double x, const double y, const double z, const CHeightGridMap2D_Base::TPointInsertParams &params=CHeightGridMap2D_Base::TPointInsertParams()) override
Update the DEM with one new point.
virtual bool dem_get_z_by_cell(const size_t cx, const size_t cy, double &z_out) const override
Get cell &#39;z&#39; by (cx,cy) cell indices.
CHeightGridMap2D_MRF(TMapRepresentation mapType=mrGMRF_SD, double x_min=-2, double x_max=2, double y_min=-2, double y_max=2, double resolution=0.5, bool run_first_map_estimation_now=true)
Constructor.
mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions insertionOptions
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
CRandomFieldGridMap2D represents a 2D grid map where each cell is associated one real-valued property...
Gaussian Markov Random Field, squared differences prior weights between 4 neighboring cells (see disc...
virtual CRandomFieldGridMap2D::TInsertionOptionsCommon * getCommonInsertOptions() override
Get the part of the options common to all CRandomFieldGridMap2D classes.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:41
Virtual base class for Digital Elevation Model (DEM) maps.
void internal_clear() override
Erase all the contents of the map.
double internal_computeObservationLikelihood(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D &takenFrom) override
Internal method called by computeObservationLikelihood()
GLsizei GLsizei GLchar * source
Definition: glext.h:4082
GLenum GLint GLint y
Definition: glext.h:3538
virtual bool dem_get_z(const double x, const double y, double &z_out) const override
Get cell &#39;z&#39; (x,y) by metric coordinates.
virtual double dem_get_resolution() const override
GLenum GLint x
Definition: glext.h:3538
GLenum const GLfloat * params
Definition: glext.h:3534
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019