Main MRPT website > C++ reference
MRPT logo
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-2014, 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 slam
21 {
22  using namespace mrpt::utils;
23  using namespace mrpt::poses;
24  using namespace mrpt::math;
25 
26  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CWirelessPowerGridMap2D , CRandomFieldGridMap2D, MAPS_IMPEXP )
27 
28  /** CWirelessPowerGridMap2D represents a PDF of wifi concentrations over a 2D area.
29  *
30  * There are a number of methods available to build the wifi grid-map, depending on the value of
31  * "TMapRepresentation maptype" passed in the constructor (see CRandomFieldGridMap2D for a discussion).
32  *
33  * Update the map with insertIndividualReading() or insertObservation()
34  *
35  * \sa mrpt::slam::CRandomFieldGridMap2D, mrpt::slam::CMetricMap, mrpt::utils::CDynamicGrid, The application icp-slam, mrpt::slam::CMultiMetricMap
36  * \ingroup mrpt_maps_grp
37  */
39  {
40  // This must be added to any CSerializable derived class:
42  public:
43  /** Constructor
44  */
46  TMapRepresentation mapType = mrKernelDM,
47  float x_min = -2,
48  float x_max = 2,
49  float y_min = -2,
50  float y_max = 2,
51  float resolution = 0.1
52  );
53 
54  /** Destructor */
55  virtual ~CWirelessPowerGridMap2D();
56 
57 
58  // See docs in base class
59  double computeObservationLikelihood( const CObservation *obs, const CPose3D &takenFrom );
60 
61 
62  /** Parameters related with inserting observations into the map:
63  */
65  public utils::CLoadableOptions,
67  {
68  TInsertionOptions(); //!< Default values loader
69 
70  /** See utils::CLoadableOptions */
71  void loadFromConfigFile(
72  const mrpt::utils::CConfigFileBase &source,
73  const std::string &section);
74 
75  void dumpToTextStream(CStream &out) const; //!< See utils::CLoadableOptions
76 
77  } insertionOptions;
78 
79 
80  /** Returns an image just as described in \a saveAsBitmapFile */
81  virtual void getAsBitmapFile(mrpt::utils::CImage &out_img) const;
82 
83  /** The implementation in this class just calls all the corresponding method of the contained metric maps.
84  */
85  void saveMetricMapRepresentationToFile(
86  const std::string &filNamePrefix
87  ) const;
88 
89  /** Save a matlab ".m" file which represents as 3D surfaces the mean and a given confidence level for the concentration of each cell.
90  * This method can only be called in a KF map model.
91  */
92  void saveAsMatlab3DGraph(const std::string &filName) const;
93 
94  /** Returns a 3D object representing the map.
95  */
96  void getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr &outObj ) const;
97 
98  protected:
99  /** Get the part of the options common to all CRandomFieldGridMap2D classes */
101  return &insertionOptions;
102  }
103 
104  /** Erase all the contents of the map
105  */
106  virtual void internal_clear();
107 
108  /** Insert the observation information into this map. This method must be implemented
109  * in derived classes.
110  * \param obs The observation
111  * \param 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)
112  *
113  * \sa CObservation::insertObservationInto
114  */
115  virtual bool internal_insertObservation( const CObservation *obs, const CPose3D *robotPose = NULL );
116 
117 
118  };
119  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CWirelessPowerGridMap2D , CRandomFieldGridMap2D, MAPS_IMPEXP )
120 
121  } // End of namespace
122 } // End of namespace
123 
124 #endif
TMapRepresentation
The type of map representation to be used, see CRandomFieldGridMap2D for a discussion.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
Definition: zip.h:16
A class for storing images as grayscale or RGB bitmaps.
Definition: CImage.h:97
Parameters related with inserting observations into the map:
This class allows loading and storing values and vectors of different types from a configuration text...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
This base provides a set of functions for maths stuff.
Definition: CArray.h:18
#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...
CRandomFieldGridMap2D represents a 2D grid map where each cell is associated one real-valued property...
Declares a class that represents any robot's observation.
Definition: CObservation.h:52
CWirelessPowerGridMap2D represents a PDF of wifi concentrations over a 2D area.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
Definition: CPoint.h:17
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...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:69
virtual CRandomFieldGridMap2D::TInsertionOptionsCommon * getCommonInsertOptions()
Get the part of the options common to all CRandomFieldGridMap2D classes.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
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.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014