Skip to content
Snippets Groups Projects
Commit 7a37d72b authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add CrossStateOptimization for ReedsShepp

parent ece59266
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,11 @@ namespace hpp { ...@@ -35,7 +35,11 @@ namespace hpp {
static CrossStateOptimizationPtr_t create (const Problem& problem); static CrossStateOptimizationPtr_t create (const Problem& problem);
/// \warning core::Problem will be casted to Problem /// \warning core::Problem will be casted to Problem
static CrossStateOptimizationPtr_t createFromCore static CrossStateOptimizationPtr_t create
(const core::Problem& problem);
template <typename T>
static CrossStateOptimizationPtr_t create
(const core::Problem& problem); (const core::Problem& problem);
core::SteeringMethodPtr_t copy () const; core::SteeringMethodPtr_t copy () const;
...@@ -77,6 +81,15 @@ namespace hpp { ...@@ -77,6 +81,15 @@ namespace hpp {
/// Weak pointer to itself /// Weak pointer to itself
CrossStateOptimizationWkPtr_t weak_; CrossStateOptimizationWkPtr_t weak_;
}; // class CrossStateOptimization }; // class CrossStateOptimization
template <typename T>
CrossStateOptimizationPtr_t CrossStateOptimization::create
(const core::Problem& problem)
{
CrossStateOptimizationPtr_t gsm = CrossStateOptimization::create (problem);
gsm->innerSteeringMethod (T::create (problem));
return gsm;
}
} // namespace steeringMethod } // namespace steeringMethod
} // namespace manipulation } // namespace manipulation
} // namespace hpp } // namespace hpp
......
...@@ -154,14 +154,20 @@ namespace hpp { ...@@ -154,14 +154,20 @@ namespace hpp {
steeringMethod::Graph::create <core::steeringMethod::Straight>); steeringMethod::Graph::create <core::steeringMethod::Straight>);
steeringMethods.add ("Graph-Hermite", steeringMethods.add ("Graph-Hermite",
steeringMethod::Graph::create <core::steeringMethod::Hermite>); steeringMethod::Graph::create <core::steeringMethod::Hermite>);
steeringMethods.add ("CrossStateOptimization",
steeringMethod::CrossStateOptimization::createFromCore);
steeringMethods.add ("Graph-ReedsShepp", steeringMethods.add ("Graph-ReedsShepp",
createSMWithGuess <steeringMethod::Graph, core::steeringMethod::ReedsShepp>); createSMWithGuess <steeringMethod::Graph, core::steeringMethod::ReedsShepp>);
steeringMethods.add ("Graph-Dubins", steeringMethods.add ("Graph-Dubins",
createSMWithGuess <steeringMethod::Graph, core::steeringMethod::Dubins>); createSMWithGuess <steeringMethod::Graph, core::steeringMethod::Dubins>);
steeringMethods.add ("Graph-Snibud", steeringMethods.add ("Graph-Snibud",
createSMWithGuess <steeringMethod::Graph, core::steeringMethod::Snibud>); createSMWithGuess <steeringMethod::Graph, core::steeringMethod::Snibud>);
steeringMethods.add ("CrossStateOptimization-Straight",
steeringMethod::CrossStateOptimization::create<core::steeringMethod::Straight>);
steeringMethods.add ("CrossStateOptimization-ReedsShepp",
createSMWithGuess <steeringMethod::CrossStateOptimization, core::steeringMethod::ReedsShepp>);
steeringMethods.add ("CrossStateOptimization-Dubins",
createSMWithGuess <steeringMethod::CrossStateOptimization, core::steeringMethod::Dubins>);
steeringMethods.add ("CrossStateOptimization-Snibud",
createSMWithGuess <steeringMethod::CrossStateOptimization, core::steeringMethod::Snibud>);
pathOptimizers.add ("KeypointsShortcut", pathOptimizers.add ("KeypointsShortcut",
pathOptimization::Keypoints::create); pathOptimization::Keypoints::create);
......
...@@ -59,7 +59,7 @@ namespace hpp { ...@@ -59,7 +59,7 @@ namespace hpp {
return shPtr; return shPtr;
} }
CrossStateOptimizationPtr_t CrossStateOptimization::createFromCore ( CrossStateOptimizationPtr_t CrossStateOptimization::create (
const core::Problem& problem) const core::Problem& problem)
{ {
HPP_STATIC_CAST_REF_CHECK (const Problem, problem); HPP_STATIC_CAST_REF_CHECK (const Problem, problem);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment