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
11
12/*
13 * Map of motion models, with the key being the type of the motion model and the value being a
14 * lambda function that returns a shared pointer to the corresponding motion model
15 */
16const std::map<std::string, std::function<std::shared_ptr<V2PMotionModel>()>, std::less<>>
18 {"constant_velocity",
19 []() -> std::shared_ptr<V2PMotionModel> {
20 return std::make_shared<ConstantVelocityModel>();
21 }},
22 {"constant_velocity_turnrate",
23 []() -> std::shared_ptr<V2PMotionModel> {
24 return std::make_shared<ConstantVelocityTurnrateModel>();
25 }},
26 {"constant_acceleration_turnrate",
27 []() -> std::shared_ptr<V2PMotionModel> {
28 return std::make_shared<ConstantAccelerationTurnrateModel>();
29 }},
30};
const std::map< std::string, std::function< std::shared_ptr< V2PMotionModel >()>, std::less<> > v2p_models_map
Definition map.hpp:17