32 m_points3D_external_stored(false),
33 m_rangeImage_external_stored(false),
37 hasIntensityImage(false),
50 CObservationRGBD360::~CObservationRGBD360()
52 #ifdef COBS3DRANGE_USE_MEMPOOL 68 out << maxRange << sensorPose;
83 out << hasRangeImage;
if (hasRangeImage)
for (
unsigned i=0; i < NUM_SENSORS; i++) out << rangeImages[i];
84 out << hasIntensityImage;
if (hasIntensityImage)
for (
unsigned i=0; i < NUM_SENSORS; i++) out << intensityImages[i];
86 for (
unsigned i=0; i < NUM_SENSORS; i++) out << timestamps[i];
92 out << m_points3D_external_stored << m_points3D_external_file;
93 out << m_rangeImage_external_stored << m_rangeImage_external_file;
106 in >> maxRange >> sensorPose;
109 if (hasRangeImage)
for (
unsigned i=0; i < NUM_SENSORS; i++)
111 #ifdef COBS3DRANGE_USE_MEMPOOL 113 this->rangeImage_setSize(240,320,i);
115 in >> rangeImages[i];
118 in >> hasIntensityImage;
119 if (hasIntensityImage)
for (
unsigned i=0; i < NUM_SENSORS; i++)
120 in >>intensityImages[i];
128 for (
unsigned i=0; i < NUM_SENSORS; i++) in >> timestamps[i];
133 in >> m_points3D_external_stored >> m_points3D_external_file;
134 in >> m_rangeImage_external_stored >> m_rangeImage_external_file;
145 void CObservationRGBD360::rangeImage_setSize(
const int H,
const int W,
const unsigned sensor_id)
147 #ifdef COBS3DRANGE_USE_MEMPOOL 152 CObservationRGBD360_Ranges_MemPoolParams mem_params;
156 CObservationRGBD360_Ranges_MemPoolData *mem_block = pool->
request_memory(mem_params);
160 rangeImage.swap(mem_block->rangeImage);
168 rangeImages[sensor_id].setSize(H,W);
171 void CObservationRGBD360::getDescriptionAsText(std::ostream &o)
const 173 CObservation::getDescriptionAsText(o);
Declares a class derived from "CObservation" that encapsules an omnidirectional RGBD measurement from...
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void mempool_donate_range_matrix(CObservation3DRangeScan &obs)
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
POOLABLE_DATA * request_memory(const DATA_PARAMS ¶ms)
Request a block of data which fulfils the size requirements stated in params.
A generic system for versatile memory pooling.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
This base provides a set of functions for maths stuff.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
This namespace contains representation of robot actions and observations.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
static CGenericMemoryPool< DATA_PARAMS, POOLABLE_DATA > * getInstance(const size_t max_pool_entries=5)
Construct-on-first-use (~singleton) pattern: Return the unique instance of this class for a given tem...
Declares a class that represents any robot's observation.
void mempool_donate_xyz_buffers(CObservation3DRangeScan &obs)