提交 005cc9f2 编写于 作者: Z Zhang Liangliang 提交者: Jiangtao Hu

Planning: (1) adjust lateral/longitudinal bound in reference_line_smoother to...

Planning: (1) adjust lateral/longitudinal bound in reference_line_smoother to provide near to center reference lines; (2) adjust the speed lower bound from 0.0 to 1e-12 to avoid double precision issue in qp_st_speed_graph.
上级 fd10774e
......@@ -172,9 +172,11 @@ bool ReferenceLineSmoother::ApplyConstraint(
std::vector<double> lateral_bound;
std::vector<common::math::Vec2d> xy_points;
for (std::uint32_t i = 0; i < path_points.size(); ++i) {
const double kLateralBoundCoeff = 0.2;
headings.push_back(path_points[i].theta());
longitidinal_bound.push_back(0.5 * smoother_config_.boundary_bound());
lateral_bound.push_back(smoother_config_.boundary_bound());
longitidinal_bound.push_back(smoother_config_.boundary_bound());
lateral_bound.push_back(kLateralBoundCoeff *
smoother_config_.boundary_bound());
xy_points.emplace_back(path_points[i].x(), path_points[i].y());
}
......@@ -228,7 +230,7 @@ bool ReferenceLineSmoother::ApplyKernel() {
smoother_config_.third_derivative_weight());
}
constexpr double kReferenceLineSmootherKernelWeight = 0.005;
constexpr double kReferenceLineSmootherKernelWeight = 0.01;
kernel->AddRegularization(kReferenceLineSmootherKernelWeight);
return true;
}
......
......@@ -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.52716, smoothed_reference_line.Length());
EXPECT_FLOAT_EQ(153.64909, smoothed_reference_line.Length());
}
} // namespace planning
......
......@@ -202,7 +202,9 @@ Status QpSplineStGraph::ApplyConstraint(
return Status(ErrorCode::PLANNING_ERROR, msg);
}
std::vector<double> speed_lower_bound(t_evaluated_.size(), 0.0);
constexpr double kSpeedBoundEpsilon = 1e-12;
std::vector<double> speed_lower_bound(t_evaluated_.size(),
kSpeedBoundEpsilon);
DCHECK_EQ(t_evaluated_.size(), speed_upper_bound.size());
DCHECK_EQ(t_evaluated_.size(), speed_lower_bound.size());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册