From 2e1b1225916c8de09845388e8582154fa16a9878 Mon Sep 17 00:00:00 2001 From: kechxu Date: Tue, 26 Dec 2017 13:47:57 -0800 Subject: [PATCH] Prediction: fix obstacle is-on-lane logit and adjust lane angle diff --- modules/prediction/common/prediction_gflags.cc | 2 +- modules/prediction/container/obstacles/obstacle.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/prediction/common/prediction_gflags.cc b/modules/prediction/common/prediction_gflags.cc index 09e9ebaeee..43bb4cd557 100644 --- a/modules/prediction/common/prediction_gflags.cc +++ b/modules/prediction/common/prediction_gflags.cc @@ -62,7 +62,7 @@ DEFINE_double(still_obstacle_position_std, 1.0, "Position standard deviation for still obstacles"); DEFINE_double(max_history_time, 7.0, "Obstacles' maximal historical time."); DEFINE_double(target_lane_gap, 2.0, "gap between two lane points."); -DEFINE_double(max_lane_angle_diff, M_PI / 2.0, +DEFINE_double(max_lane_angle_diff, M_PI / 4.0, "Max angle difference for a candiate lane"); DEFINE_bool(enable_pedestrian_acc, false, "Enable calculating speed by acc"); DEFINE_double(coeff_mul_sigma, 2.0, "coefficient multiply standard deviation"); diff --git a/modules/prediction/container/obstacles/obstacle.cc b/modules/prediction/container/obstacles/obstacle.cc index d30386705b..9c7cdb7fa3 100644 --- a/modules/prediction/container/obstacles/obstacle.cc +++ b/modules/prediction/container/obstacles/obstacle.cc @@ -119,7 +119,8 @@ bool Obstacle::IsOnLane() { std::lock_guard lock(mutex_); if (feature_history_.size() > 0) { if (feature_history_.front().has_lane() && - feature_history_.front().lane().has_lane_feature()) { + (feature_history_.front().lane().current_lane_feature_size() > 0 || + feature_history_.front().lane().nearby_lane_feature_size() > 0)) { ADEBUG << "Obstacle [" << id_ << "] is on lane."; return true; } -- GitLab