Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
map.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <memory>
5#include <string>
6
9
10/*
11 * Map of slam_solvers, with the key being the type of the slam_solver and the value being a lambda
12 * function that returns a shared pointer to the corresponding slam_solver
13 */
14const std::map<std::string,
15 std::function<std::shared_ptr<SLAMSolver>(
16 const SLAMParameters&, std::shared_ptr<DataAssociationModel>,
17 std::shared_ptr<V2PMotionModel>, std::shared_ptr<LandmarkFilter>,
18 std::shared_ptr<std::vector<double>>, std::shared_ptr<LoopClosure>)>,
19 std::less<>>
21 {"graph_slam",
22 [](const SLAMParameters& params, std::shared_ptr<DataAssociationModel> data_association,
23 std::shared_ptr<V2PMotionModel> motion_model,
24 std::shared_ptr<LandmarkFilter> landmark_filter,
25 std::shared_ptr<std::vector<double>> execution_times,
26 std::shared_ptr<LoopClosure> loop_closure) -> std::shared_ptr<SLAMSolver> {
27 return std::make_shared<GraphSLAMSolver>(params, data_association, motion_model,
28 landmark_filter, execution_times, loop_closure);
29 }},
30 {"ekf_slam",
31 [](const SLAMParameters& params, std::shared_ptr<DataAssociationModel> data_association,
32 std::shared_ptr<V2PMotionModel> motion_model,
33 std::shared_ptr<LandmarkFilter> landmark_filter,
34 std::shared_ptr<std::vector<double>> execution_times,
35 std::shared_ptr<LoopClosure> loop_closure) -> std::shared_ptr<SLAMSolver> {
36 return std::make_shared<EKFSLAMSolver>(params, data_association, motion_model,
37 landmark_filter, execution_times, loop_closure);
38 }},
39};
const std::map< std::string, std::function< std::shared_ptr< SLAMSolver >(const SLAMParameters &, std::shared_ptr< DataAssociationModel >, std::shared_ptr< V2PMotionModel >, std::shared_ptr< LandmarkFilter >, std::shared_ptr< std::vector< double > >, std::shared_ptr< LoopClosure >)>, std::less<> > slam_solver_constructors_map
Definition map.hpp:20
Parameters for the SLAM node.