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
7
#include "
adapter_slam/pacsim.hpp
"
8
#include "
adapter_slam/vehicle.hpp
"
9
#include "
ros_node/slam_node.hpp
"
10
11
/*
12
* Map of adapters, with the key being the type of the adapter and the value being a lambda function
13
* that creates the adapter
14
*/
15
const
std::map<std::string, std::function<std::shared_ptr<SLAMNode>(
const
SLAMParameters
&)>,
16
std::less<>>
17
adapter_map
= {{
"pacsim"
,
18
[](
const
SLAMParameters
& params) -> std::shared_ptr<SLAMNode> {
19
return
std::make_shared<PacsimAdapter>(params);
20
}},
21
{
"vehicle"
, [](
const
SLAMParameters
& params) -> std::shared_ptr<SLAMNode> {
22
return
std::make_shared<VehicleAdapter>(params);
23
}}};
adapter_map
const std::map< std::string, std::function< std::shared_ptr< SLAMNode >(const SLAMParameters &)>, std::less<> > adapter_map
Definition
map.hpp:17
pacsim.hpp
vehicle.hpp
slam_node.hpp
SLAMParameters
Parameters for the SLAM node.
Definition
general_config.hpp:12
src
slam
include
adapter_slam
map.hpp
Generated by
1.9.8