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
26
#include "
modules/prediction/container/obstacles/obstacle_clusters.h
"
27
#include "
modules/prediction/predictor/sequence/sequence_predictor.h
"
28
29
namespace
apollo
{
30
namespace
prediction {
31
32
class
ExtrapolationPredictor
:
public
SequencePredictor
{
33
public
:
37
ExtrapolationPredictor
();
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
apollo::prediction::ADCTrajectoryContainer
Definition
adc_trajectory_container.h:37
apollo::prediction::ExtrapolationPredictor
Definition
extrapolation_predictor.h:32
apollo::prediction::ExtrapolationPredictor::ExtrapolationPredictor
ExtrapolationPredictor()
Constructor
Definition
extrapolation_predictor.cc:30
apollo::prediction::ExtrapolationPredictor::Predict
bool Predict(const ADCTrajectoryContainer *adc_trajectory_container, Obstacle *obstacle, ObstaclesContainer *obstacles_container) override
Make prediction
Definition
extrapolation_predictor.cc:34
apollo::prediction::ExtrapolationPredictor::~ExtrapolationPredictor
virtual ~ExtrapolationPredictor()=default
Destructor
apollo::prediction::ObstacleClusters
Definition
obstacle_clusters.h:33
apollo::prediction::Obstacle
Prediction obstacle.
Definition
obstacle.h:52
apollo::prediction::ObstaclesContainer
Definition
obstacles_container.h:39
apollo::prediction::SequencePredictor
Definition
sequence_predictor.h:35
apollo
class register implement
Definition
arena_queue.h:37
obstacle_clusters.h
sequence_predictor.h
Define the sequence predictor base class
apollo::prediction::Trajectory
Definition
feature.proto:76
modules
prediction
predictor
extrapolation
extrapolation_predictor.h