Main MRPT website > C++ reference
MRPT logo
PbMap.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2014, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 /* Plane-based Map (PbMap) library
11  * Construction of plane-based maps and localization in it from RGBD Images.
12  * Writen by Eduardo Fernandez-Moral. See docs for <a href="group__mrpt__pbmap__grp.html" >mrpt-pbmap</a>
13  */
14 
15 #ifndef __PBMAP_H
16 #define __PBMAP_H
17 
18 #include <mrpt/config.h>
19 #if MRPT_HAS_PCL
20 
21 #include <mrpt/utils/utils_defs.h>
22 
25 
26 #include <mrpt/pbmap/Plane.h>
27 #include <mrpt/pbmap/Miscellaneous.h> // For typedef PointT;
28 
29 //#include <boost/thread/thread.hpp>
30 
31 namespace mrpt {
32 namespace pbmap {
33  using namespace mrpt::utils;
34 
35  // This must be added to any CSerializable derived class:
37 
38  /** A class used to store a Plane-based Map (PbMap). A PbMap consists of a set of planar patches
39  * described by geometric features (shape, relative position, etc.) and/or radiometric features
40  * (dominant color). It is organized as an annotated, undirected graph, where nodes stand for planar
41  * patches and edges connect neighbor planes when the distance between their closest points is under
42  * a threshold. This graph structure permits to find efficiently the closest neighbors of a plane,
43  * or to select groups of nearby planes representing part of the scene.
44  *
45  * \ingroup mrpt_pbmap_grp
46  */
47  class PBMAP_IMPEXP PbMap : public mrpt::utils::CSerializable
48  {
49  // This must be added to any CSerializable derived class:
51 
52  public:
53  /*!Constructor.*/
54  PbMap();
55 
56  /*!Vector to store the 3D-planes which are the basic characteristic of our map.*/
57  std::vector<Plane> vPlanes;
58 
59  /*!Label to store a semantic attribute*/
60  std::string label;
61 
62  /*!Floor plane id*/
63  int FloorPlane;
64 
65  /*!Registered point cloud from the RGB-D or Depth frames and visual odometry.*/
66  pcl::PointCloud<PointT>::Ptr globalMapPtr;
67 
68  pcl::PointCloud<pcl::PointXYZRGBA>::Ptr edgeCloudPtr;
69  pcl::PointCloud<pcl::PointXYZRGBA>::Ptr outEdgeCloudPtr;
70  unsigned background, foreground, groundplane;
71 
72  /*!Save PbMap in the given filePath*/
73  void savePbMap(std::string filePath);
74 
75  /*!Load a PbMap from the given filePath*/
76  void loadPbMap(std::string PbMapFile);
77 
78  /*!Merge two pbmaps*/
79  void MergeWith(PbMap &pbm, Eigen::Matrix4f &T);
80 
81  /*! Print PbMap content to a text file*/
82  void printPbMap(std::string txtFilePbm);
83 
84 // boost::mutex mtx_pbmap_busy;
85 
86  };
88 
89 } } // End of namespaces
90 
91 #endif
92 
93 #endif
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
Definition: zip.h:16
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:35
A class used to store a planar feature (Plane for short).
Definition: Plane.h:50
STL namespace.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_LINKAGE(class_name, _LINKAGE_)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_LINKAGE(class_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
A class used to store a Plane-based Map (PbMap).
Definition: PbMap.h:47
pcl::PointXYZRGBA PointT
Definition: Miscellaneous.h:34



Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014