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

PreGrasp are not using inequality constraints. Remove Handle::preGrapsComplement

parent c6fb6381
No related branches found
No related tags found
No related merge requests found
......@@ -102,23 +102,11 @@ namespace hpp {
/// \param gripper object containing the gripper information
/// \return the constraint of relative transformation between the handle and
/// the gripper.
/// \note Only 5 DOFs of the relative transformation between the handle and the gripper
/// are constrained. The translation along x-axis is not constrained.
/// \note 6 DOFs of the relative transformation between the handle and the gripper
/// are constrained. The transformation is shifted along x-axis of
/// value shift.
virtual NumericalConstraintPtr_t createPreGrasp
(const GripperPtr_t& gripper) const;
/// Create constraint that acts on the non-constrained axis of the
/// constraint generated by Handle::createPreGrasp.
/// \param gripper object containing the gripper information
/// \param shift the target value along the x-axis
/// \param width width of the interval of freedom of gripper along x-axis.
/// \return the constraint of relative position between the handle and
/// the gripper.
/// \note Only the x-axis of the relative transformation between the handle and the gripper
/// is constrained.
virtual NumericalConstraintPtr_t createPreGraspComplement
(const GripperPtr_t& gripper, const value_type& shift,
const value_type& width) const;
(const GripperPtr_t& gripper, const value_type& shift) const;
static NumericalConstraintPtr_t createGrasp
(const GripperPtr_t& gripper,const HandlePtr_t& handle)
......
......@@ -93,38 +93,19 @@ namespace hpp {
}
NumericalConstraintPtr_t Handle::createPreGrasp
(const GripperPtr_t& gripper) const
{
using boost::assign::list_of;
std::vector <bool> mask = list_of (false)(true)(true)(true)(true)(true);
return NumericalConstraintPtr_t
(NumericalConstraint::create (RelativeTransformation::create
("Transformation_(0,1,1,1,1,1)_" + name ()
+ "_" + gripper->name (),
gripper->joint()->robot(),
gripper->joint (), joint (),
gripper->objectPositionInJoint (),
localPosition(), mask)));
}
NumericalConstraintPtr_t Handle::createPreGraspComplement
(const GripperPtr_t& gripper, const value_type& shift,
const value_type& width) const
(const GripperPtr_t& gripper, const value_type& shift) const
{
using boost::assign::list_of;
using core::DoubleInequality;
std::vector <bool> mask = list_of (true)(false)(false)(false)(false)
(false);
std::vector <bool> mask = list_of (true)(true)(true)(true)(true)(true);
Transform3f transform = gripper->objectPositionInJoint ()
* Transform3f (fcl::Vec3f (shift,0,0));
return NumericalConstraintPtr_t
(NumericalConstraint::create (RelativeTransformation::create
("Transformation_(1,0,0,0,0,0)_" + name ()
("Transformation_(0,1,1,1,1,1)_" + name ()
+ "_" + gripper->name (),
gripper->joint()->robot(),
gripper->joint (), joint (),
transform, localPosition(), mask),
DoubleInequality::create (width)));
transform, localPosition(), mask)));
}
HandlePtr_t Handle::clone () const
......
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