Skip to content

Commit

Permalink
planning: disable enable_polynomial_speed_fallback by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
ycool authored and lianglia-apollo committed Aug 24, 2018
1 parent ff6d6ef commit a832dbc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions modules/planning/common/planning_gflags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ DEFINE_bool(use_planning_fallback, true,
DEFINE_double(fallback_total_time, 3.0, "total fallback trajectory time");
DEFINE_double(fallback_time_unit, 0.02,
"fallback trajectory unit time in seconds");
DEFINE_bool(enable_polynomial_speed_fallback, false,
"True to enable polynomial speed fallback.");

// navigation mode
DEFINE_double(navigation_fallback_cruise_time, 8.0,
Expand Down
1 change: 1 addition & 0 deletions modules/planning/common/planning_gflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ DECLARE_double(nudge_buffer);
DECLARE_bool(use_planning_fallback);
DECLARE_double(fallback_total_time);
DECLARE_double(fallback_time_unit);
DECLARE_bool(enable_polynomial_speed_fallback);

// navigation mode
DECLARE_double(navigation_fallback_cruise_time);
Expand Down
6 changes: 3 additions & 3 deletions modules/planning/planner/em/em_planner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,11 @@ void EMPlanner::GenerateFallbackPathProfile(

void EMPlanner::GenerateFallbackSpeedProfile(
const ReferenceLineInfo* reference_line_info, SpeedData* speed_data) {
*speed_data = GenerateStopProfileFromPolynomial(
if (FLAGS_enable_polynomial_speed_fallback) {
*speed_data = GenerateStopProfileFromPolynomial(
reference_line_info->AdcPlanningPoint().v(),
reference_line_info->AdcPlanningPoint().a());

if (speed_data->Empty()) {
} else {
*speed_data =
GenerateStopProfile(reference_line_info->AdcPlanningPoint().v(),
reference_line_info->AdcPlanningPoint().a());
Expand Down

0 comments on commit a832dbc

Please sign in to comment.