#include <loop_closing.h>
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< Cluster > | cluster_queue_ |
| > Current cluster to be processed | |
| string | execution_dir_ |
| > Stores the number of loop closures | |
| Graph * | graph_ |
| > 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 | |
Definition at line 30 of file loop_closing.h.
Class constructor.
Definition at line 14 of file loop_closing.cpp.
| void slam::LoopClosing::addClusterToQueue | ( | Cluster | cluster | ) |
Add a cluster to the queue of clusters.
| The | cluster to be inserted |
Definition at line 95 of file loop_closing.cpp.
| bool slam::LoopClosing::checkNewClusterInQueue | ( | ) | [protected] |
Check if there are clusters in the queue.
Definition at line 101 of file loop_closing.cpp.
| bool slam::LoopClosing::closeLoopWithCluster | ( | Cluster | candidate | ) | [protected] |
Tries to close a loop between two clusters.
| Candidate | cluster |
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.
| The | loop closing keyframe identifiers |
| The | loop closing cluster identifiers |
| The | inlier indices |
| The | number of inliers for every loop closure cluster pair |
| The | cluster pairs vector |
| All | matched keypoints of the current keyframe |
| All | matched keypoints of the candidate keyframes |
Definition at line 498 of file loop_closing.cpp.
| void slam::LoopClosing::finalize | ( | ) |
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.
| Cluster | identifier |
| The | list of best candidates |
Definition at line 414 of file loop_closing.cpp.
| void slam::LoopClosing::processNewCluster | ( | ) | [protected] |
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.
| Cluster | identifier |
Definition at line 465 of file loop_closing.cpp.
| void slam::LoopClosing::run | ( | ) |
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.
| void slam::LoopClosing::searchByProximity | ( | ) | [protected] |
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] |
Cluster slam::LoopClosing::c_cluster_ [private] |
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.
list<Cluster> slam::LoopClosing::cluster_queue_ [private] |
> Current cluster to be processed
Definition at line 115 of file loop_closing.h.
string slam::LoopClosing::execution_dir_ [private] |
> Stores the number of loop closures
Definition at line 127 of file loop_closing.h.
Graph* slam::LoopClosing::graph_ [private] |
> 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.
string slam::LoopClosing::loop_closures_dir_ [private] |
> Execution directory where all image information will be stored
Definition at line 129 of file loop_closing.h.
mutex slam::LoopClosing::mutex_cluster_queue_ [private] |
> Clusters queue to be inserted into the graph
Definition at line 117 of file loop_closing.h.
int slam::LoopClosing::num_loop_closures_ [private] |
> 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.
ros::Publisher slam::LoopClosing::pub_num_lc_ [private] |
> Publishes the number of keyframes
Definition at line 135 of file loop_closing.h.
ros::Publisher slam::LoopClosing::pub_queue_ [private] |
> Publishes the number of loop closings
Definition at line 137 of file loop_closing.h.