Class GraphSLAM
Defined in File GraphSLAM.hpp
Class Documentation
-
class GraphSLAM
Wrapper class for running GraphSLAM on Scans.
Public Types
-
using GraphMatrix = Eigen::SparseMatrix<double>
-
using GraphVector = Eigen::VectorXd
-
using Graph = std::vector<std::pair<int, int>>
Public Functions
-
GraphSLAM(const SLAMOptions *options)
-
virtual ~GraphSLAM() = default
-
void doGraphSLAM(const std::vector<SLAMScanPtr> &scans, size_t last, const std::vector<bool> &new_scans = std::vector<bool>()) const
runs the GraphSLAM algorithm
- Parameters:
scans – The scans to work on
last – The index of the last Scan to consider.
scansmay be longer, but anything afterlastwill be ignored
Protected Functions
-
void createGraph(const std::vector<SLAMScanPtr> &scans, size_t last, Graph &graph) const
Creates a graph. An edge between nodes(scans) means posible overlap.
- Parameters:
scans – reference to a vector containing the SlamScanPtr
last – number of the last considered scan
graph – Outputs the created graph
-
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.
- Parameters:
scans – reference to a vector containing the SlamScanPtr
graph – the graph created in the createGraph function
mat – Outputs the GraphMatrix
vec – Outputs the GraphVector
Protected Attributes
-
const SLAMOptions *m_options
-
using GraphMatrix = Eigen::SparseMatrix<double>