提交 b74a3d58 编写于 作者: J jmtao 提交者: Xiangquan Xiao

planning: naming changes to make naming conversion consistent

上级 a8d047a9
......@@ -61,7 +61,7 @@ stage_config: {
stage_config: {
stage_type: BARE_INTERSECTION_UNPROTECTED_CREEP
enabled: true
task_type: DECIDER_CREEP
task_type: CREEP_DECIDER
task_type: PATH_LANE_BORROW_DECIDER
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
......@@ -74,8 +74,8 @@ stage_config: {
task_type: SPEED_BOUNDS_FINAL_DECIDER
task_type: PROCEED_WITH_CAUTION_SPEED
task_config: {
task_type: DECIDER_CREEP
decider_creep_config: {
task_type: CREEP_DECIDER
creep_decider_config: {
stop_distance: 0.3
speed_limit: 1.0
max_valid_stop_distance: 0.4
......
......@@ -115,7 +115,7 @@ stage_config: {
stage_config: {
stage_type: STOP_SIGN_UNPROTECTED_CREEP
enabled: true
task_type: DECIDER_CREEP
task_type: CREEP_DECIDER
task_type: PATH_LANE_BORROW_DECIDER
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
......@@ -129,8 +129,8 @@ stage_config: {
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
# task_type: PROCEED_WITH_CAUTION_SPEED
task_config: {
task_type: DECIDER_CREEP
decider_creep_config: {
task_type: CREEP_DECIDER
creep_decider_config: {
stop_distance: 0.3
speed_limit: 1.0
max_valid_stop_distance: 0.4
......
......@@ -13,7 +13,7 @@ stage_type: TRAFFIC_LIGHT_UNPROTECTED_LEFT_TURN_INTERSECTION_CRUISE
stage_config: {
stage_type: TRAFFIC_LIGHT_UNPROTECTED_LEFT_TURN_CREEP
enabled: true
task_type: DECIDER_CREEP
task_type: CREEP_DECIDER
task_type: PATH_LANE_BORROW_DECIDER
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
......@@ -26,8 +26,8 @@ stage_config: {
task_type: SPEED_BOUNDS_FINAL_DECIDER
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
task_config: {
task_type: DECIDER_CREEP
decider_creep_config: {
task_type: CREEP_DECIDER
creep_decider_config: {
stop_distance: 0.3
speed_limit: 1.0
max_valid_stop_distance: 0.4
......
......@@ -64,7 +64,7 @@ stage_config: {
stage_config: {
stage_type: TRAFFIC_LIGHT_UNPROTECTED_RIGHT_TURN_CREEP
enabled: true
task_type: DECIDER_CREEP
task_type: CREEP_DECIDER
task_type: PATH_LANE_BORROW_DECIDER
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
......@@ -77,8 +77,8 @@ stage_config: {
task_type: SPEED_BOUNDS_FINAL_DECIDER
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
task_config: {
task_type: DECIDER_CREEP
decider_creep_config: {
task_type: CREEP_DECIDER
creep_decider_config: {
stop_distance: 0.3
speed_limit: 1.0
max_valid_stop_distance: 0.4
......
......@@ -2,7 +2,7 @@ syntax = "proto2";
package apollo.planning;
message DeciderCreepConfig {
message CreepDeciderConfig {
// stop distance(m) to the creeping stop fence while creeping
optional double stop_distance = 1 [default = 0.5]; // meter
optional double speed_limit = 2 [default = 1.0]; // m/s
......
......@@ -39,7 +39,7 @@ message TaskConfig {
NAVI_PATH_DECIDER = 7;
NAVI_SPEED_DECIDER = 8;
NAVI_OBSTACLE_DECIDER = 9;
DECIDER_CREEP = 11;
CREEP_DECIDER = 11;
OPEN_SPACE_PRE_STOP_DECIDER = 12;
PROCEED_WITH_CAUTION_SPEED = 15;
DECIDER_RSS = 16;
......@@ -62,7 +62,7 @@ message TaskConfig {
DpStSpeedConfig dp_st_speed_config = 3;
PathDeciderConfig path_decider_config = 7;
ProceedWithCautionSpeedConfig proceed_with_caution_speed_config = 8;
DeciderCreepConfig decider_creep_config = 10;
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;
......
......@@ -25,7 +25,7 @@ cc_library(
"//modules/planning/proto:planning_proto",
"//modules/planning/scenarios:scenario",
"//modules/planning/scenarios:stage_intersection_cruise_impl",
"//modules/planning/tasks/deciders:decider",
"//modules/planning/tasks/deciders/creep_decider",
"@eigen",
],
)
......
......@@ -30,7 +30,7 @@ cc_library(
"//modules/planning/scenarios:scenario",
"//modules/planning/scenarios:stage_intersection_cruise_impl",
"//modules/planning/scenarios/util:scenario_util_lib",
"//modules/planning/tasks/deciders:decider",
"//modules/planning/tasks/deciders/creep_decider",
"@eigen",
],
)
......
......@@ -33,7 +33,7 @@
#include "modules/planning/common/speed_profile_generator.h"
#include "modules/planning/common/util/util.h"
#include "modules/planning/scenarios/util/util.h"
#include "modules/planning/tasks/deciders/decider_creep.h"
#include "modules/planning/tasks/deciders/creep_decider/creep_decider.h"
namespace apollo {
namespace planning {
......@@ -81,7 +81,7 @@ Stage::StageStatus StopSignUnprotectedStageCreep::Process(
const double wait_time =
Clock::NowInSeconds() - GetContext()->creep_start_time;
const double timeout_sec = scenario_config_.creep_timeout_sec();
auto* task = dynamic_cast<DeciderCreep*>(FindTask(TaskConfig::DECIDER_CREEP));
auto* task = dynamic_cast<CreepDecider*>(FindTask(TaskConfig::CREEP_DECIDER));
if (task == nullptr) {
AERROR << "task is nullptr";
......@@ -104,7 +104,7 @@ Stage::StageStatus StopSignUnprotectedStageCreep::Process(
}
// set param for PROCEED_WITH_CAUTION_SPEED
// dynamic_cast<DeciderCreep*>(FindTask(TaskConfig::DECIDER_CREEP))
// dynamic_cast<CreepDecider*>(FindTask(TaskConfig::CREEP_DECIDER))
// ->SetProceedWithCautionSpeedParam(*frame, reference_line_info,
// stop_sign_end_s);
......
......@@ -33,7 +33,6 @@
#include "modules/planning/common/planning_context.h"
#include "modules/planning/common/util/util.h"
#include "modules/planning/scenarios/util/util.h"
#include "modules/planning/tasks/deciders/decider_creep.h"
namespace apollo {
namespace planning {
......
......@@ -25,7 +25,6 @@ cc_library(
"//modules/planning/scenarios:scenario",
"//modules/planning/scenarios:stage_intersection_cruise_impl",
"//modules/planning/scenarios/util:scenario_util_lib",
"//modules/planning/tasks/deciders:decider",
"@eigen",
],
)
......
......@@ -24,7 +24,7 @@ cc_library(
"//modules/planning/proto:planning_proto",
"//modules/planning/scenarios:scenario",
"//modules/planning/scenarios:stage_intersection_cruise_impl",
"//modules/planning/tasks/deciders:decider",
"//modules/planning/tasks/deciders/creep_decider",
"@eigen",
],
)
......
......@@ -31,7 +31,7 @@
#include "modules/common/vehicle_state/vehicle_state_provider.h"
#include "modules/planning/common/frame.h"
#include "modules/planning/common/planning_context.h"
#include "modules/planning/tasks/deciders/decider_creep.h"
#include "modules/planning/tasks/deciders/creep_decider/creep_decider.h"
namespace apollo {
namespace planning {
......
......@@ -27,7 +27,7 @@ cc_library(
"//modules/planning/scenarios:scenario",
"//modules/planning/scenarios:stage_intersection_cruise_impl",
"//modules/planning/scenarios/util:scenario_util_lib",
"//modules/planning/tasks/deciders:decider",
"//modules/planning/tasks/deciders/creep_decider",
"@eigen",
],
)
......
......@@ -34,7 +34,7 @@
#include "modules/planning/common/planning_context.h"
#include "modules/planning/common/util/util.h"
#include "modules/planning/scenarios/util/util.h"
#include "modules/planning/tasks/deciders/decider_creep.h"
#include "modules/planning/tasks/deciders/creep_decider/creep_decider.h"
namespace apollo {
namespace planning {
......@@ -107,7 +107,7 @@ Stage::StageStatus TrafficLightUnprotectedRightTurnStageCreep::Process(
const double wait_time =
Clock::NowInSeconds() - GetContext()->creep_start_time;
const double timeout_sec = scenario_config_.creep_timeout_sec();
auto* task = dynamic_cast<DeciderCreep*>(FindTask(TaskConfig::DECIDER_CREEP));
auto* task = dynamic_cast<CreepDecider*>(FindTask(TaskConfig::CREEP_DECIDER));
if (task &&
task->CheckCreepDone(*frame, reference_line_info, traffic_light->end_s,
wait_time, timeout_sec)) {
......@@ -115,7 +115,7 @@ Stage::StageStatus TrafficLightUnprotectedRightTurnStageCreep::Process(
}
// set param for PROCEED_WITH_CAUTION_SPEED
// dynamic_cast<DeciderCreep*>(FindTask(TaskConfig::DECIDER_CREEP))
// dynamic_cast<CreepDecider*>(FindTask(TaskConfig::CREEP_DECIDER))
// ->SetProceedWithCautionSpeedParam(*frame, reference_line_info,
// traffic_light.end_s);
......
......@@ -36,7 +36,7 @@ cc_library(
deps = [
":task",
"//modules/planning/proto:planning_config_proto",
"//modules/planning/tasks/deciders:decider",
"//modules/planning/tasks/deciders/creep_decider",
"//modules/planning/tasks/deciders/lane_change_decider",
"//modules/planning/tasks/deciders/open_space_decider:open_space_fallback_decider",
"//modules/planning/tasks/deciders/open_space_decider:open_space_pre_stop_decider",
......@@ -45,6 +45,7 @@ cc_library(
"//modules/planning/tasks/deciders/path_bounds_decider",
"//modules/planning/tasks/deciders/path_lane_borrow_decider",
"//modules/planning/tasks/deciders/rule_based_stop_decider",
"//modules/planning/tasks/deciders/speed_bounds_decider",
"//modules/planning/tasks/optimizers/open_space_trajectory_generation:open_space_trajectory_provider",
"//modules/planning/tasks/optimizers/open_space_trajectory_partition",
"//modules/planning/tasks/optimizers/path_decider",
......
......@@ -2,31 +2,6 @@ load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])
cc_library(
name = "decider",
srcs = [
"decider_creep.cc",
],
hdrs = [
"decider_creep.h",
],
copts = ["-DMODULE_NAME=\\\"planning\\\""],
deps = [
":decider_base",
"//modules/perception/proto:perception_proto",
"//modules/planning/common:planning_context",
"//modules/planning/common:planning_gflags",
"//modules/planning/common:reference_line_info",
"//modules/planning/common:st_graph_data",
"//modules/planning/common/util:common_lib",
"//modules/planning/common/util:util_lib",
"//modules/planning/math/piecewise_jerk:piecewise_jerk_path_problem",
"//modules/planning/scenarios/util:scenario_util_lib",
"//modules/planning/tasks/deciders/speed_bounds_decider",
"//modules/planning/tasks/deciders/speed_bounds_decider:st_boundary_mapper",
],
)
cc_library(
name = "path_decider_obstacle_utils",
srcs = [
......
load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])
cc_library(
name = "creep_decider",
srcs = [
"creep_decider.cc",
],
hdrs = [
"creep_decider.h",
],
copts = ["-DMODULE_NAME=\\\"planning\\\""],
deps = [
"//modules/planning/common:planning_context",
"//modules/planning/common:reference_line_info",
"//modules/planning/common/util:common_lib",
"//modules/planning/common/util:util_lib",
"//modules/planning/scenarios/util:scenario_util_lib",
"//modules/planning/tasks/deciders:decider_base",
],
)
cpplint()
......@@ -18,7 +18,7 @@
* @file
**/
#include "modules/planning/tasks/deciders/decider_creep.h"
#include "modules/planning/tasks/deciders/creep_decider/creep_decider.h"
#include <string>
#include <vector>
......@@ -35,14 +35,14 @@ namespace planning {
using common::Status;
using hdmap::PathOverlap;
uint32_t DeciderCreep::creep_clear_counter_ = 0;
uint32_t CreepDecider::creep_clear_counter_ = 0;
DeciderCreep::DeciderCreep(const TaskConfig& config) : Decider(config) {
CHECK(config_.has_decider_creep_config());
SetName("DeciderCreep");
CreepDecider::CreepDecider(const TaskConfig& config) : Decider(config) {
CHECK(config_.has_creep_decider_config());
SetName("CreepDecider");
}
Status DeciderCreep::Process(Frame* frame,
Status CreepDecider::Process(Frame* frame,
ReferenceLineInfo* reference_line_info) {
CHECK_NOTNULL(frame);
CHECK_NOTNULL(reference_line_info);
......@@ -90,27 +90,27 @@ Status DeciderCreep::Process(Frame* frame,
stop_line_s + FindCreepDistance(*frame, *reference_line_info);
const std::vector<std::string> wait_for_obstacles;
util::BuildStopDecision(virtual_obstacle_id, creep_stop_s,
config_.decider_creep_config().stop_distance(),
config_.creep_decider_config().stop_distance(),
StopReasonCode::STOP_REASON_CREEPER,
wait_for_obstacles, "DeciderCreep", frame,
wait_for_obstacles, "CreepDecider", frame,
reference_line_info);
}
return Status::OK();
}
double DeciderCreep::FindCreepDistance(
double CreepDecider::FindCreepDistance(
const Frame& frame, const ReferenceLineInfo& reference_line_info) {
// more delicate design of creep distance
return 2.0;
}
bool DeciderCreep::CheckCreepDone(const Frame& frame,
bool CreepDecider::CheckCreepDone(const Frame& frame,
const ReferenceLineInfo& reference_line_info,
const double stop_sign_overlap_end_s,
const double wait_time_sec,
const double timeout_sec) {
const auto& creep_config = config_.decider_creep_config();
const auto& creep_config = config_.creep_decider_config();
bool creep_done = false;
double creep_stop_s =
stop_sign_overlap_end_s + FindCreepDistance(frame, reference_line_info);
......
......@@ -32,9 +32,9 @@
namespace apollo {
namespace planning {
class DeciderCreep : public Decider {
class CreepDecider : public Decider {
public:
explicit DeciderCreep(const TaskConfig& config);
explicit CreepDecider(const TaskConfig& config);
apollo::common::Status Process(
Frame* frame, ReferenceLineInfo* reference_line_info) override;
......
......@@ -23,7 +23,7 @@
#include "modules/planning/proto/planning_config.pb.h"
#include "modules/common/status/status.h"
#include "modules/planning/tasks/deciders/decider_creep.h"
#include "modules/planning/tasks/deciders/creep_decider/creep_decider.h"
#include "modules/planning/tasks/deciders/lane_change_decider/lane_change_decider.h"
#include "modules/planning/tasks/deciders/open_space_decider/open_space_fallback_decider.h"
#include "modules/planning/tasks/deciders/open_space_decider/open_space_pre_stop_decider.h"
......@@ -92,9 +92,9 @@ void TaskFactory::Init(const PlanningConfig& config) {
[](const TaskConfig& config) -> Task* {
return new SpeedDecider(config);
});
task_factory_.Register(TaskConfig::DECIDER_CREEP,
task_factory_.Register(TaskConfig::CREEP_DECIDER,
[](const TaskConfig& config) -> Task* {
return new DeciderCreep(config);
return new CreepDecider(config);
});
task_factory_.Register(TaskConfig::OPEN_SPACE_PRE_STOP_DECIDER,
[](const TaskConfig& config) -> Task* {
......
......@@ -56,15 +56,12 @@ stage_config: {
task_config: {
task_type: SPEED_BOUNDS_FINAL_DECIDER
}
task_config: {
task_type: RULE_BASED_STOP_DECIDER
}
}
stage_config: {
stage_type: BARE_INTERSECTION_UNPROTECTED_CREEP
enabled: true
task_type: DECIDER_CREEP
task_type: CREEP_DECIDER
task_type: PATH_LANE_BORROW_DECIDER
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
......@@ -77,8 +74,8 @@ stage_config: {
task_type: SPEED_BOUNDS_FINAL_DECIDER
task_type: PROCEED_WITH_CAUTION_SPEED
task_config: {
task_type: DECIDER_CREEP
decider_creep_config: {
task_type: CREEP_DECIDER
creep_decider_config: {
stop_distance: 0.3
speed_limit: 1.0
max_valid_stop_distance: 0.4
......
......@@ -3,6 +3,7 @@ stage_type: LANE_FOLLOW_DEFAULT_STAGE
stage_config: {
stage_type: LANE_FOLLOW_DEFAULT_STAGE
enabled: true
task_type: LANE_CHANGE_DECIDER
task_type: PATH_LANE_BORROW_DECIDER
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
......@@ -16,6 +17,12 @@ stage_config: {
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
task_type: DECIDER_RSS
task_config: {
task_type: LANE_CHANGE_DECIDER
lane_change_decider_config {
enable_lane_change_urgency_check: true
}
}
task_config: {
task_type: PATH_LANE_BORROW_DECIDER
path_lane_borrow_decider_config {
......
......@@ -115,7 +115,7 @@ stage_config: {
stage_config: {
stage_type: STOP_SIGN_UNPROTECTED_CREEP
enabled: true
task_type: DECIDER_CREEP
task_type: CREEP_DECIDER
task_type: PATH_LANE_BORROW_DECIDER
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
......@@ -129,8 +129,8 @@ stage_config: {
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
# task_type: PROCEED_WITH_CAUTION_SPEED
task_config: {
task_type: DECIDER_CREEP
decider_creep_config: {
task_type: CREEP_DECIDER
creep_decider_config: {
stop_distance: 0.3
speed_limit: 1.0
max_valid_stop_distance: 0.4
......
......@@ -13,7 +13,7 @@ stage_type: TRAFFIC_LIGHT_UNPROTECTED_LEFT_TURN_INTERSECTION_CRUISE
stage_config: {
stage_type: TRAFFIC_LIGHT_UNPROTECTED_LEFT_TURN_CREEP
enabled: true
task_type: DECIDER_CREEP
task_type: CREEP_DECIDER
task_type: PATH_LANE_BORROW_DECIDER
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
......@@ -25,10 +25,9 @@ stage_config: {
task_type: SPEED_DECIDER
task_type: SPEED_BOUNDS_FINAL_DECIDER
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
# task_type: PROCEED_WITH_CAUTION_SPEED
task_config: {
task_type: DECIDER_CREEP
decider_creep_config: {
task_type: CREEP_DECIDER
creep_decider_config: {
stop_distance: 0.3
speed_limit: 1.0
max_valid_stop_distance: 0.4
......@@ -58,12 +57,6 @@ stage_config: {
task_config: {
task_type: SPEED_DECIDER
}
task_config: {
task_type: PROCEED_WITH_CAUTION_SPEED
proceed_with_caution_speed_config: {
max_distance: 5.0
}
}
task_config: {
task_type: SPEED_BOUNDS_PRIORI_DECIDER
}
......
......@@ -64,7 +64,7 @@ stage_config: {
stage_config: {
stage_type: TRAFFIC_LIGHT_UNPROTECTED_RIGHT_TURN_CREEP
enabled: true
task_type: DECIDER_CREEP
task_type: CREEP_DECIDER
task_type: PATH_LANE_BORROW_DECIDER
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
......@@ -76,10 +76,9 @@ stage_config: {
task_type: SPEED_DECIDER
task_type: SPEED_BOUNDS_FINAL_DECIDER
task_type: PIECEWISE_JERK_SPEED_OPTIMIZER
# task_type: PROCEED_WITH_CAUTION_SPEED
task_config: {
task_type: DECIDER_CREEP
decider_creep_config: {
task_type: CREEP_DECIDER
creep_decider_config: {
stop_distance: 0.3
speed_limit: 1.0
max_valid_stop_distance: 0.4
......@@ -112,12 +111,6 @@ stage_config: {
task_config: {
task_type: SPEED_BOUNDS_FINAL_DECIDER
}
task_config: {
task_type: PROCEED_WITH_CAUTION_SPEED
proceed_with_caution_speed_config: {
max_distance: 5.0
}
}
task_config: {
task_type: SPEED_DECIDER
}
......
......@@ -62,6 +62,7 @@ stage_config: {
task_config: {
task_type: RULE_BASED_STOP_DECIDER
}
}
stage_config: {
stage_type: VALET_PARKING_PARKING
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册