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

Prediction: minor refactor

上级 a3bd8d57
......@@ -145,7 +145,7 @@ void FeatureOutput::WriteFrameEnv() {
const std::string file_name =
FLAGS_prediction_data_dir + "/frame_env." +
std::to_string(idx_frame_env_) + ".bin";
common::util::SetProtoToBinaryFile(list_frame_env_, file_name);
cyber::common::SetProtoToBinaryFile(list_frame_env_, file_name);
list_frame_env_.Clear();
++idx_frame_env_;
}
......
......@@ -174,6 +174,8 @@ DEFINE_double(default_s_if_no_obstacle_in_lane_sequence, 1000.0,
"The default s value if no obstacle in the lane sequence.");
DEFINE_double(default_l_if_no_obstacle_in_lane_sequence, 10.0,
"The default l value if no obstacle in the lane sequence.");
DEFINE_bool(enable_build_current_frame_env, false,
"If build current frame environment");
// Obstacle trajectory
DEFINE_bool(enable_cruise_regression, false,
......
......@@ -111,6 +111,7 @@ DECLARE_double(distance_to_slow_down_at_stop_sign);
DECLARE_double(time_to_center_if_not_reach);
DECLARE_double(default_s_if_no_obstacle_in_lane_sequence);
DECLARE_double(default_l_if_no_obstacle_in_lane_sequence);
DECLARE_bool(enable_build_current_frame_env);
// Obstacle trajectory
DECLARE_bool(enable_cruise_regression);
......
......@@ -17,9 +17,11 @@
#include "modules/prediction/evaluator/evaluator_manager.h"
#include <vector>
#include <algorithm>
#include "modules/prediction/common/feature_output.h"
#include "modules/prediction/common/prediction_system_gflags.h"
#include "modules/prediction/common/prediction_gflags.h"
#include "modules/prediction/container/container_manager.h"
#include "modules/prediction/container/obstacles/obstacles_container.h"
#include "modules/prediction/container/pose/pose_container.h"
......@@ -131,7 +133,9 @@ void EvaluatorManager::Run() {
AdapterConfig::PERCEPTION_OBSTACLES);
CHECK_NOTNULL(obstacles_container);
BuildCurrentFrameEnv();
if (FLAGS_enable_build_current_frame_env) {
BuildCurrentFrameEnv();
}
std::vector<Obstacle*> dynamic_env;
for (int id : obstacles_container->curr_frame_predictable_obstacle_ids()) {
......
......@@ -66,7 +66,6 @@ class EvaluatorManager {
void EvaluateObstacle(Obstacle* obstacle);
private:
void BuildCurrentFrameEnv();
/**
......
......@@ -109,10 +109,6 @@ message Feature {
repeated PredictionTrajectoryPoint future_trajectory_points = 31;
}
message Features {
repeated Feature feature = 1;
}
message ObstacleHistory {
repeated Feature feature = 1;
optional bool is_trainable = 2 [default = false];
......
......@@ -43,3 +43,7 @@ message ListPredictionResult {
message ListFrameEnv {
repeated FrameEnv frame_env = 1;
}
message Features {
repeated Feature feature = 1;
}
......@@ -38,4 +38,5 @@ fi
--prediction_offline_mode=4 \
--prediction_offline_bags=${SRC_DIR} \
--prediction_data_dir=${TARGET_DIR} \
--max_num_dump_feature=1000
--max_num_dump_feature=1000 \
--enable_build_current_frame_env
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册