This class is used to explore the PbMap (or other previously acquired PbMaps) to find places observed previously (it has uses in e.g. place recognition or relocalization). PbMapLocaliser run its own thread, which is created at initialization.
Definition at line 42 of file PbMapLocaliser.h.
#include <mrpt/pbmap/PbMapLocaliser.h>
Public Member Functions | |
PbMapLocaliser (PbMap &mPbM, const std::string &config_file) | |
~PbMapLocaliser () | |
Public Attributes | |
std::vector< std::string > | previousPbMapNames |
std::vector< PbMap > | previousPbMaps |
*PbMapLocaliser y montarlo en un define *size_t | totalPrevPlanes |
std::vector< unsigned > | vQueueObservedPlanes |
std::map< std::string, pcl::PointXYZ > | foundPlaces |
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr | alignedModelPtr |
std::map< unsigned, std::vector< std::pair< double, int > > > | evalColor |
Protected Member Functions | |
void | run () |
bool | stop_pbMapLocaliser () |
Protected Attributes | |
std::thread | pbMapLocaliser_hd |
bool | m_pbMapLocaliser_must_stop |
bool | m_pbMapLocaliser_finished |
Private Member Functions | |
void | LoadPreviousPbMaps (std::string fileMaps) |
bool | searchPlaneContext (Plane &searchPlane) |
! Searches the input plane in the rest of planes of the map taking into account the neighboring relations More... | |
void | compareSubgraphNeighbors (SubgraphMatcher &matcher) |
double | getAreaMatch () |
Private Attributes | |
PbMap & | mPbMap |
SubgraphMatcher | matcher |
std::map< std::string, std::pair< int, double > > | planeRecognitionLUT |
unsigned | bestMap |
std::map< unsigned, unsigned > | bestMatch |
double | score |
PbMapLocaliser::PbMapLocaliser | ( | PbMap & | mPbM, |
const std::string & | config_file | ||
) |
Constructor.
Definition at line 33 of file PbMapLocaliser.cpp.
References mrpt::pbmap::config_heuristics::color_threshold, mrpt::pbmap::SubgraphMatcher::configLocaliser, mrpt::pbmap::config_heuristics::hue_threshold, mrpt::pbmap::config_heuristics::intensity_threshold, mrpt::pbmap::config_heuristics::load_params(), LoadPreviousPbMaps(), matcher, mrpt::pbmap::config_heuristics::min_planes_recognition, pbMapLocaliser_hd, and run().
PbMapLocaliser::~PbMapLocaliser | ( | ) |
Definition at line 540 of file PbMapLocaliser.cpp.
References stop_pbMapLocaliser().
|
private |
Search the 2nd order neighbors.
Definition at line 92 of file PbMapLocaliser.cpp.
References bestMap, bestMatch, mrpt::pbmap::SubgraphMatcher::configLocaliser, mrpt::pbmap::SubgraphMatcher::evalBinaryConstraints(), mrpt::pbmap::SubgraphMatcher::evalUnaryConstraints(), mrpt::pbmap::config_heuristics::graph_mode, matcher, mPbMap, previousPbMaps, mrpt::pbmap::Subgraph::subgraphPlanesIdx, mrpt::pbmap::SubgraphMatcher::subgraphSrc, mrpt::pbmap::SubgraphMatcher::subgraphTrg, and mrpt::pbmap::PbMap::vPlanes.
|
private |
Definition at line 183 of file PbMapLocaliser.cpp.
References bestMatch, mPbMap, and mrpt::pbmap::PbMap::vPlanes.
Referenced by searchPlaneContext().
|
private |
Load previous PbMaps to search for previous places.
Definition at line 51 of file PbMapLocaliser.cpp.
References mrpt::pbmap::PbMap::loadPbMap(), previousPbMapNames, previousPbMaps, totalPrevPlanes, and mrpt::pbmap::PbMap::vPlanes.
Referenced by PbMapLocaliser().
|
protected |
This executes the PbMapLocaliser's thread
Definition at line 396 of file PbMapLocaliser.cpp.
References mrpt::pbmap::SubgraphMatcher::configLocaliser, mrpt::pbmap::config_heuristics::graph_mode, m_pbMapLocaliser_finished, m_pbMapLocaliser_must_stop, matcher, mrpt::pbmap::config_heuristics::min_planes_recognition, mPbMap, mrpt::pbmap::SubgraphMatcher::nCheckConditions, searchPlaneContext(), time1, time2, mrpt::pbmap::PbMap::vPlanes, and vQueueObservedPlanes.
Referenced by PbMapLocaliser().
|
private |
! Searches the input plane in the rest of planes of the map taking into account the neighboring relations
Search the subgraph defined by a plane (neighborhood of 1-connected planes) in the rest of the PbMap or PbMaps aquired till the moment.
Definition at line 201 of file PbMapLocaliser.cpp.
References alignedModelPtr, bestMap, bestMatch, mrpt::pbmap::SubgraphMatcher::compareSubgraphs(), mrpt::pbmap::SubgraphMatcher::configLocaliser, foundPlaces, getAreaMatch(), mrpt::pbmap::ConsistencyTest::getRTwithModel(), mrpt::pbmap::config_heuristics::graph_mode, mrpt::pbmap::Plane::id, mrpt::pbmap::inverse(), matcher, mrpt::pbmap::config_heuristics::min_planes_recognition, model, mPbMap, mrpt::pbmap::Plane::nearbyPlanes, mrpt::pbmap::Plane::neighborPlanes, planeRecognitionLUT, previousPbMapNames, previousPbMaps, totalPrevPlanes, and mrpt::pbmap::PbMap::vPlanes.
Referenced by run().
|
protected |
PbMapLocaliser's exit thread
Definition at line 529 of file PbMapLocaliser.cpp.
References m_pbMapLocaliser_finished, m_pbMapLocaliser_must_stop, and pbMapLocaliser_hd.
Referenced by ~PbMapLocaliser().
pcl::PointCloud<pcl::PointXYZRGBA>::Ptr mrpt::pbmap::PbMapLocaliser::alignedModelPtr |
Point cloud of recognized place.
Definition at line 70 of file PbMapLocaliser.h.
Referenced by searchPlaneContext(), and mrpt::pbmap::PbMapMaker::viz_cb().
|
private |
Best previous PbMap correspondence.
Definition at line 96 of file PbMapLocaliser.h.
Referenced by compareSubgraphNeighbors(), and searchPlaneContext().
|
private |
Best correspondence between pair of planes.
Definition at line 99 of file PbMapLocaliser.h.
Referenced by compareSubgraphNeighbors(), getAreaMatch(), and searchPlaneContext().
std::map<unsigned, std::vector<std::pair<double, int> > > mrpt::pbmap::PbMapLocaliser::evalColor |
Definition at line 72 of file PbMapLocaliser.h.
std::map<std::string, pcl::PointXYZ> mrpt::pbmap::PbMapLocaliser::foundPlaces |
List of places where the system has been localised, keeping also the associated point cloud corresponding to the PbMap.
Definition at line 67 of file PbMapLocaliser.h.
Referenced by searchPlaneContext(), and mrpt::pbmap::PbMapMaker::viz_cb().
|
protected |
PbMapLocaliser's stop var
Definition at line 118 of file PbMapLocaliser.h.
Referenced by run(), and stop_pbMapLocaliser().
|
protected |
PbMapLocaliser's stop controller
Definition at line 115 of file PbMapLocaliser.h.
Referenced by run(), and stop_pbMapLocaliser().
|
private |
The matching object.
Definition at line 79 of file PbMapLocaliser.h.
Referenced by compareSubgraphNeighbors(), PbMapLocaliser(), run(), and searchPlaneContext().
|
private |
The current PbMap.
Definition at line 76 of file PbMapLocaliser.h.
Referenced by compareSubgraphNeighbors(), getAreaMatch(), run(), and searchPlaneContext().
|
protected |
PbMapLocaliser's thread handle
Definition at line 109 of file PbMapLocaliser.h.
Referenced by PbMapLocaliser(), and stop_pbMapLocaliser().
|
private |
List of places that have been matched, together with their plane correspondences.
Definition at line 85 of file PbMapLocaliser.h.
Referenced by searchPlaneContext().
std::vector<std::string> mrpt::pbmap::PbMapLocaliser::previousPbMapNames |
Vector to store the name of previous PbMaps (previous places).
Definition at line 50 of file PbMapLocaliser.h.
Referenced by LoadPreviousPbMaps(), and searchPlaneContext().
std::vector<PbMap> mrpt::pbmap::PbMapLocaliser::previousPbMaps |
Vector of vectors containing previous PbMaps.
Definition at line 53 of file PbMapLocaliser.h.
Referenced by compareSubgraphNeighbors(), LoadPreviousPbMaps(), and searchPlaneContext().
|
private |
Score of the matched places.
Definition at line 102 of file PbMapLocaliser.h.
* PbMapLocaliser y montarlo en un define* size_t mrpt::pbmap::PbMapLocaliser::totalPrevPlanes |
Number of planes of our search space.
Definition at line 61 of file PbMapLocaliser.h.
Referenced by LoadPreviousPbMaps(), and searchPlaneContext().
std::vector<unsigned> mrpt::pbmap::PbMapLocaliser::vQueueObservedPlanes |
observedPlanes is a list containing the current observed planes.
Definition at line 64 of file PbMapLocaliser.h.
Referenced by mrpt::pbmap::PbMapMaker::detectPlanesCloud(), and run().
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 |