Skip to content

Commit 924ae24

Browse files
Added mapToWorldNoBounds function to safely retrieve world coordinates. (#322)
Signed-off-by: Leander Stephen D'Souza <[email protected]>
1 parent 616690d commit 924ae24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spatio_temporal_voxel_layer/src/spatio_temporal_voxel_layer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,8 +961,8 @@ void SpatioTemporalVoxelLayer::clearArea(
961961
// convert map coords to world coords
962962
volume_grid::occupany_cell start_world(0, 0);
963963
volume_grid::occupany_cell end_world(0, 0);
964-
mapToWorld(start_x, start_y, start_world.x, start_world.y);
965-
mapToWorld(end_x, end_y, end_world.x, end_world.y);
964+
mapToWorldNoBounds(start_x, start_y, start_world.x, start_world.y);
965+
mapToWorldNoBounds(end_x, end_y, end_world.x, end_world.y);
966966

967967
boost::recursive_mutex::scoped_lock lock(_voxel_grid_lock);
968968
_voxel_grid->ResetGridArea(start_world, end_world, invert_area);

0 commit comments

Comments
 (0)