Commit 25827f2d authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

update to new parameters declarations in rbprm

parent a21ee22a
...@@ -100,24 +100,15 @@ namespace hpp { ...@@ -100,24 +100,15 @@ namespace hpp {
// build the dynamicValidation : // build the dynamicValidation :
double sizeFootX,sizeFootY,mass,mu; double sizeFootX,sizeFootY,mass,mu;
bool rectangularContact; bool rectangularContact;
try { sizeFootX = problemSolver_->problem()->getParameter (std::string("DynamicPlanner/sizeFootX")).floatValue()/2.;
sizeFootX = problemSolver_->problem()->getParameter ("sizeFootX").floatValue()/2.; sizeFootY = problemSolver_->problem()->getParameter (std::string("DynamicPlanner/sizeFootY")).floatValue()/2.;
sizeFootY = problemSolver_->problem()->getParameter ("sizeFootY").floatValue()/2.; if(sizeFootX > 0. && sizeFootY > 0.)
rectangularContact = 1; rectangularContact = 1;
} catch (const std::exception& e) { else
hppDout(warning,"Warning : size of foot not definied, use 0 (contact point)");
sizeFootX = 0;
sizeFootY = 0;
rectangularContact = 0; rectangularContact = 0;
}
mass = robot->mass(); mass = robot->mass();
try { mu = problemSolver_->problem()->getParameter (std::string("DynamicPlanner/friction")).floatValue();
mu = problemSolver_->problem()->getParameter ("friction").floatValue(); hppDout(notice,"mu define in python : "<<mu);
hppDout(notice,"mu define in python : "<<mu);
} catch (const std::exception& e) {
mu= 0.5;
hppDout(notice,"mu not defined, take : "<<mu<<" as default.");
}
DynamicValidationPtr_t dynamicVal = DynamicValidation::create(rectangularContact,sizeFootX,sizeFootY,mass,mu); DynamicValidationPtr_t dynamicVal = DynamicValidation::create(rectangularContact,sizeFootX,sizeFootY,mass,mu);
collisionChecking->addDynamicValidator(dynamicVal); collisionChecking->addDynamicValidator(dynamicVal);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment