提交 6ae481a1 编写于 作者: J Jiangtao Hu 提交者: Aaron Xiao

perception: replace AFATAL with AERROR. AFATAL will crash the perception process. (#3461)

上级 76c4ba72
......@@ -209,7 +209,7 @@ bool YoloCameraDetector::init_cnn(const string &yolo_root) {
cnnadapter_.reset(new CNNCaffe);
break;
default:
AFATAL << "unknown model type.";
AERROR << "unknown model type.";
return false;
}
......@@ -472,7 +472,7 @@ bool YoloCameraDetector::get_objects_cpu(
int label = it->first;
if (conf_scores.find(label) == conf_scores.end()) {
// Something bad happened if there are no predictions for current label.
AFATAL << "Could not find confidence predictions for " << label;
AERROR << "Could not find confidence predictions for " << label;
continue;
}
......
......@@ -61,7 +61,7 @@ bool CCLanePostProcessor::Init() {
AINFO << "using image space to generate lane instances ...";
options_.space_type = SpaceType::IMAGE;
} else {
AFATAL << "invalid space type" << space_type;
AERROR << "invalid space type" << space_type;
return false;
}
options_.frame.space_type = options_.space_type;
......@@ -256,7 +256,7 @@ bool CCLanePostProcessor::Init() {
return false;
}
} else {
AFATAL << "invalid marker association method.";
AERROR << "invalid marker association method.";
return false;
}
......@@ -310,7 +310,7 @@ bool CCLanePostProcessor::Init() {
} else if (options_.space_type == SpaceType::IMAGE) {
is_x_longitude_ = false;
} else {
AFATAL << "invalid space type" << space_type;
AERROR << "invalid space type" << space_type;
return false;
}
......
......@@ -134,7 +134,7 @@ inline int Group::ComputeOrientation(const std::vector<Marker>& markers,
break;
}
default: { AFATAL << "unknown marker shape type."; }
default: { AERROR << "unknown marker shape type."; }
}
start_angle = std::atan2(start_orie(1), start_orie(0));
RectAngle(&start_angle);
......@@ -178,7 +178,7 @@ inline int Group::ComputeOrientation(const std::vector<Marker>& markers,
break;
}
default: { AFATAL << "unknown marker shape type."; }
default: { AERROR << "unknown marker shape type."; }
}
end_angle = std::atan2(end_orie(1), end_orie(0));
RectAngle(&end_angle);
......
......@@ -83,7 +83,7 @@ ScalarType LaneFrame::ComputeMarkerPairDistance(const Marker& ref,
displacement = tar.start_pos - ref.pos;
break;
}
default: { AFATAL << "unknown marker shape type."; }
default: { AERROR << "unknown marker shape type."; }
}
ScalarType pos_dist = static_cast<ScalarType>(displacement.norm());
......@@ -483,7 +483,7 @@ vector<int> LaneFrame::ComputeMarkerEdges(
y_thresh = markers_[i].pos(0) - opts_.min_y_search_offset;
break;
}
default: { AFATAL << "Error: unknown space type " << opts_.space_type; }
default: { AERROR << "Error: unknown space type " << opts_.space_type; }
}
for (int j = 0; j < static_cast<int>(tot_marker_num); ++j) {
......@@ -642,7 +642,7 @@ bool LaneFrame::GreedyGroupConnectAssociation() {
y_thresh = cur_group->end_pos(0) - opts_.min_y_search_offset;
break;
}
default: { AFATAL << "unknown space type " << cur_group->space_type; }
default: { AERROR << "unknown space type " << cur_group->space_type; }
}
to_group_idx[k].reserve(n);
......@@ -916,7 +916,7 @@ bool LaneFrame::Process(LaneInstancesPtr instances) {
}
break;
}
default: { AFATAL << "unknown marker association method."; }
default: { AERROR << "unknown marker association method."; }
}
AINFO << "number of lane instance candidates = " << graphs_.size();
......
......@@ -617,7 +617,7 @@ void ConnectedComponent::SplitContour(int split_len) {
}
} else {
AFATAL << "unknown bounding box split type: " << bbox_.split;
AERROR << "unknown bounding box split type: " << bbox_.split;
}
}
......@@ -635,10 +635,10 @@ void ConnectedComponent::Process(ScalarType split_siz, int split_len) {
/** split a CC into several smaller ones **/
vector<int> ConnectedComponent::GetSplitRanges(int siz, int len_split) {
if (siz <= 0) {
AFATAL << "siz should be a positive number: " << siz;
AERROR << "siz should be a positive number: " << siz;
}
if (len_split <= 0) {
AFATAL << "len_split should be a positive number: " << len_split;
AERROR << "len_split should be a positive number: " << len_split;
}
int num_split = siz / len_split;
......@@ -696,17 +696,17 @@ ConnectedComponentGenerator::ConnectedComponentGenerator(int image_width,
roi_x_max_(roi.x + roi.width - 1),
roi_y_max_(roi.y + roi.height - 1) {
if (roi_x_min_ < 0) {
AFATAL << "x_min is less than zero: " << roi_x_min_;
AERROR << "x_min is less than zero: " << roi_x_min_;
}
if (roi_y_min_ < 0) {
AFATAL << "y_min is less than zero: " << roi_y_min_;
AERROR << "y_min is less than zero: " << roi_y_min_;
}
if (roi_x_max_ >= image_width_) {
AFATAL << "x_max is larger than image width: " << roi_x_max_ << "|"
AERROR << "x_max is larger than image width: " << roi_x_max_ << "|"
<< image_width_;
}
if (roi_y_max_ >= image_height_) {
AFATAL << "y_max is larger than image height: " << roi_y_max_ << "|"
AERROR << "y_max is larger than image height: " << roi_y_max_ << "|"
<< image_height_;
}
total_pix_ = static_cast<size_t>(width_) * static_cast<size_t>(height_);
......@@ -723,7 +723,7 @@ ConnectedComponentGenerator::ConnectedComponentGenerator(int image_width,
cudaError_t cuda_err = cudaGetLastError();
if (cuda_err != cudaSuccess) {
AFATAL << "failed to initialize 'img_array' and 'label_array' with CUDA: "
AERROR << "failed to initialize 'img_array' and 'label_array' with CUDA: "
<< cudaGetErrorString(cuda_err);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册