30 void CSimplePointsMap::TMapDefinition::loadFromConfigFile_map_specific(
35 source, sectionNamePrefix +
string(
"_insertOpts"));
36 likelihoodOpts.loadFromConfigFile(
37 source, sectionNamePrefix +
string(
"_likelihoodOpts"));
40 void CSimplePointsMap::TMapDefinition::dumpToTextStream_map_specific(
43 this->insertionOpts.dumpToTextStream(out);
44 this->likelihoodOpts.dumpToTextStream(out);
68 CSimplePointsMap::~CSimplePointsMap() {}
72 void CSimplePointsMap::reserve(
size_t newLength)
84 void CSimplePointsMap::resize(
size_t newLength)
86 this->reserve(newLength);
87 x.resize(newLength, 0);
88 y.resize(newLength, 0);
89 z.resize(newLength, 0);
98 this->reserve(newLength);
99 x.assign(newLength, 0);
100 y.assign(newLength, 0);
101 z.assign(newLength, 0);
110 CPointsMap::base_copyFrom(
119 void CSimplePointsMap::writeToStream(
137 out << genericMapParams;
139 insertionOptions.writeToStream(
141 likelihoodOptions.writeToStream(out);
167 in.ReadBufferFixEndianness(&
x[0],
n);
168 in.ReadBufferFixEndianness(&
y[0],
n);
169 in.ReadBufferFixEndianness(&
z[0],
n);
172 in >> genericMapParams;
175 bool disableSaveAs3DObject;
176 in >> disableSaveAs3DObject;
177 genericMapParams.enableSaveAs3DObject = !disableSaveAs3DObject;
180 insertionOptions.readFromStream(
in);
181 likelihoodOptions.readFromStream(
in);
204 in.ReadBufferFixEndianness(&
x[0],
n);
205 in.ReadBufferFixEndianness(&
y[0],
n);
206 in.ReadBufferFixEndianness(&
z[0],
n);
225 std::vector<uint32_t> dummy_pointWeight(
n);
226 in.ReadBufferFixEndianness(
227 &dummy_pointWeight[0],
n);
232 std::vector<uint32_t> dummy_pointWeight(
n);
233 in.ReadBufferFixEndianness(&dummy_pointWeight[0],
n);
241 in >> insertionOptions.minDistBetweenLaserPoints >>
242 insertionOptions.addToExistingPointsMap >>
243 insertionOptions.also_interpolate >>
244 insertionOptions.disableDeletion >>
245 insertionOptions.fuseWithExisting >>
246 insertionOptions.isPlanarMap;
250 bool old_matchStaticPointsOnly;
251 in >> old_matchStaticPointsOnly;
254 in >> insertionOptions.maxDistForInterpolatePoints;
257 bool disableSaveAs3DObject;
258 in >> disableSaveAs3DObject;
259 genericMapParams.enableSaveAs3DObject =
260 !disableSaveAs3DObject;
266 in >> insertionOptions.horizontalTolerance;
270 likelihoodOptions.readFromStream(
in);
273 in >> insertionOptions.insertInvalidPoints;
284 void CSimplePointsMap::internal_clear()
294 void CSimplePointsMap::setPointFast(
size_t index,
float x,
float y,
float z)
301 void CSimplePointsMap::insertPointFast(
float x,
float y,
float z)
303 this->x.push_back(
x);
304 this->y.push_back(
y);
305 this->z.push_back(
z);
402 void CSimplePointsMap::loadFromRangeScan(
410 void CSimplePointsMap::loadFromRangeScan(
422 void CSimplePointsMap::PLY_import_set_vertex_count(
const size_t N)
Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::m...
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
static void internal_loadFromRangeScan3D_init(CSimplePointsMap &me, mrpt::maps::CPointsMap::TLaserRange3DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called only on...
static void internal_loadFromRangeScan2D_init(CSimplePointsMap &me, mrpt::maps::CPointsMap::TLaserRange2DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called only on...
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
Declares a class derived from "CObservation" that encapsules a 3D range scan measurement, as from a time-of-flight range camera or any other RGBD sensor.
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans. ...
GLsizei GLsizei GLuint * obj
This class allows loading and storing values and vectors of different types from a configuration text...
void WriteBufferFixEndianness(const T *ptr, size_t ElementCount)
Writes a sequence of elemental datatypes, taking care of reordering their bytes from the running arch...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors...
This base provides a set of functions for maths stuff.
T length2length4N(T len)
Returns the smaller number >=len such that it's a multiple of 4.
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
static void internal_loadFromRangeScan3D_postPushBack(CSimplePointsMap &me, mrpt::maps::CPointsMap::TLaserRange3DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called after e...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
mrpt::maps::CPointsMap::TInsertionOptions insertionOpts
Observations insertion options.
mrpt::maps::CPointsMap::TLikelihoodOptions likelihoodOpts
Probabilistic observation likelihood options.
This namespace contains representation of robot actions and observations.
EIGEN_STRONG_INLINE void setSize(size_t row, size_t col)
Changes the size of matrix, maintaining its previous content as possible and padding with zeros where...
GLsizei const GLchar ** string
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
static void internal_loadFromRangeScan3D_postOneRange(CSimplePointsMap &me, mrpt::maps::CPointsMap::TLaserRange3DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called once pe...
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string §ionNamePrefix) override
Load all params from a config file/source.
void vector_strong_clear(VECTOR_T &v)
Like calling a std::vector<>'s clear() method, but really forcing deallocating the memory...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define MAP_DEFINITION_REGISTER(_CLASSNAME_STRINGS, _CLASSNAME_WITH_NS)
Registers one map class into TMetricMapInitializer factory.
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
Declares a virtual base class for all metric maps storage classes.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
GLsizei GLsizei GLchar * source
Helper struct used for internal_loadFromRangeScan3D_prepareOneRange()
static void internal_loadFromRangeScan2D_postPushBack(CSimplePointsMap &me, mrpt::maps::CPointsMap::TLaserRange2DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called after e...
static void internal_loadFromRangeScan2D_prepareOneRange(CSimplePointsMap &me, const float gx, const float gy, const float gz, mrpt::maps::CPointsMap::TLaserRange2DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called once pe...
unsigned __int32 uint32_t
Helper struct used for internal_loadFromRangeScan2D_prepareOneRange()
static void internal_loadFromRangeScan3D_prepareOneRange(CSimplePointsMap &me, const float gx, const float gy, const float gz, mrpt::maps::CPointsMap::TLaserRange3DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called once pe...