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

Prediction: dump obstacle conf info to prediction results

上级 fdb2beee
......@@ -116,7 +116,8 @@ void FeatureOutput::InsertDataForLearning(
}
void FeatureOutput::InsertPredictionResult(
const int obstacle_id, const PredictionObstacle& prediction_obstacle) {
const int obstacle_id, const PredictionObstacle& prediction_obstacle,
const ObstacleConf& obstacle_conf) {
PredictionResult* prediction_result =
list_prediction_result_.add_prediction_result();
prediction_result->set_id(obstacle_id);
......@@ -124,6 +125,7 @@ void FeatureOutput::InsertPredictionResult(
for (int i = 0; i < prediction_obstacle.trajectory_size(); ++i) {
prediction_result->add_trajectory()->CopyFrom(
prediction_obstacle.trajectory(i));
prediction_result->mutable_obstacle_conf()->CopyFrom(obstacle_conf);
}
}
......
......@@ -74,7 +74,8 @@ class FeatureOutput {
* @param prediction_obstacle
*/
static void InsertPredictionResult(
const int obstacle_id, const PredictionObstacle& prediction_obstacle);
const int obstacle_id, const PredictionObstacle& prediction_obstacle,
const ObstacleConf& obstacle_conf);
/**
* @brief Insert a frame env
......
......@@ -249,6 +249,8 @@ class Obstacle {
void SetPredictorType(const ObstacleConf::PredictorType& predictor_type);
const ObstacleConf& obstacle_conf() { return obstacle_conf_; }
private:
Obstacle() = default;
......
......@@ -21,6 +21,7 @@
#include <unordered_map>
#include "modules/prediction/common/feature_output.h"
#include "modules/prediction/common/prediction_constants.h"
#include "modules/prediction/common/prediction_gflags.h"
#include "modules/prediction/common/prediction_system_gflags.h"
#include "modules/prediction/common/prediction_thread_pool.h"
......@@ -321,8 +322,10 @@ void PredictorManager::PredictObstacle(
prediction_obstacle->mutable_priority()->CopyFrom(
obstacle->latest_feature().priority());
prediction_obstacle->set_is_static(obstacle->IsStill());
if (FLAGS_prediction_offline_mode == 3) {
FeatureOutput::InsertPredictionResult(obstacle->id(), *prediction_obstacle);
if (FLAGS_prediction_offline_mode ==
PredictionConstants::kDumpPredictionResult) {
FeatureOutput::InsertPredictionResult(obstacle->id(), *prediction_obstacle,
obstacle->obstacle_conf());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册