Apollo 11.0
自动驾驶开放平台
extrapolation_predictor.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
22#pragma once
23
24#include <string>
25
28
29namespace apollo {
30namespace prediction {
31
33 public:
38
42 virtual ~ExtrapolationPredictor() = default;
43
51 bool Predict(const ADCTrajectoryContainer* adc_trajectory_container,
52 Obstacle* obstacle,
53 ObstaclesContainer* obstacles_container) override;
54
55 private:
56 struct LaneSearchResult {
57 bool found = false;
58 std::string lane_id = "";
59 int point_index = -1;
60 };
61
62 void PostProcess(Trajectory* trajectory_ptr, ObstacleClusters* clusters_ptr);
63
64 LaneSearchResult SearchExtrapolationLane(const Trajectory& trajectory,
65 const int num_tail_point);
66
67 void ExtrapolateByLane(const LaneSearchResult& lane_search_result,
68 const double extrapolation_speed,
69 Trajectory* trajectory_ptr,
70 ObstacleClusters* clusters_ptr);
71
72 void ExtrapolateByFreeMove(const int num_tail_point,
73 const double extrapolation_speed,
74 Trajectory* trajectory_ptr);
75
76 double ComputeExtraplationSpeed(const int num_tail_point,
77 const Trajectory& trajectory);
78};
79
80} // namespace prediction
81} // namespace apollo
bool Predict(const ADCTrajectoryContainer *adc_trajectory_container, Obstacle *obstacle, ObstaclesContainer *obstacles_container) override
Make prediction
virtual ~ExtrapolationPredictor()=default
Destructor
Prediction obstacle.
Definition obstacle.h:52
class register implement
Definition arena_queue.h:37
Define the sequence predictor base class