提交 1eac463c 编写于 作者: K kechxu 提交者: Calvin Miao

Prediction: fix a bug

上级 a9df3353
......@@ -96,10 +96,6 @@ void PredictorManager::Run(const PerceptionObstacles& perception_obstacles) {
for (const auto& perception_obstacle :
perception_obstacles.perception_obstacle()) {
PredictionObstacle prediction_obstacle;
prediction_obstacle.set_predicted_period(FLAGS_prediction_duration);
prediction_obstacle.set_timestamp(perception_obstacle.timestamp());
prediction_obstacle.mutable_perception_obstacle()->
CopyFrom(perception_obstacle);
int id = perception_obstacle.id();
Obstacle* obstacle = container->GetObstacle(id);
......@@ -133,6 +129,11 @@ void PredictorManager::Run(const PerceptionObstacles& perception_obstacles) {
}
}
prediction_obstacle.set_predicted_period(FLAGS_prediction_duration);
prediction_obstacle.set_timestamp(perception_obstacle.timestamp());
prediction_obstacle.mutable_perception_obstacle()->
CopyFrom(perception_obstacle);
prediction_obstacles_.add_prediction_obstacle()->
CopyFrom(prediction_obstacle);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册