Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
slam
CWirelessPowerGridMap2D.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| The Mobile Robot Programming Toolkit (MRPT) C++ library |
3
| |
4
| http://www.mrpt.org/ |
5
| |
6
| Copyright (C) 2005-2012 University of Malaga |
7
| |
8
| This software was written by the Machine Perception and Intelligent |
9
| Robotics Lab, University of Malaga (Spain). |
10
| Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11
| |
12
| This file is part of the MRPT project. |
13
| |
14
| MRPT is free software: you can redistribute it and/or modify |
15
| it under the terms of the GNU General Public License as published by |
16
| the Free Software Foundation, either version 3 of the License, or |
17
| (at your option) any later version. |
18
| |
19
| MRPT is distributed in the hope that it will be useful, |
20
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
| GNU General Public License for more details. |
23
| |
24
| You should have received a copy of the GNU General Public License |
25
| along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26
| |
27
+---------------------------------------------------------------------------+ */
28
29
#ifndef CWirelessPowerGridMap2D_H
30
#define CWirelessPowerGridMap2D_H
31
32
#include <
mrpt/slam/CRandomFieldGridMap2D.h
>
33
#include <
mrpt/slam/CObservationWirelessPower.h
>
34
35
#include <
mrpt/maps/link_pragmas.h
>
36
37
namespace
mrpt
38
{
39
namespace
slam
40
{
41
using namespace
mrpt::utils;
42
using namespace
mrpt::poses;
43
using namespace
mrpt::math;
44
45
DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE
(
CWirelessPowerGridMap2D
,
CRandomFieldGridMap2D
,
MAPS_IMPEXP
)
46
47
48
/** CWirelessPowerGridMap2D represents a PDF of wifi concentrations over a 2D area.
49
*
50
* There are a number of methods available to build the wifi grid-map, depending on the value of
51
* "TMapRepresentation maptype" passed in the constructor.
52
*
53
* The following papers describe the mapping alternatives implemented here:
54
* - mrKernelDM: A kernel-based method:
55
* "Building gas concentration gridmaps with a mobile robot", Lilienthal, A. and Duckett, T., Robotics and Autonomous Systems, v.48, 2004.
56
*
57
* - mrKernelDMV: A kernel-based method:
58
* "A Statistical Approach to Gas Distribution Modelling with Mobile Robots--The Kernel DM+ V Algorithm"
59
* , Lilienthal, A.J. and Reggente, M. and Trincavelli, M. and Blanco, J.L. and Gonzalez, J., IROS 2009.
60
*
61
* \sa mrpt::slam::CRandomFieldGridMap2D, mrpt::slam::CMetricMap, mrpt::utils::CDynamicGrid, The application icp-slam, mrpt::slam::CMultiMetricMap
62
* \ingroup mrpt_maps_grp
63
*/
64
class
MAPS_IMPEXP
CWirelessPowerGridMap2D
: public
CRandomFieldGridMap2D
65
{
66
// This must be added to any CSerializable derived class:
67
DEFINE_SERIALIZABLE
(
CWirelessPowerGridMap2D
)
68
public:
69
/** Constructor
70
*/
71
CWirelessPowerGridMap2D
(
72
TMapRepresentation
mapType = mrAchim,
73
float
x_min = -2,
74
float
x_max = 2,
75
float
y_min = -2,
76
float
y_max = 2,
77
float
resolution = 0.1
78
);
79
80
/** Destructor */
81
virtual ~
CWirelessPowerGridMap2D
();
82
83
84
/** Computes the likelihood that a given observation was taken from a given pose in the world being modeled with this map.
85
*
86
* \param takenFrom The robot's pose the observation is supposed to be taken from.
87
* \param obs The observation.
88
* \return This method returns a likelihood in the range [0,1].
89
*
90
* \sa Used in particle filter algorithms, see: CMultiMetricMapPDF::update
91
*/
92
double
computeObservationLikelihood( const
CObservation
*obs, const
CPose3D
&takenFrom );
93
94
95
/** Parameters related with inserting observations into the map:
96
*/
97
struct
MAPS_IMPEXP
TInsertionOptions
:
98
public utils::
CLoadableOptions
,
99
public
TInsertionOptionsCommon
100
{
101
TInsertionOptions
();
//!< Default values loader
102
103
/** See utils::CLoadableOptions */
104
void
loadFromConfigFile(
105
const
mrpt::utils::CConfigFileBase
&source,
106
const
std::string §ion);
107
108
void
dumpToTextStream(
CStream
&out)
const
;
//!< See utils::CLoadableOptions
109
110
} insertionOptions;
111
112
/** Returns an image just as described in \a saveAsBitmapFile */
113
virtual
void
getAsBitmapFile(
mrpt::utils::CImage
&out_img)
const
;
114
115
/** The implementation in this class just calls all the corresponding method of the contained metric maps.
116
*/
117
void
saveMetricMapRepresentationToFile(
118
const
std::string &filNamePrefix
119
)
const
;
120
121
/** Save a matlab ".m" file which represents as 3D surfaces the mean and a given confidence level for the concentration of each cell.
122
* This method can only be called in a KF map model.
123
*/
124
void
saveAsMatlab3DGraph(
const
std::string &filName)
const
;
125
126
/** Returns a 3D object representing the map.
127
*/
128
void
getAs3DObject (
mrpt::opengl::CSetOfObjectsPtr
&outObj )
const
;
129
130
protected
:
131
/** Get the part of the options common to all CRandomFieldGridMap2D classes */
132
virtual
CRandomFieldGridMap2D::TInsertionOptionsCommon
*
getCommonInsertOptions
() {
133
return
&insertionOptions;
134
}
135
136
/** Erase all the contents of the map
137
*/
138
virtual
void
internal_clear();
139
140
/** Insert the observation information into this map. This method must be implemented
141
* in derived classes.
142
* \param obs The observation
143
* \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)
144
*
145
* \sa CObservation::insertObservationInto
146
*/
147
virtual
bool
internal_insertObservation(
const
CObservation
*obs,
const
CPose3D
*robotPose = NULL );
148
149
150
};
151
152
153
}
// End of namespace
154
155
}
// End of namespace
156
157
#endif
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013