35 likelihoodOpts.loadFromConfigFile(
source, sectionNamePrefix+
string(
"_likelihoodOpts") );
40 this->insertionOpts.dumpToTextStream(out);
41 this->likelihoodOpts.dumpToTextStream(out);
68 CSimplePointsMap::~CSimplePointsMap()
75 void CSimplePointsMap::reserve(
size_t newLength)
79 x.reserve( newLength );
80 y.reserve( newLength );
81 z.reserve( newLength );
86 void CSimplePointsMap::resize(
size_t newLength)
88 this->reserve(newLength);
89 x.resize( newLength, 0 );
90 y.resize( newLength, 0 );
91 z.resize( newLength, 0 );
99 this->reserve(newLength);
100 x.assign( newLength, 0);
101 y.assign( newLength, 0);
102 z.assign( newLength, 0);
112 CPointsMap::base_copyFrom(
obj);
138 out << genericMapParams;
140 insertionOptions.writeToStream(out);
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);
203 in.ReadBufferFixEndianness(&
x[0],
n);
204 in.ReadBufferFixEndianness(&
y[0],
n);
205 in.ReadBufferFixEndianness(&
z[0],
n);
221 std::vector<uint32_t> dummy_pointWeight(
n);
222 in.ReadBufferFixEndianness(&dummy_pointWeight[0],
n);
227 std::vector<uint32_t> dummy_pointWeight(
n);
228 in.ReadBufferFixEndianness(&dummy_pointWeight[0],
n);
236 in >> insertionOptions.minDistBetweenLaserPoints
237 >> insertionOptions.addToExistingPointsMap
238 >> insertionOptions.also_interpolate
239 >> insertionOptions.disableDeletion
240 >> insertionOptions.fuseWithExisting
241 >> insertionOptions.isPlanarMap;
245 bool old_matchStaticPointsOnly;
246 in >> old_matchStaticPointsOnly;
249 in >> insertionOptions.maxDistForInterpolatePoints;
252 bool disableSaveAs3DObject;
253 in >> disableSaveAs3DObject;
254 genericMapParams.enableSaveAs3DObject = !disableSaveAs3DObject;
260 in >> insertionOptions.horizontalTolerance;
264 likelihoodOptions.readFromStream(
in);
267 in >> insertionOptions.insertInvalidPoints;
280 void CSimplePointsMap::internal_clear()
290 void CSimplePointsMap::setPointFast(
size_t index,
float x,
float y,
float z)
297 void CSimplePointsMap::insertPointFast(
float x,
float y,
float z )
299 this->x.push_back(
x);
300 this->y.push_back(
y);
301 this->z.push_back(
z);
361 void CSimplePointsMap::loadFromRangeScan(
369 void CSimplePointsMap::loadFromRangeScan(
379 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.
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string §ionNamePrefix) MRPT_OVERRIDE
Load all params from a config file/source.
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...
static void templ_loadFromRangeScan(Derived &obj, const mrpt::obs::CObservation2DRangeScan &rangeScan, const mrpt::poses::CPose3D *robotPose)
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 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...