提交 ea715b75 编写于 作者: K kechxu 提交者: Kecheng Xu

Prediction: use free move predictor for slow obstacles

上级 67c74cbb
......@@ -108,6 +108,8 @@ DEFINE_double(still_pedestrian_position_std, 0.5,
"Position standard deviation for still pedestrians");
DEFINE_double(still_unknown_position_std, 0.5,
"Position standard deviation for still unknown obstacles");
DEFINE_double(slow_obstacle_speed_threshold, 2.0,
"Speed threshold for slow 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(dense_lane_gap, 0.2,
......
......@@ -72,6 +72,7 @@ DECLARE_double(still_unknown_speed_threshold);
DECLARE_double(still_obstacle_position_std);
DECLARE_double(still_pedestrian_position_std);
DECLARE_double(still_unknown_position_std);
DECLARE_double(slow_obstacle_speed_threshold);
DECLARE_double(max_history_time);
DECLARE_double(target_lane_gap);
DECLARE_double(dense_lane_gap);
......
......@@ -100,6 +100,11 @@ bool Obstacle::IsStill() {
return true;
}
bool Obstacle::IsSlow() {
const Feature& feature = latest_feature();
return feature.speed() < FLAGS_slow_obstacle_speed_threshold;
}
bool Obstacle::IsOnLane() const {
if (feature_history_.size() > 0) {
if (feature_history_.front().has_lane() &&
......
......@@ -151,6 +151,12 @@ class Obstacle {
*/
bool IsStill();
/**
* @brief Check if the obstacle is slow.
* @return If the obstacle is slow.
*/
bool IsSlow();
/**
* @brief Check if the obstacle is on any lane.
* @return If the obstacle is on any lane.
......
......@@ -270,7 +270,10 @@ void PredictorManager::PredictObstacle(
} else {
switch (obstacle->type()) {
case PerceptionObstacle::VEHICLE: {
if (obstacle->HasJunctionFeatureWithExits() &&
if (obstacle->IsSlow()) {
predictor = GetPredictor(ObstacleConf::FREE_MOVE_PREDICTOR);
CHECK_NOTNULL(predictor);
} else if (obstacle->HasJunctionFeatureWithExits() &&
!obstacle->IsCloseToJunctionExit()) {
predictor = GetPredictor(vehicle_in_junction_predictor_);
CHECK_NOTNULL(predictor);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册