Main MRPT website > C++ reference for MRPT 1.4.0
PbMapLocaliser.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-2016, 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 __PBMAPLOCALISER_H
16#define __PBMAPLOCALISER_H
17
18#include <mrpt/config.h>
19
20#if MRPT_HAS_PCL
21
23
24#include <mrpt/system/threads.h>
25
26#include <mrpt/pbmap/PbMap.h>
30
31namespace mrpt {
32namespace pbmap {
33
34 /*! This class is used to explore the PbMap (or other previously acquired PbMaps)
35 * to find places observed previously (it has uses in e.g. place recognition or relocalization).
36 * PbMapLocaliser run its own thread, which is created at initialization.
37 *
38 * \ingroup mrpt_pbmap_grp
39 */
41 {
42 public:
43
44 /*!Constructor.*/
45 PbMapLocaliser(PbMap &mPbM, const std::string &config_file);
47
48 /*!Vector to store the name of previous PbMaps (previous places).*/
49 std::vector<std::string> previousPbMapNames;
50
51 /*!Vector of vectors containing previous PbMaps.*/
52 std::vector<PbMap> previousPbMaps;
53
54 ///*!Vector to store the index of the floor plane for the previous PbMaps (-1 indicates that the floor was not detected).*/ // Mover a la clase PbMapLocaliser y montarlo en un define
55 // std::vector<int> vFloors;
56
57 /*!Number of planes of our search space.*/
59
60 /*!observedPlanes is a list containing the current observed planes.*/
61 std::vector<unsigned> vQueueObservedPlanes;
62
63 /*!List of places where the system has been localised, keeping also the associated point cloud corresponding to the PbMap.*/ // Mover a la clase PbMapLocaliser
64 std::map<std::string, pcl::PointXYZ> foundPlaces;
65
66 /*!Point cloud of recognized place.*/
67 pcl::PointCloud<pcl::PointXYZRGBA>::Ptr alignedModelPtr;
68
69 std::map<unsigned, std::vector< std::pair<double,int> > > evalColor;
70
71 private:
72
73 /*!The current PbMap.*/
75
76 /*!The matching object.*/
78
79 /*!Load previous PbMaps to search for previous places.*/
80 void LoadPreviousPbMaps(std::string fileMaps);
81
82 /*!List of places that have been matched, together with their plane correspondences.*/ // Cambiar nombre
83 std::map<std::string, std::pair<int,double> > planeRecognitionLUT;
84
85 /*!Search the subgraph defined by a plane (neighborhood of 1-connected planes) in the rest of the PbMap or PbMaps aquired till the moment.*/ // Cambiar nombre
86 bool searchPlaneContext(Plane &searchPlane);
87
88 /*!Search the 2nd order neighbors.*/
90
91 double getAreaMatch();
92
93 /*!Best previous PbMap correspondence.*/
94 unsigned bestMap;
95
96 /*!Best correspondence between pair of planes.*/
97 std::map<unsigned, unsigned> bestMatch;
98
99 /*!Score of the matched places.*/ // Cambiar nombre o Quitar!
100 double score;
101
102 protected:
103
104 /*!This executes the PbMapLocaliser's thread*/
105 void run();
106
107 /*!PbMapLocaliser's thread handle*/
109
110 /*!PbMapLocaliser's exit thread*/
112
113 /*!PbMapLocaliser's stop controller*/
115
116 /*!PbMapLocaliser's stop var*/
118 };
119
120} } // End of namespaces
121
122#endif
123
124#endif
A class used to store a Plane-based Map (PbMap).
Definition pbmap/pbmap.h:46
std::vector< PbMap > previousPbMaps
void LoadPreviousPbMaps(std::string fileMaps)
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr alignedModelPtr
mrpt::system::TThreadHandle pbMapLocaliser_hd
std::map< std::string, std::pair< int, double > > planeRecognitionLUT
std::map< unsigned, std::vector< std::pair< double, int > > > evalColor
bool searchPlaneContext(Plane &searchPlane)
std::vector< std::string > previousPbMapNames
PbMapLocaliser(PbMap &mPbM, const std::string &config_file)
std::vector< unsigned > vQueueObservedPlanes
std::map< unsigned, unsigned > bestMatch
std::map< std::string, pcl::PointXYZ > foundPlaces
void compareSubgraphNeighbors(SubgraphMatcher &matcher)
A class used to store a planar feature (Plane for short).
Definition Plane.h:49
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
This structure contains the information needed to interface the threads API on each platform:
Definition threads.h:26



Page generated by Doxygen 1.9.8 for MRPT 1.4.0 SVN: at Fri Dec 15 05:36:48 UTC 2023