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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020