Go to the documentation of this file.
30 void CSimplePointsMap::TMapDefinition::loadFromConfigFile_map_specific(
35 likelihoodOpts.loadFromConfigFile(
c,
s +
string(
"_likelihoodOpts"));
36 renderOpts.loadFromConfigFile(
c,
s +
string(
"_renderOpts"));
39 void CSimplePointsMap::TMapDefinition::dumpToTextStream_map_specific(
40 std::ostream& out)
const
42 this->insertionOpts.dumpToTextStream(out);
43 this->likelihoodOpts.dumpToTextStream(out);
44 this->renderOpts.dumpToTextStream(out);
63 void CSimplePointsMap::reserve(
size_t newLength)
66 m_y.reserve(newLength);
67 m_z.reserve(newLength);
73 void CSimplePointsMap::resize(
size_t newLength)
75 this->reserve(newLength);
76 m_x.resize(newLength, 0);
77 m_y.resize(newLength, 0);
78 m_z.resize(newLength, 0);
87 this->reserve(newLength);
88 m_x.assign(newLength, 0);
89 m_y.assign(newLength, 0);
90 m_z.assign(newLength, 0);
96 CPointsMap::base_copyFrom(
100 uint8_t CSimplePointsMap::serializeGetVersion()
const {
return 10; }
114 out << genericMapParams;
115 insertionOptions.writeToStream(out);
116 likelihoodOptions.writeToStream(out);
117 renderOptions.writeToStream(out);
125 void CSimplePointsMap::serializeFrom(
144 in.ReadBufferFixEndianness(&m_x[0],
n);
145 in.ReadBufferFixEndianness(&m_y[0],
n);
146 in.ReadBufferFixEndianness(&m_z[0],
n);
149 in >> genericMapParams;
152 bool disableSaveAs3DObject;
153 in >> disableSaveAs3DObject;
154 genericMapParams.enableSaveAs3DObject = !disableSaveAs3DObject;
156 insertionOptions.readFromStream(
in);
157 likelihoodOptions.readFromStream(
in);
158 if (version>=10) renderOptions.readFromStream(
in);
181 in.ReadBufferFixEndianness(&m_x[0],
n);
182 in.ReadBufferFixEndianness(&m_y[0],
n);
183 in.ReadBufferFixEndianness(&m_z[0],
n);
202 std::vector<uint32_t> dummy_pointWeight(
n);
203 in.ReadBufferFixEndianness(
204 &dummy_pointWeight[0],
n);
209 std::vector<uint32_t> dummy_pointWeight(
n);
210 in.ReadBufferFixEndianness(&dummy_pointWeight[0],
n);
218 in >> insertionOptions.minDistBetweenLaserPoints >>
219 insertionOptions.addToExistingPointsMap >>
220 insertionOptions.also_interpolate >>
221 insertionOptions.disableDeletion >>
222 insertionOptions.fuseWithExisting >>
223 insertionOptions.isPlanarMap;
227 bool old_matchStaticPointsOnly;
228 in >> old_matchStaticPointsOnly;
231 in >> insertionOptions.maxDistForInterpolatePoints;
234 bool disableSaveAs3DObject;
235 in >> disableSaveAs3DObject;
236 genericMapParams.enableSaveAs3DObject =
237 !disableSaveAs3DObject;
243 in >> insertionOptions.horizontalTolerance;
247 likelihoodOptions.readFromStream(
in);
250 in >> insertionOptions.insertInvalidPoints;
261 void CSimplePointsMap::internal_clear()
271 void CSimplePointsMap::setPointFast(
size_t index,
float x,
float y,
float z)
278 void CSimplePointsMap::insertPointFast(
float x,
float y,
float z)
379 void CSimplePointsMap::loadFromRangeScan(
387 void CSimplePointsMap::loadFromRangeScan(
399 void CSimplePointsMap::PLY_import_set_vertex_count(
const size_t N)
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
void vector_strong_clear(VECTOR_T &v)
Like calling a std::vector<>'s clear() method, but really forcing deallocating the memory.
mrpt::maps::CPointsMap::TRenderOptions renderOpts
Rendering as 3D object options.
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...
Helper struct used for internal_loadFromRangeScan3D_prepareOneRange()
mrpt::maps::CPointsMap::TLikelihoodOptions likelihoodOpts
Probabilistic observation likelihood options.
#define MAP_DEFINITION_REGISTER(_CLASSNAME_STRINGS, _CLASSNAME_WITH_NS)
Registers one map class into TMetricMapInitializer factory.
GLsizei GLsizei GLuint * obj
Helper struct used for internal_loadFromRangeScan2D_prepareOneRange()
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::m...
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
This namespace contains representation of robot actions and observations.
Virtual base class for "archives": classes abstracting I/O streams.
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...
mrpt::maps::CPointsMap::TInsertionOptions insertionOpts
Observations insertion options.
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...
Declares a virtual base class for all metric maps storage classes.
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...
Declares a class derived from "CObservation" that encapsules a 3D range scan measurement,...
This class allows loading and storing values and vectors of different types from a configuration text...
virtual void reserve(size_t newLength) override
Reserves memory for a given number of points: the size of the map does not change,...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
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...
This base provides a set of functions for maths stuff.
GLsizei const GLchar ** string
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
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 WriteBufferFixEndianness(const T *ptr, size_t ElementCount)
Writes a sequence of elemental datatypes, taking care of reordering their bytes from the running arch...
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string §ionNamePrefix) override
Load all params from a config file/source.
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...
unsigned __int32 uint32_t
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |