Main MRPT website > C++ reference for MRPT 1.9.9
Subgraph.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-2018, 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
13  * href="group__mrpt__pbmap__grp.html" >mrpt-pbmap</a>
14  */
15 
16 #ifndef __SUBGRAPH_H
17 #define __SUBGRAPH_H
18 
19 #include <mrpt/config.h>
20 #if MRPT_HAS_PCL
21 
22 #include <mrpt/pbmap/PbMap.h>
23 
24 namespace mrpt
25 {
26 namespace pbmap
27 {
28 /*! This class defines a subgraph inside a PbMap.
29  * This subgraph represents the entity to be matched in order to recognize a
30  * previous place.
31  *
32  * \ingroup mrpt_pbmap_grp
33  */
34 class Subgraph
35 {
36  public:
37  /*!Subgraph constructor with no parameters*/
38  Subgraph(){};
39 
40  /*!Construct a subgraph, inside a given PbMap, as a set of neighborh planes
41  * (1-connected) of a reference plane.*/
42  Subgraph(PbMap* pPbMap, const unsigned& refPlaneId) : pPBM(pPbMap)
43  {
44  subgraphPlanesIdx.insert(refPlaneId);
45  // Add proximity neighbors
46  // for(std::set<unsigned>::iterator it =
47  // pPBM->vPlanes[refPlaneId].nearbyPlanes.begin(); it !=
48  // pPBM->vPlanes[refPlaneId].nearbyPlanes.end(); it++)
49  // subgraphPlanesIdx.insert(*it);
50 
51  // Add neighbors co-visible neighbors
53  pPBM->vPlanes[refPlaneId].neighborPlanes.begin();
54  it != pPBM->vPlanes[refPlaneId].neighborPlanes.end(); it++)
55  subgraphPlanesIdx.insert(it->first);
56 
57 #ifdef _VERBOSE
58  std::cout << "Subgraph constructor: ";
60  it != subgraphPlanesIdx.end(); it++)
61  std::cout << *it << " ";
62  std::cout << std::endl;
63 #endif
64  };
65 
66  PbMap* pPBM;
67  std::set<unsigned> subgraphPlanesIdx;
68 };
69 }
70 } // End of namespaces
71 
72 #endif
73 #endif
Scalar * iterator
Definition: eigen_plugins.h:26
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
std::set< unsigned > subgraphPlanesIdx
Definition: Subgraph.h:67
Subgraph(PbMap *pPbMap, const unsigned &refPlaneId)
Definition: Subgraph.h:42
std::vector< Plane > vPlanes
Definition: pbmap/PbMap.h:57
A class used to store a Plane-based Map (PbMap).
Definition: pbmap/PbMap.h:47



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019