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 "pid.hpp"
8
9/*
10 * Map of longitudinal control solvers, with the key being the type of the solver and the value being a lambda
11 * function that creates the solver
12 */
13const std::map<std::string, std::function<std::shared_ptr<LongitudinalController>(const ControlParameters&)>,
14 std::less<>>
16 {"pid",
17 [](const ControlParameters& params) -> std::shared_ptr<LongitudinalController> {
18 return std::make_shared<PID>(params);
19 }},
20 };
const std::map< std::string, std::function< std::shared_ptr< LongitudinalController >(const ControlParameters &)>, std::less<> > longitudinal_controller_map
Definition map.hpp:15