-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Hybrid A* search heavily depends on inflation layer cost_scaling_factor value #4314
Comments
How often does this happen for the choice of cost scaling factor? I.e. is what you show every single time or just on a rare occasion? Are you (reasonably) sure this doesn't also happen for values of 3/8? This is odd, I agree. When this happens, printing some data would be nice to see what these are returning in terms of cost. If you uncomment this block (and adjust the resolution/center), what's the heuristic look like? https://github.com/open-navigation/navigation2/blob/main/nav2_smac_planner/src/node_hybrid.cpp#L717-L732 |
Happens consistently, 100% reproducible. Yes, I tried a bunch of values:
as weird as it can get! I enabled the code, and I only get zeros in either case |
OK, I won't get to it this week, but this has been noted by me as something I'm going to personally investigate. If you have time / interest to look into it yourself more to make progress, that can make this move faster to a resolution. |
sorry.... I already tried and failed to find the problem... |
I can confirm that I have the exact same issue. I was (in Galactic) used to have the But since upgrading to Humble (patch 8 from February 2024) recently, I wondered why the Humble's SmacPlannerHybrid was barely (/ not at all) able to find any routes when using bigger robot footprints. I tested also with the Rolling version (downloaded/build at 4.4.2024, almost synonym to Jazzy at this point) to see with the With a footprint size of around 4m x 4m, things still work: But when increasing it to over 5m x 5m, things seem to break: But when using the 5m x 5m and reducing the The (relevant) parameters used (for 4m x 4m, commented for 5m x 5m):
This "cost scaling factor 5" behaviour happens both in the Humble version as well as in the one month old Rolling version. In Galactic, there is not such an issue. Seems that there was quite a lot of (heuristical calculation) changes to the Smac Planner in the migration from Galactic to Humble, so likely something there created this "side effect". E.g. "Replacing the wavefront heuristic with a new, and novel, heuristic dubbed the obstacle heuristic." sound like a potential source for this, but I haven't done any further/deeper investigation of the actual cause. Luckily the issue is avoidable by just a simple parameter value change (thanks to @corot for finding this affecting parameter), so that will be enough for me now 🙂 |
As an extra info, the
In the end, putting the |
That is so frecking strange, thanks @ahopsu for more follow up and detail. This definitely needs to be looked into. |
I was debugging another issue but I think I ran into this as well with SmacPlannerHybrid I was using the planner playground from @doisyg, here is my branch with the params to reproduce: https://github.com/angsa-robotics/planner_playground/tree/custom-testing-angsa |
Bug report
Not sure if this is a bug, but the behavior is surely puzzling, so I think it's worth reporting. I found that, for certain values of
cost_scaling_factor
parameter (I saw with 4.0 and 5.0), the Hybrid A* search becomes way less effective. Indeed looks like the obstacles heuristic somehow stops working, e,gcost_scaling_factor = 3
cost_scaling_factor = 8
cost_scaling_factor = 5 !!!!
This only happens with a non-circular footprint, so I guess it's related with how we calculate the cost here.
But I cannot imagine how changing this values to an intermediate value can have such a dramatic effect. In the turtlebot 3 little world, it still finds a valid path, but I discover this on a much larger map where it was unable to find a path in several seconds.
Required Info:
Steps to reproduce issue
nav2_bringup/params/nav2_params.yaml
with the parameter file below. It's similar to the default params except:nav2_bringup/maps/turtlebot3_world.pgm
with the attached map (with a wall bisecting the map with a single passage far from the robot)/expansions
topic on RViz (planner_server/GridBased/debug_visualizations must be true)The text was updated successfully, but these errors were encountered: