**3. Wire Shape Estimation**

A specific sensor reference frame, Σ*s*(*Os*, *xs*, *ys*), is defined at the center of the tactile sensor pad (see Figure 3) and the wire shape estimation problem is tackled with respect to this frame. The 16 taxels are organized as a matrix, where each cell can be identified by its row and column indices. Hence, for each *cij* cell it is possible to associate a couple of coordinates (*xi*, *yj*), corresponding to the physical distances of the cell mechanical center from the sensor frame origin. In particular, the x-coordinates of the columns are −4.5 mm, −1.5 mm, 1.5 mm and 4.5 mm, from left to right, while the y-coordinates of the rows, are 4.5 mm, 1.5 mm, −1.5 mm and −4.5 mm, from top to bottom. The measured voltage variation corresponding to the *cij* cell is indicated as Δ*vij*.

**Figure 3.** Scheme of the grasped wire with respect to the sensor frame Σ*<sup>s</sup>* and taxels.

In this paper, in order to estimate the shape of the grasped wire, this is locally approximated as a straight line, coincident with the longitudinal axis of the wire (see Figure 3), modelled in the Σ*<sup>s</sup>* frame as the line with equation

$$y\_s = m\mathbf{x}\_s + n\_r \tag{1}$$

where *m* and *n* are the two parameters to be identified by using the tactile data. Since the section of the grasped wire is considered *a priori* known, estimating the grasped wire shape means to estimate the *m* and *n* parameters characterizing longitudinal axis of the wire. The initial position of the wire implies that the grasped wire has the main direction always mainly aligned with the *xs*-axis (horizontal direction). In this hypothesis, the procedure for the wire shape estimation is constituted by a first step, where the centroid coordinates for each column are computed, and a second step, where the computation of the model parameters in (1) is implemented via a least squares method applied to the data set constituted by the coordinates of the column centroids. In detail,

*step 1:*

the *y* coordinates *y<sup>c</sup> <sup>j</sup>* of the column centroids are computed from tactile data as

$$y\_j^\varepsilon = \frac{\sum\_{i=1}^4 y\_i \Delta v\_{ij}}{\sum\_{i=1}^4 \Delta v\_{ij}} \quad j = 1, \dots, 4,\tag{2}$$

where *yi* is the mechanical *<sup>y</sup>* coordinate of the *<sup>i</sup>*-th row. Hence, the data set <sup>D</sup>¯ is constituted by the coordinates (*xj*, *y<sup>c</sup> <sup>j</sup>*) of the 4 column centroids (where *xj* is the mechanical *x* coordinate of the *j*-th column).

*step 2:*

the model (1) parameters, *m*, *n*, are estimated by using a least squares method applied to the data set <sup>D</sup>¯ resulting from step 1.

The presented procedure has been experimentally applied by grasping a wire in different configurations. Figure 4 reports a generic grasp: the tactile map shows how the cells on the second and the third rows present higher Δ*vij* values. The column centroids (green stars) have been computed by using Equation (2) and than the wire shape has been computed via least squares method (straight line). To assess the accuracy of the algorithm, a comparison among the estimated shapes and the actual ones has been carried out, superimposing a picture of the corresponding grasp to the measured data and estimated shapes. Figure 5 shows the good matching between the estimated and the actual wire shapes. The quality of the shape reconstruction is fundamental to successfully complete the insertion task, as detailed below.

**Figure 4.** Tactile map and estimated shape for a grasped wire.

**Figure 5.** Comparison among estimated and actual wire shape for a grasped wire.

#### **4. The Insertion Task**

As discussed in Section 1, the main objective of the WIRES project is the robotic assembly of electric switchgears. To this aim, a fundamental subtask is represented by the insertion of the wire into the holes corresponding to the pins of the electrical components. The successful execution of the task allows the mechanical connection of the wire. The tactile sensor has been integrated into the gripper, suitably designed for the WIRES project in order to experimentally test its funcionalities during the insertion task. The proposed solution for the insertion task described in the following is based on the assumptions that the relative position between the robot system and the switchgear is known and, additionally, the length of the protruding part of the grasped wire is also known. Note that in real applications, a standard calibration procedure for the robot system allows us to obtain a precision that satisfies the first assumption. For the second assumption, the length of the protruding part of the wire can be estimated by using the camera integrated into the gripper as described in Section 2.

A human operator prepares the wire by placing it in a delimited area (based on the gripper stroke), with a random pose. The robotic system is used to grasp the wire and as a consequence, after grasping, the pose of the wire with respect to the tactile sensor is unknown. Then, the grasped wire shape is estimated by computing the model parameters *m*, *n* and applying the wire shape estimation algorithm. Figure 6a reports a sketch of a generic grasped wire, with the estimated shape. Let Σ*h*(*Oh*, *xh*, *yh*) be the hole frame, with the origin in the center of the hole and the *xh*-axis aligned with the hole axis; let Σ*w*(*Ow*, *xw*, *yw*) be the wire end frame, with the origin in the end point of the wire actual axis and the *xw*-axis aligned with the wire actual axis; let the frame Σˆ *<sup>w</sup>*(*O*ˆ *<sup>w</sup>*, *x*ˆ*w*, *y*ˆ*w*), with the origin in the end point of the estimated wire axis and the *x*ˆ*w*-axis aligned with the estimated wire axis. On the basis of the assumption described above, the poses of Σ*<sup>s</sup>* and Σ*<sup>h</sup>* are perfectly known, while the pose of Σˆ *<sup>w</sup>* can be computed from the estimated shape parameters *m*, *n* and the protruding part *L* value of the grasped wire. To this aim, the homogenous transformation matrix **T***<sup>s</sup> <sup>w</sup>*<sup>ˆ</sup> can be computed from Figure 6a with simple geometrical considerations

$$\mathbf{T}\_{\rm ib}^{\rm c} = \begin{bmatrix} \cos \gamma & -\sin \gamma & 0 & l \cos \gamma \\ \sin \gamma & \cos \gamma & 0 & l \sin \gamma + n \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix},\tag{3}$$

where *γ* = arctan(*m*) and *l* = *L* + *a*/ cos *γ* (*a* is the half side length of the sensor pad). After the computation of Σˆ *<sup>w</sup>*, a standard technique can be used to program the robotic system in order to align <sup>Σ</sup><sup>ˆ</sup> *<sup>w</sup>* with <sup>Σ</sup>*h*. After that, the resulting configuration is sketched in Figure 6b, with <sup>Σ</sup><sup>ˆ</sup> *<sup>w</sup>* <sup>≡</sup>Σ*h*. From this point the insertion task can be easily completed with a linear movement along the *xh*-axis. In real working conditions the hole diameter *D* is typically two times larger than the wire diameter *d*. Note that in this paper, the insertion has been tackled by considering the task a 2D problem; the *z*-axes are considered all aligned.

**Figure 6.** *Cont.*

**Figure 6.** Sketch of the grasped wire with respect to the electric component before (**a**) and after (**b**) the alignment with the hole axis.

#### **5. Assessment of Wire Shape Estimation and Expected Success Rate**

In ideal conditions, when the estimation error of the wire shape is zero (i.e., <sup>Σ</sup><sup>ˆ</sup> *<sup>w</sup>* <sup>≡</sup>Σ*w*), under the described assumptions, the proposed procedure allows us to align the wire axis and the hole axis, by maintaining the distances between wire and hole edges (both above *δ<sup>a</sup>* and below *δb*) equal to the maximum possible value ¯ *δ* = (*D* − *d*)/2. Obviously, in this case, the execution of the insertion task is guaranteed with a Success Rate *SR* = 100%. In real working conditions, the estimation error of the wire shape implies <sup>Σ</sup><sup>ˆ</sup> *<sup>w</sup>* <sup>=</sup> <sup>Σ</sup>*w*, and since the alignment can be made only between <sup>Σ</sup><sup>ˆ</sup> *<sup>w</sup>* and <sup>Σ</sup>*h*, when the estimation error increases the insertion task may fail. As a consequence, in real conditions the success rate of the insertion task is *SR* < 100%.

The quality of the estimated grasped wire shape and the maximum SR reachable can be evaluated taking into account both the estimation error and the actual diameters of the hole and the wire. In particular, the estimation error can be quantified by considering the relative poses of Σ*<sup>w</sup>* and Σˆ *<sup>w</sup>*. The relative pose of these two frames can be represented by the following homogeneous transformation

$$\mathbf{T}\_w^{\Phi} = \begin{bmatrix} \cos a & -\sin a & 0 & -\Delta \sin a \\ \sin a & \cos a & 0 & \Delta \cos a \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \tag{4}$$

where *α* is the angle between the estimated wire axis and the actual one, while Δ is the distance between the origins of Σ*<sup>w</sup>* and Σˆ *<sup>w</sup>*. In the ideal case, with a perfect shape estimation it is *α* = Δ = 0 and **T***w*<sup>ˆ</sup> *<sup>w</sup>* <sup>=</sup> **<sup>I</sup>**. In real working conditions (*<sup>α</sup>* <sup>=</sup> 0, <sup>Δ</sup> <sup>=</sup> 0), after the alignment <sup>Σ</sup><sup>ˆ</sup> *<sup>w</sup>* <sup>≡</sup> <sup>Σ</sup>*<sup>h</sup>* (see Figure 6b), the distances between wire and hole edges depends on Δ and *α*. In particular, the estimation error implies that the actual position of the wire presents an offset along *yh*-axis, which is responsible for any failure in the execution of the insertion task. This offset, computed from **T***w*<sup>ˆ</sup> *<sup>w</sup>*, is equal to Δ cos *α* and it reduces the space between wire and hole edges. The maximum limit for this offset, in order to avoid the unsuccessful execution of the task, is represented by the value ¯ *δ*. As a consequence, the following metric

$$
\delta = \delta - \Delta \cos \kappa \tag{5}
$$

can be computed to evaluate both the quality of the grasping and the expected result (success or not) of the insertion task execution. In conclusion, if 0 <sup>≤</sup> *<sup>δ</sup>* <sup>≤</sup> ¯ *δ* the insertion can be successfully completed, while if *δ* < 0 the insertion task cannot be correctly completed. Moreover, the more *δ* is close to ¯ *δ*, i.e., Δ cos *α* → 0, the better is the quality of the estimated wire shape.

#### **6. Experiments**

A number of experiments have been carried out to evaluate the proposed approach. For each experiment, the wire shape has been computed according to the procedure detailed in Section 3. Tens of static experiments, with the sensor fixed on the workbench, have been used to evaluate the shape estimation quality and expected success rate. Additional experiments have been carried out to evaluate the actual success rate of the insertion task in real working conditions, by using the sensorized gripper with standard wires and electrical component.

**Figure 7.** Some pictures of grasped wires with the estimated shapes and the offset errors Δ cos *α*: (**a**) reports a standard case, while (**b**) reports a borderline case.

#### *6.1. Estimation Quality and Expected SR*

For the first set of experiments, a standard wire with *d* = 3 mm has been grasped between the tactile sensor, fixed on the workbench, and a transparent methacrylate plate, in different poses. By considering the diameter of the hole of the electric component *D* = 2*d*, it is ¯ *δ* = 1.5 mm. A calibrated optical microscope has been used to take pictures from the transparent plate side. Hence, the offset errors Δ cos *α* between the estimated and the actual wire end points can be directly measured from the pictures. Figure 7 reports two sample cases, where the estimated wire shapes are compared to the actual ones. For each considered case the value of the offset error is reported. By using Equation (5) the metric can be computed, obtaining for the cases in Figure 7 the following values: *δ* = 0.72 mm for case (a) and *δ* = −0.02 mm for case (b). From these values it is evident that case (a) allows the correct execution of the insertion task, while case (b) does not guarantee a correct insertion phase (*δ* < 0). Note that case (b) corresponds to a grasp configuration close to the diagonal of the sensor pad (that is quite unlikely). The same procedure has been applied to 20 considered experiments. Finally, all grasping cases have been divided into two sets: the first set corresponding to cases with a computed metric *δ* > 0 (17 experiments) and a second set with *δ* < 0 (3 experiments). The expected success rate for the insertion task has been computed, by relating the number of experiments within the first set with respect to the total number of experiments, by obtaining a *SR* = 85%.

#### *6.2. The Insertion Task Implementation*

For the implementation of the insertion task, the sensorized gripper has been used. All measurements are reported with respect to the world reference frame Σ(*O*, *x*, *y*), placed at the robot base. Position and orientation of Σ*<sup>s</sup>* with respect to Σ is known in each time instant, by using the robot system kinematics. The pose of the electric component hole is defined by Σ*h*, assumed known from the switchgear CAD. Figure 8 reports experimental results for the s pose during an insertion task. After the wire grasping, the *xs*-axis is aligned to the *xh*-axis during an approaching phase (see Figure 8a), leaving a distance between *Os* and *Oh* equal to 22 mm in this specific case (it is the estimated length *L* plus the half side length *a* of the sensor pad). The reached configuration (at *t* = 10 s) is reported in Figure 9a, where the estimated wire shape and the frame poses (Σ*s*, Σˆ *<sup>w</sup>*, Σ*h*) are reported with respect to Σ, together with the tactile sensor pad and the component hole. It is evident that without a correction the insertion cannot be completed correctly. The wire shape has been estimated by applying the wire shape estimation algorithm, and the parameters *m* and *n* have been used to compute the homogeneous transformation (3). For the experiment reported in the figures *m* = −0.0694 and *<sup>n</sup>* <sup>=</sup> <sup>−</sup>3.4866. By using the computed homogeneous transformation, <sup>Σ</sup><sup>ˆ</sup> *<sup>w</sup>* has been aligned with <sup>Σ</sup>*<sup>h</sup>* during the correction phase. Figure 8b shows a zoom of the rotation and the translation applied during the correction. After this phase, the estimated wire axis is aligned with the component hole axis. The reached configuration (at *t* = 22 s) is reported in Figure 9b, where it is evident that the insertion can now be correctly completed with a simple translation along the *x*-axis. Figure 8a shows also the final insertion phase. Figure 10 reports the flowchart, where the connections among all subtasks of the whole insertion sequence are reported. Several checks are implemented by using the tactile sensor data during the insertion execution, in order to evaluate if the task is correctly completed or not. During experiments, the wire shape estimation error will affect the final success of the insertion phase. As discussed in Section 5, the actual wire end point is related to the Σ*<sup>w</sup>* frame, while the estimated wire end point is identified by the Σˆ *<sup>w</sup>* frame. To test how this estimation error affects the insertion phase during experiments in real working conditions, the insertion task has been repeated 40 times starting from different initial grasping conditions for the wire. The same experiment described above has been executed and, for each case, the final correct insertion has been evaluated. The number of successfully completed tasks was 33 with a success rate *SR* = 82.5%. The obtained SR is slightly below the expected SR computed in static conditions (see Section 5), as was foreseeable, since during the experiments, additional errors (e.g., robotic system calibration, electric component position) appears together with the wire shape estimation error. Figure 11 reports a sequence of frames extracted from the video (https://youtu.be/oPxkeeQLKi8) related to the paper in order to show how the designed gripper with the proposed approach allow to correctly complete an insertion sequence. Each frame has been marked with the corresponding procedure subtask. The video shows the effectiveness of the proposed approach during a demo. In the video, the robot is used to fix the screwdriver position for the connection, while the insertion is completely implemented by the designed gripper.

**Figure 8.** Experimental results: (**a**) Σ*<sup>s</sup>* pose during the whole insertion subtask and (**b**) zoom of the correction and insertion phases.

**Figure 9.** Positions of defined frames in the cartesian space for the experimental case (**a**) before (*t* = 10 s) and (**b**) after (*t* = 22 s) the correction phase.

**Figure 10.** Flowchart of the whole insertion sequence.

Move backward the gripper Screwing check Move to next wire

#### **Figure 11.** Sequence of frames during some detailed phases of an insertion task.

#### **7. Conclusions**

This paper presented a sensorized gripper for wire manipulation, and in particular, for their insertion into the electric components of a switchgear. The designed gripper integrates tactile sensors suitably optimized for this task. A specific procedure for the insertion task execution has been proposed and evaluated in terms of expected success rate. Experimental results have been reported to show the effectiveness of the proposed strategy. Future work will pprobably be devoted to using the sensor to estimate contact forces between the gripper and the manipulated wire during the whole assembly process of the switchgear.

**Supplementary Materials:** The following are available online at http://www.mdpi.com/2218-6581/8/2/46/s1.

**Author Contributions:** Design and development of the end-effector, G.P.; Design and development of the tactile sensor, S.P.; Integration, methodology and experimental validation, G.P. and S.P.

**Funding:** This work was supported by the European Commission's Seventh Framework Programme (FP7/2007-20013) under Grant agreement NO. 601116 (ECHORD++—WIRES Experiment).

**Conflicts of Interest:** The authors declare no conflict of interest. The founding sponsors had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, and in the decision to publish the results.
