-
Notifications
You must be signed in to change notification settings - Fork 1
/
trajectory_layer.hpp
44 lines (31 loc) · 1.04 KB
/
trajectory_layer.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Created by aoool on 15.11.18.
//
#ifndef PATH_PLANNING_TRAJECTORY_LAYER_HPP
#define PATH_PLANNING_TRAJECTORY_LAYER_HPP
#include "path_planner_config.hpp"
#include "localization_layer.hpp"
#include "prediction_layer.hpp"
#include "behavior_layer.hpp"
#include <vector>
#include <deque>
class TrajectoryLayer {
public:
TrajectoryLayer(const PathPlannerConfig& config,
LocalizationLayer& localization_layer,
PredictionLayer& prediction_layer,
BehaviorLayer& behavior_layer);
virtual ~TrajectoryLayer();
void Initialize(const Car& car);
std::vector<Car> GetTrajectory(size_t num_points);
private:
std::vector<double> GetJerkMinimizingTrajectory(std::vector<double> start, std::vector<double> end, double t) const;
const PathPlannerConfig& pp_config_;
LocalizationLayer& localization_layer_;
PredictionLayer& prediction_layer_;
BehaviorLayer& behavior_layer_;
bool initialized_;
Car ego_car_;
std::deque<Car> next_cars_;
};
#endif //PATH_PLANNING_TRAJECTORY_LAYER_HPP