Skip to content

Commit

Permalink
Revert a parameter in grid_based_sweep_coverage_path_planner to corre…
Browse files Browse the repository at this point in the history
…ct (#917)

the planning results
  • Loading branch information
ssr-yuki authored Oct 15, 2023
1 parent 6a76596 commit 2c4d745
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def move_target_grid(self, c_x_index, c_y_index, grid_map):
# moving backward
next_c_x_index = -self.moving_direction + c_x_index
next_c_y_index = c_y_index
if self.check_occupied(next_c_x_index, next_c_y_index, grid_map):
if self.check_occupied(next_c_x_index, next_c_y_index, grid_map, FloatGrid(1.0)):
# moved backward, but the grid is occupied by obstacle
return None, None
else:
Expand All @@ -61,8 +61,8 @@ def move_target_grid(self, c_x_index, c_y_index, grid_map):
return next_c_x_index, next_c_y_index

@staticmethod
def check_occupied(c_x_index, c_y_index, grid_map):
return grid_map.check_occupied_from_xy_index(c_x_index, c_y_index, FloatGrid(0.5))
def check_occupied(c_x_index, c_y_index, grid_map, occupied_val=FloatGrid(0.5)):
return grid_map.check_occupied_from_xy_index(c_x_index, c_y_index, occupied_val)

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

Expand Down

0 comments on commit 2c4d745

Please sign in to comment.