Skip to content

Commit 2c4d745

Browse files
authored
Revert a parameter in grid_based_sweep_coverage_path_planner to correct (AtsushiSakai#917)
the planning results
1 parent 6a76596 commit 2c4d745

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PathPlanning/GridBasedSweepCPP/grid_based_sweep_coverage_path_planner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def move_target_grid(self, c_x_index, c_y_index, grid_map):
5050
# moving backward
5151
next_c_x_index = -self.moving_direction + c_x_index
5252
next_c_y_index = c_y_index
53-
if self.check_occupied(next_c_x_index, next_c_y_index, grid_map):
53+
if self.check_occupied(next_c_x_index, next_c_y_index, grid_map, FloatGrid(1.0)):
5454
# moved backward, but the grid is occupied by obstacle
5555
return None, None
5656
else:
@@ -61,8 +61,8 @@ def move_target_grid(self, c_x_index, c_y_index, grid_map):
6161
return next_c_x_index, next_c_y_index
6262

6363
@staticmethod
64-
def check_occupied(c_x_index, c_y_index, grid_map):
65-
return grid_map.check_occupied_from_xy_index(c_x_index, c_y_index, FloatGrid(0.5))
64+
def check_occupied(c_x_index, c_y_index, grid_map, occupied_val=FloatGrid(0.5)):
65+
return grid_map.check_occupied_from_xy_index(c_x_index, c_y_index, occupied_val)
6666

6767
def find_safe_turning_grid(self, c_x_index, c_y_index, grid_map):
6868

0 commit comments

Comments
 (0)