Skip to content

Commit 8b5419e

Browse files
committed
fix: indices max
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
1 parent 5cf469e commit 8b5419e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

perception/ground_segmentation/src/ray_ground_filter_nodelet.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ void RayGroundFilterComponent::ExtractPointsIndices(
280280
size_t no_ground_count = 0;
281281
std::vector<bool> is_ground_idx(in_cloud_ptr->width, false);
282282
for (const auto & idx : in_indices.indices) {
283+
if(std::size_t(idx) >= is_ground_idx.size())
284+
{
285+
continue;
286+
}
283287
is_ground_idx[idx] = true;
284288
}
285289
for (size_t i = 0; i < is_ground_idx.size(); ++i) {

0 commit comments

Comments
 (0)