modules/prediction/README.md
The Prediction module studies and predicts the behavior of all the obstacles detected by the perception module. Prediction receives obstacle data along with basic perception information including positions, headings, velocities, accelerations, and then generates predicted trajectories with probabilities for those obstacles. The prediction module is composed of four sub-modules: Container, Scenario, Evaluator and Predictor.
Note:
The Prediction module only predicts the behavior of obstacles and not the EGO car. The Planning module plans the trajectory of the EGO car.
Container stores input data from subscribed channels. Current supported inputs are perception obstacles, vehicle localization and vehicle planning.
The Scenario sub-module analyzes scenarios that includes the ego vehicle. Currently, we have two defined scenarios:
we also have three defined types of obstacle priority:
The Evaluator predicts path and speed separately for any given obstacle. An evaluator evaluates a path by outputting a probability for it (lane sequence) using the given model stored in prediction/data/.
The list of available evaluators include:
Cost evaluator: probability is calculated by a set of cost functions
MLP evaluator: probability is calculated using an MLP model
RNN evaluator: probability is calculated using an RNN model
Cruise MLP + CNN-1d evaluator: probability is calculated using a mix of MLP and CNN-1d models for the cruise scenario
Junction MLP evaluator: probability is calculated using an MLP model for junction scenario
Junction Map evaluator: probability is calculated using an semantic map-based CNN model for junction scenario. This evaluator was created for caution level obstacles
Social Interaction evaluator: this model is used for pedestrians, for short term trajectory prediction. It uses social LSTM. This evaluator was created for caution level obstacles
Semantic LSTM evaluator: this evaluator is used in the new Caution Obstacle model to generate short term trajectory points which are calculated using CNN and LSTM. Both vehicles and pedestrians are using this same model, but with different parameters
Vectornet LSTM evaluator: this evaluator is used in place of Semantic LSTM evaluator to generate short term trajectory points for "Caution" tagged obstacles.
Jointly prediction planning evaluator: this evaluator is used in the new Interactive Obstacle(vehicle-type) model to generate short term trajectory points which are calculated using Vectornet and LSTM. By considering ADC's trajectory info, the obstacle trajectory prediction can be more accurate under interaction scenario. Please refer jointly prediction planning evaluator.
Predictor generates predicted trajectories for obstacles. Currently, the supported predictors include:
├── prediction
├── common // common code
├── conf // configuration folder
├── container // container sub-module
│ ├── adc_trajectory
│ ├── obstacles
│ ├── pose
│ └── storytelling
├── dag // module startup file
├── data // module configuration parameters
├── evaluator // evaluator sub-module
│ ├── cyclist
│ ├── model_manager
│ ├── pedestrian
│ ├── vehicle
│ └── warm_up
├── images // demo images
├── launch // launch file
├── network // network code
├── pipeline // VectorNet code
├── predictor // predictor sub-module
│ ├── empty
│ ├── extrapolation
│ ├── free_move
│ ├── interaction
│ ├── junction
│ ├── lane_sequence
│ ├── move_sequence
│ ├── sequence
│ └── single_lane
├── proto // configuration proto file
├── scenario // scenario sub-module
│ ├── analyzer
│ ├── feature_extractor
│ ├── interaction_filter
│ ├── prioritization
│ ├── right_of_way
│ └── scenario_features
├── submodules // manage evaluator and predictor submodules
├── testdata // test data
├── BUILD // compile file
├── cyberfile.xml // package management file
├── prediction_component.cc //component entrance
├── prediction_component.h
└── prediction_component_test.cc
| Name | Type | Description | Input channal |
|---|---|---|---|
frame | apollo::perception::PerceptionObstacles | Obstacle message | /apollo/perception/obstacles |
| Name | Type | Description | Output channal |
|---|---|---|---|
frame | apollo::prediction::PredictionObstacles | Obstacle prediction message | /apollo/prediction |
modules/prediction/dag/prediction.dagmodules/prediction/conf/prediction_conf.pb.txttopic_conf: the name of different topic
evaluator_model_conf: the conf of different evaluator model
obstacle_conf: the conf of different obstacle
cyber_launch start modules/prediction/launch/prediction.launch