34 #ifndef GRAPHSLAM_HPP_ 35 #define GRAPHSLAM_HPP_ 41 #include <Eigen/SparseCore> 56 bool findCloseScans(
const std::vector<SLAMScanPtr>& scans,
size_t scan,
const SLAMOptions&
options, std::vector<size_t>& output);
67 using Graph = std::vector<std::pair<int, int>>;
80 void doGraphSLAM(
const std::vector<SLAMScanPtr>& scans,
size_t last,
const std::vector<bool>& new_scans = std::vector<bool>())
const;
89 void createGraph(
const std::vector<SLAMScanPtr>& scans,
size_t last,
Graph& graph)
const;
GraphSLAM(const SLAMOptions *options)
void doGraphSLAM(const std::vector< SLAMScanPtr > &scans, size_t last, const std::vector< bool > &new_scans=std::vector< bool >()) const
runs the GraphSLAM algorithm
std::vector< std::pair< int, int > > 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.
Wrapper class for running GraphSLAM on Scans.
const kaboom::Options * options
virtual ~GraphSLAM()=default
void eulerCovariance(KDTreePtr tree, SLAMScanPtr scan, Matrix6d &outMat, Vector6d &outVec) const
Eigen::VectorXd GraphVector
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
void createGraph(const std::vector< SLAMScanPtr > &scans, size_t last, Graph &graph) const
Creates a graph. An edge between nodes(scans) means posible overlap.
A struct to configure SLAMAlign.
std::shared_ptr< KDTree > KDTreePtr
Eigen::Matrix< double, 6, 6 > Matrix6d
6D matrix double precision
Eigen::Matrix< double, 6, 1 > Vector6d
6D vector double precision
std::shared_ptr< SLAMScanWrapper > SLAMScanPtr
Eigen::SparseMatrix< double > GraphMatrix
const SLAMOptions * m_options