WIP: Add multi-goal planning to LazyPRM/LazyPRM*#995
Open
Conversation
mamoll
approved these changes
May 26, 2023
Member
mamoll
left a comment
There was a problem hiding this comment.
Looks good to me, modulo some minor changes.
| for (std::size_t goalIndex = 0; goalIndex < goalM_.size(); ++goalIndex) | ||
| auto startComponent = vertexComponentProperty_[s]; | ||
| std::copy_if(std::begin(goalM_), std::end(goalM_), std::inserter(goals, std::begin(goals)), | ||
| [&](const auto &g) { return vertexComponentProperty_[g] == startComponent; }); |
Member
There was a problem hiding this comment.
The code does more work than necessary, since you can stop as soon as you find a goal state that is in the same component as the start state. You don't have to iterate over all goal states. No need to change, since optimizing this part of the code is probably not worth it.
113090d to
98e597d
Compare
Co-authored-by: Mark Moll <[email protected]>
Co-authored-by: Mark Moll <[email protected]>
Co-authored-by: Mark Moll <[email protected]>
Member
Author
|
Thanks for the review - just tested locally to double check and the LazyPRM is now throwing an exception in some cases, I'll change this to a WIP and request review when I've kicked the tires a bit more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #776. Before, LazyPRM would simply use the first sampled goal. This should enable LazyPRM to plan to multiple goals.