29 #include "modules/prediction/proto/prediction_conf.pb.h" 36 namespace prediction {
54 void Init(
const PredictionConf& config);
67 void Run(
const apollo::perception::PerceptionObstacles& perception_obstacles,
81 PredictionObstacle*
const prediction_obstacle);
94 void RegisterPredictor(
const ObstacleConf::PredictorType& type);
101 std::unique_ptr<Predictor> CreatePredictor(
102 const ObstacleConf::PredictorType& type);
107 void RegisterPredictors();
109 void PredictObstacles(
110 const apollo::perception::PerceptionObstacles& perception_obstacles,
114 void PredictObstaclesInParallel(
115 const apollo::perception::PerceptionObstacles& perception_obstacles,
119 void InitVehiclePredictors(
const ObstacleConf& conf);
121 void InitCyclistPredictors(
const ObstacleConf& conf);
123 void InitDefaultPredictors(
const ObstacleConf& conf);
125 void RunVehiclePredictor(
129 void RunPedestrianPredictor(
133 void RunCyclistPredictor(
137 void RunDefaultPredictor(
146 std::map<ObstacleConf::PredictorType, std::unique_ptr<Predictor>> predictors_;
148 ObstacleConf::PredictorType vehicle_on_lane_predictor_ =
149 ObstacleConf::LANE_SEQUENCE_PREDICTOR;
151 ObstacleConf::PredictorType vehicle_off_lane_predictor_ =
152 ObstacleConf::FREE_MOVE_PREDICTOR;
154 ObstacleConf::PredictorType vehicle_in_junction_predictor_ =
155 ObstacleConf::LANE_SEQUENCE_PREDICTOR;
157 ObstacleConf::PredictorType cyclist_on_lane_predictor_ =
158 ObstacleConf::LANE_SEQUENCE_PREDICTOR;
160 ObstacleConf::PredictorType cyclist_off_lane_predictor_ =
161 ObstacleConf::FREE_MOVE_PREDICTOR;
163 ObstacleConf::PredictorType pedestrian_predictor_ =
164 ObstacleConf::FREE_MOVE_PREDICTOR;
166 ObstacleConf::PredictorType default_on_lane_predictor_ =
167 ObstacleConf::LANE_SEQUENCE_PREDICTOR;
169 ObstacleConf::PredictorType default_off_lane_predictor_ =
170 ObstacleConf::FREE_MOVE_PREDICTOR;
172 ObstacleConf::PredictorType vehicle_on_lane_caution_predictor_ =
173 ObstacleConf::MOVE_SEQUENCE_PREDICTOR;
175 ObstacleConf::PredictorType vehicle_in_junction_caution_predictor_ =
176 ObstacleConf::INTERACTION_PREDICTOR;
178 ObstacleConf::PredictorType vehicle_default_caution_predictor_ =
179 ObstacleConf::EXTRAPOLATION_PREDICTOR;
181 PredictionObstacles prediction_obstacles_;
Define the predictor base class.
PredictorManager()
Constructor.
Prediction obstacle.
Definition: obstacle.h:52
Definition: obstacles_container.h:39
Definition: predictor_manager.h:38
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Predictor * GetPredictor(const ObstacleConf::PredictorType &type)
Get predictor.
void Run(const apollo::perception::PerceptionObstacles &perception_obstacles, const ADCTrajectoryContainer *adc_trajectory_container, ObstaclesContainer *obstacles_container)
Execute the predictor generation.
void Init(const PredictionConf &config)
Initializer.
Definition: predictor.h:38
virtual ~PredictorManager()=default
Destructor.
const PredictionObstacles & prediction_obstacles()
Get prediction obstacles.
void PredictObstacle(const ADCTrajectoryContainer *adc_trajectory_container, Obstacle *obstacle, ObstaclesContainer *obstacles_container, PredictionObstacle *const prediction_obstacle)
Predict a single obstacle.
Definition: adc_trajectory_container.h:37