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:
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  };
44 
45  protected:
48 
49  public:
50  CObservationPointCloud() = default;
51 
53 
54  /** The pointcloud */
56 
57  /** Sensor placement wrt the vehicle/robot.
58  * i.e. A point at (0,0,0) in \a pointcloud is at \a sensorPose wrt the
59  * vehicle.
60  */
62 
63  // See base class docs
64  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override;
65  void setSensorPose(const mrpt::poses::CPose3D& p) override;
66  void getDescriptionAsText(std::ostream& o) const override;
67 
68  /** @name Delayed-load manual control methods.
69  @{ */
70  // See base class docs.
71  void load() const override;
72  void unload() override;
73  /** @} */
74 
75  /** \name Point cloud external storage functions
76  * @{ */
77  inline bool isExternallyStored() const
78  {
80  }
81  inline const std::string& getExternalStorageFile() const
82  {
83  return m_external_file;
84  }
86  const std::string& fileName, const ExternalStorageFormat fmt);
87  /** @} */
88 
89 }; // End of class def.
90 
91 } // 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.
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.
unsigned char uint8_t
Definition: rptypes.h:44
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.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
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:84
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
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: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019