# Grasping Assisting Algorithm in Tele-Operated Robotic Gripper
## 2 Grasp Quality Computation
### Stable Grasps  
Before examining the stability of grasps, an important assumption needs to be taken concerning the rigidness of the object. Under certain loads a soft object could deform and the wrenches acted on it would change, and on the other hand, when the object is extremely hard the grasp will become unstable due to massive loads (a phenomena called \"coin snapping\"). In the following physical treatment we assume rigid objects with small loads. We illustrate the stability of our grasp with the force-closure property. A grasp is said to be a force-closure if we can counterbalance any external loads and torques exerted on the body using the contact forces. This way the body can be maintained in static equilibrium. The Grasp Wrench Space (GWS) is defined as the set containing all the primitive wrenches in a given grasp in Equation (6). \[GWS=\left\{\widehat{w}_{11}\quad\widehat{w}_{21}\quad\widehat{w}_{31}\quad \ldots\quad\widehat{w}_{sn}\right\} \tag{6}\]  
In our case the conditions for a grasp to be a force-closure are [28]:  
* The origin of the wrench space is in the interior of the convex hull of the GWS. This is a necessary condition for any grasp to be a force-closure. * Using a positive linear combination of the wrenches, the external wrench on the body (due to external force) is counterbalanced. In practice, it means we sustain static equilibrium. The first condition can be satisfied using hypergeometry. Because the GWS is a \(\mathcal{R}^{6}\) shape, The facets of its convex hull rest on five-dimensional hyperplanes. We describe these facets by the hyperplane equation in Equation (7). \[\partial CH=\left\{\mathcal{F}_{j}|\mathcal{F}_{j}\equiv\sum_{k=1}^{6}h_{jk}x _{k}+b=0,j=1\ldots m\right\} \tag{7}\]  
Each facet is made up of six vertices (or six wrench vectors) of _CH(GWS)_. \(\underline{h}_{j}\) is the normal vector to \(\mathcal{F}_{j}\), b is the offset from the origin, and x describes the coordinates of wrenches on the facet. We wish to calculate the distance between the origin to a hyperplane using the formula in Equation (8). \[d_{0}=\frac{|b|}{\|\underline{h}\|} \tag{8}\]  
To check that the origin lies in the same half-space divided by the hyperplanes of \(\partial CH\) we calculate the signed distance between each facet and a known inside point, and then compare their signed distances. Let \(\underline{r}\) be a point in space that is the \"center of mass\" to the primitive wrenches of the grasp wrench space, as described in Equation (9). \[\underline{r}=\frac{1}{ns}\sum_{i=0}^{n}\sum_{j=0}^{s}\widehat{w}_{ij} \tag{9}\]  
We check the signed distance using the following formula for both \(\underline{r}\) and the origin in Equation (10). \[d=\frac{\underline{h}\cdot\underline{x}+b}{\|\underline{h}\|}\rightarrow\left\{ \begin{array}{c}d_{r}=\frac{\underline{h}\cdot\underline{r}+b}{\|\underline {h}\|}\\ d_{o}=\frac{b}{\|\underline{h}\|}\end{array} \right. \tag{10}\]  
If the equality \(sign(d_{r})=sign(d_{o})\) is correct, then both the origin and \(\underline{r}\) lie in the same half-space divided by the hyperplane. To satisfy our first condition for force-closure we need to check the above equality for each facet in the convex hull. Even if there is only one facet where \(sign(d_{r})\
eq sign(d_{o})\) our origin is on the wrong side of the hyperplane and our grasp is not a force-closure. The second condition is easily satisfied by Equation (11):  
\[\underline{w}_{\text{external}}\,+\sum_{i=1}^{n}\beta_{i}\underline{w}_{i}=0,\forall M_{i}\geq\beta_{i}>0 \tag{11}\]  
The coefficients \(\beta_{i}\) of our linear combination are bounded. The lower bound satisfies our demand for the fingers to push the object and not pull it. The upper bounds \(M_{i}\) comes from the physical realization that our gripper is limited by the amount of grasp force it can exert. Consequently, the grasp wrench set is bounded by a maximal convex hull. A practical solution to check the existence of the second condition is to assume a new, shifted origin of the grasp wrench space.