From 78f329b06f645eeea334b76d0df5d83ce14488bc Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Tue, 15 Sep 2015 19:03:53 +0200 Subject: [PATCH] Add path planner type and path validation type in ProblemSolver constructor. --- include/hpp/manipulation/problem-solver.hh | 5 +---- src/problem-solver.cc | 12 ++++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/include/hpp/manipulation/problem-solver.hh b/include/hpp/manipulation/problem-solver.hh index 3d7466c9..64369d93 100644 --- a/include/hpp/manipulation/problem-solver.hh +++ b/include/hpp/manipulation/problem-solver.hh @@ -40,10 +40,7 @@ namespace hpp { virtual ~ProblemSolver () {} - ProblemSolver () : - core::ProblemSolver (), robot_ (), problem_ (0x0), graspsMap_() - { - } + ProblemSolver (); static ProblemSolverPtr_t create (); diff --git a/src/problem-solver.cc b/src/problem-solver.cc index b15aedd0..95be01f8 100644 --- a/src/problem-solver.cc +++ b/src/problem-solver.cc @@ -23,6 +23,7 @@ #include <hpp/model/gripper.hh> #include <hpp/core/roadmap.hh> +#include <hpp/core/discretized-collision-checking.hh> #include "hpp/manipulation/device.hh" #include "hpp/manipulation/handle.hh" @@ -30,6 +31,7 @@ #include "hpp/manipulation/manipulation-planner.hh" #include "hpp/manipulation/problem.hh" #include "hpp/manipulation/roadmap.hh" +#include "hpp/manipulation/graph-path-validation.hh" namespace hpp { namespace manipulation { @@ -38,6 +40,16 @@ namespace hpp { return robot.print (os); } + ProblemSolver::ProblemSolver () : + core::ProblemSolver (), robot_ (), problem_ (0x0), graspsMap_() + { + addPathPlannerType ("M-RRT", ManipulationPlanner::create); + addPathValidationType ("Graph-discretized", + GraphPathValidation::create <core::DiscretizedCollisionChecking>); + pathPlannerType ("M-RRT"); + pathValidationType ("Graph-discretized", 0.05); + } + ProblemSolverPtr_t ProblemSolver::create () { return ProblemSolverPtr_t (new ProblemSolver ()); -- GitLab