提交 589c623a 编写于 作者: D Dong Li 提交者: Jiangtao Hu

planning: when perception message is not provided, keep planning

* but print an error message for every 10 seconds, incase the user
really forget to provide prediction message
上级 5583a122
......@@ -96,7 +96,7 @@ Status Planning::Init() {
return Status(ErrorCode::PLANNING_ERROR, error_msg);
}
if (FLAGS_enable_prediction && AdapterManager::GetPrediction() == nullptr) {
std::string error_msg("Prediction is not registered");
std::string error_msg("Enabled prediction, but no prediction not enabled");
AERROR << error_msg;
return Status(ErrorCode::PLANNING_ERROR, error_msg);
}
......@@ -232,16 +232,13 @@ void Planning::RunOnce() {
return;
}
// Update reference line provider
ReferenceLineProvider::instance()->UpdateVehicleState(vehicle_state);
if (FLAGS_enable_prediction && AdapterManager::GetPrediction()->Empty()) {
not_ready->set_reason("prediction not ready");
AERROR << not_ready->reason() << "; skip the planning cycle.";
PublishPlanningPb(&not_ready_pb, start_timestamp);
return;
AERROR_EVERY(100) << "prediction is enabled but no prediction provided";
}
// Update reference line provider
ReferenceLineProvider::instance()->UpdateVehicleState(vehicle_state);
const double planning_cycle_time = 1.0 / FLAGS_planning_loop_rate;
bool is_replan = false;
const auto stitching_trajectory =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册