提交 564832f5 编写于 作者: Z Zhang Liangliang 提交者: Jiangtao Hu

Planning: removed dependancy on reference line in qp_spline_path optimizer.

上级 be052dc9
......@@ -78,9 +78,9 @@ em_planner_config {
number_of_fx_constraint_knots: 13
time_resolution: 0.1
regularization_weight: 0.1
derivative_weight: 1.0
second_derivative_weight: 0.0
third_derivative_weight: 10.0
derivative_weight: 10.0
second_derivative_weight: 1.0
third_derivative_weight: 1.0
reference_line_weight: 0.0
num_refline_point: 10
num_output: 100
......@@ -127,7 +127,7 @@ em_planner_config {
}
reference_line_smoother_config {
num_spline: 6
num_spline: 5
spline_order: 6
num_evaluated_points: 13
boundary_bound: 0.2
......@@ -137,7 +137,7 @@ reference_line_smoother_config {
ref_line_weight: 0.0
derivative_weight: 0.0
second_derivative_weight: 0.0
third_derivative_weight: 100
third_derivative_weight: 100.0
num_of_total_points: 500
}
......
......@@ -203,7 +203,7 @@ bool ReferenceLineSmoother::apply_constraint(
}
if (!spline_solver_->mutable_constraint()
->AddThirdDerivativeSmoothConstraint()) {
->AddSecondDerivativeSmoothConstraint()) {
AERROR << "Add jointness constraint failed";
return false;
}
......
......@@ -74,7 +74,7 @@ TEST_F(ReferenceLineSmootherTest, smooth) {
ReferenceLine smoothed_reference_line;
EXPECT_FLOAT_EQ(153.87421, reference_line_->Length());
EXPECT_TRUE(smoother_.Smooth(*reference_line_, &smoothed_reference_line));
EXPECT_FLOAT_EQ(153.54385, smoothed_reference_line.Length());
EXPECT_FLOAT_EQ(153.3642, smoothed_reference_line.Length());
}
} // namespace planning
......
......@@ -93,7 +93,6 @@ bool DPRoadGraph::FindPathTunnel(const common::TrajectoryPoint &init_point,
accumulated_s += path_length;
}
FrenetFramePath tunnel(frenet_path);
path_data->SetReferenceLine(&reference_line_);
path_data->SetFrenetPath(tunnel);
return true;
......
......@@ -122,7 +122,9 @@ bool QpSplinePathGenerator::Generate(
double l = spline(s);
if (planning_debug->planning_data().sl_frame().size() >= 1) {
auto sl_point = planning_debug->mutable_planning_data()
->mutable_sl_frame(0)->mutable_sl_path()->Add();
->mutable_sl_frame(0)
->mutable_sl_path()
->Add();
sl_point->set_l(l);
sl_point->set_s(s);
}
......@@ -332,7 +334,6 @@ bool QpSplinePathGenerator::AddConstraint(
AERROR << "Add spline joint third derivative constraint failed!";
return false;
}
return true;
}
......@@ -358,14 +359,6 @@ void QpSplinePathGenerator::AddKernel() {
spline_kernel->add_third_order_derivative_matrix(
qp_spline_path_config_.third_derivative_weight());
}
// reference line kernel
if (qp_spline_path_config_.number_of_knots() > 1 &&
qp_spline_path_config_.reference_line_weight() > 0) {
std::vector<double> l_vec(knots_.size(), 0.0);
spline_kernel->add_reference_line_kernel_matrix(
knots_, l_vec, qp_spline_path_config_.reference_line_weight());
}
}
bool QpSplinePathGenerator::Solve() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册