Go to the documentation of this file.
29 "mrpt::maps::CWirelessPowerGridMap2D,wifiGrid",
36 const std::string& sectionNamePrefix)
39 const std::string sSectCreation =
40 sectionNamePrefix + string(
"_creationOpts");
47 sSectCreation,
"mapType", mapType);
49 insertionOpts.loadFromConfigFile(
50 source, sectionNamePrefix +
string(
"_insertOpts"));
54 std::ostream&
out)
const
67 this->insertionOpts.dumpToTextStream(
out);
91 TMapRepresentation mapType,
double x_min,
double x_max,
double y_min,
92 double y_max,
double resolution)
102 CWirelessPowerGridMap2D::~CWirelessPowerGridMap2D() =
default;
106 void CWirelessPowerGridMap2D::internal_clear()
128 robotPose2D =
CPose2D(*robotPose);
129 robotPose3D = (*robotPose);
147 sensorReading = o.power;
184 [[maybe_unused]]
const CPose3D& takenFrom)
200 n =
static_cast<uint32_t
>(
m_map.size());
204 #if MRPT_IS_BIG_ENDIAN
205 for (uint32_t i = 0; i < n; i++)
208 <<
m_map[i].dmv_var_mean;
265 vector<TOldCellTypeInVersion1> old_map(n);
266 in.
ReadBuffer(&old_map[0],
sizeof(old_map[0]) * old_map.size());
270 for (
size_t k = 0; k < n; k++)
273 (old_map[k].w != 0) ? old_map[k].wr : old_map[k].
mean;
275 (old_map[k].w != 0) ? old_map[k].w : old_map[k].std;
287 #if MRPT_IS_BIG_ENDIAN
288 for (uint32_t i = 0; i < n; i++)
289 in >>
m_map[i].kf_mean() >>
m_map[i].dm_mean() >>
290 m_map[i].dmv_var_mean;
335 std::ostream&
out)
const
337 out <<
"\n----------- [CWirelessPowerGridMap2D::TInsertionOptions] "
352 internal_loadFromConfigFile_common(
iniFile, section);
void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr &outObj) const override
Returns a 3D object representing the map (mean)
mrpt::maps::CWirelessPowerGridMap2D::TMapRepresentation mapType
The kind of map representation (see CWirelessPowerGridMap2D::CWirelessPowerGridMap2D)
void dumpToTextStream_map_specific(std::ostream &out) const override
static mrpt::maps::CMetricMap * internal_CreateFromMapDefinition(const mrpt::maps::TMetricMapInitializer &def)
mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions insertionOptions
TMapRepresentation m_mapType
The map representation type of this map, as passed in the constructor.
This represents a measurement of the wireless strength perceived by the robot.
void loadFromConfigFile_map_specific(const mrpt::config::CConfigFileBase &source, const std::string §ionNamePrefix) override
Load all map-specific params.
void dumpToTextStream(std::ostream &out) const override
This method should clearly display all the contents of the structure in textual form,...
void clear()
Clear the contents of this container.
std::shared_ptr< mrpt::opengl ::CSetOfObjects > Ptr
TInsertionOptions()
Default values loader.
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
mrpt::math::CMatrixD m_stackedCov
The compressed band diagonal matrix for the KF2 implementation.
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.
#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...
bool enableSaveAs3DObject
(Default=true) If false, calling CMetricMap::getAs3DObject() will have no effects
double x() const
Common members of all points & poses classes.
float KF_observationModelNoise
The sensor model noise (in normalized concentration units).
#define IS_CLASS(obj, class_name)
True if the given reference to object (derived from mrpt::rtti::CObject) is of the given class.
double mean(const CONTAINER &v)
Computes the mean value of a vector.
double m_average_normreadings_var
#define MAP_DEFINITION_REGISTER(_CLASSNAME_STRINGS, _CLASSNAME_WITH_NS)
Registers one map class into TMetricMapInitializer factory.
bool internal_insertObservation(const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D *robotPose=nullptr) override
Internal method called by insertObservation()
float R_min
Limits for normalization of sensor readings.
bool m_hasToRecoverMeanAndCov
Only for the KF2 implementation.
mrpt::vision::TStereoCalibResults out
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 ...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
size_t ReadBuffer(void *Buffer, size_t Count)
Reads a block of bytes from the stream into Buffer.
Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::m...
mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions insertionOpts
TMapGenericParams genericMapParams
Common params to all maps.
float KF_covSigma
The "sigma" for the initial covariance value between cells (in meters).
#define THROW_EXCEPTION(msg)
#define ASSERT_(f)
Defines an assertion mechanism.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
std::vector< TRandomFieldCell > m_map
The cells
float KF_initialCellStd
The initial standard deviation of each cell's concentration (will be stored both at each cell's struc...
This namespace contains representation of robot actions and observations.
Virtual base class for "archives": classes abstracting I/O streams.
CWirelessPowerGridMap2D represents a PDF of wifi concentrations over a 2D area.
float sigma
The sigma of the "Parzen"-kernel Gaussian.
void internal_clear() override
Erase all the contents of the map.
Declares a virtual base class for all metric maps storage classes.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
This class allows loading and storing values and vectors of different types from a configuration text...
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).
TMapRepresentation
The type of map representation to be used, see CRandomFieldGridMap2D for a discussion.
string iniFile(myDataDir+string("benchmark-options.ini"))
uint16_t KF_W_size
[mrKalmanApproximate] The size of the window of neighbor cells.
void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr &outObj) const override
Returns a 3D object representing the map
double m_average_normreadings_mean
return_t square(const num_t x)
Inline function for the square of a number.
#define LOADABLEOPTS_DUMP_VAR(variableName, variableType)
Macro for dumping a variable to a stream, within the method "dumpToTextStream(out)" (Variable types a...
ENUMTYPE read_enum(const std::string §ion, const std::string &name, const ENUMTYPE &defaultValue, bool failIfNotFound=false) const
Reads an "enum" value, where the value in the config file can be either a numerical value or the symb...
void dyngridcommon_writeToStream(STREAM &out) const
void dyngridcommon_readFromStream(STREAM &in, bool cast_from_float=false)
double internal_computeObservationLikelihood(const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D &takenFrom) override
Internal method called by computeObservationLikelihood()
CRandomFieldGridMap2D represents a 2D grid map where each cell is associated one real-valued property...
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
void internal_dumpToTextStream_common(std::ostream &out) const
See utils::CLoadableOptions.
Declares a class that represents any robot's observation.
The contents of each cell in a CRandomFieldGridMap2D map.
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string §ion) override
This method load the options from a ".ini"-like file or memory-stored string list.
mrpt::math::CMatrixD m_cov
The whole covariance matrix, used for the Kalman Filter map representation.
float cutoffRadius
The cutoff radius for updating cells.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
double min_x
See CWirelessPowerGridMap2D::CWirelessPowerGridMap2D.
size_t m_average_normreadings_count
std::string std::string format(std::string_view fmt, ARGS &&... args)
IMPLEMENTS_SERIALIZABLE(CWirelessPowerGridMap2D, CRandomFieldGridMap2D, mrpt::maps) CWirelessPowerGridMap2D
float KF_defaultCellMeanValue
The default value for the mean of cells' concentration.
Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Fri May 15 23:51:15 UTC 2020 | |