提交 b97a69f4 编写于 作者: C Capri2014 提交者: henryhu6

correct name number_of_spline to number_of_knots (#380)

上级 ed0a2db6
spline_order: 6 spline_order: 6
number_of_spline: 5 number_of_knots: 5
number_of_fx_constraint_knots: 13 number_of_fx_constraint_knots: 13
time_resolution: 0.1 time_resolution: 0.1
regularization_weight: 0.001 regularization_weight: 0.001
......
...@@ -58,14 +58,14 @@ bool QpSplinePathSampler::Sample(const common::FrenetFramePoint& init_point, ...@@ -58,14 +58,14 @@ bool QpSplinePathSampler::Sample(const common::FrenetFramePoint& init_point,
sampling_point->emplace_back(start_s); sampling_point->emplace_back(start_s);
// map sampling point // map sampling point
if (config_.number_of_spline() == 0) { if (config_.number_of_knots() == 0) {
AERROR << "sampling point shall greater than 0"; AERROR << "sampling point shall greater than 0";
return false; return false;
} }
const double delta_s = sampling_distance / config_.number_of_spline(); const double delta_s = sampling_distance / config_.number_of_knots();
double s = start_s + delta_s; double s = start_s + delta_s;
for (uint32_t i = 1; i <= config_.number_of_spline(); ++i) { for (uint32_t i = 1; i <= config_.number_of_knots(); ++i) {
sampling_point->emplace_back(s); sampling_point->emplace_back(s);
s += delta_s; s += delta_s;
} }
......
...@@ -4,7 +4,7 @@ package apollo.planning; ...@@ -4,7 +4,7 @@ package apollo.planning;
message QpSplinePathConfig { message QpSplinePathConfig {
optional uint32 spline_order = 1 [default = 6]; optional uint32 spline_order = 1 [default = 6];
optional uint32 number_of_spline = 2 [default = 5]; optional uint32 number_of_knots = 2 [default = 5];
optional uint32 number_of_fx_constraint_knots = 3 [default = 6]; optional uint32 number_of_fx_constraint_knots = 3 [default = 6];
optional double time_resolution = 4 [default = 0.1]; optional double time_resolution = 4 [default = 0.1];
optional double regularization_weight = 5 [default = 0.001]; optional double regularization_weight = 5 [default = 0.001];
......
spline_order: 6 spline_order: 6
number_of_spline: 5 number_of_knots: 5
number_of_fx_constraint_knots: 13 number_of_fx_constraint_knots: 13
time_resolution: 0.1 time_resolution: 0.1
regularization_weight: 0.001 regularization_weight: 0.001
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册