Skip to content

Commit

Permalink
planning: make scenario/task/conf more organized in planning_config.p…
Browse files Browse the repository at this point in the history
…roto
  • Loading branch information
jmtao committed May 12, 2020
1 parent 4e2873f commit 9beb751
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 146 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ stage_config: {
task_type: SPEED_DECIDER
task_type: SPEED_BOUNDS_FINAL_DECIDER
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
task_type: DECIDER_RSS
task_type: RSS_DECIDER

task_config: {
task_type: PATH_LANE_BORROW_DECIDER
Expand Down Expand Up @@ -119,7 +119,7 @@ stage_config: {
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
}
task_config: {
task_type: DECIDER_RSS
task_type: RSS_DECIDER
}
task_config: {
task_type: RULE_BASED_STOP_DECIDER
Expand Down
4 changes: 2 additions & 2 deletions modules/planning/conf/scenario/emergency_stop_config.pb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ stage_config: {
task_type: SPEED_DECIDER
task_type: SPEED_BOUNDS_FINAL_DECIDER
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
task_type: DECIDER_RSS
task_type: RSS_DECIDER

task_config: {
task_type: PATH_LANE_BORROW_DECIDER
Expand Down Expand Up @@ -55,7 +55,7 @@ stage_config: {
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
}
task_config: {
task_type: DECIDER_RSS
task_type: RSS_DECIDER
}
task_config: {
task_type: RULE_BASED_STOP_DECIDER
Expand Down
4 changes: 2 additions & 2 deletions modules/planning/conf/scenario/lane_follow_config.pb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stage_config: {
task_type: SPEED_BOUNDS_FINAL_DECIDER
# task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
task_type: PIECEWISE_JERK_NONLINEAR_SPEED_OPTIMIZER
task_type: DECIDER_RSS
task_type: RSS_DECIDER

task_config: {
task_type: LANE_CHANGE_DECIDER
Expand Down Expand Up @@ -71,7 +71,7 @@ stage_config: {
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
}
task_config: {
task_type: DECIDER_RSS
task_type: RSS_DECIDER
}
task_config: {
task_type: RULE_BASED_STOP_DECIDER
Expand Down
4 changes: 2 additions & 2 deletions modules/planning/conf/scenario/park_and_go_config.pb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ stage_config:{
task_type: SPEED_DECIDER
task_type: SPEED_BOUNDS_FINAL_DECIDER
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
task_type: DECIDER_RSS
task_type: RSS_DECIDER
task_config: {
task_type: PATH_LANE_BORROW_DECIDER
path_lane_borrow_decider_config {
Expand Down Expand Up @@ -175,7 +175,7 @@ stage_config:{
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
}
task_config: {
task_type: DECIDER_RSS
task_type: RSS_DECIDER
}
task_config: {
task_type: RULE_BASED_STOP_DECIDER
Expand Down
4 changes: 2 additions & 2 deletions modules/planning/conf/scenario/pull_over_config.pb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ stage_config: {
task_type: SPEED_DECIDER
task_type: SPEED_BOUNDS_FINAL_DECIDER
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
task_type: DECIDER_RSS
task_type: RSS_DECIDER

task_config: {
task_type: PATH_LANE_BORROW_DECIDER
Expand Down Expand Up @@ -69,7 +69,7 @@ stage_config: {
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
}
task_config: {
task_type: DECIDER_RSS
task_type: RSS_DECIDER
}
task_config: {
task_type: RULE_BASED_STOP_DECIDER
Expand Down
198 changes: 102 additions & 96 deletions modules/planning/proto/planning_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,64 +11,68 @@ import "modules/planning/proto/task_config.proto";
// tasks are shared among all scenarios and stages.
message TaskConfig {
enum TaskType {
DP_ST_SPEED_OPTIMIZER = 1;
PATH_DECIDER = 4;
SPEED_DECIDER = 5;
NAVI_PATH_DECIDER = 7;
NAVI_SPEED_DECIDER = 8;
NAVI_OBSTACLE_DECIDER = 9;
CREEP_DECIDER = 11;
OPEN_SPACE_PRE_STOP_DECIDER = 12;
DECIDER_RSS = 16;
SPEED_BOUNDS_PRIORI_DECIDER = 17;
SPEED_BOUNDS_FINAL_DECIDER = 18;
PIECEWISE_JERK_PATH_OPTIMIZER = 19;
PATH_BOUNDS_DECIDER = 20;
OPEN_SPACE_ROI_DECIDER = 21;
OPEN_SPACE_TRAJECTORY_PROVIDER = 22;
OPEN_SPACE_TRAJECTORY_PARTITION = 23;
OPEN_SPACE_FALLBACK_DECIDER = 24;
PATH_ASSESSMENT_DECIDER = 25;
PATH_LANE_BORROW_DECIDER = 26;
PIECEWISE_JERK_SPEED_OPTIMIZER = 27;
LANE_CHANGE_DECIDER = 28;
RULE_BASED_STOP_DECIDER = 29;
PATH_REUSE_DECIDER = 30;
ST_BOUNDS_DECIDER = 31;
PIECEWISE_JERK_NONLINEAR_SPEED_OPTIMIZER = 32;
LEARNING_BASED_TASK = 33;
// deciders
CREEP_DECIDER = 1;
LANE_CHANGE_DECIDER = 2;
NAVI_OBSTACLE_DECIDER = 3;
NAVI_PATH_DECIDER = 4;
NAVI_SPEED_DECIDER = 5;
OPEN_SPACE_FALLBACK_DECIDER = 6;
OPEN_SPACE_PRE_STOP_DECIDER = 7;
OPEN_SPACE_ROI_DECIDER = 8;
PATH_ASSESSMENT_DECIDER = 9;
PATH_BOUNDS_DECIDER = 10;
PATH_DECIDER = 11;
PATH_LANE_BORROW_DECIDER = 12;
PATH_REUSE_DECIDER = 13;
RSS_DECIDER = 14;
RULE_BASED_STOP_DECIDER = 15;
SPEED_BOUNDS_PRIORI_DECIDER = 16;
SPEED_BOUNDS_FINAL_DECIDER = 17;
SPEED_DECIDER = 18;
ST_BOUNDS_DECIDER = 19;
// optimizers
OPEN_SPACE_TRAJECTORY_PARTITION = 20;
OPEN_SPACE_TRAJECTORY_PROVIDER = 21;
DP_ST_SPEED_OPTIMIZER = 22;
PIECEWISE_JERK_NONLINEAR_SPEED_OPTIMIZER = 23;
PIECEWISE_JERK_PATH_OPTIMIZER = 24;
PIECEWISE_JERK_SPEED_OPTIMIZER = 25;
// other tasks
LEARNING_BASED_TASK = 26;
};

optional TaskType task_type = 1;
oneof task_config {
SpeedHeuristicConfig speed_heuristic_config = 3;
PathDeciderConfig path_decider_config = 7;
CreepDeciderConfig creep_decider_config = 10;
OpenSpacePreStopDeciderConfig open_space_pre_stop_decider_config = 11;
SpeedBoundsDeciderConfig speed_bounds_decider_config = 15;
PiecewiseJerkPathConfig piecewise_jerk_path_config = 16;
PathBoundsDeciderConfig path_bounds_decider_config = 17;
OpenSpaceFallBackDeciderConfig open_space_fallback_decider_config = 18;
OpenSpaceRoiDeciderConfig open_space_roi_decider_config = 19;
OpenSpaceTrajectoryProviderConfig
open_space_trajectory_provider_config = 20;
// deciders
CreepDeciderConfig creep_decider_config = 2;
LaneChangeDeciderConfig lane_change_decider_config = 3;
OpenSpaceFallBackDeciderConfig open_space_fallback_decider_config = 4;
OpenSpacePreStopDeciderConfig open_space_pre_stop_decider_config = 5;
OpenSpaceRoiDeciderConfig open_space_roi_decider_config = 6;
PathAssessmentDeciderConfig path_assessment_decider_config = 7;
PathBoundsDeciderConfig path_bounds_decider_config = 8;
PathDeciderConfig path_decider_config = 9;
PathLaneBorrowDeciderConfig path_lane_borrow_decider_config = 10;
PathReuseDeciderConfig path_reuse_decider_config = 11;
RuleBasedStopDeciderConfig rule_based_stop_decider_config = 12;
SpeedBoundsDeciderConfig speed_bounds_decider_config = 13;
STBoundsDeciderConfig st_bounds_decider_config = 14;
// optimizers
OpenSpaceTrajectoryPartitionConfig
open_space_trajectory_partition_config = 21;
PathAssessmentDeciderConfig path_assessment_decider_config = 22;
PiecewiseJerkSpeedConfig piecewise_jerk_speed_config = 23;
PathLaneBorrowDeciderConfig path_lane_borrow_decider_config = 24;
LaneChangeDeciderConfig lane_change_decider_config = 25;
RuleBasedStopDeciderConfig rule_based_stop_decider_config = 26;
PathReuseDeciderConfig path_reuse_decider_config = 27;
STBoundsDeciderConfig st_bounds_decider_config = 28;
PiecewiseJerkNonlinearSpeedConfig piecewise_jerk_nonlinear_speed_config =
29;
LearningBasedTaskConfig learning_based_task_config = 30;
open_space_trajectory_partition_config = 15;
OpenSpaceTrajectoryProviderConfig
open_space_trajectory_provider_config = 16;
SpeedHeuristicConfig speed_heuristic_config = 17;
PiecewiseJerkNonlinearSpeedConfig
piecewise_jerk_nonlinear_speed_config = 18;
PiecewiseJerkPathConfig piecewise_jerk_path_config = 19;
PiecewiseJerkSpeedConfig piecewise_jerk_speed_config = 20;
// other tasks
LearningBasedTaskConfig learning_based_task_config = 21;
}
}

message ScenarioLaneFollowConfig {
}

message ScenarioBareIntersectionUnprotectedConfig {
optional double start_bare_intersection_scenario_distance = 1
[default = 25.0]; // meter
Expand All @@ -81,6 +85,51 @@ message ScenarioBareIntersectionUnprotectedConfig {
optional float creep_timeout_sec = 7 [default = 10.0]; // sec
}

message ScenarioEmergencyPullOverConfig {
optional double max_stop_deceleration = 1 [default = 3.0];
optional double slow_down_deceleration_time = 2 [default = 3.0]; // second
optional double target_slow_down_speed = 3 [default = 2.5]; // m/s
optional double stop_distance = 4 [default = 1.5]; // meter
}

message ScenarioEmergencyStopConfig {
optional double max_stop_deceleration = 1 [default = 6.0];
optional double stop_distance = 2 [default = 1.0]; // meter
}

message ScenarioLaneFollowConfig {
}

message ScenarioLearningModelSampleConfig {
}

message ScenarioNarrowStreetUTurnConfig {
}

message ScenarioParkAndGoConfig {
optional double front_obstacle_buffer = 1 [default = 4.0]; // meter
optional double heading_buffer = 2 [default = 0.5]; // rad
optional double min_dist_to_dest = 3 [default = 25.0]; // meter
optional double max_steering_percentage_when_cruise = 4 [default = 90.0];
}

message ScenarioPullOverConfig {
optional double start_pull_over_scenario_distance = 1
[default = 50.0]; // meter
optional double pull_over_min_distance_buffer = 2 [default = 10.0]; // meter
// keep the same value as pull_over_destination_to_adc_buffer in
// PathBoundsDeciderConfig
optional double max_distance_stop_search = 3 [default = 25.0]; // meter
optional double max_s_error_to_end_point = 4 [default = 0.2];
optional double max_l_error_to_end_point = 5 [default = 0.5];
optional double max_theta_error_to_end_point = 6 [default = 0.2];
optional double max_distance_error_to_end_point = 7 [default = 0.2];
optional double pass_destination_threshold = 8 [default = 10.0];
optional double max_valid_stop_distance = 9 [default = 1.0];
optional double s_distance_to_stop_for_open_space_parking = 10
[default = 7.0];
}

message ScenarioStopSignUnprotectedConfig {
optional double start_stop_sign_scenario_distance = 1
[default = 5.0]; // meter
Expand Down Expand Up @@ -123,50 +172,11 @@ message ScenarioTrafficLightUnprotectedRightTurnConfig {
optional double max_adc_speed_before_creep = 7 [default = 3.0]; // m/s
}

message ScenarioPullOverConfig {
optional double start_pull_over_scenario_distance = 1
[default = 50.0]; // meter
optional double pull_over_min_distance_buffer = 2 [default = 10.0]; // meter
// keep the same value as pull_over_destination_to_adc_buffer in
// PathBoundsDeciderConfig
optional double max_distance_stop_search = 3 [default = 25.0]; // meter
optional double max_s_error_to_end_point = 4 [default = 0.2];
optional double max_l_error_to_end_point = 5 [default = 0.5];
optional double max_theta_error_to_end_point = 6 [default = 0.2];
optional double max_distance_error_to_end_point = 7 [default = 0.2];
optional double pass_destination_threshold = 8 [default = 10.0];
optional double max_valid_stop_distance = 9 [default = 1.0];
optional double s_distance_to_stop_for_open_space_parking = 10
[default = 7.0];
}

message ScenarioEmergencyPullOverConfig {
optional double max_stop_deceleration = 1 [default = 3.0];
optional double slow_down_deceleration_time = 2 [default = 3.0]; // second
optional double target_slow_down_speed = 3 [default = 2.5]; // m/s
optional double stop_distance = 4 [default = 1.5]; // meter
}

message ScenarioEmergencyStopConfig {
optional double max_stop_deceleration = 1 [default = 6.0];
optional double stop_distance = 2 [default = 1.0]; // meter
}

message ScenarioValetParkingConfig {
optional double parking_spot_range_to_start = 1 [default = 20.0];
optional double max_valid_stop_distance = 2 [default = 1.0]; // meter
}

message ScenarioNarrowStreetUTurnConfig {
}

message ScenarioParkAndGoConfig {
optional double front_obstacle_buffer = 1 [default = 4.0]; // meter
optional double heading_buffer = 2 [default = 0.5]; // rad
optional double min_dist_to_dest = 3 [default = 25.0]; // meter
optional double max_steering_percentage_when_cruise = 4 [default = 90.0];
}

message ScenarioYieldSignConfig {
optional double start_yield_sign_scenario_distance = 1
[default = 10.0]; // meter
Expand All @@ -175,11 +185,7 @@ message ScenarioYieldSignConfig {
optional float creep_timeout_sec = 4 [default = 10.0]; // sec
}

message ScenarioLearningModelSampleConfig {
}

// scenario configs
// next id: 19
message ScenarioConfig {
enum ScenarioType {
LANE_FOLLOW = 0; // default scenario
Expand Down Expand Up @@ -274,8 +280,8 @@ message ScenarioConfig {
message StageConfig {
optional StageType stage_type = 1;
optional bool enabled = 2 [default = true];
// an ordered list of tasks that are used at runtime. Its order determines
// the runtime order of the tasks.
// an ordered list of tasks that are used at runtime.
// the order determines the runtime order of the tasks.
repeated TaskConfig.TaskType task_type = 3;
// an unordered task configurations
repeated TaskConfig task_config = 4;
Expand Down
Loading

0 comments on commit 9beb751

Please sign in to comment.