29 CSimplePointsMap::TMapDefinition::TMapDefinition() =
default;
30 void CSimplePointsMap::TMapDefinition::loadFromConfigFile_map_specific(
33 insertionOpts.loadFromConfigFile(
c,
s +
string(
"_insertOpts"));
34 likelihoodOpts.loadFromConfigFile(
c,
s +
string(
"_likelihoodOpts"));
35 renderOpts.loadFromConfigFile(
c,
s +
string(
"_renderOpts"));
38 void CSimplePointsMap::TMapDefinition::dumpToTextStream_map_specific(
39 std::ostream& out)
const 41 this->insertionOpts.dumpToTextStream(out);
42 this->likelihoodOpts.dumpToTextStream(out);
43 this->renderOpts.dumpToTextStream(out);
60 CSimplePointsMap::CSimplePointsMap() =
default;
61 void CSimplePointsMap::reserve(
size_t newLength)
63 m_x.reserve(newLength);
64 m_y.reserve(newLength);
65 m_z.reserve(newLength);
71 void CSimplePointsMap::resize(
size_t newLength)
73 this->reserve(newLength);
74 m_x.resize(newLength, 0);
75 m_y.resize(newLength, 0);
76 m_z.resize(newLength, 0);
83 void CSimplePointsMap::setSize(
size_t newLength)
85 this->reserve(newLength);
86 m_x.assign(newLength, 0);
87 m_y.assign(newLength, 0);
88 m_z.assign(newLength, 0);
95 CPointsMap::base_copyFrom(
obj);
98 uint8_t CSimplePointsMap::serializeGetVersion()
const {
return 10; }
112 out << genericMapParams;
113 insertionOptions.writeToStream(out);
114 likelihoodOptions.writeToStream(out);
115 renderOptions.writeToStream(out);
123 void CSimplePointsMap::serializeFrom(
142 in.ReadBufferFixEndianness(&m_x[0],
n);
143 in.ReadBufferFixEndianness(&m_y[0],
n);
144 in.ReadBufferFixEndianness(&m_z[0],
n);
147 in >> genericMapParams;
150 bool disableSaveAs3DObject;
151 in >> disableSaveAs3DObject;
152 genericMapParams.enableSaveAs3DObject = !disableSaveAs3DObject;
154 insertionOptions.readFromStream(
in);
155 likelihoodOptions.readFromStream(
in);
156 if (version >= 10) renderOptions.readFromStream(
in);
179 in.ReadBufferFixEndianness(&m_x[0],
n);
180 in.ReadBufferFixEndianness(&m_y[0],
n);
181 in.ReadBufferFixEndianness(&m_z[0],
n);
200 std::vector<uint32_t> dummy_pointWeight(
n);
201 in.ReadBufferFixEndianness(
202 &dummy_pointWeight[0],
n);
207 std::vector<uint32_t> dummy_pointWeight(
n);
208 in.ReadBufferFixEndianness(&dummy_pointWeight[0],
n);
216 in >> insertionOptions.minDistBetweenLaserPoints >>
217 insertionOptions.addToExistingPointsMap >>
218 insertionOptions.also_interpolate >>
219 insertionOptions.disableDeletion >>
220 insertionOptions.fuseWithExisting >>
221 insertionOptions.isPlanarMap;
225 bool old_matchStaticPointsOnly;
226 in >> old_matchStaticPointsOnly;
229 in >> insertionOptions.maxDistForInterpolatePoints;
232 bool disableSaveAs3DObject;
233 in >> disableSaveAs3DObject;
234 genericMapParams.enableSaveAs3DObject =
235 !disableSaveAs3DObject;
241 in >> insertionOptions.horizontalTolerance;
245 likelihoodOptions.readFromStream(
in);
248 in >> insertionOptions.insertInvalidPoints;
259 void CSimplePointsMap::internal_clear()
269 void CSimplePointsMap::insertPointFast(
float x,
float y,
float z)
363 void CSimplePointsMap::loadFromRangeScan(
371 void CSimplePointsMap::loadFromRangeScan(
383 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...
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)
To be added to all CSerializable-classes implementation files.
void WriteBufferFixEndianness(const T *ptr, size_t ElementCount)
Writes a sequence of elemental datatypes, taking care of reordering their bytes from the running arch...
mrpt::maps::CPointsMap::TRenderOptions renderOpts
Rendering as 3D object options.
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
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors...
This class allows loading and storing values and vectors of different types from a configuration text...
This base provides a set of functions for maths stuff.
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...
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.
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...
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...
Virtual base class for "archives": classes abstracting I/O streams.
void vector_strong_clear(VECTOR_T &v)
Like calling a std::vector<>'s clear() method, but really forcing deallocating the memory...
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).
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...
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.