diff --git a/src/manipulation-planner.cc b/src/manipulation-planner.cc index b358538e223dd744109235355eac946dfc3bb0d1..796dd4bb760a9f5e330f475778224d2e4e85cb37 100644 --- a/src/manipulation-planner.cc +++ b/src/manipulation-planner.cc @@ -31,7 +31,7 @@ #include <hpp/core/projection-error.hh> #include <hpp/core/nearest-neighbor.hh> #include <hpp/core/roadmap.hh> -#include <hpp/core/basic-configuration-shooter.hh> +#include <hpp/core/configuration-shooter.hh> #include "hpp/manipulation/graph/statistics.hh" #include "hpp/manipulation/device.hh" @@ -440,7 +440,7 @@ namespace hpp { core::PathPlanner (problem, roadmap), shooter_ (problem.configurationShooter()), problem_ (problem), roadmap_ (roadmap), - extendStep_ (problem.getParameter<value_type>("ManipulationPlanner/ExtendStep", 1)), + extendStep_ (problem.getParameter("ManipulationPlanner/extendStep").floatValue()), qProj_ (problem.robot ()->configSize ()) {} @@ -449,5 +449,15 @@ namespace hpp { core::PathPlanner::init (weak); weakPtr_ = weak; } + + using core::Parameter; + using core::ParameterDescription; + + HPP_START_PARAMETER_DECLARATION(ManipulationPlanner) + core::Problem::declareParameter(ParameterDescription(Parameter::FLOAT, + "ManipulationPlanner/extendStep", + "Step of the RRT extension", + Parameter((value_type)1))); + HPP_END_PARAMETER_DECLARATION(ManipulationPlanner) } // namespace manipulation } // namespace hpp diff --git a/src/path-optimization/spline-gradient-based.cc b/src/path-optimization/spline-gradient-based.cc index d7b169e22a362ffcbe38199e32b7fbe4f3656c85..50bfb16e6fae78011e2fa1ccea030c7bebb86581 100644 --- a/src/path-optimization/spline-gradient-based.cc +++ b/src/path-optimization/spline-gradient-based.cc @@ -74,7 +74,7 @@ namespace hpp { { assert (init->numberPaths() == splines.size() && sods.size() == splines.size()); - bool zeroDerivative = this->problem().getParameter ("SplineGradientBased/zeroDerivativesAtStateIntersection", false); + bool zeroDerivative = this->problem().getParameter ("SplineGradientBased/zeroDerivativesAtStateIntersection").boolValue(); const std::size_t last = splines.size() - 1; graph::StatePtr_t stateOfStart; @@ -178,7 +178,7 @@ namespace hpp { // TODO Should we add zero velocity sometimes ? ConstraintSetPtr_t set = state->configConstraint(); - value_type guessThreshold = this->problem().getParameter ("SplineGradientBased/guessThreshold", value_type(-1)); + value_type guessThreshold = this->problem().getParameter ("SplineGradientBased/guessThreshold").floatValue(); Eigen::RowBlockIndices select = this->computeActiveParameters (path, set->configProjector()->solver(), guessThreshold, true); hppDout (info, "End of path " << idxSpline << ": do not change this dof " << select); @@ -209,7 +209,7 @@ namespace hpp { spline->basisFunctionDerivative(1, 1, B1); // ConstraintSetPtr_t set = state->configConstraint(); - // value_type guessThreshold = this->problem().getParameter ("SplineGradientBased/guessThreshold", value_type(-1)); + // value_type guessThreshold = this->problem().getParameter ("SplineGradientBased/guessThreshold").floatValue(); // Eigen::RowBlockIndices select = // this->computeActiveParameters (path, set->configProjector()->solver(), guessThreshold); @@ -248,6 +248,16 @@ namespace hpp { template class SplineGradientBased<core::path::BernsteinBasis, 1>; // equivalent to StraightPath // template class SplineGradientBased<core::path::BernsteinBasis, 2>; template class SplineGradientBased<core::path::BernsteinBasis, 3>; + + using core::Parameter; + using core::ParameterDescription; + + HPP_START_PARAMETER_DECLARATION(SplineGradientBased) + core::Problem::declareParameter(ParameterDescription(Parameter::BOOL, + "SplineGradientBased/zeroDerivativesAtStateIntersection", + "Whether we should enforce a null velocity at each control point where the state before and after is different.", + Parameter(false))); + HPP_END_PARAMETER_DECLARATION(SplineGradientBased) } // namespace pathOptimization } // namespace manipulation } // namespace hpp diff --git a/src/steering-method/cross-state-optimization.cc b/src/steering-method/cross-state-optimization.cc index 478ae8cdd70dbc3faf81df3db034db3d70013f5d..251727a64106679fab52307dcb9b13352d298d58 100644 --- a/src/steering-method/cross-state-optimization.cc +++ b/src/steering-method/cross-state-optimization.cc @@ -546,8 +546,8 @@ namespace hpp { OptimizationData& d, const Edges_t& transitions) const { if (d.N == 0) return; - size_type maxIter = problem_.getParameter ("CrossStateOptimization/maxIteration", size_type(60)); - value_type thr = problem_.getParameter ("CrossStateOptimization/errorThreshold", value_type(1e-4)); + size_type maxIter = problem_.getParameter ("CrossStateOptimization/maxIteration").intValue(); + value_type thr = problem_.getParameter ("CrossStateOptimization/errorThreshold").floatValue(); d.solver.maxIterations (maxIter); d.solver.errorThreshold (thr); @@ -650,7 +650,7 @@ namespace hpp { d.s1 = graph.getState (q1); d.s2 = graph.getState (q2); // d.maxDepth = 2; - d.maxDepth = problem_.getParameter ("CrossStateOptimization/maxDepth", size_type(2)); + d.maxDepth = problem_.getParameter ("CrossStateOptimization/maxDepth").intValue(); // Find d.queue1.push (d.addInitState()); @@ -696,6 +696,24 @@ namespace hpp { return core::PathPtr_t (); } + + using core::Parameter; + using core::ParameterDescription; + + HPP_START_PARAMETER_DECLARATION(CrossStateOptimization) + core::Problem::declareParameter(ParameterDescription(Parameter::INT, + "CrossStateOptimization/maxDepth", + "Maximum number of transitions to look for.", + Parameter((size_type)2))); + core::Problem::declareParameter(ParameterDescription(Parameter::INT, + "CrossStateOptimization/maxIteration", + "Maximum number of iterations of the Newton Raphson algorithm.", + Parameter((size_type)60))); + core::Problem::declareParameter(ParameterDescription(Parameter::FLOAT, + "CrossStateOptimization/errorThreshold", + "Error threshold of the Newton Raphson algorithm.", + Parameter(1e-4))); + HPP_END_PARAMETER_DECLARATION(CrossStateOptimization) } // namespace steeringMethod } // namespace manipulation } // namespace hpp diff --git a/src/symbolic-planner.cc b/src/symbolic-planner.cc index 9e5cfd5fd65cdc8cd4603c8b366ac029472b560c..de4c278cd0a80d6c0c07ce0403b07e62185a71e8 100644 --- a/src/symbolic-planner.cc +++ b/src/symbolic-planner.cc @@ -33,7 +33,7 @@ #include <hpp/core/path-projector.hh> #include <hpp/core/projection-error.hh> #include <hpp/core/nearest-neighbor.hh> -#include <hpp/core/basic-configuration-shooter.hh> +#include <hpp/core/configuration-shooter.hh> #include <hpp/core/path-validation-report.hh> #include <hpp/core/collision-validation-report.hh>