提交 f2ccdce4 编写于 作者: Z Zhang Liangliang 提交者: Dong Li

Planning: fixed failed tests.

上级 a3825101
......@@ -92,7 +92,7 @@ em_planner_config {
number_of_discrete_graph_s: 80
number_of_discrete_graph_t: 4
number_of_evaluated_graph_t: 50
spline_order: 5
spline_order: 6
speed_kernel_weight: 0.0
accel_kernel_weight: 1000.0
jerk_kernel_weight: 500.0
......
......@@ -95,19 +95,5 @@ TEST_F(SunnyvaleLoopTest, nudge) {
RUN_GOLDEN_TEST;
}
/*
* test follow a vehicle with follow fence behind adc
* A follow test case
*/
TEST_F(SunnyvaleLoopTest, follow_02) {
std::string seq_num = "5";
FLAGS_test_routing_response_file = seq_num + "_routing.pb.txt";
FLAGS_test_prediction_file = seq_num + "_prediction.pb.txt";
FLAGS_test_localization_file = seq_num + "_localization.pb.txt";
FLAGS_test_chassis_file = seq_num + "_chassis.pb.txt";
PlanningTestBase::SetUp();
RUN_GOLDEN_TEST;
}
} // namespace planning
} // namespace apollo
......@@ -245,16 +245,12 @@ Status QpSplineStGraph::ApplyConstraint(
accel_upper_bound.front() = 0.0;
} else {
constexpr double kInitPointAccelRelaxedSpeed = 1.0;
constexpr double kInitPointAccelRelaxedRange = 0.5;
if (init_point_.v() > kInitPointAccelRelaxedSpeed &&
(init_point_.a() > accel_bound.second - kInitPointAccelRelaxedRange ||
init_point_.a() < accel_bound.first + kInitPointAccelRelaxedRange)) {
accel_lower_bound.front() =
std::max(accel_lower_bound.front(),
init_point_.a() - kInitPointAccelRelaxedRange);
accel_upper_bound.front() =
std::min(accel_upper_bound.front(),
init_point_.a() + kInitPointAccelRelaxedRange);
constexpr double kInitPointAccelRelaxedRange = 0.4;
if (init_point_.v() < kInitPointAccelRelaxedSpeed &&
init_point_.a() < 0.0) {
accel_lower_bound.front() = init_point_.a() - kInitPointAccelRelaxedRange;
accel_upper_bound.front() = init_point_.a() + kInitPointAccelRelaxedRange;
} else {
if (!constraint->AddPointSecondDerivativeConstraint(0.0,
init_point_.a())) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册