GraphSLAM.hpp
Go to the documentation of this file.
1 
34 #ifndef GRAPHSLAM_HPP_
35 #define GRAPHSLAM_HPP_
36 
37 #include "SLAMScanWrapper.hpp"
38 #include "SLAMOptions.hpp"
39 #include "KDTree.hpp"
40 
41 #include <Eigen/SparseCore>
42 
43 namespace lvr2
44 {
45 
56 bool findCloseScans(const std::vector<SLAMScanPtr>& scans, size_t scan, const SLAMOptions& options, std::vector<size_t>& output);
57 
61 class GraphSLAM
62 {
63 public:
64 
65  using GraphMatrix = Eigen::SparseMatrix<double>;
66  using GraphVector = Eigen::VectorXd;
67  using Graph = std::vector<std::pair<int, int>>;
68 
70 
71  virtual ~GraphSLAM() = default;
72 
80  void doGraphSLAM(const std::vector<SLAMScanPtr>& scans, size_t last, const std::vector<bool>& new_scans = std::vector<bool>()) const;
81 
82 protected:
89  void createGraph(const std::vector<SLAMScanPtr>& scans, size_t last, Graph& graph) const;
90 
98  void fillEquation(const std::vector<SLAMScanPtr>& scans, const Graph& graph, GraphMatrix& mat, GraphVector& vec) const;
99 
100  void eulerCovariance(KDTreePtr tree, SLAMScanPtr scan, Matrix6d& outMat, Vector6d& outVec) const;
101 
103 };
104 
105 } /* namespace lvr2 */
106 
107 #endif /* GRAPHSLAM_HPP_ */
lvr2::Matrix6d
Eigen::Matrix< double, 6, 6 > Matrix6d
6D matrix double precision
Definition: MatrixTypes.hpp:159
lvr2::GraphSLAM::fillEquation
void fillEquation(const std::vector< SLAMScanPtr > &scans, const Graph &graph, GraphMatrix &mat, GraphVector &vec) const
A function to fill the linear system mat * x = vec.
Definition: GraphSLAM.cpp:266
SLAMScanWrapper.hpp
lvr2::GraphSLAM::GraphSLAM
GraphSLAM(const SLAMOptions *options)
Definition: GraphSLAM.cpp:117
lvr2::GraphSLAM::eulerCovariance
void eulerCovariance(KDTreePtr tree, SLAMScanPtr scan, Matrix6d &outMat, Vector6d &outVec) const
Definition: GraphSLAM.cpp:392
lvr2::GraphSLAM::Graph
std::vector< std::pair< int, int > > Graph
Definition: GraphSLAM.hpp:67
lvr2::GraphSLAM::GraphVector
Eigen::VectorXd GraphVector
Definition: GraphSLAM.hpp:66
options
const kaboom::Options * options
Definition: src/tools/lvr2_kaboom/Main.cpp:45
lvr2::GraphSLAM::doGraphSLAM
void doGraphSLAM(const std::vector< SLAMScanPtr > &scans, size_t last, const std::vector< bool > &new_scans=std::vector< bool >()) const
runs the GraphSLAM algorithm
Definition: GraphSLAM.cpp:122
lvr2::GraphSLAM::m_options
const SLAMOptions * m_options
Definition: GraphSLAM.hpp:102
lvr2::KDTreePtr
std::shared_ptr< KDTree > KDTreePtr
Definition: KDTree.hpp:135
KDTree.hpp
lvr2::GraphSLAM::~GraphSLAM
virtual ~GraphSLAM()=default
lvr2::SLAMScanPtr
std::shared_ptr< SLAMScanWrapper > SLAMScanPtr
Definition: SLAMScanWrapper.hpp:221
lvr2::Vector6d
Eigen::Matrix< double, 6, 1 > Vector6d
6D vector double precision
Definition: MatrixTypes.hpp:162
SLAMOptions.hpp
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::GraphSLAM::GraphMatrix
Eigen::SparseMatrix< double > GraphMatrix
Definition: GraphSLAM.hpp:65
lvr2::GraphSLAM::createGraph
void createGraph(const std::vector< SLAMScanPtr > &scans, size_t last, Graph &graph) const
Creates a graph. An edge between nodes(scans) means posible overlap.
Definition: GraphSLAM.cpp:243
lvr2::SLAMOptions
A struct to configure SLAMAlign.
Definition: SLAMOptions.hpp:45
lvr2::findCloseScans
bool findCloseScans(const std::vector< SLAMScanPtr > &scans, size_t scan, const SLAMOptions &options, std::vector< size_t > &output)
finds Scans that are "close" to a Scan as determined by a Loopclosing strategy
lvr2::GraphSLAM
Wrapper class for running GraphSLAM on Scans.
Definition: GraphSLAM.hpp:61


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23