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

Fixing grid_based_sweep_coverage_path_planner.py #915

Closed
ssr-yuki opened this issue Oct 4, 2023 · 2 comments · Fixed by #917
Closed

Fixing grid_based_sweep_coverage_path_planner.py #915

ssr-yuki opened this issue Oct 4, 2023 · 2 comments · Fixed by #917

Comments

@ssr-yuki
Copy link
Contributor

ssr-yuki commented Oct 4, 2023

Hi.

The current behavior of PathPlanning/GridBasedSweepCPP/grid_based_sweep_coverage_path_planner.py is different from one shown in the doc.

Screenshots

current expected (same as shown in the doc)
Screenshot from 2023-10-04 20-07-01 Screenshot from 2023-10-04 20-07-39
Screenshot from 2023-10-04 20-07-22 Screenshot from 2023-10-04 20-08-00

Cause

Investigating the change log, I found that the latest commit caused this behavior change.

Screenshot from 2023-10-04 20-15-30

The change in L54-55->L53 of the file (also see the image) silently transformed the occupied_val argument of check_occupied_from_xy_index function from 1.0 into 0.5.

As a reference, the following modification for the current L53 can correct this issue temporally.

-                 if self.check_occupied(next_c_x_index, next_c_y_index, grid_map):
---
+                 if grid_map.check_occupied_from_xy_index(next_c_x_index,
                                                           next_c_y_index, FloatGrid(1.0)):

Please check it. Thanks.

@MrDavidAlv
Copy link

good

@AtsushiSakai
Copy link
Owner

Thank you for great explanation about the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants