48 sectionNamePrefix +
string(
"_creationOpts");
55 sSectCreation,
"mapType", mapType);
57 insertionOpts.loadFromConfigFile(
58 source, sectionNamePrefix +
string(
"_insertOpts"));
75 this->insertionOpts.dumpToTextStream(out);
99 TMapRepresentation mapType,
double x_min,
double x_max,
double y_min,
100 double y_max,
double resolution)
110 CWirelessPowerGridMap2D::~CWirelessPowerGridMap2D() {}
136 robotPose2D =
CPose2D(*robotPose);
137 robotPose3D = (*robotPose);
156 sensorReading = o->
power;
221 #if MRPT_IS_BIG_ENDIAN 225 <<
m_map[i].dmv_var_mean;
287 vector<TOldCellTypeInVersion1> old_map(
n);
288 in.ReadBuffer(&old_map[0],
sizeof(old_map[0]) * old_map.size());
292 for (
size_t k = 0; k <
n; k++)
295 (old_map[k].w != 0) ? old_map[k].wr : old_map[k].
mean;
297 (old_map[k].w != 0) ? old_map[k].
w : old_map[k].
std;
309 #if MRPT_IS_BIG_ENDIAN 312 m_map[i].dmv_var_mean;
366 "\n----------- [CWirelessPowerGridMap2D::TInsertionOptions] " 367 "------------ \n\n");
368 internal_dumpToTextStream_common(
381 internal_loadFromConfigFile_common(iniFile, section);
#define ASSERT_EQUAL_(__A, __B)
double x() const
Common members of all points & poses classes.
Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::m...
IMPLEMENTS_SERIALIZABLE(CWirelessPowerGridMap2D, CRandomFieldGridMap2D, mrpt::maps) CWirelessPowerGridMap2D
CWirelessPowerGridMap2D(TMapRepresentation mapType=mrKernelDM, double x_min=-2, double x_max=2, double y_min=-2, double y_max=2, double resolution=0.1)
Constructor.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr &outObj) const override
Returns a 3D object representing the map.
bool enableSaveAs3DObject
(Default=true) If false, calling CMetricMap::getAs3DObject() will have no effects ...
double m_average_normreadings_mean
mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions insertionOptions
#define THROW_EXCEPTION(msg)
#define LOADABLEOPTS_DUMP_VAR(variableName, variableType)
Macro for dumping a variable to a stream, within the method "dumpToTextStream(out)" (Variable types a...
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.
void WriteBuffer(const void *Buffer, size_t Count)
Writes a block of bytes to the stream from Buffer.
bool internal_insertObservation(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=nullptr) override
Internal method called by insertObservation()
mrpt::math::CMatrixD m_cov
The whole covariance matrix, used for the Kalman Filter map representation.
TMapRepresentation
The type of map representation to be used, see CRandomFieldGridMap2D for a discussion.
TMapGenericParams genericMapParams
Common params to all maps.
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string §ion) override
This method load the options from a ".ini"-like file or memory-stored string list.
GLsizei GLsizei GLuint * obj
void clear()
Clear the contents of this container.
GLubyte GLubyte GLubyte GLubyte w
virtual void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr &outObj) const override
Returns a 3D object representing the map (mean)
This class allows loading and storing values and vectors of different types from a configuration text...
T square(const T x)
Inline function for the square of a number.
static mrpt::maps::CMetricMap * internal_CreateFromMapDefinition(const mrpt::maps::TMetricMapInitializer &def)
TMapRepresentation m_mapType
The map representation type of this map, as passed in the constructor.
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...
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
The contents of each cell in a CRandomFieldGridMap2D map.
A helper class that can convert an enum value into its textual representation, and viceversa...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
size_t m_average_normreadings_count
void loadFromConfigFile_map_specific(const mrpt::utils::CConfigFileBase &source, const std::string §ionNamePrefix) override
Load all map-specific params.
std::vector< TRandomFieldCell > m_map
The cells.
double power
The power or signal strength as sensed by the Wifi receiver (In percentage: [0-100]) ...
std::shared_ptr< CSetOfObjects > Ptr
This namespace contains representation of robot actions and observations.
TInsertionOptions()
Default values loader.
GLsizei const GLchar ** string
This represents a measurement of the wireless strength perceived by the robot.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
bool m_hasToRecoverMeanAndCov
Only for the KF2 implementation.
mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions insertionOpts
unsigned __int64 uint64_t
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void readFromStream(mrpt::utils::CStream &in, int version) override
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
#define MAP_DEFINITION_REGISTER(_CLASSNAME_STRINGS, _CLASSNAME_WITH_NS)
Registers one map class into TMetricMapInitializer factory.
CRandomFieldGridMap2D represents a 2D grid map where each cell is associated one real-valued property...
Declares a virtual base class for all metric maps storage classes.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Declares a class that represents any robot's observation.
#define IS_CLASS(ptrObj, class_name)
Evaluates to true if the given pointer to an object (derived from mrpt::utils::CSerializable) is of t...
virtual void internal_clear() override
Erase all the contents of the map.
mrpt::maps::CWirelessPowerGridMap2D::TMapRepresentation mapType
The kind of map representation (see CWirelessPowerGridMap2D::CWirelessPowerGridMap2D) ...
double m_average_normreadings_var
GLsizei GLsizei GLchar * source
mrpt::poses::CPose3D sensorPoseOnRobot
The location of the sensing antenna on the robot coordinate framework.
void dyngridcommon_writeToStream(mrpt::utils::CStream &out) const
mrpt::math::CMatrixD m_stackedCov
The compressed band diagonal matrix for the KF2 implementation.
#define MRPT_LOAD_CONFIG_VAR( variableName, variableType, configFileObject, sectionNameStr)
An useful macro for loading variables stored in a INI-like file under a key with the same name that t...
unsigned __int32 uint32_t
void dyngridcommon_readFromStream(mrpt::utils::CStream &in, bool cast_from_float=false)
double min_x
See CWirelessPowerGridMap2D::CWirelessPowerGridMap2D.
double internal_computeObservationLikelihood(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D &takenFrom) override
Internal method called by computeObservationLikelihood()
void dumpToTextStream_map_specific(mrpt::utils::CStream &out) const override
EIGEN_STRONG_INLINE double mean() const
Computes the mean of the entire matrix.
virtual int printf(const char *fmt,...) MRPT_printf_format_check(2
Writes a string to the stream in a textual form.
void internal_clear() override
Erase all the contents of the map.
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const override
Introduces a pure virtual method responsible for writing to a CStream.
void insertIndividualReading(const double sensorReading, const mrpt::math::TPoint2D &point, const bool update_map=true, const bool time_invariant=true, const double reading_stddev=.0)
Direct update of the map with a reading in a given position of the map, using the appropriate method ...