提交 b9b08a29 编写于 作者: P panjiacheng 提交者: Yajia Zhang

Planning: reverted the previous temporary updates and added debug-recording for generated paths.

上级 e783a95d
......@@ -69,7 +69,8 @@ class PlanningContext {
static const LaneFollowInfo& lane_follow_info() { return lane_follow_info_; }
static LaneFollowInfo* mutable_lane_follow_info() { return &lane_follow_info_; }
static LaneFollowInfo* mutable_lane_follow_info() {
return &lane_follow_info_; }
private:
static PlanningStatus planning_status_;
......
......@@ -310,6 +310,6 @@ default_task_config: {
default_task_config: {
task_type: PATH_BOUNDS_DECIDER
path_bounds_decider_config {
is_lane_borrowing: true
is_lane_borrowing: false
}
}
......@@ -7,7 +7,7 @@ stage_config: {
task_type: PATH_BOUNDS_DECIDER
task_type: PIECEWISE_JERK_PATH_OPTIMIZER
task_type: PATH_ASSESSMENT_DECIDER
#task_type: PATH_DECIDER
task_type: PATH_DECIDER
task_type: SPEED_BOUNDS_PRIORI_DECIDER
task_type: DP_ST_SPEED_OPTIMIZER
task_type: SPEED_DECIDER
......@@ -27,9 +27,9 @@ stage_config: {
task_config: {
task_type: PATH_ASSESSMENT_DECIDER
}
#task_config: {
# task_type: PATH_DECIDER
#}
task_config: {
task_type: PATH_DECIDER
}
task_config: {
task_type: SPEED_BOUNDS_PRIORI_DECIDER
}
......
......@@ -89,7 +89,6 @@ std::unique_ptr<Stage> SidePassScenario::CreateStage(
bool SidePassScenario::IsTransferable(const Scenario& target_scenario,
const Frame& frame) {
// Sanity checks.
return false;
if (frame.reference_line_info().size() > 1) {
return false;
}
......
......@@ -25,8 +25,6 @@
#include "modules/map/hdmap/hdmap_util.h"
#include "modules/planning/tasks/deciders/path_decider_obstacle_utils.h"
// #define ADEBUG AINFO
namespace apollo {
namespace planning {
......@@ -75,9 +73,8 @@ Status PathAssessmentDecider::Process(
const std::string msg = "Neither regular nor fallback path is valid.";
AERROR << msg;
return Status(ErrorCode::PLANNING_ERROR, msg);
} else {
ADEBUG << "There are " << valid_path_data.size() << " valid path data.";
}
ADEBUG << "There are " << valid_path_data.size() << " valid path data.";
// Analyze and add important info for speed decider to use.
for (auto& curr_path_data : valid_path_data) {
......@@ -103,6 +100,12 @@ Status PathAssessmentDecider::Process(
reference_line_info->SetBlockingObstacleId(
valid_path_data.front().blocking_obstacle_id());
const auto &path_points = reference_line_info->path_data().discretized_path();
auto *ptr_optimized_path =
reference_line_info->mutable_debug()->mutable_planning_data()->add_path();
ptr_optimized_path->set_name("Path Planning Output");
ptr_optimized_path->mutable_path_point()->CopyFrom(
{path_points.begin(), path_points.end()});
return Status::OK();
}
......
......@@ -31,8 +31,6 @@
#include "modules/map/hdmap/hdmap_util.h"
#include "modules/planning/tasks/deciders/path_decider_obstacle_utils.h"
// #define ADEBUG AINFO
namespace apollo {
namespace planning {
......@@ -54,7 +52,7 @@ constexpr double kPathBoundsDeciderHorizon = 100.0;
constexpr double kPathBoundsDeciderResolution = 0.5;
constexpr double kDefaultLaneWidth = 5.0;
constexpr double kDefaultRoadWidth = 20.0;
constexpr double kObstacleSBuffer = 2.0;
constexpr double kObstacleSBuffer = 1.0;
constexpr double kObstacleLBuffer = 0.4;
PathBoundsDecider::PathBoundsDecider(const TaskConfig& config)
......@@ -103,8 +101,8 @@ Status PathBoundsDecider::Process(
std::vector<LaneBorrowInfo> lane_borrow_info_list;
if (config.path_bounds_decider_config().is_lane_borrowing()) {
// Try borrowing from left and from right neighbor lane.
lane_borrow_info_list = {LaneBorrowInfo::LEFT_BORROW};//,
//LaneBorrowInfo::RIGHT_BORROW};
lane_borrow_info_list = {LaneBorrowInfo::LEFT_BORROW,
LaneBorrowInfo::RIGHT_BORROW};
} else {
// Only use self-lane with no lane borrowing
lane_borrow_info_list = {LaneBorrowInfo::NO_BORROW};
......@@ -208,7 +206,7 @@ std::string PathBoundsDecider::GenerateRegularPathBound(
AERROR << msg;
return msg;
}
PathBoundsDebugString(*path_bound);
// PathBoundsDebugString(*path_bound);
// 4. Adjust the boundary considering dynamic obstacles
// TODO(all): may need to implement this in the future.
......
......@@ -28,8 +28,6 @@
#include "modules/planning/common/trajectory1d/piecewise_jerk_trajectory1d.h"
#include "modules/planning/math/finite_element_qp/fem_1d_qp_problem.h"
// #define ADEBUG AINFO
namespace apollo {
namespace planning {
......
......@@ -29,7 +29,6 @@
#include "modules/planning/tasks/deciders/open_space_roi_decider.h"
#include "modules/planning/tasks/deciders/path_assessment_decider.h"
#include "modules/planning/tasks/deciders/path_bounds_decider.h"
#include "modules/planning/tasks/deciders/path_assessment_decider.h"
#include "modules/planning/tasks/deciders/side_pass_path_decider.h"
#include "modules/planning/tasks/deciders/side_pass_safety.h"
#include "modules/planning/tasks/deciders/speed_bounds_decider/speed_bounds_decider.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册