35 likelihoodOpts.loadFromConfigFile(
source, sectionNamePrefix+
string(
"_likelihoodOpts") );
40 this->insertionOpts.dumpToTextStream(out);
41 this->likelihoodOpts.dumpToTextStream(out);
69 CWeightedPointsMap::~CWeightedPointsMap()
76 void CWeightedPointsMap::reserve(
size_t newLength)
79 x.reserve( newLength );
80 y.reserve( newLength );
81 z.reserve( newLength );
82 pointWeight.reserve(newLength);
87 void CWeightedPointsMap::resize(
size_t newLength)
89 this->reserve(newLength);
90 x.resize( newLength, 0 );
91 y.resize( newLength, 0 );
92 z.resize( newLength, 0 );
93 pointWeight.resize(newLength, 1);
100 this->reserve(newLength);
101 x.assign( newLength, 0);
102 y.assign( newLength, 0);
103 z.assign( newLength, 0);
104 pointWeight.assign( newLength, 1 );
107 void CWeightedPointsMap::setPointFast(
size_t index,
float x,
float y,
float z)
116 void CWeightedPointsMap::insertPointFast(
float x,
float y,
float z )
118 this->x.push_back(
x);
119 this->y.push_back(
y);
120 this->z.push_back(
z);
121 this->pointWeight.push_back(1);
130 CPointsMap::base_copyFrom(
obj);
142 void CWeightedPointsMap::addFrom_classSpecific(
const CPointsMap &anotherMap,
const size_t nPreviousPoints)
144 const size_t nOther = anotherMap.
size();
151 for (
size_t i=0,j=nPreviousPoints;i<nOther;i++, j++)
180 out << genericMapParams;
181 insertionOptions.writeToStream(out);
182 likelihoodOptions.writeToStream(out);
209 in.ReadBufferFixEndianness(&
x[0],
n);
210 in.ReadBufferFixEndianness(&
y[0],
n);
211 in.ReadBufferFixEndianness(&
z[0],
n);
212 in.ReadBufferFixEndianness(&pointWeight[0],
n);
218 in >> genericMapParams;
221 bool disableSaveAs3DObject;
222 in >> disableSaveAs3DObject;
223 genericMapParams.enableSaveAs3DObject = !disableSaveAs3DObject;
226 insertionOptions.readFromStream(
in);
231 in >> insertionOptions.minDistBetweenLaserPoints
232 >> insertionOptions.addToExistingPointsMap
233 >> insertionOptions.also_interpolate
234 >> insertionOptions.disableDeletion
235 >> insertionOptions.fuseWithExisting
236 >> insertionOptions.isPlanarMap
237 >> insertionOptions.maxDistForInterpolatePoints;
239 bool disableSaveAs3DObject;
240 in >> disableSaveAs3DObject;
241 genericMapParams.enableSaveAs3DObject = !disableSaveAs3DObject;
243 in >> insertionOptions.horizontalTolerance;
246 likelihoodOptions.readFromStream(
in);
259 void CWeightedPointsMap::internal_clear()
326 void CWeightedPointsMap::loadFromRangeScan(
334 void CWeightedPointsMap::loadFromRangeScan(
345 void CWeightedPointsMap::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.
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.
static void internal_loadFromRangeScan3D_init(CWeightedPointsMap &me, mrpt::maps::CPointsMap::TLaserRange3DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called only on...
std::vector< uint32_t > pointWeight
The points weights.
IMPLEMENTS_SERIALIZABLE(CLogFileRecord_FullEval, CHolonomicLogFileRecord, mrpt::nav) IMPLEMENTS_SERIALIZABLE(CHolonomicFullEval
mrpt::maps::CPointsMap::TInsertionOptions insertionOpts
Observations insertion options.
GLsizei GLsizei GLuint * obj
static void internal_loadFromRangeScan2D_prepareOneRange(CWeightedPointsMap &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...
This class allows loading and storing values and vectors of different types from a configuration text...
With this struct options are provided to the observation insertion process.
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.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
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_loadFromRangeScan2D_postPushBack(CWeightedPointsMap &me, mrpt::maps::CPointsMap::TLaserRange2DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called after e...
mrpt::maps::CPointsMap::TLikelihoodOptions likelihoodOpts
Probabilistic observation likelihood options.
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...
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans. ...
static void internal_loadFromRangeScan3D_prepareOneRange(CWeightedPointsMap &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 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()
unsigned __int32 uint32_t
size_t size() const
Returns the number of stored points in the map.
static void internal_loadFromRangeScan3D_postOneRange(CWeightedPointsMap &me, mrpt::maps::CPointsMap::TLaserRange3DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called once pe...
static void internal_loadFromRangeScan2D_init(CWeightedPointsMap &me, mrpt::maps::CPointsMap::TLaserRange2DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called only on...
Helper struct used for internal_loadFromRangeScan2D_prepareOneRange()
static void internal_loadFromRangeScan3D_postPushBack(CWeightedPointsMap &me, mrpt::maps::CPointsMap::TLaserRange3DInsertContext &lric)
Helper method fot the generic implementation of CPointsMap::loadFromRangeScan(), to be called after e...