提交 c769fd73 编写于 作者: K kechxu 提交者: PAN Jiacheng

Prediction: refactor some junction related parameters

上级 fb259f4f
......@@ -90,7 +90,7 @@ void JunctionAnalyzer::SetAllJunctionExits() {
std::vector<JunctionExit> JunctionAnalyzer::GetJunctionExits(
const std::string& start_lane_id) {
// TODO(hongyi) make this a gflag
int max_search_level = 5;
int max_search_level = 6;
std::vector<JunctionExit> junction_exits;
std::queue<std::pair<ConstLaneInfoPtr, int>> lane_info_queue;
......
......@@ -25,7 +25,7 @@ DEFINE_double(prediction_trajectory_time_length, 8.0,
"Time length of predicted trajectory (in seconds)");
DEFINE_double(prediction_trajectory_time_resolution, 0.1,
"Time resolution of predicted trajectory (in seconds");
DEFINE_double(min_prediction_trajectory_spatial_length, 20.0,
DEFINE_double(min_prediction_trajectory_spatial_length, 100.0,
"Minimal spatial length of predicted trajectory");
DEFINE_bool(enable_trajectory_validation_check, false,
"If check the validity of prediction trajectory.");
......
......@@ -24,7 +24,7 @@ obstacle_conf {
obstacle_status: IN_JUNCTION
priority_type: NORMAL
evaluator_type: JUNCTION_MLP_EVALUATOR
predictor_type: INTERACTION_PREDICTOR
predictor_type: LANE_SEQUENCE_PREDICTOR
}
obstacle_conf {
obstacle_type: VEHICLE
......
......@@ -1028,7 +1028,7 @@ void Obstacle::BuildLaneGraph() {
double road_graph_search_distance = std::fmax(
estimated_move_distance, FLAGS_min_prediction_trajectory_spatial_length);
bool is_in_junction = feature->has_junction_feature();
bool is_in_junction = HasJunctionFeatureWithExits();
std::unordered_set<std::string> exit_lane_id_set;
if (is_in_junction) {
for (const auto& exit : feature->junction_feature().junction_exit()) {
......@@ -1212,7 +1212,7 @@ void Obstacle::BuildLaneGraphFromLeftToRight() {
return;
}
bool is_in_junction = feature->has_junction_feature();
bool is_in_junction = HasJunctionFeatureWithExits();
std::unordered_set<std::string> exit_lane_id_set;
if (is_in_junction) {
for (const auto& exit : feature->junction_feature().junction_exit()) {
......
......@@ -144,11 +144,7 @@ bool JunctionMLPEvaluator::Evaluate(Obstacle* obstacle_ptr) {
latest_feature_ptr->raw_velocity().x());
double d_idx = (angle / (2.0 * M_PI) + 1.0 / 24.0) * 12.0;
int idx = static_cast<int>(floor(d_idx >= 0 ? d_idx : d_idx + 12));
int prev_idx = idx == 0 ? 11 : idx - 1;
int post_idx = idx == 11 ? 0 : idx + 1;
junction_exit_prob[junction_exit.exit_lane_id()] =
probability[idx] * 0.5 + probability[prev_idx] * 0.25 +
probability[post_idx] * 0.25;
junction_exit_prob[junction_exit.exit_lane_id()] = probability[idx];
}
for (int i = 0; i < lane_graph_ptr->lane_sequence_size(); ++i) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册