Main MRPT website > C++ reference for MRPT 1.3.2
maps/CWirelessPowerGridMap2D.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-2015, 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 CWirelessPowerGridMap2D_H
11 #define CWirelessPowerGridMap2D_H
12 
15 
16 #include <mrpt/maps/link_pragmas.h>
17 
18 namespace mrpt
19 {
20 namespace maps
21 {
22  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CWirelessPowerGridMap2D , CRandomFieldGridMap2D, MAPS_IMPEXP )
23 
24  /** CWirelessPowerGridMap2D represents a PDF of wifi concentrations over a 2D area.
25  *
26  * There are a number of methods available to build the wifi grid-map, depending on the value of
27  * "TMapRepresentation maptype" passed in the constructor (see CRandomFieldGridMap2D for a discussion).
28  *
29  * Update the map with insertIndividualReading() or insertObservation()
30  *
31  * \sa mrpt::maps::CRandomFieldGridMap2D, mrpt::maps::CMetricMap, mrpt::utils::CDynamicGrid, The application icp-slam, mrpt::maps::CMultiMetricMap
32  * \ingroup mrpt_maps_grp
33  */
35  {
36  // This must be added to any CSerializable derived class:
38  public:
39  /** Constructor
40  */
42  TMapRepresentation mapType = mrKernelDM,
43  float x_min = -2,
44  float x_max = 2,
45  float y_min = -2,
46  float y_max = 2,
47  float resolution = 0.1
48  );
49 
50  /** Destructor */
51  virtual ~CWirelessPowerGridMap2D();
52 
53  /** Parameters related with inserting observations into the map:
54  */
56  public utils::CLoadableOptions,
57  public TInsertionOptionsCommon
58  {
59  TInsertionOptions(); //!< Default values loader
60 
61  /** See utils::CLoadableOptions */
62  void loadFromConfigFile(
63  const mrpt::utils::CConfigFileBase &source,
64  const std::string &section);
65 
66  void dumpToTextStream(mrpt::utils::CStream &out) const; //!< See utils::CLoadableOptions
67 
68  } insertionOptions;
69 
70 
71  /** Returns an image just as described in \a saveAsBitmapFile */
72  virtual void getAsBitmapFile(mrpt::utils::CImage &out_img) const;
73 
74  /** The implementation in this class just calls all the corresponding method of the contained metric maps.
75  */
76  void saveMetricMapRepresentationToFile(
77  const std::string &filNamePrefix
78  ) const;
79 
80  /** Save a matlab ".m" file which represents as 3D surfaces the mean and a given confidence level for the concentration of each cell.
81  * This method can only be called in a KF map model.
82  */
83  void saveAsMatlab3DGraph(const std::string &filName) const;
84 
85  /** Returns a 3D object representing the map.
86  */
87  void getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr &outObj ) const;
88 
89  protected:
90  /** Get the part of the options common to all CRandomFieldGridMap2D classes */
92  return &insertionOptions;
93  }
94 
95  // See docs in derived class
96  void internal_clear() MRPT_OVERRIDE;
97  bool internal_insertObservation( const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose = NULL ) MRPT_OVERRIDE;
98  double internal_computeObservationLikelihood( const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D &takenFrom ) MRPT_OVERRIDE;
99 
101  float min_x,max_x,min_y,max_y,resolution; //!< See CWirelessPowerGridMap2D::CWirelessPowerGridMap2D
102  mrpt::maps::CWirelessPowerGridMap2D::TMapRepresentation mapType; //!< The kind of map representation (see CWirelessPowerGridMap2D::CWirelessPowerGridMap2D)
105 
106  };
107  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CWirelessPowerGridMap2D , CRandomFieldGridMap2D, MAPS_IMPEXP )
108 
109  } // End of namespace
110 } // End of namespace
111 
112 #endif
#define MAP_DEFINITION_END(_CLASS_NAME_, _LINKAGE_)
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
A class for storing images as grayscale or RGB bitmaps.
Definition: CImage.h:101
Parameters related with inserting observations into the map:
TMapRepresentation
The type of map representation to be used, see CRandomFieldGridMap2D for a discussion.
This class allows loading and storing values and vectors of different types from a configuration text...
CWirelessPowerGridMap2D represents a PDF of wifi concentrations over a 2D area.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
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...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:72
Declares a class that represents any robot&#39;s observation.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define MAP_DEFINITION_START(_CLASS_NAME_, _LINKAGE_)
Add a MAP_DEFINITION_START() ...
virtual CRandomFieldGridMap2D::TInsertionOptionsCommon * getCommonInsertOptions()
Get the part of the options common to all CRandomFieldGridMap2D classes.



Page generated by Doxygen 1.8.12 for MRPT 1.3.2 SVN: at Thu Nov 10 13:46:27 UTC 2016