Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert a parameter in grid_based_sweep_coverage_path_planner to correct the planning results #917

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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