**3. Application scenario 1: peg-and-hole alignment in one dimension**

The simplified peg-and-hole alignment task was conducted to test the efficiency of the proposed method in realizing fast and accurate set point regulation under internal and external uncertainties [13]. The experimental testbed is shown in **Figure 4**. The add-on compensation module had one degree of freedom (DOF). A workpiece (metal plate with six randomly configured holes) was blindly placed on a desk for each experiment trial. The holes were 2 mm along the *x*-direction and were elongated in the *y*-direction to account for the fact that compensation was carried out only in the *x*-direction. A mechanical pencil with a diameter of 1.0 mm acting as the peg was attached to the linear compensation actuator, and the insertion

### **Figure 4.**

*Experimental system [13]. (a) Overall setup: A one-DOF (x-direction) add-on module and a commercial parallel-link robot. (b) Global VGA camera for coarse motion planning of the parallel-link robot. (c) Detected marker and reference position (center of the nearest hole). (d) Marker representing the peg's position.*

Quadro K5200) (made by Dell Inc., USA), and the high-speed camera was config-

*High-speed vision system [25]. (a) Traditional system with imaging and image processing conducted separately.*

**Stroke Maximum velocity Maximum acceleration Weight** 100 mm 1.6 m/s 200 m/s<sup>2</sup> 0.86 kg

*(b) New high-speed vision system with high-speed imaging and processing integrated in one chip.*

*Dynamic Compensation Framework to Improve the Autonomy of Industrial Robots*

and they are accumulated within the relative error toward the peg.

The one-DOF add-on module with linear actuation was developed with specifications presented in **Table 1**. In accordance with the proposed dynamic compensation framework, the module was designed with large acceleration capability as well as being lightweight. The high-speed camera addressed above was configured with

**3.2 Add-on compensation module with one DOF**

Since control was limited to one dimension (along the *x*-direction in our case), the peg and the holes only needed to be aligned along the *x*-axis in the images. The peg was tracked using a marker fixed on the mechanical pencil at some distance from its tip (**Figure 3(b)**). In the captured images, it corresponded to roughly 9 9 pixel patches, and we employed a simple template-based search to find the location of the marker by minimizing the mean squared error. Following marker identification, we calculated its location at sub-pixel accuracy by computing image moments on the center patch. After locating the peg, we searched for the hole on a row in the image at a fixed distance from the detected marker in the *y*-direction. This image row was effectively binarized apart from the edge regions around the holes. We therefore searched for consecutive white regions (holes) and selected the one with center closest to the peg in the *x*-direction. The hole position was also computed with sub-pixel accuracy using image moments over the non-black region on the searched row. The processing ran within a millisecond using CUDA [20] to enable 1000 fps tracking of the positions of the pen and the hole. The high-speed camera is configured in such a way that the peg and each hole were both visible, and the relative error in image coordinates was sent to the real-time controller (**Figure 3**) by an Ethernet at a frequency of 1000 Hz. Since the high-speed camera was configured as the eye-in-hand, uncertainties due to the main robot as well as the external environment can be resultantly perceived as the variations of the hole's position,

ured with a working frame rate of 1000 fps.

*Spec. of actuator for the one-DOF add-on module prototype.*

*DOI: http://dx.doi.org/10.5772/intechopen.90169*

**Figure 5.**

**Table 1.**

**69**

action was driven by an on–off solenoid. The insertion action was activated only if the error between the peg and the center of the hole in the *x*-direction was smaller than 0.8 pixels (corresponding to 0.112 mm) and lasted for more than 0.02 s. The insertion lasted for 0.3 s. We sought to insert the peg at the center of these holes. As can be seen from **Figure 4**, the holes formed the white parts of the otherwise black workpiece. Section 3.3.2 describes the process of detecting and obtaining the positions of these holes.
