44 o <<
"Homogeneous matrix for the sensor pose wrt vehicle:\n";
48 o <<
"Pointcloud class: ";
55 o <<
pointcloud->GetRuntimeClass()->className <<
"\n";
56 o <<
"Number of points: " <<
pointcloud->size() <<
"\n";
125 bool ok = pts->loadFromKittiVelodyneFile(abs_filename);
128 "[kitti format] Error loading lazy-load point cloud " 130 abs_filename.c_str()));
139 auto obj = ar.ReadObject();
145 "[mrpt-serialization format] Error loading " 146 "lazy-load point cloud file: %s",
147 abs_filename.c_str()));
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
A compile-time fixed-size numeric matrix container.
void load() const override
Makes sure all images and other fields which may be externally stored are loaded in memory...
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
#define THROW_EXCEPTION(msg)
An observation from any sensor that can be summarized as a pointcloud.
bool fileExists(const std::string &fileName)
Test if a given file (or directory) exists.
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.
void setSensorPose(const mrpt::poses::CPose3D &p) override
A general method to change the sensor pose on the robot.
GLsizei GLsizei GLuint * obj
mrpt::poses::CPose3D sensorPose
Sensor placement wrt the vehicle/robot.
ExternalStorageFormat m_externally_stored
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
CArchiveStreamBase< STREAM > archiveFrom(STREAM &s)
Helper function to create a templatized wrapper CArchive object for a: MRPT's CStream, std::istream, std::ostream, std::stringstream.
void unload() override
Unload all images, for the case they being delayed-load images stored in external files (othewise...
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors...
This namespace contains representation of robot actions and observations.
static Ptr Create(Args &&... args)
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
std::string m_external_file
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
GLsizei const GLchar ** string
mrpt::maps::CPointsMap::Ptr pointcloud
The pointcloud.
IMPLEMENTS_SERIALIZABLE(CObservationPointCloud, CObservation, mrpt::obs)
std::string sensorLabel
An arbitrary label that can be used to identify the sensor.
bool isExternallyStored() const
static Ptr Create(Args &&... args)
mrpt::system::TTimeStamp timestamp
The associated UTC time-stamp.
void setAsExternalStorage(const std::string &fileName, const ExternalStorageFormat fmt)
Virtual base class for "archives": classes abstracting I/O streams.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
Uses Kitti .bin file format.
is always stored in memory
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Declares a class that represents any robot's observation.
Uses mrpt-serialization binary file.
CObservationPointCloud()=default
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
MATRIX44 getHomogeneousMatrixVal() const
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (t...
Saves data to a file and transparently compress the data using the given compression level...
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
virtual void getDescriptionAsText(std::ostream &o) const
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...