32 : m_points3D_external_stored(false),
33 m_rangeImage_external_stored(false),
37 hasIntensityImage(false),
50 CObservationRGBD360::~CObservationRGBD360()
52 #ifdef COBS3DRANGE_USE_MEMPOOL 61 void CObservationRGBD360::writeToStream(
69 out << maxRange << sensorPose;
86 for (
unsigned i = 0; i < NUM_SENSORS; i++) out << rangeImages[i];
87 out << hasIntensityImage;
88 if (hasIntensityImage)
89 for (
unsigned i = 0; i < NUM_SENSORS; i++)
90 out << intensityImages[i];
93 for (
unsigned i = 0; i < NUM_SENSORS; i++) out << timestamps[i];
99 out << m_points3D_external_stored << m_points3D_external_file;
100 out << m_rangeImage_external_stored << m_rangeImage_external_file;
113 in >> maxRange >> sensorPose;
117 for (
unsigned i = 0; i < NUM_SENSORS; i++)
119 #ifdef COBS3DRANGE_USE_MEMPOOL 122 this->rangeImage_setSize(240, 320, i);
124 in >> rangeImages[i];
127 in >> hasIntensityImage;
128 if (hasIntensityImage)
129 for (
unsigned i = 0; i < NUM_SENSORS; i++)
130 in >> intensityImages[i];
138 for (
unsigned i = 0; i < NUM_SENSORS; i++) in >> timestamps[i];
143 in >> m_points3D_external_stored >> m_points3D_external_file;
144 in >> m_rangeImage_external_stored >> m_rangeImage_external_file;
154 void CObservationRGBD360::rangeImage_setSize(
155 const int H,
const int W,
const unsigned sensor_id)
157 #ifdef COBS3DRANGE_USE_MEMPOOL 162 CObservationRGBD360_Ranges_MemPoolParams mem_params;
166 CObservationRGBD360_Ranges_MemPoolData* mem_block =
171 rangeImage.swap(mem_block->rangeImage);
179 rangeImages[sensor_id].setSize(H, W);
182 void CObservationRGBD360::getDescriptionAsText(std::ostream& o)
const 184 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...
Declares a class that represents any robot's observation.
void mempool_donate_xyz_buffers(CObservation3DRangeScan &obs)
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...