35 CObservationRGBD360::~CObservationRGBD360()
37 #ifdef COBS3DRANGE_USE_MEMPOOL 43 uint8_t CObservationRGBD360::serializeGetVersion()
const {
return 0; }
47 out << maxRange << sensorPose;
64 for (
const auto& rangeImage : rangeImages) out << rangeImage;
65 out << hasIntensityImage;
66 if (hasIntensityImage)
67 for (
const auto& intensityImage : intensityImages)
68 out << intensityImage;
71 for (
auto t : timestamps) out <<
t;
77 out << m_points3D_external_stored << m_points3D_external_file;
78 out << m_rangeImage_external_stored << m_rangeImage_external_file;
81 void CObservationRGBD360::serializeFrom(
88 in >> maxRange >> sensorPose;
91 for (
auto& rangeImage : rangeImages)
93 #ifdef COBS3DRANGE_USE_MEMPOOL 96 this->rangeImage_setSize(240, 320, i);
101 in >> hasIntensityImage;
102 if (hasIntensityImage)
103 for (
auto& intensityImage : intensityImages)
104 in >> intensityImage;
112 for (
auto&
t : timestamps)
in >>
t;
117 in >> m_points3D_external_stored >> m_points3D_external_file;
118 in >> m_rangeImage_external_stored >> m_rangeImage_external_file;
128 void CObservationRGBD360::rangeImage_setSize(
129 const int H,
const int W,
const unsigned sensor_id)
131 #ifdef COBS3DRANGE_USE_MEMPOOL 136 CObservationRGBD360_Ranges_MemPoolParams mem_params;
140 CObservationRGBD360_Ranges_MemPoolData* mem_block =
145 rangeImage.swap(mem_block->rangeImage);
153 rangeImages[sensor_id].setSize(H, W);
156 void CObservationRGBD360::getDescriptionAsText(std::ostream& o)
const 158 CObservation::getDescriptionAsText(o);
Declares a class derived from "CObservation" that encapsules an omnidirectional RGBD measurement from...
void mempool_donate_range_matrix(CObservation3DRangeScan &obs)
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to 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.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
A generic system for versatile memory pooling.
This base provides a set of functions for maths stuff.
This namespace contains representation of robot actions and observations.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
Virtual base class for "archives": classes abstracting I/O streams.
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...