Skip to content
Snippets Groups Projects
Commit 123364ee authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Remove ProblemSolver::resetConstraints and addFunctionToConfigProjector

parent 9bdf7ff8
No related branches found
No related tags found
No related merge requests found
...@@ -118,20 +118,6 @@ namespace hpp { ...@@ -118,20 +118,6 @@ namespace hpp {
const value_type& width, const value_type& width,
const value_type& margin = 1e-4); const value_type& margin = 1e-4);
/// Reset constraint set and put back the disable collisions
/// between gripper and handle
virtual void resetConstraints ();
/// Add differential function to the config projector
/// \param constraintName Name given to config projector if created by
/// this method.
/// \param functionName name of the function as stored in internal map.
/// Build the config projector if not yet constructed.
/// If constraint is a graps, deactivate collision between gripper and
/// object.
virtual void addFunctionToConfigProjector
(const std::string& constraintName, const std::string& functionName);
virtual void pathValidationType (const std::string& type, virtual void pathValidationType (const std::string& type,
const value_type& tolerance); const value_type& tolerance);
......
...@@ -257,48 +257,6 @@ namespace hpp { ...@@ -257,48 +257,6 @@ namespace hpp {
addNumericalConstraint (name, NumericalConstraint::create (cvxShape)); addNumericalConstraint (name, NumericalConstraint::create (cvxShape));
} }
void ProblemSolver::resetConstraints ()
{
if (robot_)
constraints_ = ConstraintSet::create (robot_,
"Default constraint set");
GraspsMap_t graspsMap = grasps();
for (GraspsMap_t::const_iterator itGrasp = graspsMap.begin();
itGrasp != graspsMap.end(); ++itGrasp) {
GraspPtr_t grasp = itGrasp->second;
GripperPtr_t gripper = grasp->first;
HandlePtr_t handle = grasp->second;
JointPtr_t joint = handle->joint();
model::JointVector_t joints = gripper->getDisabledCollisions();
for (model::JointVector_t::iterator itJoint = joints.begin() ;
itJoint != joints.end(); ++itJoint) {
robot()->addCollisionPairs(joint, *itJoint, hpp::model::COLLISION);
robot()->addCollisionPairs(joint, *itJoint, hpp::model::DISTANCE);
}
}
}
void ProblemSolver::addFunctionToConfigProjector
(const std::string& constraintName, const std::string& functionName)
{
core::ProblemSolver::addFunctionToConfigProjector (constraintName,
functionName);
NumericalConstraintPtr_t constraint (numericalConstraint (functionName));
if (GraspPtr_t g = grasp (constraint)) {
GripperPtr_t gripper = g->first;
HandlePtr_t handle = g->second;
JointPtr_t joint1 = handle->joint();
model::JointVector_t joints = gripper->getDisabledCollisions();
for (model::JointVector_t::iterator itJoint = joints.begin() ;
itJoint != joints.end(); ++itJoint++) {
robot()->removeCollisionPairs(joint1, *itJoint,
hpp::model::COLLISION);
robot()->removeCollisionPairs(joint1, *itJoint,
hpp::model::DISTANCE);
}
}
}
void ProblemSolver::pathValidationType (const std::string& type, void ProblemSolver::pathValidationType (const std::string& type,
const value_type& tolerance) const value_type& tolerance)
{ {
......
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