diff --git a/src/rbprmbuilder.impl.hh b/src/rbprmbuilder.impl.hh index 5556966aaa5b5a58848a49a1356c7dcd25ea0ae3..0d848e0e408b35df3f38d2211b6c95b5e43696a4 100755 --- a/src/rbprmbuilder.impl.hh +++ b/src/rbprmbuilder.impl.hh @@ -100,24 +100,15 @@ namespace hpp { // build the dynamicValidation : double sizeFootX,sizeFootY,mass,mu; bool rectangularContact; - try { - sizeFootX = problemSolver_->problem()->getParameter ("sizeFootX").floatValue()/2.; - sizeFootY = problemSolver_->problem()->getParameter ("sizeFootY").floatValue()/2.; - rectangularContact = 1; - } catch (const std::exception& e) { - hppDout(warning,"Warning : size of foot not definied, use 0 (contact point)"); - sizeFootX = 0; - sizeFootY = 0; + sizeFootX = problemSolver_->problem()->getParameter (std::string("DynamicPlanner/sizeFootX")).floatValue()/2.; + sizeFootY = problemSolver_->problem()->getParameter (std::string("DynamicPlanner/sizeFootY")).floatValue()/2.; + if(sizeFootX > 0. && sizeFootY > 0.) + rectangularContact = 1; + else rectangularContact = 0; - } mass = robot->mass(); - try { - mu = problemSolver_->problem()->getParameter ("friction").floatValue(); - hppDout(notice,"mu define in python : "<<mu); - } catch (const std::exception& e) { - mu= 0.5; - hppDout(notice,"mu not defined, take : "<<mu<<" as default."); - } + mu = problemSolver_->problem()->getParameter (std::string("DynamicPlanner/friction")).floatValue(); + hppDout(notice,"mu define in python : "<<mu); DynamicValidationPtr_t dynamicVal = DynamicValidation::create(rectangularContact,sizeFootX,sizeFootY,mass,mu); collisionChecking->addDynamicValidator(dynamicVal);