-
Notifications
You must be signed in to change notification settings - Fork 30
Add SequenceConfigurationToConfigurationMetaPlanner #564
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
Open
gilwoolee
wants to merge
9
commits into
master
Choose a base branch
from
gilwoo/SequenceConfigurationToConfigurationMetaPlanner
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d946452
Add SequenceConfigurationToConfigurationMetaPlanner
gilwoolee f5d7841
Merge branch 'master' into gilwoo/SequenceConfigurationToConfiguratio…
gilwoolee 9eda36c
Clang format
gilwoolee b96f3f7
Merge branch 'master' into gilwoo/SequenceConfigurationToConfiguratio…
gilwoolee 72acf69
Update src/planner/SequenceConfigurationToConfigurationMetaPlanner.cpp
gilwoolee 2636ff0
Update src/planner/SequenceConfigurationToConfigurationMetaPlanner.cpp
gilwoolee f7de825
Remove commented out lines
gilwoolee 6e2d48a
Merge branch 'master' into gilwoo/SequenceConfigurationToConfiguratio…
egordon 47d6ed5
Merge branch 'master' into gilwoo/SequenceConfigurationToConfiguratio…
egordon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
39 changes: 39 additions & 0 deletions
39
include/aikido/planner/SequenceConfigurationToConfigurationMetaPlanner.hpp
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #ifndef AIKIDO_PLANNER_SEQUENCECONFIGURATIONTOCONFIGURATIONMETAPLANNER_HPP_ | ||
| #define AIKIDO_PLANNER_SEQUENCECONFIGURATIONTOCONFIGURATIONMETAPLANNER_HPP_ | ||
|
|
||
| #include "aikido/planner/ConfigurationToConfigurationPlanner.hpp" | ||
| #include "aikido/planner/SequenceMetaPlanner.hpp" | ||
|
|
||
| namespace aikido { | ||
| namespace planner { | ||
|
|
||
| /// A meta planner that solves ConfigurationToConfiguration using the sub | ||
| /// planners one-by-one sequentially and returns the first successfully planned | ||
| /// trajectory. | ||
| class SequenceConfigurationToConfigurationMetaPlanner | ||
| : public SequenceMetaPlanner | ||
| , public ConfigurationToConfigurationPlanner | ||
| { | ||
| public: | ||
| /// Constructs given list of planners. | ||
| /// | ||
| /// \param[in] stateSpace State space that this planner associated with. | ||
| /// \param[in] planners Planners to be used by this planner. | ||
| /// \param[in] rng RNG that planner uses. If nullptr, a default is created. | ||
| /// \throw If any of \c planners are not ConfigurationToConfigurationPlanner. | ||
| SequenceConfigurationToConfigurationMetaPlanner( | ||
| statespace::ConstStateSpacePtr stateSpace, | ||
| const std::vector<PlannerPtr>& planners = std::vector<PlannerPtr>(), | ||
| common::RNG* rng = nullptr); | ||
|
|
||
| // Documentation inherited. | ||
| // trajectory::TrajectoryPtr plan( | ||
| // const Problem& problem, Result* result = nullptr) override; | ||
| trajectory::TrajectoryPtr plan( | ||
| const SolvableProblem& problem, Result* result = nullptr) override; | ||
| }; | ||
|
|
||
| } // namespace planner | ||
| } // namespace aikido | ||
|
|
||
| #endif // AIKIDO_PLANNER_SEQUENCECONFIGURATIONTOCONFIGURATIONMETAPLANNER_HPP_ | ||
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
35 changes: 35 additions & 0 deletions
35
src/planner/SequenceConfigurationToConfigurationMetaPlanner.cpp
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #include "aikido/planner/SequenceConfigurationToConfigurationMetaPlanner.hpp" | ||
|
|
||
| namespace aikido { | ||
| namespace planner { | ||
|
|
||
| //============================================================================== | ||
| SequenceConfigurationToConfigurationMetaPlanner:: | ||
| SequenceConfigurationToConfigurationMetaPlanner( | ||
| statespace::ConstStateSpacePtr stateSpace, | ||
| const std::vector<PlannerPtr>& planners, | ||
| common::RNG* rng) | ||
| : SequenceMetaPlanner(stateSpace, std::move(planners)) | ||
| , ConfigurationToConfigurationPlanner(stateSpace, std::move(rng)) | ||
| { | ||
| for (auto planner : mPlanners) | ||
gilwoolee marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| auto castedPlanner | ||
| = std::dynamic_pointer_cast<ConfigurationToConfigurationPlannerPtr>( | ||
| planner); | ||
|
|
||
| if (!castedPlanner) | ||
| throw std::invalid_argument( | ||
| "One of the planners is not ConfigurationToConfigurationPlanner."); | ||
| } | ||
| } | ||
|
|
||
| // //============================================================================== | ||
gilwoolee marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| trajectory::TrajectoryPtr SequenceConfigurationToConfigurationMetaPlanner::plan( | ||
| const SolvableProblem& problem, Result* result) | ||
| { | ||
| return SequenceMetaPlanner::plan(problem, result); | ||
| } | ||
|
|
||
| } // namespace planner | ||
| } // namespace aikido | ||
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.
Uh oh!
There was an error while loading. Please reload this page.