提交 4b955b37 编写于 作者: S sjiang2018 提交者: Jinyun Zhou

Planning: using rule-based model when data based data is empty

上级 89564c0b
......@@ -29,6 +29,7 @@ stage_config: {
cpu_model_file: "/apollo/modules/planning/data/model/cpu_test_model_cnn.pt"
gpu_model_file: "/apollo/modules/planning/data/model/gpu_test_model_cnn.pt"
use_cuda: true
allow_empty_learning_based_data: true
allow_empty_output_trajectory: true
}
}
......
......@@ -54,7 +54,8 @@ message LearningModelInferenceTaskConfig {
optional bool use_cuda = 4 [default = true];
// delta_t depends on the model output, not a configurable value here
optional double trajectory_delta_t = 5 [default = 0.2]; // second
optional bool allow_empty_output_trajectory = 6 [default = false];
optional bool allow_empty_learning_based_data = 6 [default = false];
optional bool allow_empty_output_trajectory = 7 [default = false];
}
//////////////////////////////////
......
......@@ -62,6 +62,11 @@ Status LearningModelInferenceTask::Process(Frame* frame) {
!injector_->learning_based_data()->GetLatestLearningDataFrame()) {
const std::string msg = "learning_data_frame empty";
AERROR << msg;
// hybrid model will use rule based planning when learning based data or
// learning data frame is empty
if (config.allow_empty_learning_based_data()) {
return Status::OK();
}
return Status(ErrorCode::PLANNING_ERROR, msg);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册