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-2017, 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/utils/utils_defs.h>
23 
24 #include <mrpt/pbmap/PbMap.h>
25 
26 namespace mrpt
27 {
28 namespace pbmap
29 {
30 /*! This class defines a subgraph inside a PbMap.
31  * This subgraph represents the entity to be matched in order to recognize a
32  * previous place.
33  *
34  * \ingroup mrpt_pbmap_grp
35  */
36 class Subgraph
37 {
38  public:
39  /*!Subgraph constructor with no parameters*/
40  Subgraph(){};
41 
42  /*!Construct a subgraph, inside a given PbMap, as a set of neighborh planes
43  * (1-connected) of a reference plane.*/
44  Subgraph(PbMap* pPbMap, const unsigned& refPlaneId) : pPBM(pPbMap)
45  {
46  subgraphPlanesIdx.insert(refPlaneId);
47  // Add proximity neighbors
48  // for(std::set<unsigned>::iterator it =
49  // pPBM->vPlanes[refPlaneId].nearbyPlanes.begin(); it !=
50  // pPBM->vPlanes[refPlaneId].nearbyPlanes.end(); it++)
51  // subgraphPlanesIdx.insert(*it);
52 
53  // Add neighbors co-visible neighbors
55  pPBM->vPlanes[refPlaneId].neighborPlanes.begin();
56  it != pPBM->vPlanes[refPlaneId].neighborPlanes.end(); it++)
57  subgraphPlanesIdx.insert(it->first);
58 
59 #ifdef _VERBOSE
60  std::cout << "Subgraph constructor: ";
62  it != subgraphPlanesIdx.end(); it++)
63  std::cout << *it << " ";
64  std::cout << std::endl;
65 #endif
66  };
67 
68  PbMap* pPBM;
69  std::set<unsigned> subgraphPlanesIdx;
70 };
71 }
72 } // End of namespaces
73 
74 #endif
75 #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:69
Subgraph(PbMap *pPbMap, const unsigned &refPlaneId)
Definition: Subgraph.h:44
std::vector< Plane > vPlanes
Definition: pbmap/PbMap.h:59
A class used to store a Plane-based Map (PbMap).
Definition: pbmap/PbMap.h:49



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019