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
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,8 @@ namespace hpp {
pathValidations.add ("Graph-Dichotomy" , GraphPathValidation::create<core::continuousValidation::Dichotomy >);
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",
pathOptimization::RandomShortcut::create);
......@@ -202,6 +203,9 @@ namespace hpp {
core::ProblemSolver::initializeProblem (problem_);
if (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)
......@@ -373,10 +377,10 @@ namespace hpp {
const value_type& tolerance)
{
parent_t::pathValidationType(type, tolerance);
assert (problem_);
problem_->setPathValidationFactory (
pathValidations.get(type),
tolerance);
if (problem_)
problem_->setPathValidationFactory (
pathValidations.get(type),
tolerance);
}
void ProblemSolver::resetRoadmap ()
......
......@@ -104,10 +104,6 @@ namespace hpp {
core::Problem::checkProblem ();
if (!graph_)
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 hpp
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