提交 3d17861c 编写于 作者: C Calvin Miao 提交者: Tae Eun Choe

Revert "perception: refactor WriteCalibrationOutput method (#6654)" (#6701)

This reverts commit 60dd9ffa920e1cf64c80e5f2d9c92ec60722c275.
上级 5673e43a
......@@ -316,16 +316,10 @@ int WriteCalibrationOutput(bool enable,
&camera_ground_height,
&pitch_angle);
FILE *file_save = fopen(out_path.data(), "wt");
if (file_save == nullptr) {
AERROR << "Failed to open calibration output file: " << out_path.data();
return -1;
}
fprintf(file_save, "camera_ground_height:\t%f\n",
camera_ground_height);
fprintf(file_save, "pitch_angle:\t%f\n",
pitch_angle);
fclose(file_save);
return 0;
}
......
......@@ -341,13 +341,9 @@ bool ObstacleCameraPerception::Perception(
std::string save_calibration_path =
perception_param_.debug_param().calibration_out_dir()
+ "/" + std::to_string(frame->frame_id) + ".txt";
if (WriteCalibrationOutput(perception_param_.has_debug_param() &&
WriteCalibrationOutput(perception_param_.has_debug_param() &&
perception_param_.debug_param().has_calibration_out_dir(),
save_calibration_path, frame) < 0) {
AERROR << "Failed to write calibration output.";
return false;
}
save_calibration_path, frame);
// obstacle
if (!tracker_->Predict(tracker_options, frame)) {
......
......@@ -48,11 +48,12 @@ class IndexedList {
AWARN << "object " << id << " is already in container";
*obs = object;
return obs;
} else {
object_dict_.insert({id, object});
auto* ptr = &object_dict_.at(id);
object_list_.push_back(ptr);
return ptr;
}
object_dict_.insert({id, object});
auto* ptr = &object_dict_.at(id);
object_list_.push_back(ptr);
return ptr;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册