MRPT  1.9.9
CObservationPointCloud.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
12 #include <mrpt/maps/CPointsMap.h>
13 #include <mrpt/obs/CObservation.h>
14 
15 namespace mrpt::obs
16 {
17 class CObservation3DRangeScan;
18 
19 /** An observation from any sensor that can be summarized as a pointcloud.
20  * The cloud can comprise plain XYZ points, or can include intensity, or RGB
21  * data; in particular, the point cloud can be any of the derived classes of
22  * mrpt::maps::CPointsMap.
23  *
24  * The pointcloud has as frame of coordinates the `sensorPose` field, which
25  * may match the origin of the vehicle/robot or not.
26  *
27  * \note This is a mrpt::obs::CObservation class, but it is defined in the
28  * mrpt_maps_grp library, so it can use mrpt::maps::CPointsMap.
29  *
30  * \sa CObservation, mrpt::maps::CPointsMap
31  * \ingroup mrpt_maps_grp
32  */
34 {
36 
37  public:
38  enum class ExternalStorageFormat : uint8_t
39  {
40  None = 0, //!< is always stored in memory
41  MRPT_Serialization, //!< Uses mrpt-serialization binary file
42  KittiBinFile, //!< Uses Kitti .bin file format
43  PlainTextFile //!< Plain text, each line has "x y z [i]" coords
44  };
45 
46  protected:
49 
50  public:
51  CObservationPointCloud() = default;
52 
54 
55  /** The pointcloud */
57 
58  /** Sensor placement wrt the vehicle/robot.
59  * i.e. A point at (0,0,0) in \a pointcloud is at \a sensorPose wrt the
60  * vehicle.
61  */
63 
64  // See base class docs
65  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override;
66  void setSensorPose(const mrpt::poses::CPose3D& p) override;
67  void getDescriptionAsText(std::ostream& o) const override;
68 
69  /** @name Delayed-load manual control methods.
70  @{ */
71  // See base class docs.
72  void load() const override;
73  void unload() override;
74  /** @} */
75 
76  /** \name Point cloud external storage functions
77  * @{ */
78  inline bool isExternallyStored() const
79  {
81  }
82  inline const std::string& getExternalStorageFile() const
83  {
84  return m_external_file;
85  }
87  const std::string& fileName, const ExternalStorageFormat fmt);
88 
90  {
91  m_externally_stored = fmt;
92  }
93  /** @} */
94 
95 }; // End of class def.
96 
97 } // namespace mrpt::obs
void load() const override
Makes sure all images and other fields which may be externally stored are loaded in memory...
An observation from any sensor that can be summarized as a pointcloud.
void overrideExternalStorageFormatFlag(const ExternalStorageFormat fmt)
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.
mrpt::poses::CPose3D sensorPose
Sensor placement wrt the vehicle/robot.
void unload() override
Unload all images, for the case they being delayed-load images stored in external files (othewise...
This namespace contains representation of robot actions and observations.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
GLsizei const GLchar ** string
Definition: glext.h:4116
mrpt::maps::CPointsMap::Ptr pointcloud
The pointcloud.
void setAsExternalStorage(const std::string &fileName, const ExternalStorageFormat fmt)
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
GLfloat GLfloat p
Definition: glext.h:6398
const std::string & getExternalStorageFile() const



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 45d659fbb Tue Dec 10 18:21:14 2019 +0100 at mar dic 10 18:30:09 CET 2019