Public Member Functions | Protected Member Functions | Private Attributes
slam::LoopClosing Class Reference

#include <loop_closing.h>

List of all members.

Public Member Functions

void addClusterToQueue (Cluster cluster)
 Add a cluster to the queue of clusters.
void finalize ()
 Finalizes the loop closing class.
 LoopClosing ()
 Class constructor.
void run ()
 Starts graph.
void setGraph (Graph *graph)
 Set the graph object.

Protected Member Functions

bool checkNewClusterInQueue ()
 Check if there are clusters in the queue.
bool closeLoopWithCluster (Cluster candidate)
 Tries to close a loop between two clusters.
void drawLoopClosure (vector< int > cand_kfs, vector< int > cand_matchings, vector< int > inliers, vector< int > definitive_inliers_per_pair, vector< vector< int > > definitive_cluster_pairs, vector< cv::Point2f > matched_query_kp_l, vector< cv::Point2f > matched_cand_kp_l)
 Draw and publish a loop closure image with all the correspondences between current keyframe and all the loop closing keyframes.
void getCandidates (int cluster_id, vector< pair< int, float > > &candidates)
 Get the best candidates to close a loop by hash.
void processNewCluster ()
 Processes the new cluster.
Cluster readCluster (int id)
 Read cluster data from file.
void searchByHash ()
 Searches a loop closing between current cluster and all other clusters using the hash.
void searchByProximity ()
 Searches a loop closing between current cluster and its closest neighbors.

Private Attributes

Cluster c_cluster_
image_geometry::PinholeCameraModel camera_model_
 > Publishes the image with the loop closure matchings
vector< pair< int, int > > cluster_lc_found_
 > Hash table: stores a hash for every image. This is the unique variable that grows with the robot trajectory
list< Clustercluster_queue_
 > Current cluster to be processed
string execution_dir_
 > Stores the number of loop closures
Graphgraph_
 > Directory where images of loop closures will be stored
haloc::Hash hash_
 > Mutex for the insertion of new clusters
vector< pair< int, vector
< float > > > 
hash_table_
 > Hash object
string loop_closures_dir_
 > Execution directory where all image information will be stored
mutex mutex_cluster_queue_
 > Clusters queue to be inserted into the graph
int num_loop_closures_
 > Stores all the loop closures (between clusters) found in order to do not repeat them
ros::Publisher pub_lc_matchings_
 > Publishes the loop closing queue size
ros::Publisher pub_num_keyframes_
 > Graph pointer
ros::Publisher pub_num_lc_
 > Publishes the number of keyframes
ros::Publisher pub_queue_
 > Publishes the number of loop closings

Detailed Description

Definition at line 30 of file loop_closing.h.


Constructor & Destructor Documentation

Class constructor.

Definition at line 14 of file loop_closing.cpp.


Member Function Documentation

Add a cluster to the queue of clusters.

Parameters:
Thecluster to be inserted

Definition at line 95 of file loop_closing.cpp.

Check if there are clusters in the queue.

Returns:
true if clusters queue is not empty.

Definition at line 101 of file loop_closing.cpp.

bool slam::LoopClosing::closeLoopWithCluster ( Cluster  candidate) [protected]

Tries to close a loop between two clusters.

Returns:
true if loop closing
Parameters:
Candidatecluster

Definition at line 174 of file loop_closing.cpp.

void slam::LoopClosing::drawLoopClosure ( vector< int >  cand_kfs,
vector< int >  cand_matchings,
vector< int >  inliers,
vector< int >  definitive_inliers_per_pair,
vector< vector< int > >  definitive_cluster_pairs,
vector< cv::Point2f >  matched_query_kp_l,
vector< cv::Point2f >  matched_cand_kp_l 
) [protected]

Draw and publish a loop closure image with all the correspondences between current keyframe and all the loop closing keyframes.

Parameters:
Theloop closing keyframe identifiers
Theloop closing cluster identifiers
Theinlier indices
Thenumber of inliers for every loop closure cluster pair
Thecluster pairs vector
Allmatched keypoints of the current keyframe
Allmatched keypoints of the candidate keyframes

Definition at line 498 of file loop_closing.cpp.

Finalizes the loop closing class.

Definition at line 631 of file loop_closing.cpp.

void slam::LoopClosing::getCandidates ( int  cluster_id,
vector< pair< int, float > > &  candidates 
) [protected]

Get the best candidates to close a loop by hash.

Parameters:
Clusteridentifier
Thelist of best candidates

Definition at line 414 of file loop_closing.cpp.

Processes the new cluster.

Definition at line 107 of file loop_closing.cpp.

Cluster slam::LoopClosing::readCluster ( int  id) [protected]

Read cluster data from file.

Returns:
The cluster
Parameters:
Clusteridentifier

Definition at line 465 of file loop_closing.cpp.

Starts graph.

Definition at line 23 of file loop_closing.cpp.

void slam::LoopClosing::searchByHash ( ) [protected]

Searches a loop closing between current cluster and all other clusters using the hash.

Definition at line 150 of file loop_closing.cpp.

Searches a loop closing between current cluster and its closest neighbors.

Definition at line 133 of file loop_closing.cpp.

void slam::LoopClosing::setGraph ( Graph graph) [inline]

Set the graph object.

Parameters:
graph

Definition at line 42 of file loop_closing.h.


Member Data Documentation

Definition at line 113 of file loop_closing.h.

> Publishes the image with the loop closure matchings

Definition at line 141 of file loop_closing.h.

vector< pair<int, int > > slam::LoopClosing::cluster_lc_found_ [private]

> Hash table: stores a hash for every image. This is the unique variable that grows with the robot trajectory

Definition at line 123 of file loop_closing.h.

> Current cluster to be processed

Definition at line 115 of file loop_closing.h.

> Stores the number of loop closures

Definition at line 127 of file loop_closing.h.

> Directory where images of loop closures will be stored

Definition at line 131 of file loop_closing.h.

haloc::Hash slam::LoopClosing::hash_ [private]

> Mutex for the insertion of new clusters

Definition at line 119 of file loop_closing.h.

vector< pair<int, vector<float> > > slam::LoopClosing::hash_table_ [private]

> Hash object

Definition at line 121 of file loop_closing.h.

> Execution directory where all image information will be stored

Definition at line 129 of file loop_closing.h.

> Clusters queue to be inserted into the graph

Definition at line 117 of file loop_closing.h.

> Stores all the loop closures (between clusters) found in order to do not repeat them

Definition at line 125 of file loop_closing.h.

> Publishes the loop closing queue size

Definition at line 139 of file loop_closing.h.

> Graph pointer

Definition at line 133 of file loop_closing.h.

> Publishes the number of keyframes

Definition at line 135 of file loop_closing.h.

> Publishes the number of loop closings

Definition at line 137 of file loop_closing.h.


The documentation for this class was generated from the following files:


stereo_slam
Author(s): Pep Lluis Negre
autogenerated on Thu Jul 14 2016 04:09:13