Skip to content

Commit

Permalink
Prediction: only apply new pedestrian model on caution-level pedestrians
Browse files Browse the repository at this point in the history
  • Loading branch information
kechxu authored and HongyiSun committed Jun 20, 2019
1 parent 51eff7b commit 1ea2fee
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions modules/prediction/evaluator/evaluator_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ void EvaluatorManager::Init(const PredictionConf& config) {
break;
}
case PerceptionObstacle::PEDESTRIAN: {
pedestrian_evaluator_ = obstacle_conf.evaluator_type();
break;
if (obstacle_conf.priority_type() == ObstaclePriority::CAUTION) {
pedestrian_evaluator_ = obstacle_conf.evaluator_type();
break;
}
}
case PerceptionObstacle::UNKNOWN: {
if (obstacle_conf.obstacle_status() == ObstacleConf::ON_LANE) {
Expand Down Expand Up @@ -281,10 +283,13 @@ void EvaluatorManager::EvaluateObstacle(Obstacle* obstacle,
break;
}
case PerceptionObstacle::PEDESTRIAN: {
evaluator = GetEvaluator(pedestrian_evaluator_);
CHECK_NOTNULL(evaluator);
evaluator->Evaluate(obstacle);
break;
if (obstacle->latest_feature().priority().priority() ==
ObstaclePriority::CAUTION) {
evaluator = GetEvaluator(pedestrian_evaluator_);
CHECK_NOTNULL(evaluator);
evaluator->Evaluate(obstacle);
break;
}
}
default: {
if (obstacle->IsOnLane()) {
Expand Down

0 comments on commit 1ea2fee

Please sign in to comment.