提交 c1a535c2 编写于 作者: X xmyqsh 提交者: Weide Zhang

set roi points label And enhance return logic (#9190)

* set roi points label And enhance return logic

* enhance roi service content
上级 2e2a7a58
......@@ -111,13 +111,12 @@ bool HdmapROIFilter::Filter(const ROIFilterOptions& options,
// set roi points label
if (ret) {
/*
TODO(all) fix this block
for (auto index : frame->roi_indices.indices) {
auto& pt_label = frame->cloud->points_label().at(index);
pt_label = static_cast<uint8_t>(LidarPointLabel::ROI);
for (auto index : frame->roi_indices.indices) {
frame->cloud->mutable_points_label()->at(index) =
static_cast<uint8_t>(LidarPointLabel::ROI);
frame->world_cloud->mutable_points_label()->at(index) =
static_cast<uint8_t>(LidarPointLabel::ROI);
}
*/
}
// set roi service
......@@ -131,6 +130,10 @@ bool HdmapROIFilter::Filter(const ROIFilterOptions& options,
roi_service_content_.major_dir_ =
static_cast<ROIServiceContent::DirectionMajor>(bitmap_.dir_major());
roi_service_content_.transform_ = frame->lidar2world_pose.translation();
if (!ret) {
std::fill(roi_service_content_.bitmap_.begin(),
roi_service_content_.bitmap_.end(), -1);
}
roi_service->UpdateServiceContent(roi_service_content_);
} else {
AINFO << "Failed to find roi service and cannot update.";
......@@ -175,9 +178,9 @@ bool HdmapROIFilter::FilterWithPolygonMask(
}
bitmap_.SetUp(major_dir);
DrawPolygonsMask<double>(raw_polygons, &bitmap_, extend_dist_,
no_edge_table_);
return Bitmap2dFilter(cloud, bitmap_, roi_indices);
return DrawPolygonsMask<double>(raw_polygons, &bitmap_,
extend_dist_, no_edge_table_) &&
Bitmap2dFilter(cloud, bitmap_, roi_indices);
}
void HdmapROIFilter::TransformFrame(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册