A Novel Teaching System for Industrial Robots

The most important tool for controlling an industrial robotic arm is a teach pendant, which controls the robotic arm movement in work spaces and accomplishes teaching tasks. A good teaching tool should be easy to operate and can complete teaching tasks rapidly and effortlessly. In this study, a new teaching system is proposed for enabling users to operate robotic arms and accomplish teaching tasks easily. The proposed teaching system consists of the teach pen, optical markers on the pen, a motion capture system, and the pen tip estimation algorithm. With the marker positions captured by the motion capture system, the pose of the teach pen is accurately calculated by the pen tip algorithm and used to control the robot tool frame. In addition, Fitts' Law is adopted to verify the usefulness of this new system, and the results show that the system provides high accuracy, excellent operation performance, and a stable error rate. In addition, the system maintains superior performance, even when users work on platforms with different inclination angles.

capture system. The teaching tool is shaped like a pen for ergonomics purposes and is called a teach pen. The teach pen is a pointing device, by which an operator can accurately record the position and pose (position and orientation) of a target. Through the motion capture system, an optical marker attached to the teach pen collects information related to position and pose. When the operator moves the teach pen to a desired position and pose, the path of movement is planned and recorded easily. In addition, the teach pen incorporates three lock buttons and one non-lock button for facilitating commands and tasks, such as saving movement paths and opening or closing the claw. By inputting corresponding commands using these buttons, the entire movement plan for the robotic arm can be completed.
To verify whether the proposed teaching system is ergonomics and provides superior performance, Fitts' Law [19,20] and the ISO 9241-9 [21] were adopted to analyze and compare traditional systems with the proposed system. Fitts' Law and the ISO 9241-9 are frequently employed to evaluate the performance of the HMIs or HCIs; for example, performance for a mouse [22], stylus [19], joystick [22], and pointing or drag-drop interfaces, (e.g., touchscreen [23]). When evaluating a HMI according to Fitts' Law, the primary method is to conduct an experiment in which the mean time of movement is recorded. By examining the relationship between the mean time of movement and index of difficulty, the performance of the HMI can be determined. ISO 9241-9 is formulated on the basis of Fitts' Law and has been adopted to collect experimental data, such as the mean time of movement and error rate, for statistical calculation. The statistical results are usually suitable for calculating the time of movement in different work environments.

Material and Methods
The new teaching system proposed in this study can be applied to different types of robotic arms and facilitate the teaching tasks and movement path planning. The main purpose of this study is to identify the tip coordinates teach pen pose. of the teach pen and the position and angle of the pen body. With these coordinates the pen pose, a robotic arm can move accurately as directed by the tip of the teach pen. To elucidate, the new teaching system is divided into three parts, specifically, hardware, software, and computation ( Figure 1), as listed below.

Teach Pen
A comparison between the traditional teach pendant and teach pen is shown in Figure 2. The teach pendant (Figure 2a) controls the 6-DoF of the robotic-arm endpoint by twelve + andbuttons, which is not intuitive or convenient. By contrast, the teach pen (Figure 2b) resembles the number -7‖ and has three active markers, three lock buttons, and one non-lock button. The three markers collect data related to the pen pose and coordinates, and calculate the pen tip coordinates and the pose of the rigid arm body using a proposed algorithm. Concurrently, the signals from the buttons are processed using the Arduino MCU development kit, which controls the opening and closing of the claw. VZ4000, an optical 3D motion tracker developed by PhoeniX Technologies Inc. (New Taipei, Taiwan) was employed to process the coordinates collected by the three markers on the pen and the two active markers on the operator arm to a measurement accuracy of 0.6 mm and a sample frequency of 2 KHz. The data collected by the optical markers on the pen and the operator arm become zero or inaccurate when the relative viewing angle between the capture system and the marked point is near the operation borderline. Therefore, marked data must be pretreated and filtered to obtain accurate results.

The Industrial Robotic Arm
The robotic arm employed in this study is the STAUBLI TX40 (Pfä ffikon, Switzerland), which has 6-DoF, 0.02 mm repeatability, 515 mm jib length, and a maximum speed of 8.2 m/s at the endpoint.

Software
The motion capture system collects the coordinate data saved by the active markers in a specific space, and the computer calculates the coordinates for the pen tip and the pose of the pen based on the data obtained from the active markers. The results are then transmitted via Ethernet to the robotic arm controller for movement control. Because a high sampling rate increases the calculation load and lowers efficiency, 100 Hz was set as the data collection rate for collecting data from the markers.

Calculating the Position and Pose of the Robotic-Arm Endpoint
The teach pen has three markers, namely, , , and ( Figure 3), on which the calculations of the pose and position of the rigid body are based. First, a coordinate system for the teach pen, ( ), must be selected, where is the direction of , is the direction of , and is the direction of the cross-product of and . The correction method for the teach pen platform is as follows: place three mutually-perpendicular markers on the platform of the pen ( , , and ; the red spots in Figure 3). The coordinates collected by these markers (i.e., the reference markers of the motion capture system; ) can then be used to establish a reference coordinate system for the teach pen platform ( ). Similarly, select three mutually-perpendicular points on the robotic arm platform (the blue spots in Figure 3); the teach pendant is then employed to move the endpoint of the robotic arm to these coordinates. Eventually, the coordinates which are opposite to those of the robotic arm ( ) are obtained, and a reference coordinate system for the robotic arm platform ( ) can thus be created. ( ) represents the coordinate system for the tip endpoints of the robotic arm corresponding to the reference coordinate ( ).
The correction calibration method for the teach pen platform is as follows: Place three mutually-perpendicular markers on the platform of the pen ( , , and ; the red spots in Figure 3). The coordinates collected by these markers (i.e., the reference markers of the motion capture system; ) can then be used to establish a reference coordinate system for the teach pen platform ( ). Similarly, select three mutually-perpendicular points on the robotic arm platform (the blue spots in Figure 3); the teach pendant is then employed to move the endpoint of the robotic arm to these coordinates. Eventually, the coordinates which are opposite to those of the robotic arm ( ) are obtained, and a reference coordinate system for the robotic arm platform ( ) can thus be created. ( ) represents the coordinate system for the tip endpoints of the robotic arm corresponding to the reference coordinate ( ).

Pen Tip Estimation
A virtual marker was adopted for pen tip estimation. The virtual marker is attached to the tip of the teach pen for obtaining the coordinates from the tip. Set on the teach pen platform as the origin, and move the tip to this point. Using Equation (3), convert coordinates ( ) of the teach pen into the transformation matrix for the coordinates ( ) of the teach pen platform. This transformation matrix is then transferred back to the coordinates ( ) of the teach pen for the estimation of the coordinates of the pen tip as , which corresponds to the coordinates ( ) on the teach pen. The matrix of ( ) is: The matrix of ( ) is: The is: ( The is: The pose (orientation and position) of the robot ( ), the coordinate system for the tip endpoints of the robotic arm corresponding to the robot reference coordinate ( ), is calculated as: When the teach pen moves to any point on the platform, transformation matrices can be obtained constantly on the basis of ( ) and ( ), and the new data can be integrated with the . By calculating , which corresponds to transformation matrix between ( ) and ( ) (the transformation matrix represents the pose of the teach pen with respect to the the coordinate of the teach pen platform), and further incorporating this matrix into the robotic arm platform, the coordinate system of the robotic-arm end point can be obtained; that is, ( )= ( ). This method can be adopted to position and pose the robotic arm as desired.

Fitts-Law-Based Quantitative Evaluation
Fitts adopted an experiment to examine the index of performance (IP), which was changed to throughput (TP) in ISO 9241-9. TP is obtained on the basis of the index of difficulty (ID) and the movement time (MT). According to the Shannon formulation [24], ID refers to the relationship between the distance of movement and the target width: (6) ID is measured by bits. D represents the distance between the start point and the target, and W represents the target width. After several experiments, W was revised to ; thus, the effective index of difficulty (IDe) is: In this equation: represents the effective target width and can be obtained through Equations (8) or (9). If the discrete endpoint data of the operator pointing actions are collected, the standard deviation ( ) of these actions can be obtained, and can be obtained by Equation (8). If the discrete end-point data cannot be collected, the can be obtained through Equation (9). In this equation, Err refers to the error rate in the experiment (the definition of error is provided in the following section) and z refers to the z-distribution. Equation (7) proves that a greater D and a smaller error tolerance for , increases ID. By contrast, a lower D and a greater the error tolerance for , reduces ID. If ISO 9241-9 was used to describe the relationship between the ID and the MT, the following can be expressed: (10) In this equation, intercept and slope are coefficients obtained by processing the experimental data using linear regression. Basing on IDe and MT, TP can be: (11) TP is measured by bits/sec (bits per second, bps) and is the performance indicator for the experimental tools. The teach pendant and the teach pen are compared by their TPs.

Pen Tip Estimation
Nine men (mean age: 23) were selected for this experiment; all of which were right-handed and familiar with the use of a pen. All participants underwent the teach pen experiment, and six underwent the teach pendant experiment.

Apparatus
The equipment employed in this experiment included the new teaching system proposed in this study and the traditional teach pendant. Regarding this new system, an Intel Pentium Dual-Core E6500 2.93 GHz system with 2 GB RAM and running Windows XP SP3 was adopted for this experiment. Regarding the teach pendant, STAUBLI TX40 and a CS8C controller were employed. In this experiment, FlexiForce force sensors, the Arduino MCU development kit, a 180 × 90 × 75 teaching platform, a 37 × 37 × 47 cm chair, and a 100 × 100.5 × 82 cm robotic arm platform were used.

Environment
A subject performed the experiments in a bright and clear environment. There were two working desks: one was for the subject and the other was for the robot. The motion capture system was set up in front of the subject working desk (see Figure 4). The subject held the proposed teach pen where the optical markers were captured by the motion capture system. Since the optical markers were active, their acquired positions were slightly affected by the environmental lighting condition. When the subject moved the teach pen, the robot tool frame was controlled to move to the desired pose.

Procedure
Participants sat or stood near the experiment platform ( Figure 5) and used the teach pen or the teach pendant as requested. Before experimentation, explanations and practice were provided to the participants, allowing them to familiarize themselves with the tools. In the 10-min practice session, they performed various experiment tasks, such moving the robotic arm to various distances and at various widths, and selecting established targets in a clockwise direction. Tasks were designed according to ISO 9241-9. Figure 6 shows the participants using the teach pen or the traditional teach pendant to move the robotic arm from Targets 1 to 11 (Start/Finish). Prior to timing, the participants were asked to use the teach pen or the teach pendant to move the end point of the robotic arm to the starting point, that is, Target 11 (Start/Finish). The timing began as soon as the robotic arm left the starting point; the arm was required to point from Target 1 to Target 11 in a clockwise direction. The experiment ended as soon as the robotic arm was returned to Target 11 (Start/Finish). After practicing, participants operated the teach pen or the teach pendant to perform the actions shown in Figure 6. They were required to perform the same task five times, during which the MT, error rate, ID, distance, width, and the angle of inclination were recorded and analyzed.
Before operating the teach pendant, participants were provided with training, and were instructed to complete an outcome evaluation. The procedures were as follows: (1) participants were guided through the basic-level operations, such as moving the robotic-arm endpoint in three dimensions and rotating; (2) the participants underwent unassisted practice to familiarize themselves with the experiment tool; (3) an evaluation was conducted to determine the practice outcome of the participants; the difficulty parameters were set at an ID of 3.75, a distance of 150 mm, and a width of 12 mm. Participants who complete the evolution in two minutes with an error rate lower than 10% (based on the test results of most participants) were prepared for actual experimentation.  In the experiment, participants performed tasks in increments of one ID per 15 min session over intervals of 1 h to prevent fatigue from prolonged operating times, which may consequently result in biased data collection. Operation difficulty was increased by one ID following each interval.
Regarding the experiment platform, the timer in the Arduino MCU development kit and FlexiForce force sensors were adopted to measure the time. A force sensor was placed under Target 11 (Start/Finish), which activated the timer when the endpoint of the robotic arm left Target 11 and halted when the endpoint returned to Target 11 when the operation cycle was complete. The times of each operation cycle was collected to determine the MT of each participant.

Experimental Considerations
The experiment platform was the work platform for the robotic arm. Because the teach pen controlled the robotic arm directly, the participants used the teach pen to complete the tasks. For safety, the experiment platform was placed away from the work platform of the robotic arm. The participants performed according to the following instructions: ․Adjust to the most comfortable position. ․Point the targets and accomplish the tasks as fast and precisely as possible. ․Practice for 5 min prior to formal experimentation. ․Attempt the assigned tasks five times based on the given instructions. ․Initially, the endpoint of the robotic arm remains on Target 11 (Start/Finish). The timer is activated once the robotic arm endpoint begins to move. Point from Target 1 to Target 11 in a clockwise direction as instructed. The experiment is completed once the endpoint returns to Target 11. ․During the experiment, failure to point at the correct target, same target selected twice or more, or operational failures (e.g., the robotic arm hits the experiment platform and causes the machine to shutdown), an error is recorded and the experiment continues. ․On completion, the duration and the number of errors are recorded. ․An interval of 3 min is provided on each successful completion of a given task.

Experiment Considerations
(1) The paired-samples t test was adopted to calculate the mean time, error rate, and the TPs that were recorded in the teach pen experiments and in the teach pendant experiments to determine whether a significant difference exists between the two tools under identical ID and inclination angle conditions.
(2) Repeated-measures ANOVA was adopted to analyze the mean time, error rate, and the TPs recorded in the teach pen experiments to determine whether the mean time, error rate, and the TPs changed significantly under varying ID and inclination angle conditions, and the interaction of both.

Bias and Variance
When operating an industrial robotic arm, accuracy is crucial, and robotic-arm teaching tools also require accuracy. In this article, bias and variance analyses were conducted to signify the degree of accuracy. Bias refers to the difference between the value obtained in one measurement and the known value. If the difference between numerous obtained values and the known value is small, bias is small, and vice versa. Bias is indicated by absolute error, E: (12) In this equation, represents the known value and is the value of an individual measurement. Variance refers to the degree of concentration among multiple values; a high degree of concentration signifies low variance, and vice versa. Variance is represented by the standard deviation, : (13) In this equation, refers to the value obtained in the ith measurement, n refers to the number of measurements, and refers to the mean of all values. In the experiment, an operator was instructed to use the teach pen to point at the nine targets on the platform and repeated 100 times to obtain the bias and variance of the teach pen operations. Bias and variance were calculated by Equations (12) and (13). Regarding bias, the mean absolute error was obtained by averaging the values obtained in the 100 measurements and the known value. The results are presented in Table 1. The table shows the mean absolute error and the standard deviation on the x-axis and the y-axis. Because the experiment was conducted on a surface, the highly accurate z-axis was not presented. On the x-axis, the maximum mean absolute error was only 1.6 mm and the maximum standard deviation was 1.2 mm. On the y-axis, the maximum mean absolute error was 0.6 mm and the maximum standard deviation was 0.2 mm. In this study, the mean absolute error indicates that a 1.6 mm error occurred when the teach pen platform was established; this rate could be reduced by rectifying and reestablishing the coordinate system. The source of the error was caused by light and other environmental factors which affected the active markers. Table 2 shows the MT equation, correlation, and TP of operating the two tools at three inclination angles. The table indicates that the TP of the teach pen operation was superior to that of the teach pendant operation at all angles. Figure 8 shows the mean time of the teach pen operation at different IDs and on different inclination angles. The MT equation is obtained by linear regression.   Table 3 shows the mean time of operating the two tools at three different inclination angles; the mean time for teach pen operation was considerably less than that for operating the teach pendant. Furthermore, a paired-samples t test analysis was conducted and the results are shown in Table 4. The table shows that a significant difference existed between the mean time required by the teach pen operation and that required by the teach pendant operation under identical ID and the inclination angle conditions (p < 0.001). The table shows that the mean time required for the teach pen operation was considerably less than that required for the teach pendant, thereby indicating that the teach pen required less time to accomplish missions.  Repeated-measures ANOVA was conducted to compare the mean time required by teach pen operation under varying ID and inclination angle conditions, and the interaction of both. The results are presented in Table 5, and show that a significant difference existed (F = 371.802, p < 0.05). Furthermore, Figure 8 indicates that a higher ID (the more difficult a task) mandates longer mean time.

Mean Time
A significant difference existed in the mean time required by the teach pen operation among differing inclination angles (F = 7.739, p < 0.05). Figure 8 shows that the lowest mean time occurred when the inclination angle was 0°, and the sequence was 0° < -15° < 15°. No significant difference existed in the interaction between ID and inclination angle (p > 0.05).  Table 6 shows the error rate for operating the two tools at three different inclination angles. Following the paired-samples t test, the results were obtained, as shown in Table 7. The table shows that a significant difference (p < 0.001) existed in the error rate for operating the two tools at angle: ID = 5.42 angle = 0°. Further analysis indicated that the large difference (teach pen: 9.09%, teach pendant: 4.55%) was caused by the high ID and the limited time that the participants were allowed for each task.   When ID = 5.42 and angle = 0°, the mean time necessitated by the teach pen operation was substantially less than that by the teach pendant operation. No significant difference existed in the error rate for the other two angles, indicating that no large difference existed. Table 8 shows a comparison of the error rate for operating the two tools under varying ID and inclination angle conditions, and the interaction of both. A significant difference existed in the error rate for the teach pen operation at varying IDs (F = 10.007, p < 0.05).    Figure 9 indicates that a higher ID (a more difficult mission) increased the error rate. No significant difference existed in the error rate for the teach pen operation at varying inclination angles (F = 2.852, p > 0.05), indicating that the error rate did not vary significantly when the teach pen was operated under varying angles. Finally, no significant difference existed in the error rate for the teach pen operation in the interaction of the ID and the inclination angle (p > 0.05). Figure 10 shows the TP of operating the two tools at three inclination angles; the TP of the teach pen operation was considerably greater than that of the teach pendant operation. Following paired-samples t test, the results are presented in Table 9. The table shows that at the same inclination angle, a significant difference existed in the TP between the teach pen operation and the teach pendant operation (p < 0.001). Further analysis reveals that the TP of the teach pen operation was considerably greater than that of the teach pendant operation, thereby indicating that the teach pen has superior performance. Figure 10. Bar chart of the TP for operating the two tools at three inclination angles.   Table 10 contains a comparison of the TP of the teach pen operation at different inclination angles; the table shows that no significant difference existed in the TP of the teach pen operation at different angles (F = 0.380, p > 0.05). Therefore, the differences in angles did not affect the TP of the teach pen operation, thereby indicating that the teach pen had similar performance under varying angles; that is, the superior performance of the teach pen was not affected by the angles of inclination.

Conclusions
The new ergonomics teaching system proposed in this study demonstrated high accuracy, was easy and intuitive for professional execution, and was less prone to errors. As suggested in Table 1, bias and variance analyses revealed that an average error of only 1.3 mm occurred in the new teaching system. In addition, the operation time and performance of the new teaching system and those of the teach pendant were compared according to Fitts' Law, and the results showed that the new teaching system was superior to the teach pendant for both time and performance. In addition, the error rate for the new teaching system was similar to that for the teach pendant, thereby indicating that accuracy was not negatively affected by short learning time. Moreover, superior performance was demonstrated at all inclination angles.