We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2cd2aa commit ed9de41Copy full SHA for ed9de41
perception/compare_map_segmentation/src/voxel_grid_map_loader.cpp
@@ -241,8 +241,9 @@ bool VoxelGridMapLoader::is_in_voxel(
241
const double dist_x = map->points.at(voxel_index).x - target_point.x;
242
const double dist_y = map->points.at(voxel_index).y - target_point.y;
243
const double dist_z = map->points.at(voxel_index).z - target_point.z;
244
- const double sqr_distance = dist_x * dist_x + dist_y * dist_y + dist_z * dist_z;
245
- if (sqr_distance < distance_threshold * distance_threshold * downsize_ratio_z_axis_) {
+ const double sqr_distance = dist_x * dist_x + dist_y * dist_y +
+ dist_z * dist_z * downsize_ratio_z_axis_ * downsize_ratio_z_axis_;
246
+ if (sqr_distance < distance_threshold * distance_threshold) {
247
return true;
248
}
249
0 commit comments