# Kinesthetic Learning Based on Fast Marching Square Method for Manipulation
## 3 Learning Manipulation Trajectories via Fast Marching Square
### Kinesthetic Data Collection  
The FML algorithm needs learning data generated by a user as input. To prevent the problems presented in Section 1, such as re-targeting, data collection is directly performed with the robot itself. The data acquisition process, therefore, is based on kinesthetic learning, where the user moves the ADAM robotic arms generating the trajectories required for the task to be performed. This robotic platform is presented in Figure 7.  
The arms used for this project are UR3 from the Universal Robots company. This arm is an ultra-light and compact collaborative industrial robot, with a weight of 11 kg, a payload of 3 kg and a rotation of \(\pm 360^{\circ}\) for the first five joints and infinite rotation at the end-effector. To facilitate the process of taking data with the arm, two grips have been designed at the critical control points of the arm, namely the end-effector and the elbow, as shown in Figure 8. These grips allow the user to have greater control of the six joints, thus allowing the generation of trajectories to be much more natural and similar to those that a human would perform. Figure 5: FM\({}^{2}\) saturated variation: modification of the path depending on the aoi value. Figure 6: Procedure of our proposed method. Each box corresponds to a different algorithm step. These elements can be easily removed from the robot after kinesthetic teaching has been carried out and they can be used on both arms. With these grips, the user can handle the arm in a simple and controlled way, as shown in Figure 9, where the person can handle the last three joints through the end-effector grip (gray), and the first three joints through the elbow grip (green). For path generation, an algorithm with a constant time cycle \(T\) has been designed. This algorithm allows to store the position in Cartesian coordinates of the end-effector. Therefore, each of the paths \(P\) that are taught will contain a set of \(N\) points in the three-dimensional space conformed by \(p(x,y,z)\). Since this method has been created for its use in real environments, it has been established that more than one path can be taken to teach the  
Figure 8: Grips for kinesthetic learning control (yellow and gray handles): (**a**) lateral view; and (**b**) frontal view. Figure 7: ADAM robotic platform: (**a**) full view of the robot; (**b**) 3D LiDAR sensor; and (**c**) robotic base with 2D laser. Figure 9: Example of path teaching guiding the robotic arm with grips: (**a**) initial point; and (**b**) final point. robot. Therefore, \(K\) different paths can be made, which will make up the robot's experience \(E\) that can be codified as  
\[E=[P_{1},P_{2},\ldots,P_{K}] \tag{4}\]  
where each path consists of  
\[P_{i}=[p_{i1},p_{i2},\ldots,p_{i\times Ni}] \tag{5}\]  
Although data collection may seem trivial, it is a very important step and must be performed correctly in order not to generate errors that can be accumulated during the learning step. Empirically, it has been found that there are two preferable ways to collect data. The first one is to perform a movement at a very low speed, having full control of all the joints of the robot. The second one is to perform a path at a high speed, in which, due to the inertia of the movement, the transmission of any possible disturbance from the person teaching the trajectory is avoided. Figure 10 shows results from gathering data in three different ways, where the same path has been taught using different strategies depending on the velocity and stability. As shown in Figure 10, results are clearly better in cases where the user has full control of the robotic arm. When using low velocity and a full control of the 6 DoF of the arm, correct paths are generated but with a greater amount of points than in other cases. If the user decides to use a high velocity demonstration, the path generated has less points than in the previous case, but the path precision is reduced compared with the low-velocity case. Therefore, there is no single way to solve the kinesthetic learning task.