From 7ef23f5e2c3f8168feeccd9c6b8754d232a670ee Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Thu, 27 Aug 2015 09:54:27 +0200
Subject: [PATCH] Revert "createPreGraspComplement makes use of the clearance
 parameters."

This reverts commit 891ca96699c53b06aac281f919aa27ceae8da4ff.
---
 include/hpp/manipulation/axial-handle.hh | 19 ++-----------------
 include/hpp/manipulation/handle.hh       | 16 +---------------
 src/axial-handle.cc                      | 21 ++-------------------
 src/handle.cc                            | 19 +------------------
 4 files changed, 6 insertions(+), 69 deletions(-)

diff --git a/include/hpp/manipulation/axial-handle.hh b/include/hpp/manipulation/axial-handle.hh
index 590eb44..1f220e3 100644
--- a/include/hpp/manipulation/axial-handle.hh
+++ b/include/hpp/manipulation/axial-handle.hh
@@ -70,28 +70,13 @@ namespace hpp {
 
       /// Create constraint that acts on the non-constrained axis of the
       /// constraint generated by Handle::createPreGrasp.
-      /// \warning {currently, the only constrained axis is x. The rotation
-      ///           around the z-axis is not constrained.}
-      /// \param gripper object containing the gripper information
-      /// \return the constraint of relative position between the handle and
-      ///         the gripper.
-      /// \note The translation along x-axis is constrained.
-      virtual DifferentiableFunctionPtr_t createPreGraspComplement
-      (const GripperPtr_t& gripper) const;
-
-      /// Create constraint that acts on the non-constrained axis of the
-      /// constraint generated by Handle::createPreGrasp.
-      /// \warning {currently, the only constrained axis is x. The rotation
-      ///           around the z-axis is not constrained.}
       /// \param gripper object containing the gripper information
       /// \param shift the target value along the x-axis
       /// \return the constraint of relative position between the handle and
       ///         the gripper.
-      /// \note The translation along x-axis is constrained.
-      /// \deprecated Use createPreGraspComplement(const GripperPtr_t&) instead.
+      /// \note The translation along x-axis and the rotation around z-axis are constrained.
       virtual DifferentiableFunctionPtr_t createPreGraspComplement
-      (const GripperPtr_t& gripper, const value_type& shift) const
-      HPP_MANIPULATION_DEPRECATED;
+      (const GripperPtr_t& gripper, const value_type& shift) const;
 
       virtual std::ostream& print (std::ostream& os) const;
     protected:
diff --git a/include/hpp/manipulation/handle.hh b/include/hpp/manipulation/handle.hh
index 3c76664..ee1da30 100644
--- a/include/hpp/manipulation/handle.hh
+++ b/include/hpp/manipulation/handle.hh
@@ -21,7 +21,6 @@
 # define HPP_MANIPULATION_HANDLE_HH
 
 # include <hpp/fcl/math/transform.h>
-# include <hpp/manipulation/deprecated.hh>
 # include <hpp/manipulation/config.hh>
 # include <hpp/manipulation/fwd.hh>
 
@@ -108,17 +107,6 @@ namespace hpp {
       virtual DifferentiableFunctionPtr_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
-      /// \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. The centers are shifted of
-      ///       \f clearance () + gripper->clearance ()\f along the x-axis.
-      virtual DifferentiableFunctionPtr_t createPreGraspComplement
-        (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
@@ -127,10 +115,8 @@ namespace hpp {
       ///         the gripper.
       /// \note Only the x-axis of the relative transformation between the handle and the gripper
       ///       is constrained.
-      /// \deprecated Use createPreGraspComplement(const GripperPtr_t&) instead.
       virtual DifferentiableFunctionPtr_t createPreGraspComplement
-        (const GripperPtr_t& gripper, const value_type& shift) const
-        HPP_MANIPULATION_DEPRECATED;
+        (const GripperPtr_t& gripper, const value_type& shift) const;
 
       static DifferentiableFunctionPtr_t createGrasp
       (const GripperPtr_t& gripper,const HandlePtr_t& handle)
diff --git a/src/axial-handle.cc b/src/axial-handle.cc
index 42dc75a..e2cd42a 100644
--- a/src/axial-handle.cc
+++ b/src/axial-handle.cc
@@ -66,31 +66,14 @@ namespace hpp {
     }
 
     DifferentiableFunctionPtr_t AxialHandle::createPreGraspComplement
-    (const GripperPtr_t& gripper) const
-    {
-      using boost::assign::list_of;
-      std::vector <bool> mask = list_of (true)(false)(false)(false)(true)
-	(false);
-      Transform3f transform (gripper->objectPositionInJoint ().getRotation (),
-			     gripper->objectPositionInJoint ().getTranslation ()
-			     + fcl::Vec3f (gripper->clearance () +
-					   clearance (),0,0));
-      return RelativeTransformation::create
-	("Transformation_(1,0,0,0,0,0)_" + name () + "_" + gripper->name (),
-	 gripper->joint()->robot(), gripper->joint (), joint (),
-	 transform, localPosition(), mask);
-    }
-
-    DifferentiableFunctionPtr_t AxialHandle::createPreGraspComplement
-    (const GripperPtr_t& gripper, const value_type& shift) const
+      (const GripperPtr_t& gripper, const value_type& shift) const
     {
       using boost::assign::list_of;
       std::vector <bool> mask = list_of (true)(false)(false)(false)(true)
 	(false);
       Transform3f transform (gripper->objectPositionInJoint ().getRotation (),
 			     gripper->objectPositionInJoint ().getTranslation ()
-			     + fcl::Vec3f (gripper->clearance () +
-					   clearance () + shift,0,0));
+			     + fcl::Vec3f (shift,0,0));
       return RelativeTransformation::create
 	("Transformation_(1,0,0,0,0,0)_" + name () + "_" + gripper->name (),
 	 gripper->joint()->robot(), gripper->joint (), joint (),
diff --git a/src/handle.cc b/src/handle.cc
index 473f7d9..add5ed0 100644
--- a/src/handle.cc
+++ b/src/handle.cc
@@ -67,22 +67,6 @@ namespace hpp {
 	 gripper->objectPositionInJoint (), localPosition(), mask);
     }
 
-    DifferentiableFunctionPtr_t Handle::createPreGraspComplement
-    (const GripperPtr_t& gripper) const
-    {
-      using boost::assign::list_of;
-      std::vector <bool> mask = list_of (true)(false)(false)(false)(false)
-	(false);
-      Transform3f transform (gripper->objectPositionInJoint ().getRotation (),
-			     gripper->objectPositionInJoint ().getTranslation ()
-			     + fcl::Vec3f (gripper->clearance () +
-					   clearance (),0,0));
-      return RelativeTransformation::create
-	("Transformation_(1,0,0,0,0,0)_" + name () + "_" + gripper->name (),
-	 gripper->joint()->robot(), gripper->joint (), joint (),
-	 transform, localPosition(), mask);
-    }
-
     DifferentiableFunctionPtr_t Handle::createPreGraspComplement
     (const GripperPtr_t& gripper, const value_type& shift) const
     {
@@ -91,8 +75,7 @@ namespace hpp {
 	(false);
       Transform3f transform (gripper->objectPositionInJoint ().getRotation (),
 			     gripper->objectPositionInJoint ().getTranslation ()
-			     + fcl::Vec3f (gripper->clearance () +
-					   clearance () + shift,0,0));
+			     + fcl::Vec3f (shift,0,0));
       return RelativeTransformation::create
 	("Transformation_(1,0,0,0,0,0)_" + name () + "_" + gripper->name (),
 	 gripper->joint()->robot(), gripper->joint (), joint (),
-- 
GitLab