Feature/smac incremental obstacle heuristic#6247
Conversation
…eplanning Signed-off-by: Yuchen Fan <2994114386@qq.com>
Signed-off-by: Yuchen Fan <2994114386@qq.com>
|
This pull request is in conflict. Could you fix it @Functionhx? |
…into feature/smac-incremental-obstacle-heuristic Signed-off-by: Yuchen Fan <2994114386@qq.com> # Conflicts: # nav2_smac_planner/include/nav2_smac_planner/a_star_impl.hpp # nav2_smac_planner/src/smac_planner_hybrid.cpp # nav2_smac_planner/src/smac_planner_lattice.cpp
Signed-off-by: Yuchen Fan <2994114386@qq.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 38 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Signed-off-by: Yuchen Fan <2994114386@qq.com>
|
I think a little more description and design intent is good here. This is a big change without much architecture or intent discussion (and looks rather AI generated with markers for it in all key algorithmic code). I don't actually see any changes using LPA* for the planning in the path planner for incremental path planning; only adjustments to the obstacle heuristic. I'm also not seeing any performance metrics about the improvements and otherwise the planners continued correctness. How does this perform to keep the initial plan in the same area and incrementally replan the parts required only? The obstacle heuristic is perhaps an important component of this, but that is not itself the planner, that is in the A quick review on with Claude (which I don't fall back on with much certainty) also points to some technical issues as well with the implementation, but I'm more concerned to start off with architectural and higher level alignment before getting into the details. I suppose a good closing question: how much design effort or algorithmic analysis did you put into this - or did you point an AI at this and largely just go with it? |
|
Thanks for your review,I maybe mixed two different ideas together in my earlier comment on #6110.Precisely, this PR not incremental re-planning but incremental heuristic. The design path was roughly this: I first explored incremental replanning as a standalone D Lite planner in #6110,I found it would be better integrate it in Smac planner,When I try to do it,I found some hard issues:
Because of that, I narrowed this PR to the obstacle heuristic only: a smaller, self-contained optimization that can be verified independently. |
|
For this PR, the evidence I have so far is at the heuristic level:
|
|
About opt-in: So the intent is an opt-in optimization for repeated replanning to the same goal with relatively small costmap changes. |
|
About AI: |
Signed-off-by: Yuchen Fan <2994114386@qq.com>
Each bin is mapped to a pose, but you have all the predecessor bins and poses available, no? State Lattice does the same.
This process however connects those bins to fill in the path, so from the outside perspective, this looks the same as if it had searched to find these
That's only true of State Lattice. Hybrid-A* nominally does ~1-2 cells but may be larger depending on some esoteric settings. But the 'too many changing' is definitely something and I would think the incremental planning methods would handle that or we should detect that to replan more fully in which case. I'm sure issues like that aren't unique to us and there's advice/methods regarding it. Less that replanning, then an incremental heuristic generation would just be a run-time performance improvement. That's certainly not nothing though! We'd need some more evidence though that this actually works beyond a couple of unit test cases & understand if/when this breaks down if the costmap changes "too much". If it degrades into a full update in a heavy change situation, that's basically perfect so that we don't have any edge cases we need to calculate to know if we can incrementally update or fully recompute. Otherwise, we'd need to know what case we should fall back to the full update case.
This is a good point for us to document and be aware of. Benchmarking this would be good to understand the performance changes. If the first plan takes ~2 seconds for a 1,000,000 sqft warehouse (rather than ~800ms) due to this but every other plan to that goal is guaranteed to be incrementally computed and makes the planning ~10x faster, I think that's a trade off many (though not all) would make. Definitely a useful feature to have around! |
|
Thanks, that makes sense. Your points about Hybrid-A* predecessors, analytic expansion, and swept cells make sense. Those are things I had not considered carefully enough before. I’ll focus this PR on proving whether the incremental obstacle heuristic is useful as a runtime optimization. For True incremental replanning, I’d like to explore it separately later |
Basic Info
Description of contribution in a few bullet points
incremental_obstacle_heuristic(default: false) for SmacPlannerHybrid and SmacPlannerLatticedownsample_obstacle_heuristicoff, since the incremental field is kept at full resolutionDescription of documentation updates required from your changes
incremental_obstacle_heuristicneeds to be added to the docs.nav2.org configuration and tuning pagesDescription of how this change was tested
colcon testfor nav2_smac_planner passes: 359 tests, 0 failures (no regression)incremental_obstacle_heuristicenabled planned and the robot navigated to the goal end-to-end (result: SUCCEEDED) with the MPPI controllerFuture work that may be required in bullet points
For Maintainers:
backport-*.