Skip to content
Snippets Groups Projects
Commit 6f1c8deb authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

Keep the default validation from hpp-core + Fix minor issues

parent 5237d867
Branches
Tags
No related merge requests found
...@@ -129,7 +129,8 @@ namespace hpp { ...@@ -129,7 +129,8 @@ namespace hpp {
pathValidations.add ("Graph-Dichotomy" , GraphPathValidation::create<core::continuousValidation::Dichotomy >); pathValidations.add ("Graph-Dichotomy" , GraphPathValidation::create<core::continuousValidation::Dichotomy >);
pathValidations.add ("Graph-Progressive", GraphPathValidation::create<core::continuousValidation::Progressive>); pathValidations.add ("Graph-Progressive", GraphPathValidation::create<core::continuousValidation::Progressive>);
pathValidationType ("Graph-Discretized", 0.05); // TODO Uncomment to make Graph-Discretized the default.
//pathValidationType ("Graph-Discretized", 0.05);
pathOptimizers.add ("RandomShortcut", pathOptimizers.add ("RandomShortcut",
pathOptimization::RandomShortcut::create); pathOptimization::RandomShortcut::create);
...@@ -202,6 +203,9 @@ namespace hpp { ...@@ -202,6 +203,9 @@ namespace hpp {
core::ProblemSolver::initializeProblem (problem_); core::ProblemSolver::initializeProblem (problem_);
if (constraintGraph_) if (constraintGraph_)
problem_->constraintGraph (constraintGraph_); problem_->constraintGraph (constraintGraph_);
value_type tolerance;
const std::string& type = parent_t::pathValidationType (tolerance);
problem_->setPathValidationFactory (pathValidations.get(type), tolerance);
} }
void ProblemSolver::constraintGraph (const std::string& graphName) void ProblemSolver::constraintGraph (const std::string& graphName)
...@@ -373,10 +377,10 @@ namespace hpp { ...@@ -373,10 +377,10 @@ namespace hpp {
const value_type& tolerance) const value_type& tolerance)
{ {
parent_t::pathValidationType(type, tolerance); parent_t::pathValidationType(type, tolerance);
assert (problem_); if (problem_)
problem_->setPathValidationFactory ( problem_->setPathValidationFactory (
pathValidations.get(type), pathValidations.get(type),
tolerance); tolerance);
} }
void ProblemSolver::resetRoadmap () void ProblemSolver::resetRoadmap ()
......
...@@ -104,10 +104,6 @@ namespace hpp { ...@@ -104,10 +104,6 @@ namespace hpp {
core::Problem::checkProblem (); core::Problem::checkProblem ();
if (!graph_) if (!graph_)
throw std::runtime_error ("No graph in the problem."); throw std::runtime_error ("No graph in the problem.");
if (!pathValidation ())
throw std::runtime_error ("No GraphPathValidation in the problem.");
if (!core::Problem::steeringMethod ())
throw std::runtime_error ("No SteeringMethod in the problem.");
} }
} // namespace manipulation } // namespace manipulation
} // namespace hpp } // namespace hpp
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment