Full text
Universidade do Minho Escola de Engenharia Carlos Alberto Peixoto Borges Inspection of Deformable Objects via Robotic Manipulation: a Learning from Demonstration Approach June 2022 UMinho | 2022 Carlos Borges Inspection of Deformable Objects via Robotic Manipulation: a Learning from Demonstration Approach
Carlos Alberto Peixoto Borges Inspection of Deformable Objects via Robotic Manipulation: a Learning from Demonstration Approach Master’s Dissertation Integrated Master in Mechanical Engineering Mechatronic Systems Work developed under the supervision of: Professor António Alberto Caetano Monteiro and Professor Estela Guerreiro da Silva Bicho Erlhagen Universidade do Minho Escola de Engenharia June 2022
ii COPYRIGHT AND TERMS OF USE OF THIS WORK BY A THIRD PARTY This is academic work that can be used by third parties as long as internationally accepted rules and good practices regarding copyright and related rights are respected. Accordingly, this work may be used under the license provided below. If the user needs permission to make use of the work under conditions not provided for in the indicated licensing, they should contact the author through the RepositoriUM of Universidade do Minho. License granted to the users of this work Attribution-NonCommercial-ShareAlike CC BY-NC-SA https://creativecommons.org/licenses/by-nc-sa/4.0/
iii ACKNOWLEDGMENTS First, I would like to express my gratitude to my supervisors, Professor Caetano Monteiro, and Professor Estela Bicho, for the valuable guidance, encouragement, availability to help me when I most needed, and genuine concern for my well-being. Particularly to Professor Caetano I am grateful for the effort made during the past years to help me in my favorite field of study. Especially to Professor Estela I thank for all the “outside of the box” suggestions that were crucial to this work. Although Professor Luís Louro and Professor Sérgio Monteiro were not officially my supervisors, they demonstrated a level of commitment and dedication to my work as if they were. As such, I would like to express my deepest gratitude to them too. I am also truly grateful to my laboratory colleagues, especially Paulo Vicente, for all the help in different areas. If this dissertation could have a second author, it would undoubtedly be Miguel Maia. Almost every interesting aspect presented here started in discussion with him, and I am sure that without his ideas, many problems would remain unsolved until today. To you my friend, a very special thanks. I thank Junchen Wang, from Beihang University, for the availability and promptness to help, mainly in topics related to singularities, and to Fabio Pando, from Kuka, for all the information related to the robotic arm used. To my family, particularly to my parents and sister, I have to thank for all the investment in my education, for the unconditional support, comprehension, and inspiration. I sincerely hope you feel that all the efforts were worthwhile. I also cannot forget to express my gratitude to my friends, who were always available to comfort me and transmit confidence. Lastly, I want to thank both Professor Estela Bicho and Professor Sérgio Monteiro for the opportunity to work on the exciting project IntVIS4Insp (ref.: POCI-01-0247-FEDER-042778) with the grant support provided by “Fundação para a Ciência e a Tecnologia” with the reference UMINHO/BIM/2021/35.
iv STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho.
v RESUMO A aplicação generalizada da inspeção automática e o interesse crescente pelo controlo de qualidade impulsionam a procura de sistemas capazes de inspecionar objetos cada vez mais complexos. Neste âmbito surgiu o projeto de Investigação & Desenvolvimento “IntVIS4Insp”, no qual esta dissertação se insere. As peças de couro são um exemplo importante do tipo de objetos que este projeto pretende cobrir, porque implicam manipulação no seu processo de inspeção. Uma abordagem que usa aprendizagem por imitação, baseada em dois sistemas, pode ser aplicada para automatizar os movimentos necessários para as inspecionar. Primeiro, um sistema de visão por computador capta as trajetórias descritas pela mão ativa de um técnico de qualidade. Segundo, um braço robótico (Kuka LBR iiwa) reproduz as trajetórias anteriormente adquiridas. Esta dissertação foca-se no segundo sistema. Dois desafios relacionados têm de ser resolvidos no âmbito do seguimento de trajetórias: (i) determinar como comandar o manipulador, sem exceder limites de juntas ou atravessar singularidades, de modo que a garra siga a trajetória desejada, ou seja, resolver um problema de equivalência física; (ii) descobrir como aumentar a distância aos limites das juntas e singularidades por forma a aumentar a capacidade de o manipulador alterar arbitrariamente a pose da garra durante a execução da trajetória. A resolução deste segundo problema é essencial para, nas tarefas futuras do projeto IntVIS4Insp (e noutros), ser possível implementar um sistema de correção da trajetória baseado nas deformações induzidas nas peças de couro em cada instante. Este último sistema aumentará a robustez da abordagem utilizada. Para resolver estes dois problemas é proposto um novo método para seguimento de trajetórias que considera a manipulabilidade. Fundamentalmente, como as trajetórias podem ser realizadas em diferentes zonas do espaço de trabalho do manipulador, esta liberdade é utilizada com as várias soluções do problema da cinemática inversa e com a redundância do cotovelo para aumentar a distância aos limites das juntas e singularidades. Abordagens estado da arte são utilizadas como ponto de partida, mas são alargadas para considerarem a continuidade do arm angle no limite do seu domínio. O método proposto foi testado em trajetórias de inspeção reais (em simulação e com o manipulador real) e os resultados demonstram 3 pontos: (i) as trajetórias foram corretamente reproduzidas; (ii) conseguiu- -se uma elevada manipulabilidade (distância média mínima de 42,6º aos limites das juntas e singularidades); (iii) a abordagem utilizada permite induzir as deformações desejadas nos objetos. Palavras-Chave: Limites de Juntas, Manipulabilidade, Manipulador Robótico, Seguimento de Trajetórias, Singularidades.
vi ABSTRACT The widespread application of automatic inspection and the increasing interest in quality control boost the search for systems capable of inspecting increasingly complex objects. In this scope emerged the Research & Development project "IntVIS4Insp", in which this dissertation is inserted. Leather pieces are an important example of the object type this project intends to address because their inspection process involves manipulation. A learning from demonstration approach, based on two systems, can be used to automate the necessary movements to inspect them. First, a computer vision system acquires the trajectories described by the active hand of a quality control technician. Second, a robot arm (Kuka LBR iiwa) reproduces these trajectories. This dissertation is focused on the latter system. Two related challenges must be solved in a trajectory tracking problem: (i) determine how to command the manipulator so that its end-effector follows the desired trajectory without exceeding joint limits and crossing singularities, i.e., to solve a physical equivalence problem; (ii) find out how to increase the distance to joint limits and singularities to enhance the manipulator's capacity to change its tip’s pose arbitrarily during the execution of the trajectory. Solving this second problem is essential so that, in future tasks of the IntVIS4Insp project (and others), it will be possible to implement a trajectory correction system based on the deformations induced in the leather pieces at each instant. The latter system will increase the robustness of the overall learning from the demonstration approach. To solve both these problems, a novel trajectory tracking method considering manipulability is proposed. Fundamentally, as the trajectories can be executed in different zones of the manipulator’s workspace, this freedom is used with the various possibilities for the inverse kinematics problem and the elbow redundancy to increase the distance to joint limits and singularities. State-of-the-art approaches are used as a starting point, but they are extended to consider the continuity of the arm angle in its domain boundary. The proposed method was tested on real inspection trajectories (in simulation and with the actual manipulator), and the results demonstrate 3 points: (i) the trajectories were correctly reproduced; (ii) a high manipulability was obtained (minimum average distance of 42.6° to joint limits and singularities); (iii) the used approach allows to induce the desired deformations in the leather parts. Keywords: Joint Limits, Manipulability, Robotic Manipulator, Singularities, Trajectory Tracking.
vii CONTENTS 1. Introduction ................................................................................................................................ 1 2. Learning from demonstration ...................................................................................................... 5 2.1 Fundamental aspects of learning from demonstration .......................................................... 5 2.2 Relevant methods to solve the physical equivalence problem ............................................... 8 2.2.1 Problem detailing ......................................................................................................... 8 2.2.2 Inverse kinematics and redundancy resolution ........................................................... 11 2.2.3 Complementary strategies ......................................................................................... 18 2.3 Generalization ................................................................................................................... 19 2.4 Chapter conclusions .......................................................................................................... 23 3. Kinematics of a 7–DoF serial manipulator ................................................................................. 25 3.1 Forward kinematics ........................................................................................................... 25 3.1.1 Forward kinematics fundamental aspects ................................................................... 25 3.1.2 Forward kinematics resolution .................................................................................... 32 3.1.3 Arm angle determination ............................................................................................ 34 3.2 Inverse kinematics ............................................................................................................ 40 3.2.1 Shoulder-wrist vector and joint 4 determination .......................................................... 41 3.2.2 Real elbow’s rotation matrices determination ............................................................. 42 3.2.3 Joint 1, 2, and 3 values determination ....................................................................... 44 3.2.4 Joint 5, 6, and 7 values determination ....................................................................... 46 3.2.5 Final considerations ................................................................................................... 47 3.3 Joint limits and singularities mapping into the redundancy circle ........................................ 48 3.3.1 7-DoF serial manipulator kinematic singularities ......................................................... 48 3.3.2 Arm angle feasible intervals ....................................................................................... 51 4. Trajectory tracking considering manipulability ............................................................................ 56 4.1 Method description ............................................................................................................ 56 4.1.1 Scanning ................................................................................................................... 57 4.1.2 Arm angle series ........................................................................................................ 60
xiv LIST OF ACRONYMS Acronym Description AR Augmented Reality CAD Computer Aided Design CG Center of Gravity CPD Coherent Point Drift CSV Comma Separated Values DH Denavit–Hartenberg convention DoF Degrees of Freedom FK Forward Kinematics GC Global Configuration GUI Graphical User Interface HMI Human Machine Interface IK Inverse Kinematics IO Input–Output communication IP Internet Protocol LfD Learning from Demonstration PbD Programming by Demonstration RC Redundancy Circle ROS Robot Operating System RTU Remote Terminal Unit SEVW Shoulder–Elbow of the virtual manipulator–Wrist SEW Shoulder–Elbow–Wrist S-R-S Spherical–Rotational–Spherical SW Shoulder–Wrist TPS–RPM Thin Plate Spline–Robust Point Matching TSM–RPM Tangent Space Mapping–Robust Point Matching UDP User Datagram Protocol
xv LIST OF SYMBOLS Symbol Description Used unit 𝜶 Constant that controls the distance to the borders from where the repulsion begins, α ∈ ℝ+ - 𝜶𝒊 DH parameter: angle between z𝑖−1 and z𝑖 about x𝑖 (positive rotation direction is counter-clockwise) rad 𝜸 Angle formed by the shoulder–elbow, and elbow–wrist vectors rad 𝜹 Arm angle safety margin for singularities rad 𝜽𝒊 Angular value of joint 𝑖/DH parameter: angle between x𝑖−1 and x𝑖 about z𝑖−1 (positive rotation direction is counter-clockwise) rad 𝜽𝒊𝒗 Angular value of joint 𝑖 in the virtual manipulator rad 𝜽𝒍 Lower joint limit rad 𝜽𝒖 Upper joint limit rad 𝜽𝟒 𝒎𝒆𝒂𝒏 Mean of the joint 4 distances to its limit/singularity for each path rad 𝜽𝟒 𝒎𝒊𝒏 Minimum of the joint 4 distances to its limit/singularity for each path rad 𝝓 Angle formed by the shoulder–wrist, and shoulder–elbow vectors rad 𝝍 Arm angle rad 𝝍(𝒕) Arm angle to be determined in the current pose rad 𝝍(𝒕−𝟏) Arm angle from the previous pose rad 𝝍𝒍 Lower limit of the current pose feasible interval that contains 𝜓(𝑡−1) rad 𝝍𝒎𝒆𝒂𝒏 Mean of the shortest distances of the arm angles to the limits of the feasible intervals for each path rad 𝝍𝒎𝒊𝒏 Minimum of the shortest distances of the arm angles to the limits of the feasible intervals for each path rad 𝝍𝒖 Upper limit of the current pose feasible interval that contains 𝜓(𝑡−1) rad
xvi Symbol Description Used unit 𝑨𝒔, 𝑩𝒔, 𝑪𝒔 Auxiliar matrices used in the calculation of 𝑅3.0 with the Rodrigues’ rotation formula, and also of 𝑅7.4 - 𝑨𝒘, 𝑩𝒘, 𝑪𝒘 Auxiliar matrices used in the calculation of 𝑅7.4 𝒂𝒊 DH parameter: distance from frame 𝑖−1 to frame 𝑖 measured along x𝑖 m 𝒂𝒏/𝒂𝒅/𝒂 Generic representation of an element of the matrices 𝐴𝑠 or 𝐴𝑤. The subscript 𝑛 stands for numerator or first input, the 𝑑 for denominator or second input. - 𝒂𝒔𝒎𝒏,𝒃𝒔𝒎𝒏, 𝒄𝒔𝒎𝒏 Element of the 𝑚 row and 𝑛 column of the auxiliar matrices 𝐴𝑠, 𝐵𝑠, 𝐶𝑠, respectively - 𝒃𝒏/𝒃𝒅/𝒃 Generic representation of an element of the matrices 𝐵𝑠 or 𝐵𝑤. The subscript 𝑛 stands for numerator or first input, the 𝑑 for denominator or second input. - 𝒄 Notation simplification for cos rad 𝒄𝒏/𝒄𝒅/𝒄 Generic representation of an element of the matrices 𝐶𝑠 or 𝐶𝑤. The subscript 𝑛 stands for numerator or first input, the 𝑑 for denominator or second input. - 𝒅𝒃𝒔 Base–shoulder distance m 𝒅𝒆𝒘 Elbow–wrist distance m 𝒅𝒊 DH parameter: distance from frame 𝑖−1 to frame 𝑖 measured along z𝑖−1 m 𝒅𝒔𝒆 Shoulder–elbow distance m 𝒅𝒘𝒕 Wrist–tip distance m 𝑮𝑪𝒊 Configuration flags for the joints 2, 4, and 6. - 𝑰𝒏 Identity matrix of size n×n - 𝑲 Constant that controls the strength of repulsion from the interval limits, 𝐾 ∈[0,1] - 𝒎𝒔 Score attributed to each path - 𝒑𝒋𝒌.𝒊 Vector that goes from the origin of frame 𝑗 to the origin of frame 𝑘, with coordinates relative to frame 𝑖 m
xvii Symbol Description Used unit 𝑹𝝍.𝟎 Rotation matrix resulting from the Rodrigues’ rotation formula - s Notation simplification for sin rad 𝒗𝑺𝑬𝑾 . Vector normal to the plane SEW - 𝒗𝑺𝑬𝑾 𝒗 Vector normal to the plane SEVW - 𝒗× Cross-product matrix for the unit vector 𝑣 -
1 1. INTRODUCTION The present work is part of the project IntVIS4Insp–Intelligent & Flexible Computer Vision System for Automatic Inspection (reference: POCI-01-0247-FEDER-042778). This project intends to develop automatic quality control systems capable of inspecting complex objects. Here, complex objects are considered the ones with specular or textured characteristics, complex tridimensional geometry, and features only visible through manipulation. This dissertation will mainly focus on the latter example, particularly in defects of small leather pieces with buckling strength (present resistance when one tries to approximate their extremities). Typically, these objects' inspection process involves movements to highlight the existing defects, e.g., cuts, folds, pokes, and glue spills. Giving a practical example, the reader (without looking to the next page) is challenged to identify all the cuts present in the leather piece of the figure below (Figure 1.1), which is flat on a surface. Then, the number of detected cuts can be compared with the one observed in Figure 1.2, where the object is bent. Due to its complexity, this task is done manually, which raises the problem of musculoskeletal injuries. Highly skilled human operators are required to ensure good quality control, but these are hard to hire. Hence, to provide a healthier industry along with highly demanding customer expectations, it is of paramount importance to automate, at least in part, the task of leather pieces inspection. The work here reported makes several steps toward this objective. The ultimate goal is to develop a highly flexible robotic system that can emulate the inspection movements performed by human operators. Figure 1.1 – Cut defects in a leather piece when it is flat on a surface.
2 To automate the presented task, a Learning from Demonstration (LfD) approach 1 , based on three systems, is used on the introduced project: ➢ First, the movements of a person's hands during the manipulation are acquired with a computer vision system. Other methods could be used to obtain the trajectories, such as teleoperation and kinesthetic teaching, but the allowed freedom of movement to the person performing the exemplification would be reduced. ➢ Then, a robotic system reproduces these trajectories. All the inspection movements considered are complementary between both hands, which means that to enforce a particular configuration on the object does not matter the movement of each hand independently but rather the movement relative to each other. Therefore, the inspection can be made with only one active robotic arm (with a 7 Degrees of Freedom (DoF) serial manipulator due to its dexterity), which is responsible for performing the inspection movements, and a fixed grasp support with a holding function (Figure 1.3). ➢ A second computer vision system analyzes the leather pieces during the manipulation. It is crucial to note that, in the future, another computer vision system will be used to verify if the desired deformations are actually being induced in the leather pieces. If they are not, online corrections will need to be introduced in the trajectories. This will increase the robustness of the overall system and allow to deal, for example, with minor variations in the grasping points of the leather pieces. 1 The main reasons why a learning from a demonstration approach must be used in the introduced project will be discussed in Section 2. Figure 1.2 – Cut defects in a leather piece when it is bent.
3 It was the goal of this dissertation to focus on the second system previously presented (i.e., the robotic one) and meet the following objectives: ➢ Obtain a trajectory tracking method capable of making the tip of a 7-DoF serial manipulator follow the acquired inspection trajectories, i.e., solve a physical equivalence problem. This method must consider the manipulability of the robotic arm at every via point of the trajectory, i.e., the capability to change the position and orientation of the end-effector arbitrarily. This capability will help ensure that the online corrections one intends to introduce in future works can be performed. ➢ Test the developed method with real inspection trajectories and analyze the results regarding manipulability. ➢ Validate the tracking of the trajectories and the safety of the generated movements using a robotics simulator. ➢ Mount a physical setup where the active manipulator must be the Kuka LBR iiwa 14 R820. All the other aspects should be studied and implemented, e.g., gripper to be used, and communication/command interfaces. All the decisions must consider the online corrections that will be implemented in the future. The available ROS (Robot Operating System) interfaces should be prioritized because they accelerate the component’s integration process and the development of the necessary programs. With the obtained setup, it must be proved that the reproduced trajectories induce in the leather pieces the desired deformations. The present dissertation is organized as follows: Section 2 mainly introduces learning from demonstration and presents the primary methods found in the literature that can be useful to solve a trajectory tracking problem considering manipulability. Section 3 uses approaches exposed in Section 2 to solve kinematic Figure 1.3 – Approach used to automate the necessary manipulation to inspect the leather pieces.
4 problems related to a 7–DoF serial manipulator (e.g., forward kinematics and inverse kinematics). In Section 4, the two previous sections are used as a base to present a novel trajectory tracking method considering manipulability. Also in this chapter, the presented method is extensively tested using real inspection trajectories. Finally, Section 5 presents an overview of all the work done and extracts the main conclusions as well as the future prospects. The most important contribution of this dissertation is the method exposed in Section 4, which gave rise to the paper “Trajectory tracking for the inspection of deformable objects considering manipulability of a 7-DoF serial manipulator”, presented at the 2022 IEEE International Conference on Autonomous Robot Systems and Competitions (ICARSC) (Borges et al., 2022).
5 2. LEARNING FROM DEMONSTRATION This chapter first presents the essential aspects of learning from demonstration. Then, because of its importance to this dissertation, the physical equivalence problem is explored in detail. Finally, the generalization of demonstrations in the scope of deformable objects is studied, and the chapter’s conclusions are presented. 2.1 Fundamental aspects of learning from demonstration In robotics, Learning from Demonstration 2 (LfD) represents a paradigm in which robots learn by imitating experts, thereby acquiring new skills (Ravichandar et al., 2020). One of the significant advantages of this method is that it can be used by those who have no programming capabilities. Users only have to exemplify how to perform the task they want to automate because the robotic system can collect a set of data and use it later to replicate the exemplified task (Billard et al., 2016; Zhu & Hu, 2018). In this dissertation, this advantage is essential because people who know how to highlight the defects in leather pieces do not know how to program the robots. In addition, LfD is also advantageous in the sense that, unlike other methods used to manipulate deformable objects, avoids modeling (see, for example, Sanchez et al. (2020)) and motion planning (see, for instance, Saha and Isto (2007)) (McConachie et al., 2020). Despite the advantages presented above, LfD also has disadvantages. In this method, the actions generated may be limited by the demonstrator’s capabilities, not by the robot. The latter may be, for example, faster than the former. Thus, to take full advantage of the robotic system capabilities, there may be a need to resort to specific techniques such as Reinforcement Learning (see Sutton and Barto (2018) for an introduction to the topic). Furthermore, if a task is to be performed under different conditions than those in which the demonstrations were performed (with pieces of leather with different sizes or properties, for example), they can become inadequate. It may be necessary to generalize the exemplifications or perform new ones (Argall et al., 2009; McConachie et al., 2020). Due to its importance, the first option will be detailed in subchapter 2.3. 2 In addition to the term learning from demonstration, there are other common terminologies in the literature. Examples are Programming by Demonstration (PbD), Imitation Learning, and Apprenticeship Learning (Billard et al., 2016).
6 Using LfD, it is necessary to decide how the exemplifications of the task to be automated will be performed. Three different approaches can be chosen: ➢ Kinesthetic teaching: in this method, while the person performing the exemplifications physically moves the manipulator, data for learning is collected from sensors that equip the robot itself (Figure 2.1–a)). Thus, this is a user-friendly method that does not require any equipment other than the arm. Moreover, it does not require transferring movements between different systems because the demonstrations are performed in the robot that will be used in the desired task. On the other hand, a disadvantage of this approach is that the quality of the demonstrations is dependent on the dexterity and smoothness of the agent exemplifying the task (Billard et al., 2016; Ravichandar et al., 2020; H. Zhang et al., 2020). ➢ Teleoperation: here, the agent performing the demonstration sends the commands to the robot from a device (such as the one in Figure 2.1–b)), which can be haptic (as in Evrard et al. (2009)) or combined with virtual reality interfaces (as in T. Zhang et al. (2018)). In teleoperation, the robot collects data from sensors, similarly to kinesthetic teaching, and, as such, there is no need to transfer movements here either. Although, in this method, the exemplification process may not be user-friendly (Ravichandar et al., 2020). a) b) c) Figure 2.1 – Different ways of performing the demonstrations: a) Kinesthetic teaching (adapted from Tang (2020)); b) Teleoperation (adapted from Ravichandar et al. (2020)); c) Human movements (adapted from Vogt et al. (2017)). ➢ Human movements: in this approach, a person exemplifies the task that is to be performed, and her movements are captured, for example, by vision-based systems (as in Vogt et al. (2017)) or by motion sensors 3 (as in Edmonds et al. (2017)). Subsequently, it is necessary to understand how the captured movements will be transferred to the robots since they have differences from humans (known as the body correspondence problem). Despite this, the approach allows ample freedom of movement to the agent performing the exemplification. As already mentioned in 3 There are situations in which it may be useful to use sensors that can also collect force information, such as when one wants to open medicine bottles with child safety mechanisms (Edmonds et al., 2017).
13 the redundancy circle. In practice, this means that, as depicted in Figure 2.4, one can know which zones of the redundancy circle put the joints inside (represented with the green color) and outside their limits (represented with the red color). Despite this, the inverse kinematics algorithm does not consider the different solutions, and the joint limits mapping is only achieved for one joint. Moradi and Lee (2005) made minor corrections to the inverse kinematics algorithm proposed by Dahm and Joublin (1997) and introduced a more extensive method to map joint limits into de redundancy circle. These authors also presented a redundancy resolution approach in which the arm movement was reduced with the minimization of the elbow position variation. Nevertheless, as the work of Dahm and Joublin (1997), this paper does not consider the different inverse kinematics solutions. Shimizu et al. (2008) presented a solution to the previously mentioned situation in which the arm angle presented by Kreutz-Delgado et al. (1992) became undefined. To achieve this, they proposed that the reference plane stopped being spanned by a fixed vector and the vector from shoulder to wrist, starting being defined by the SEW (Shoulder–Elbow–Wrist) plane of a virtual manipulator, refered as SEVW. The virtual manipulator is a non-redundant image of the original arm (has its third joint always in its zero position)–Figure 2.5. Moreover, these authors presented a new method to solve the inverse kinematics problem, and they derived expressions that allow mapping not only joint limits but also singularities into the redundancy circle. Finally, a redundancy resolution method is presented to increase the distance to joint limits. Despite being an extensive and detailed work, which considers the main problems of this dissertation, the paper of Shimizu et al. (2008) has the same problem as others already presented: it does not consider the multiple inverse kinematics solutions. Furthermore, when the root of the wrist (intersection of the last Figure 2.5 – Arm angle (𝜓) representation with the reference plane being given by a virtual manipulator, as proposed by Shimizu et al. (2008).
14 three joints’ axes of the manipulator) is in the direction of the joint 1 axis, the angular value for this joint becomes indeterminate at an early stage of the algorithm. Moreover, this condition can lead to abrupt variations in trajectory tracking. To solve the first problem, the authors use a convention and set the value of the first joint to zero, but the second was not analyzed. Xu et al., 2016 agreed that the alternative way of defining the arm angle proposed by Shimizu et al. (2008) could deal with the algorithmic singularity presented in the Kreutz-Delgado et al. (1992) approach. Despite this, they pointed out that the reference plane used by Shimizu et al. (2008) is not absolute, i.e., it varies between different solutions of the inverse kinematics, making the approach neither user-friendly nor convenient for practical applications. Therefore, Xu et al., 2016 proposed a method that uses two arm angles. These are defined similarly to what was seen in the Kreutz-Delgado et al. (1992) approach but in a twofold way. Two fixed vectors and the vector from shoulder to the wrist are used to spawn two reference planes, which define the two arm angles with the SEW plane. As the vector from shoulder to the wrist cannot be collinear simultaneously with the two fixed vectors, at least one reference plane will always be defined. Thus, the algorithmic singularity is avoided, and both reference planes are absolute. These authors also present a method for solving the inverse kinematics and consider the eight different solutions that exist at most. As previously presented, these eight solutions can be defined by the combinations of signals used in joints 2, 4, and 6. Thus, these authors suggest placing three configuration flags in these three joints to make the selection among the various possible solutions. Kuhlemann et al. (2016) also solved the inverse kinematics problem considering an elbow redundancy parameter and configuration flags. Despite everything, in both works, joint limits and kinematic singularities were not considered, and a redundancy resolution approach was not proposed as in Shimizu et al. (2008). Oh et al. (2017) defined the arm angle similarly to Kreutz-Delgado et al. (1992) and used the Shimizu et al. (2008) approach to solve the inverse kinematics problem and map joint limits into the redundancy circle. Moreover, they determined the feasible arm angle range to avoid self-collisions and presented a redundancy resolution strategy. Despite this, it is not adequate for a trajectory tracking problem because it does not ensure a continuous arm angle variation. The work proposed by Faria et al. (2018) brought two significant developments, which made this the state-of-the-art approach to solving the inverse kinematics and redundancy problem (Wang et al., 2021; Wiedmeyer et al., 2021): ➢ These authors used configuration flags to make the inverse kinematics algorithm proposed by Shimizu et al. (2008) return the eight possible solutions (at most). For these solutions, they also used the strategy of Shimizu et al. (2008) to map joint limits and singularities to the redundancy
15 circle. In this particular work, the authors call the flags Global Configuration parameter and divide it into three variables, 𝐺𝐶2, 𝐺𝐶4, and 𝐺𝐶6, which are the flags for the shoulder, elbow, and wrist, respectively. ➢ An analytical redundancy resolution approach was proposed, allowing joint limits and singularities avoidance, and real-time performance. To better understand this method, one should consider Figure 2.6. In this figure, it is possible to see the arm angle feasible intervals (represented in grey) for two consecutive poses of a given trajectory (to a specific solution of the inverse kinematics). The chosen arm angle for pose 1 was 𝜓𝑡−1 and the arm angle for pose 2 is to be determined (𝜓𝑡). Here, the method proposed by Faria et al. (2018) first looks for which interval in the current pose, pose 2, contains the arm angle of the previous pose (𝜓𝑡−1), pose 1. In this case, this interval would be the second (marked in green). From this interval and with 𝜓𝑡−1, it is possible to determine 𝜓𝑡 from an equation with two parameters that can be tuned. The first controls the strength of repulsion of the arm angle from the limits of the feasible interval. The second controls the distance to the limits from where the repulsion starts. Thus, the second parameter controls the tendency of the arm angle to move towards the interval center or to preserve its position, as long as it is not overly close to limits. In conclusion, the next arm angle is calculated depending on the previous, originating smooth transitions between poses and avoiding joint limits and singularities. Another great advantage of the article proposed by Faria et al. (2018) is that the authors make the approach implementation in Matlab available, which speeds up the understanding of the code, the implementation of changes, and the testing phase (Faria, 2021). Regardless of this, some problems still arise: ➢ The redundancy resolution method does not consider the continuity of the arm angle at −𝜋/𝜋, i.e., it does not consider that at one instant of time one can have a value slightly below 𝜋, and at the next instant a value slightly above −𝜋 (Figure 2.7), or vice versa. Figure 2.6 – Redundancy resolution approach proposed by Faria et al. (2018). ose ose 2 Arm angle ( )
16 ➢ The resolution of the singularity that happens when the root of the wrist lies in the direction of the joint one axis is solved identically to Shimizu et al. (2008), and the problems that can arise from here related to trajectory tracking are also not analyzed. ➢ The method proposed by Faria et al. (2018) does not suggest any way to choose one of the several solutions available in inverse kinematics or to select the arm angle to be used in the first pose of a trajectory. Gong et al. (2019) proposed an alternative way to solve the inverse kinematics problem, also using configuration flags and defining the arm angle similarly to Shimizu et al. (2008). They discussed the situations in which the configuration flags could be switched in the middle of a movement without causing abrupt changes in the joint values. In addition to this, these authors also mapped into the redundancy circle joint limits and collisions with obstacles. Nevertheless, it can be argued that this approach will not be as suitable for trajectory tracking as the one of Faria et al. (2018) because singularities are not taken into account in such a detailed way, and a suitable redundancy resolution approach is not suggested. Tian et al. (2021) solved the inverse kinematics problem similarly to Faria et al. (2018). Although, they defined the reference plane used to define the arm angle through the vectors from base to shoulder and from shoulder to wrist. As Gong et al. (2019), these authors discuss the situations in which it is possible to switch between solutions of the inverse kinematics, in the middle of a movement, without abrupt changes in the joint values. To solve the redundancy problem, an iterative approach was proposed that optimizes a cost function, resulting in the arm angle that maximizes the avoidance of joint limits. Wiedmeyer et al. (2021) used the algorithm of Faria et al. (2018) to solve the inverse kinematics problem and map joint limits and singularities to the redundancy circle. Despite this, they proposed a new method for solving the redundancy problem but considered more than one objective. In addition to avoiding joint limits and singularities, higher end-effector velocities and smoother trajectory execution were sought and achieved. As the approach of Faria et al. (2018), the strategy of these authors can also work in real-time, and its implementation in C++ is public too (Wiedmeyer, 2020). Regardless, it is not as user-friendly as the implementation of Faria et al. (2018). One of the goals of this dissertation is to create a system that is prepared to be subjected to online corrections. To achieve this, the robot must have the capability to change the position and orientation of Figure 2.7 – Continuity of the arm angle in −𝜋/𝜋 in redundancy resolution. ose ose 2 Arm angle ( )
17 the end-effector arbitrarily. This requirement is usually evaluated in the literature by the concept of manipulability (Yoshikawa, 1985), which is negatively affected by the proximity to joint limits and singularities (Vahrenkamp et al., 2012). For this reason, Wiedmeyer et al. (2021) highlight that the middles of the feasible arm angle intervals, for each pose, increase manipulability. In this approach, two aspects must be taken carefully. The first is that the feasible intervals do not consider the fourth joint because it is independent of the arm angle. Thus, singularities and joint limits related to it will not be considered. The second is that the arm angle is an abstraction for six joints and, as such, may sometimes not represent the real proximity to the boundaries of all joints or singularities. Nevertheless, this approach is suitable to increase the manipulability in real-time performance because the absolute value of the fourth joint will be explicitly defined by the pose 7 , and, as such, one can not change it, i.e., it can not be used to influence the manipulability. In cases where there is the possibility of changing the poses values, the fourth joint angle can already be exploited and, as such, can be used to increase the manipulability. More than this, the pose with larger feasible intervals can be searched. Such an approach is presented in the doctoral thesis Faria (2018). In this work, the author was able to change the orientation of a pose and used this possibility to obtain the one with the highest manipulability. Despite this, the distance to joint limits in the fourth joint was not considered, only its singularity. Faria et al. (2018) detected singularities by comparing a discriminant with zero through a threshold. Wang et al. (2021) argued that this is not a good practice because the threshold will be inconsistent across different poses, which will lead to wrong feasible arm angle intervals. To solve this numerical issue, the authors clearly defined that a 7-DoF S-R-S manipulator is in a singularity when joint 2 or 6 is at 0º or ±180º (in this dissertation, only the first case is possible because the used arm’s joints do not have a maximum angular limit of ±180º). From this point and with the expressions that come from the works of Shimizu et al. (2008) and Faria et al. (2018), Wang et al. (2021) were able to detect singularities in a numerically stable way. Dou et al. (2022) proposed a strategy to solve the redundancy problem similar to Faria et al. (2018). Still, they simplified the calculations of the equation presented in the latter paper. Despite this, they continued to use two equivalent tunable parameters and the arm angle from the previous pose. Furthermore, these authors divided the feasible intervals into "working areas" and "dangerous areas" to increase safety. 7 It will be seen in Section 3.2.1 that the joint 4 will have the same distance to joint limits and singularities independently of the arm angle and inverse kinematics solution.
18 Finally, the introduced redundancy resolution strategy was used to successfully solve a trajectory tracking problem. Works as Asfour and Dillmann (2003), Tondu (2006), and Kim and Rosen (2015) are not explored in this literature review because they focus on human likeness 8 and, as such, are difficult to use in generalpurpose approaches. Furthermore, this section mainly presented closed-form inverse kinematics algorithms and redundancy resolution strategies of 7-DoF S-R-S manipulators. Still, specific trajectory tracking strategies can contribute to the success of this work. As such, the next section will expose some of these strategies and works that use them. 2.2.3 Complementary strategies Despite the importance of inverse kinematics algorithms and the strategies for redundancy resolution, other aspects have been highlighted in the literature that can add value to this dissertation. Gutzeit et al. (2018) pointed out that when one wants to solve a trajectory tracking problem, like the one faced in this dissertation, the workspace zone where the manipulator will describe the trajectory can vary. By following the trajectory, the effects on the material to be inspected will be the same. Still, there will be restrictions associated with the passive manipulator reachable zone and the areas that the inspection camera will capture. Despite this, they will never be highly limiting because the passive manipulator reachable zone can be, at least, equal to that of the active one. Moreover, there may be several cameras or only one camera attached to the passive manipulator. Considering that this dissertation pretends to solve a trajectory tracking problem, increasing the manipulability of the arm in each pose, the place in which these requirements are fulfilled should be chosen. One of the most significant advantages of learning from demonstration is that it allows people not specialized in robotics to program a robot. Thus, a system that works by LfD should have a set of interfaces with the user, which allow more than just collecting trajectories. Nowadays, these interfaces enable interactions such as: ➢ Command and collect information about the manipulator intuitively through a Human Machine Interface (HMI)/Graphical User Interface (GUI). ➢ Perform commands through gestures (Figure 2.8 – a)). 8 Despite not being in the scope of this thesis, the human-like movements are of great importance in taks that envolve human-robot collaboration, because they make the movements more predictable and enhance the collaboration (Garcia et al., 2019).
19 ➢ Visualize acquired trajectories and simulations in Augmented Reality (AR) (Figure 2.8 – b)). Also, in AR, obstacles can be designed online with gestures to be included in simulations, and trajectories can be modified. a) b) Figure 2.8 – User-friendly interfaces used in LfD: a) Commands through gestures; b) Trajectory capturing with online representation in an AR environment (adapted from Zhang (2019)). A recent and exciting work that addresses these topics is Zhang et al. (2020). 2.3 Generalization Although LfD takes a task demonstration as a starting point, it is not easy to exemplify all the conditions under which the desired task can be performed. Imagine, for example, the case in which one wants to tie a knot in a rope with a bimanual robotic system (Figure 2.9 – a)). In the situation in which the desired task is to be performed (Figure 2.9 – b)), no matter how many exemplifications are performed, the rope can always be in different initial configurations and poses (Figure 2.9 – c)), or ropes of different sizes may appear. These modifications imply changes in the way the task is performed. Thus, it is considered that the generalization/adaptation ability is important in LfD. Deep down, it will distinguish systems that can learn a task from the systems that can only reproduce demonstrations (Ravichandar et al., 2020). In the case of deformable materials, when LfD is used, the adaptability of systems has been achieved based on non-rigid registration methods 9 . These methods allow transforming a point cloud into another, and, to do so, they solve two problems (Tang et al., 2016): 9 Examples of methods used in task modeling and generalization, outside the scope of deformable object manipulation, are: Hidden Markov Models (HMMs), Gaussian Mixture Models (GMMs), and Dynamic Movement Primitives (DMPs) (Billard et al., 2016; Zhu & Hu, 2018). More information about these methods can be found in Chernova and Thomaz (2014) and Xie et al. (2020).
20 1. Find the correspondence between the points of the two clouds. 2. Determine a transformation function that minimizes the distance between the previously considered correspondent points when applied to the cloud to be transformed. This type of method is called "non–rigid" because to transform a point cloud into another, the first is "warped", not only translations or rotations are applied (Crum et al., 2004). This aspect can be seen in Figure 2.10, particularly in the grids of a) and b), as they allow to infer the effect of the “warp” function needed to transform the point cloud of a) (which corresponds to the rope configuration presented in Figure 2.10 – c)) into the one of b) (which corresponds to the configuration presented in Figure 2.10 – d)). Some examples of non-rigid registration methods are the algorithms: Thin Plate Spline-Robust Point a) b) c) Figure 2.9 – Bimanual manipulation of linear deformable objects: a) Two manipulators finish the task of tying a knot; b) Initial configuration of a rope for which the system is intended to perform the task; c) Initial configuration of a rope in the exemplification performed, that only approximates the configuration in which the task is intended to be performed (adapted from Tang (2020)).
21 Matching (TPS–RPM) (Chui & Rangarajan, 2003); Tangent Space Mapping–Robust Point Matching (TSM– RPM) (Tang et al., 2016); and Coherent Point Drift (CPD) (Myronenko & Song, 2010). a) b) c) d) Figure 2.10 – Generalization of trajectories, in the manipulation of deformable linear objects, based on non-rigid registration methods: a) Point cloud corresponding to the configuration of the rope present in c) and respective manipulation trajectory, obtained from an exemplification; b) Point cloud corresponding to the configuration of the rope present in d) and respective manipulation trajectory, generalized from the trajectory present in a); c) Initial configuration of the rope before performing the exemplification that provides the trajectory present in a); d) Initial configuration of the rope when the desired task is to be performed (adapted from Schulman et al. (2016)). Schulman et al. (2016) were the first to use non-rigid registration methods to generalize exemplified trajectories. They studied tasks like knot tying and folding clothes, in which the initial pose, configuration, and size of the object may change between the exemplification and reproduction situations. To adapt the trajectories between these two scenarios, these authors assumed that the function that transforms the objects point clouds from one situation to another, is the same that will allow the adaptation of the demonstrated trajectories to the new case. Thus, these authors use a non-rigid registration method (TPSRPM) in order to determine the necessary transformation function (ℝ3→ℝ3), and then apply this function to the trajectory collected in the exemplification, obtaining a new one, suited for the new initial situation. For this reason, the authors have called the method trajectory transfer. In the case of Figure 2.10 the transformation function obtained allows to "warp" the point cloud of a) into the one of b), and applying this function to the exemplified trajectory, present in a), one obtains its generalization, shown in b). Still in the work of Schulman et al. (2016) it is also relevant to highlight the following three points:
22 ➢ In tasks that involve gripping and releasing the object several times, such as knot tying and folding clothes, the trajectory transfer method is applied several times to each of the individual trajectories between gripping and releasing the object. ➢ The results will be better if there are several exemplifications for each task/task step. This is because one can choose the exemplification whose initial state has more similarities to the current situation, considering the configuration, pose, and object size. ➢ The exemplification of trajectories that allow changing the object state in situations from which one will not be able to finish the task allows reducing the number of times the method fails. After the work done by Schulman et al. (2016), several others appeared with the same scope (generalization of trajectories in the manipulation of deformable objects, using non-rigid registration methods), bringing different improvements. Three of the most recent of these works are Huang et al. (2015) 10 , Tang et al. (2016), and Tang et al. (2018). Huang et al. (2015) improved the correspondence between the point clouds of the exemplification and reproduction situations. To do this, they identified specific zones of ropes and towels, using convolutional neural networks 11 , and incorporated the information from there into the TPS-RPM algorithm used by Schulman et al. (2016). Tang et al. (2016) proposed an alternative method, the TSM-RPM, which has application in tangent space (see Figure 2.11 (a) and (b)), whereas TPS-RPM had in Cartesian space. a) b) Figure 2.11 – Tangent space used in the application of the TSM-RPM algorithm, proposed by Tang et al. (2016): a) Schematic representation of a rope arranged on a surface; b) Representation of the rope presented in a) in the tangent space: the horizontal axis represents the length of the rope, and the vertical axis represents the direction of a unit vector tangent to it (adapted from Tang et al. (2016)). 10 Although this paper is indicated as more recent than Schulman et al. (2016), it is not, because the latter was first published in 2013. 11 Convolutional neural networks allow, among others, to solve complex problems in computer vision, particularly in object recognition (Rivas, 2020). In the scope of this thesis, this method can be considered as a black box, but detailed information can be found in Nielsen (2015) and Aggarwal (2018). 0 4 0 0 4 Tangent Direction Rope length y x
29 𝑇 .01𝑇 .12=[ 𝑅 .02𝑝02.0 0 0 0 1 ]= 𝑇 .02. (3.13) Now that it is possible to understand better how the homogeneous transformations work, a simple example of the three-step procedure presented at the beginning of this subchapter will be presented. This example will consider a simple 2-DoF planar manipulator, like the one presented in Figure 3.2. Considering now that joints 1 and 2 are submitted to a rotation 𝜃1 and 𝜃2, respectively, the arm is positioned in the configuration presented in Figure 3.3. The position and orientation of frame 1 relatively to frame 0 can be obtained by (colors of equation 3.14 should be related to the frames of Figure 3.3): 𝑇 .01=𝑅𝑜𝑡(𝑥,𝜃1)𝑇𝑟𝑎𝑛𝑠(0,𝐿1,0)𝑅𝑜𝑡(𝑥,𝜃2)𝑇𝑟𝑎𝑛𝑠(0,𝐿2,0), (3.14) which allows to obtain, Figure 3.2 – Schematic representation of a 2-DoF manipulator with a base and end-effector frame. L1 and L2 are the lengths of links 1 and 2, respectively. Figure 3.3 – Schematic representation of a 2-DoF manipulator with a 𝜃1 and 𝜃2 rotations in joints 1 and 2, respectively. z0 0z1 1 1 2 oint oint 2 z0 0 z1 1 1 2
30 𝑇 .01=[1000 0𝑐𝑜𝑠(𝜃1+𝜃2)−𝑠𝑖𝑛(𝜃1+𝜃2)𝐿2𝑐𝑜𝑠(𝜃1+𝜃2)+𝐿1𝑐𝑜𝑠(𝜃1) 0𝑠𝑖𝑛(𝜃1+𝜃2)𝑐𝑜𝑠(𝜃1+𝜃2)𝐿2𝑠𝑖𝑛(𝜃1+𝜃2)+𝐿1𝑠𝑖𝑛(𝜃1) 0 0 0 1 ]. (3.15) The latter can easily be verified by the projections represented in Figure 3.4 (and the colors related). The previously presented topics and procedure are of great importance to understanding the fundamental aspects of the forward kinematics problem. Despite this, a systematic and general method called the Denavit-Hartenberg convention (DH) is typically followed 14 . In this convention, a coordinate frame is assigned to each link of the manipulator. It is considered that an arm has a total of n+1 links, connected by n joints. The link 0 is conventionally fixed to the robot’s base. As such, for a n DoF manipulator, there will be n+1 coordinate frames, numbered from 0 to n. The assignment of the frames should be done following the steps presented next (particular considerations about the frames 0 and n will need to be made before): 1. Choose the z-axis of the 𝑖 (goes from 0 to n) frame (z𝑖) along the axis of joint 𝑖+1. The direction of the z-axis is determined by the joint’s positive direction of rotation. 2. Locate the origin of the frame 𝑖 (O𝑖) at the intersection of the axis z𝑖 with the common normal to axes z𝑖 and z𝑖−1 (line containing the minimum distance segment between the two axes). If z𝑖 and z𝑖−1are parallel, then O𝑖 should be located so that the distance between the current and 14 There are different variations of the Denavit-Hartenberg convention (Waldron & Schmiedeler, 2016). In this thesis is used the one known as “classical” (particulary the steps and rules presented in Siciliano et al. (2009) and McKerrow (1991)) because it is the one that is used in the papers that constitute the foundations of this work. Figure 3.4 – Schematic representation of a 2-DoF manipulator with the elbow and tip projections in the base frame. z0 0 z1 1 1 2 1 1 1 1 1 2 1+ 2 2 1+ 2 z1 1 1 2 1+ 2+ /2 = 1+ 2 1+ 2+ /2 = 1+ 2 1+ 2 1+ 2 1 2
31 the previous frame, measured in the z-axis of the latter, becomes 0. If the axes intercept, then O𝑖 should be at the intersection of the axes axes z𝑖 and z𝑖−1. 3. Choose x𝑖 axis along the common normal to axes z𝑖 and z𝑖−1 with direction from joint 𝑖 to joint 𝑖+1. If z𝑖 and z𝑖−1are parallel, x𝑖 is made coincident with the centerline of the link. If they intersect x𝑖 can be made parallel, or anti-parallel, with the cross product of z𝑖 and z𝑖−1. 4. Choose 𝑖 according to the right-hand rule. These steps do not specify everything about frames 0 and n. As such, one should consider the following: ➢ The origin of frame 0 is located on the axis z0, and the axes x0 and 0 are chosen arbitrarily, respecting the right-hand rule. This frame can be made coincident with the robot’s base frame if possible. ➢ The origin of frame n is attached to the robot's tip, and generally, it can be made equal to frame n−1. Once the frames have been assigned, the position and orientation of the frame 𝑖 concerning the frame 𝑖−1 can be described entirely using the following parameters: ➢ 𝑎𝑖–distance from frame 𝑖−1 to frame 𝑖 measured along x𝑖. ➢ 𝑑𝑖–distance from frame 𝑖−1 to frame 𝑖 measured along z𝑖−1. ➢ 𝛼𝑖–angle between z𝑖−1 and z𝑖 about x𝑖 (positive rotation direction is counter-clockwise). ➢ 𝜃𝑖–angle between x𝑖−1 and x𝑖 about z𝑖−1 (positive rotation direction is counter-clockwise). The parameters for all the links are generally summarized in a table as in Table 3.1. Table 3.1 – DH parameters table example. Link 𝒂𝒊 𝒅𝒊 𝜶𝒊 𝜽𝒊 1 𝑎1 𝑑1 𝛼1 𝜃1 (…) n 𝑎𝑛 𝑑𝑛 𝛼𝑛 𝜃𝑛 With each line of Table 3.1 is possible to obtain the homogeneous transformation matrix, which describes the position and orientation of the frame 𝑖 relatively to frame 𝑖−1 (considering the notation simplification 𝑐𝑜𝑠=𝑐 and 𝑠𝑖𝑛=𝑠),
32 𝑇 . 𝑖−1 𝑖=𝑅𝑜𝑡(z𝑖−1,𝜃𝑖)𝑇𝑟𝑎𝑛𝑠(z𝑖−1,𝑑𝑖)𝑇𝑟𝑎𝑛𝑠(x𝑖,𝑎𝑖)𝑅𝑜𝑡(x𝑖,𝛼𝑖)= [𝑐(𝜃𝑖)−𝑠(𝜃𝑖)0 0 𝑠(𝜃𝑖)𝑐(𝜃𝑖)0 0 0 0 1 0 0 0 0 1][1 0 0 0 0 1 0 0 0 0 1 𝑑𝑖 0 0 0 1][1 0 0 𝑎𝑖 0 1 0 0 0 0 1 0 0 0 0 1][1 0 0 0 0 𝑐(𝛼𝑖)−𝑠(𝛼𝑖)0 0 𝑠(𝛼𝑖)𝑐(𝛼𝑖)0 0 0 0 1] =[𝑐(𝜃𝑖)−𝑠(𝜃𝑖)𝑐(𝛼𝑖)𝑠(𝜃𝑖)𝑠(𝛼𝑖)𝑎𝑖𝑐(𝜃𝑖) 𝑠(𝜃𝑖)𝑐(𝜃𝑖)𝑐(𝛼𝑖)−𝑐(𝜃𝑖)𝑠(𝛼𝑖)𝑎𝑖𝑠(𝜃𝑖) 0 𝑠(𝛼𝑖)𝑐(𝛼𝑖)𝑑𝑖 0 0 0 1 ]. (3.16) With the homogenous transformation matrices that relate all the frames that were assigned, two by two, it is possible, by multiplying all the matrices sequentially, to obtain the homogenous transformation matrix that relates the tip with the base, i.e., which gives the position and orientation of the robot’s tip in relation to the base frame, 𝑇 .0𝑛= 𝑇 .01𝑇 .12… 𝑇 . 𝑛−2 𝑛−1 𝑇 . 𝑛−1 𝑛. (3.17) 3.1.2 Forward kinematics resolution In Figure 3.5–a) is possible to observe the locations and positive directions of rotation for each joint of the manipulator. With this information, and following the Denavit–Hartenberg classical convention presented in the last section, it is possible to obtain the assignments of Figure 3.5–b) and the parameters of Table 3.2. It should be noted that, because it is possible (there are configurations in certain robots that cannot be described following the rules of DH, e.g., PUMA 560 with all links in a vertical direction) and convenient (allows one to deal with a single set of joints values), the kinematic zero-angle configuration of the arm is made coincident with the joint controller’s zero-angle configuration. Table 3.2 – Kuka LBR iiwa 14 R820 classic DH parameters table. Link 𝒂𝒊 (𝐦𝐦) 𝒅𝒊 (𝐦𝐦) 𝜶𝒊 (𝐫𝐚𝐝) 𝜽𝒊(𝐫𝐚𝐝) 1 0 𝑑𝑏𝑠=360 −𝜋/2 𝜃1 2 0 0 𝜋/2 𝜃2 3 0 𝑑𝑠𝑒=420 𝜋/2 𝜃3 4 0 0 −𝜋/2 𝜃4 5 0 𝑑𝑒𝑤=400 −𝜋/2 𝜃5 6 0 0 𝜋/2 𝜃6 7 0 𝑑𝑤𝑡=350 0 𝜃7
33 Using the matrix presented in 3.16 and the parameters of the Table 3.2, is possible to obtain the individual homogenous transformation matrices that relate all the frames that were assigned, two by two, 𝑇 .01= [𝑐(𝜃1) 0 −𝑠(𝜃1) 0 𝑠(𝜃1) 0 𝑐(𝜃1) 0 0 −1 0 𝑑𝑏𝑠 0 0 0 1], (3.18) 𝑇 .12=[𝑐(𝜃2) 0 𝑠(𝜃2) 0 𝑠(𝜃2) 0 −𝑐(𝜃2) 0 0 1 0 0 0 0 0 1], (3.19) 𝑇 .23=[𝑐(𝜃3) 0 𝑠(𝜃3) 0 𝑠(𝜃3) 0 −𝑐(𝜃3) 0 0 1 0 𝑑𝑠𝑒 0 0 0 1], (3.20) 𝑇 .34=[𝑐(𝜃4) 0 −𝑠(𝜃4) 0 𝑠(𝜃4) 0 𝑐(𝜃4) 0 0 −1 0 0 0 0 0 1], (3.21) 𝑇 .45=[𝑐(𝜃5) 0 −𝑠(𝜃5) 0 𝑠(𝜃5) 0 𝑐(𝜃5) 0 0 −1 0 𝑑𝑒𝑤 0 0 0 1], (3.22) a) b) Figure 3.5 – Kuka LBR iiwa 14 R820 kinematic model: a) joints localizations and positive rotation directions; b) Coordinate frames assignment according to the Denavit-Hartenberg convention ( dbs : base–shoulder distance; dse : shoulder–elbow distance; dew : elbow– wrist distance; dwt : wrist–tip distance). rigins coincide rigins coincide rigins coincide
34 𝑇 .56=[𝑐(𝜃6) 0 𝑠(𝜃6) 0 𝑠(𝜃6) 0 −𝑐(𝜃6) 0 0 1 0 0 0 0 0 1], (3.23) 𝑇 .67=[𝑐(𝜃7) −𝑠(𝜃7) 0 0 𝑠(𝜃7) 𝑐(𝜃7) 0 0 0 0 1 𝑑𝑤𝑡 0 0 0 1]. (3.24) Using the equation 3.17 is possible to obtain the matrix 𝑇 .07, 𝑇 .07= 𝑇 .01𝑇 .12𝑇 .23𝑇 .34𝑇 .45𝑇 .56𝑇 .67, (3.25) which gives the position (coordinates of the tip are in the first three rows of the last column) and orientation (the first three columns, in the first three rows, contain the coordinates of the unit vectors x7, 7, z7) of the robot’s tip in relation to the base frame. With the same procedure, it is possible to obtain the position of other relevant points in the manipulator, such as the shoulder (using 𝑇 .01 or 𝑇 .02), elbow (using 𝑇 .03 or 𝑇 .04), and wrist (using 𝑇 .05 or 𝑇 .06). 3.1.3 Arm angle determination As presented before, more than providing the tip’s pose, it is also helpful that the FK gives the elbow position into the redundancy circle. In this dissertation, the parameter used to describe this position is the arm angle proposed by Shimizu et al. (2008). This parameter was also used by Faria et al. (2018), but some precautions were taken to consider the different configurations which the manipulator can assume to achieve a specific pose, as will be seen in this section. Recalling what was presented in the subchapter 2.2.2, the previously referred arm angle is defined by a reference and an arm plane (Figure 2.5). The latter is the SEW plane of the real manipulator (has the joint values that are being studied in the FK problem). The reference plane is the SEW plane of a virtual manipulator (SEVW), which is a nonredundant image of the real arm (joint 3 is always in 0º). To define the SEW and SEVW planes, the shoulder, elbow, and wrist’s coordinates of the virtual and real manipulator have to be determined. For the real manipulator, the strategy presented at the end of the last subchapter can be applied (using the information of the homogenous transformation matrices, which relate the frames assigned to the shoulder, elbow, and wrist with the base frame). As the shoulder and wrist’s coordinates of the virtual manipulator are equal to those of the real arm (Figure 2.5), there is only a need to obtain the coordinates of the elbow for the virtual manipulator. For that, one has to follow two main steps: determine the angles of the joints 1, 2, 3, and 4, which allow for the virtual manipulator to have the same tip’s pose as the real manipulator; use the calculated joint values to obtain the
35 homogeneous transformation matrix 𝑇 .03𝑣 or 𝑇 .04𝑣 and take from one of them the desired coordinates. In these two steps, two aspects should be taken into consideration: the joint 3 angular value is easily determined because for the virtual manipulator it is established that it is zero; the value of the joint 4 for the virtual manipulator is equal to the value of the real one because, as it will be seen, this joint will not change if the pose of the tip and the signal of the joint are maintained. Considering the previously presented explanation, there is a need to obtain the values of the joints 1 and 2 for the virtual manipulator. To achieve this, the wrist’s position relative to a frame placed on the shoulder is relevant (frame S in Figure 3.6, which results from a translation in the z-axis of the base frame, from a distance 𝑑𝑏𝑠). As stated above, because the wrist’s position of the real and virtual arm is the same, one could use an approach mainly based on FK to determine it. Despite this, a geometric approach is used because it will be helpful in the IK problem. This position (wrist relative to shoulder) can be obtained from the vector sum, 𝑝07.0= 𝑝0𝑆.0+ 𝑝𝑆6.0+ 𝑝67.0, (3.26) because the previous equation can be rewritten as, 𝑝𝑆6.0= 𝑝07.0− 𝑝0𝑆.0− 𝑝67.0, (3.27) and because the base and shoulder frames keep the same orientation in space ( 𝑝𝑆6.0= 𝑝𝑆6.𝑆), 𝑝𝑆6.𝑆= 𝑝07.0− 𝑝0𝑆.0− 𝑝67.0. (3.28) Figure 3.6 – Geometrical approach to determine the wrist’s position. It should be taken into account the following: 𝑝07.0 is known because with FK one can determine 𝑇 .07; 𝑝0𝑆.0 is given by the link distance 𝑑𝑏𝑠: 𝑝0𝑆.0=[0 0 𝑑𝑏𝑠] (Figure 3.6); 𝑝67.0 can be determined because 𝑝67.7=[0 0 𝑑𝑤𝑡] (Figure 3.6), and as 𝑅 .07 is known from 𝑇 .07 one can write,
36 𝑝67.0= 𝑅 .07𝑝67.7. (3.29) With the position of the wrist relative to the shoulder determined, the joint 1 value for the virtual manipulator can be obtained. Although, before, it is convenient to define de four-quadrant inverse tangent function (atan2) (The MathWorks, Inc., n.d.): 𝑎𝑡𝑎𝑛2(𝑦,𝑥)= { 𝑎𝑟𝑐𝑡𝑎𝑛(𝑦𝑥) 𝑖𝑓 𝑥>0, 𝑎𝑟𝑐𝑡𝑎𝑛(𝑦𝑥)+𝜋 𝑖𝑓 𝑥<0 𝑎𝑛𝑑 𝑦≥0, 𝑎𝑟𝑐𝑡𝑎𝑛(𝑦𝑥)−𝜋 𝑖𝑓 𝑥<0 𝑎𝑛𝑑 𝑦<0, 𝜋2 𝑖𝑓 𝑥=0 𝑎𝑛𝑑 𝑦>0, −𝜋2 𝑖𝑓 𝑥=0 𝑎𝑛𝑑 𝑦<0, 𝑢𝑛𝑑𝑒𝑓𝑖𝑛𝑒𝑑 𝑖𝑓 𝑥=0 𝑎𝑛𝑑 𝑦=0. (3.30) This function will be useful because it allows determining angles in the domain [−𝜋,𝜋], i.e., with information about the quadrant where the angle is localized. Still, precautions must be taken when it is undefined. Thus, considering Figure 3.7, it can be written, 𝜃1𝑣={𝑎𝑡𝑎𝑛2(𝑝𝑆6,𝑦.𝑆,𝑝𝑆6,𝑥.𝑆),𝑖𝑓 ‖𝑝𝑆6 ×[0 0 1] .𝑆‖>0 0,𝑖𝑓 ‖𝑝𝑆6 ×[0 0 1] .𝑆‖=0 . (3.31) Figure 3.7 – Determination of the joint 1 value for the virtual manipulator. Regarding the determination of 𝜃1𝑣 four more aspects should be taken into consideration: 1. The condition ‖𝑝𝑆6 ×[0 0 1] .𝑆‖ is capable of describing the situation in which the atan2 is undefined because when 𝑝𝑆6,𝑦.𝑆 and 𝑝𝑆6,𝑥.𝑆 are zero, the vectors 𝑝𝑆6 .𝑆and [0 0 1] (relative to S frame) are collinear (Figure 3.8). As such, their cross product gives rise to a vector in which all the coordinates are zero.
37 2. In practice, ‖𝑝𝑆6 ×[0 0 1] .𝑆‖ will never be exactly 0. Thus, this condition will be compared with a small value instead (for example, 10−6). 3. When ‖𝑝𝑆6 ×[0 0 1] .𝑆‖ is approximately 0, 𝜃1𝑣 becomes 0, but other values could be conventioned. 4. Physically on the manipulator, the atan2 undefinition reflects the infinite possibilities that can be used in 𝜃1𝑣 to put the wrist’s root in the direction of the joint 1 axis (Figure 3.8). This situation is sometimes referred to as shoulder singularity 15 (Tian et al., 2021). With the value of the joint 1 for the virtual manipulator determined, one needs to obtain the value of the joint 2. To achieve this, it is helpful to determine first the angle 𝜙 present in Figure 3.9. With the law of cosines, it can be written, 𝑑𝑒𝑤=√𝑑𝑠𝑒2+‖𝑝𝑆6 .𝑆‖2−2𝑑𝑠𝑒 𝑝𝑆6 .𝑆𝑐𝑜𝑠 (𝜙), (3.32) which can be rewritten in order to 𝜙 giving rise to the following expression 16 , 𝜙=𝑎𝑟𝑐𝑐𝑜𝑠(𝑑𝑠𝑒2+‖𝑝𝑆6 .𝑆‖2−𝑑𝑒𝑤2 2𝑑𝑠𝑒 𝑝𝑆6 .𝑆). (3.33) The virtual manipulator used as a reference will not be the same for the configurations (of the real one) with the elbow joint (joint 4) positive and negative. This is useful because it will be in accordance with the 15 This is an algorithmic singularity because it raises from the method used to calculate the joint values. These singularities are different from the kinematic ones, which are related to the robot's structure (Section 3.3 will present more details about this type). 16 Being this a FK problem, it is sound to assume that a solution can be obtained because it is impossible to generate a combination of joint values that cause the argument of the arccos function to exceed its domain. Figure 3.8 – Shoulder singularity: in this case the angular movement of joint does not influence the wrist’s position.
38 strategy used in the IK resolution (Section 3.2). Although the value of 𝜃2𝑣 depends on the signal of the joint 4, the determination of 𝜙 for both cases is similar and uses the same equation. With the value of 𝜙 and considering the representations presented in Figure 3.10, it is possible to obtain the value of the joint 2 for the virtual manipulator by making use of the following expression, 𝜃2𝑣 =𝑎𝑡𝑎𝑛2(√(𝑝𝑆6,𝑥 .𝑆)2+(𝑝𝑆6,𝑦 .𝑆)2,𝑝𝑆6,𝑧 .𝑆)+𝐺𝐶4𝜙. (3.34) The configuration flag 𝐺𝐶4 is -1 for the configurations that use the negative range of the joint 4 (Figure 3.10–a)), and 1 for the opposite case (Figure 3.10–b)). With 𝜃1𝑣, 𝜃2𝑣, 𝜃3𝑣, and 𝜃4𝑣 is possible to obtain 𝑇 .04𝑣 (with FK), which gives the virtual elbow position relative to the base frame ( 𝑝04 𝑣 .0). As such, all the information necessary to obtain the angle between the planes SEW and SEVW (𝜓) is known (the shoulder, elbow, and wrist’s coordinates of the virtual and real manipulator). To recall, 𝑝02= 𝑝02 𝑣 .0 .0, 𝑝04.0, and 𝑝06.0= 𝑝06 𝑣 .0 can result directly from the FK matrices Figure 3.9 – Angle formed by the shoulder–wrist vector and the shoulder–elbow vector (𝜙), needed to obtain 𝜃2v. a) b) Figure 3.10 – Determination of the joint 2 value for the virtual manipulator: configuration with the joint 4 negative; configuration with the joint 4 positive.
45 algebraic expressions 𝑠(𝜃1)𝑠(𝜃2) ( 𝑅 .03(𝜃1,2,3)[2,2]) and 𝑐(𝜃1)𝑠(𝜃2) ( 𝑅 .03(𝜃1,2,3)[1,2]), however the presence of an 𝑠(𝜃2) does not invalidate the determination of 𝜃1. To better understand why, as the atan2 can result in different cases (function 3.30), it is convenient to analyze the three that can generally happen. When the second input of the atan2 function is different from zero, both the inputs are divided. Then they serve as an input for the atan function. Being both elements affected by 𝑠(𝜃2), the division will cancel its effect and the determination of 𝜃1 remains possible. If only the second input is zero, that means that 𝑐(𝜃1) is zero, which leads to the conclusion that 𝜃1 is equal to ±90º. Also in this case 𝜃1 can be determined. These two cases were presented for the 𝜃1 case, but for 𝜃3 the explanation is equivalent. When both the inputs of the atan2 function are zero, which implies that 𝜃2 is 0º, because 𝑠(𝜃2) is zero, the determination of 𝜃1 and 𝜃3 remains possible but it will be related. In these cases 𝑅 .03(𝜃1,2,3) becomes, 𝑅 .03(𝜃1,2=0,3)=[ 𝑐(𝜃1)𝑐(𝜃3)−𝑠(𝜃1)𝑠(𝜃3) 0 𝑐(𝜃3)𝑠(𝜃1)+𝑐(𝜃1)𝑠(𝜃3) 𝑐(𝜃1)𝑠(𝜃3)+𝑐(𝜃3)𝑠(𝜃1) 0 𝑠(𝜃1)𝑠(𝜃3)−𝑐(𝜃1)𝑐(𝜃3) 0 1 0 ]. (3.62) In this case, the mathematical combinations between the values for 𝜃1 and 𝜃3 that give rise to a numerical matrix equal to the one that results from equation 3.53, are infinite. As such, a way to solve this indeterminacy can be based on the selection of a value to 𝜃1 or 𝜃3, and on the determination of the joint value that was not specified accordingly to the one that was. For example, one can impose that the value of 𝜃3 is zero, and in that way the 𝑅 .03(𝜃1,2=0,3) gets to be, 𝑅 .03(𝜃1,2=0,3=0)=[ 𝑐(𝜃1)0 𝑠(𝜃1) 𝑠(𝜃1) 0 −𝑐(𝜃1) 0 1 0 ]. (3.63) As such, 𝜃1 can be given by, 𝜃1=𝑎𝑡𝑎𝑛2([𝑎𝑠21𝑠𝑖𝑛(𝜓)+𝑏𝑠21𝑐𝑜𝑠(𝜓)+ 𝑐𝑠21], [𝑎𝑠11𝑠𝑖𝑛(𝜓)+𝑏𝑠11𝑐𝑜𝑠(𝜓)+ 𝑐𝑠11]). (3.64) 2. Another important aspect related to the equations 3.60 and 3.61 is that it is essential to take into consideration the signal of 𝜃2, using the configuration flag 𝐺𝐶2, and the signals of the matrix 3.57. Otherwise, the absolute values of the cosine and sine functions, obtained with the values of 𝜃1 and 𝜃3, may be correct but the signals not, and therefore, the numerical matrix obtained with the equation 3.53 is not be respected.
46 3.2.4 Joint 5, 6, and 7 values determination At this stage, the numeric matrices 𝑅 .03, 𝑅 .34, and 𝑅 .07 are known. To recall: 𝑅 .03 was obtained with equation 3.53; 𝑅 .34 can be obtained with the joint 4 value resulting from the Section 3.2.1, and with the 𝑇 .34 algebraic matrix presented in Section 3.1.2; 𝑅 .07 is known in the IK problem because the desired pose is given. Thus the numeric matrix 𝑅 .47 can be obtained ( 𝑅 .47=(𝑅 .34)𝑇(𝑅 .03)𝑇𝑅 .07). Keeping the notation of Faria et al. (2018) and Shimizu et al. (2008), 𝑅 .47 can be written using six auxiliary matrices (𝐴𝑠, 𝐵𝑠, 𝐶𝑠, 𝐴𝑤, 𝐵𝑤, and 𝐶𝑤), 𝑅 .47 =𝐴𝑤𝑠𝑖𝑛(𝜓)+𝐵𝑤𝑐𝑜𝑠(𝜓)+𝐶𝑤, (3.65) where, 𝐴𝑤 = 𝑅 .34𝑇 𝐴𝑠𝑇 𝑅 .07, (3.66) 𝐵𝑤 = 𝑅 .34𝑇 𝐵𝑠𝑇 𝑅 .07, (3.67) 𝐶𝑤 = 𝑅 .34𝑇 𝐶𝑠𝑇 𝑅 .07. (3.68) Following the same approach of the previous section, a matrix constituted by algebraic expressions equivalent to the numeric matrix 𝑅 .47 (obtained with equation 3.65 21 ) can be obtained. This matrix has the variables 𝜃5, 𝜃6, and 𝜃7 and can be determined with the multiplication of the matrices 𝑇 .45, 𝑇 .56, and 𝑇 .67, presented in Section 3.1.2. This multiplication gives rise to, 𝑅 .47(𝜃5,6,7)= [ 𝑐(𝜃5)𝑐(𝜃6)𝑐(𝜃7)−𝑠(𝜃5)𝑠(𝜃7)−𝑐(𝜃7)𝑠(𝜃5)−𝑐(𝜃5)𝑐(𝜃6)𝑠(𝜃7)𝑐(𝜃5)𝑠(𝜃6) 𝑐(𝜃5)𝑠(𝜃7)+𝑐(𝜃6)𝑐(𝜃7)𝑠(𝜃5)𝑐(𝜃5)𝑐(𝜃7)−𝑐(𝜃6)𝑠(𝜃5)𝑠(𝜃7)𝑠(𝜃5)𝑠(𝜃6) −𝑐(𝜃7)𝑠(𝜃6)𝑠(𝜃7)𝑠(𝜃6)𝑐(𝜃6)]. (3.69) With the matrix 𝑅 .47 both in the numerical and algebraic form obtained, it is possible to verify that a similar procedure to the one used to determine the joints 1, 2, and 3 values can be applied in the present section. This conclusion is sound because both groups of joints constitute a spherical joint. With this in mind, similarly to 𝜃2, 𝜃6=𝐺𝐶6𝑎𝑟𝑐𝑐𝑜𝑠(𝑎𝑤33𝑠𝑖𝑛(𝜓)+𝑏𝑤33𝑐𝑜𝑠(𝜓)+ 𝑐𝑤33), (3.70) and similarly to 𝜃1 and 𝜃3, 𝜃5=𝑎𝑡𝑎𝑛2(𝐺𝐶6[𝑎𝑤23𝑠𝑖𝑛(𝜓)+𝑏𝑤23𝑐𝑜𝑠(𝜓)+ 𝑐𝑤23], 𝐺𝐶6[𝑎𝑤13𝑠𝑖𝑛(𝜓)+𝑏𝑤13𝑐𝑜𝑠(𝜓)+ 𝑐𝑤13]), (3.71) 𝜃7=𝑎𝑡𝑎𝑛2(𝐺𝐶6[𝑎𝑤32𝑠𝑖𝑛(𝜓)+𝑏𝑤32𝑐𝑜𝑠(𝜓)+ 𝑐𝑤32], 𝐺𝐶6[−𝑎𝑤31𝑠𝑖𝑛(𝜓)−𝑏𝑤31𝑐𝑜𝑠(𝜓)− 𝑐𝑤31]). (3.72) 21 The numeric matrix 𝑅 .47, obtained with equation 3.65, follows the Denavit-Hartenberg convention because it is derived from matrices that are in accordance with this convention.
47 In case 𝜃6=0° is not possible to use equations 3.71 and 3.72 to determine 𝜃5 and 𝜃7, respectively, because 𝑅 .47(𝜃5,6,7) becomes, 𝑅 .47(𝜃5,6=0,7)=[ 𝑐(𝜃5)𝑐(𝜃7)−𝑠(𝜃5)𝑠(𝜃7)−𝑐(𝜃7)𝑠(𝜃5)−𝑐(𝜃5)𝑠(𝜃7)0 𝑐(𝜃5)𝑠(𝜃7)+𝑐(𝜃7)𝑠(𝜃5)𝑐(𝜃5)𝑐(𝜃7)−𝑠(𝜃5)𝑠(𝜃7)0 0 0 1]. (3.73) Similar to what happened when 𝜃2 was zero, when 𝜃6 is zero, there are infinity possibilities for 𝜃5 and 𝜃7. Thus, one of the values can be conventioned and the other determined accordingly. Making 𝜃5 zero, 𝑅 .47(𝜃5,6=0,7) gets to be, 𝑅 .47(𝜃5=0,6=0,7)=[ 𝑐(𝜃7)−𝑠(𝜃7)0 𝑠(𝜃7)𝑐(𝜃7)0 0 0 1], (3.74) making 𝜃7 be, 𝜃7=𝑎𝑡𝑎𝑛2([𝑎𝑠21𝑠𝑖𝑛(𝜓)+𝑏𝑠21𝑐𝑜𝑠(𝜓)+ 𝑐𝑠21], [𝑎𝑠11𝑠𝑖𝑛(𝜓)+𝑏𝑠11𝑐𝑜𝑠(𝜓)+ 𝑐𝑠11]). (3.75) 3.2.5 Final considerations This subchapter presented a method to solve the IK, which considers the arm’s redundancy and the different solutions that may exist for each arm angle. These solutions are given by the combination of the signals in the joints 2, 4, and 6 (𝐺𝐶2, 𝐺𝐶4, 𝐺𝐶6) and are enumerated from 0 to 7 in Table 3.3. Table 3.3 – Numeration used in this dissertation for the IK solutions. IK solution 𝑮𝑪𝟐 𝑮𝑪𝟒 𝑮𝑪𝟔 0 1 1 1 1 -1 1 1 2 1 -1 1 3 -1 -1 1 4 1 1 -1 5 -1 1 -1 6 1 -1 -1 7 -1 -1 -1 Furthermore, the presented method, as will be seen in the following section, facilitates the mapping of joint limits and singularities into the redundancy circle (which is highly important to this dissertation because it will allow placing the arm angle farther from the mapped limits, which will tend to increase manipulability).
48 Other conventions could be used to solve the indeterminacies that can arise when 𝜃2 and 𝜃6 become zero. The ones proposed in the above sections are just examples. Although these procedures are relevant to understand the IK, they will not be crucial to this dissertation because the strategy used will be to avoid the situations in which the 𝜃2 and 𝜃6 need to be zero. The previous sections studied these cases mainly from a mathematical standpoint, but the following subchapter will give the physical meaning and safety risks associated with them (𝜃2=0° or 𝜃6=0° will specify kinematic singularities). 3.3 Joint limits and singularities mapping into the redundancy circle This subchapter first discusses the kinematic singularities of a 7-DoF serial manipulator. It then summarizes the method presented by Shimizu et al. (2008) and Faria et al. (2018), and extended by Wang et al. (2021), to map into the RC these singularities and also joint limits. This mapping is crucial for the trajectory tracking method proposed in this dissertation (Section 4). 3.3.1 7-DoF serial manipulator kinematic singularities Craig (2014) presents an excellent example of kinematic singularities in mechanisms and of the problems that can arise when one is crossed. This example is related to the rear–gunner’s mechanism of a World War I plane–Figure 3.15 (2 DoF: elevation and azimuth). To understand it, one should imagine an enemy plane moving in a way that makes the gunner increase the elevation continuously, and eventually passing nearly overhead (near the azimuth rotation axis–Figure 3.15). In the latter situation, an abrupt change in the value of the azimuth would be required for the gunner to be able to keep shooting at the enemy. Figure 3.15 – Rear-gunner’s mechanism of a World War I biplane (reproduced from Craig (2014)).
49 The described situation is a singularity, and all mechanisms are prone to these complications, including robots. The presented example allows to understand in a simple way fundamental aspects and problems of singularities: ➢ The rear–gunner could shoot static objects placed anywhere in the upper hemisphere without having problems with the presented singularity. Although, when shooting a moving airplane, problems can arise. Analogously, singularities do not prevent manipulators from achieving poses within their workspace, but they can cause problems in movements that cross them. ➢ If one tried to solve the IK problem for the present mechanism when the target is in the direction of the azimuth axis, an infinite number of possibilities could be chosen for the latter DoF, i.e., one would have to deal with a mathematical indeterminacy. ➢ When the rear–gunner orientates the stream of bullets in the direction of the azimuth’s axis, the changes in the latter DoF will not affect their path. It can be said that a joint has momentarily lost its usefulness and the mechanism behaves as if it had only one degree of freedom, which will restrict the movements in the Cartesian space (i.e., the manipulability). ➢ Even if the enemy airplane crossed the rear–gunner’s overhead at a low velocity, the value of the azimuth would have to be changed at a very high rate, i.e., near singularities, small velocities/displacements in the Cartesian space may cause major velocities/displacements in the joint space. Singularities can be classified into: ➢ Boundary singularities: this kind of singularity happens when the arm is fully stretched or retracted, i.e., when the manipulator is driven to the boundaries of its workspace. They are detected by analyzing the joint 4 values because when the arm is stretched, this joint will tend to be zero (condition given by equation 3.48 and called “arm singularity” in Section 3.2.1), when the arm is folded, the joint 4 (angular values given by equation 3.47) will tend to exceed the limit (±120º). ➢ Internal singularities: are generally caused by the alignment of two or more joint axes and are not related to the workspace boundaries. In this manipulator, there are two: 𝜃2=0° (leads to the alignment of the joints 1 and 3 axes: Figure 3.16–a)) and 𝜃6=0° (leads to the alignment of the joints 5 and 7 axes: Figure 3.16–b)). These singularities can not be identified in such a straightforward way as the previously mentioned ones because the values 𝜃2 and 𝜃6 depend on the arm angle. Thus, these singularities will be mapped into the RC in the next subchapter. Figure
50 3.16 helps to understand why in the Sections 3.2.3 (IK–Determination of the joint 1, 2, and 3 values) and 3.2.4 (IK–Determination of the joint 5, 6, and 7 values), one concluded that when the joint 2 or 6 was 0, there would be a mathematical indetermination. When these joints are in the 0 position, they align the previous and next joint axes, making them have the same practical effect. For example, when the joint 6 is 0, having the joint 5 and 7 in the positions 15º and 30º, respectively, is the same that having the joint 5 and 7 in the positions 0º and 45º, respectively. a) b) Figure 3.16 – Internal singularities: a) 𝜃2 =0°; b) 𝜃6 =0°. With the gunner’s example, it was possible to introduce four aspects of singularities. Still, the fourth can be hard to imagine in a complex 7-DoF serial manipulator (small displacements in Cartesian space giving rise to major joint movements). As such, an example is presented in Figure 3.17: with the joint 6 in 0º, a displacement of only 50 mm in this joint axis direction originates joint displacements of roughly 90º. oint and axis oint 2 axis Figure 3.17 – Small displacement in the Cartesian space causing a major one in the joint space, due to the joint 6 singularity. oint and axis oint axis ose 2 ose oint axis
51 3.3.2 Arm angle feasible intervals To map the joint limits and singularities into the redundancy circle, one has to study the behavior of the joints with the variation of the arm angle from −𝜋 to 𝜋. This behavior is given by the equations 3.59– 3.61 and 3.70–3.72. The latter equations can be written in two generic ways. For the joints 1, 3, 5, and 7, 𝜃𝑖(𝜓)=𝑎𝑡𝑎𝑛2(𝐺𝐶𝑘[𝑎𝑛𝑠𝑖𝑛(𝜓)+𝑏𝑛𝑐𝑜𝑠(𝜓)+ 𝑐𝑛], 𝐺𝐶𝑘[𝑎𝑑𝑠𝑖𝑛(𝜓)+𝑏𝑑𝑐𝑜𝑠(𝜓)+ 𝑐𝑑]), (3.76) and for the joints 2 and 6, 𝜃𝑖(𝜓)=𝐺𝐶𝑘𝑎𝑟𝑐𝑐𝑜𝑠(𝑎𝑠𝑖𝑛(𝜓)+𝑏𝑐𝑜𝑠(𝜓)+ 𝑐). (3.77) The differentiation of these functions can give the necessary information for one to understand their overall behavior. With that information, it becomes easier to outline a strategy for mapping joint limits and singularities into the redundancy circle. Starting with the generic equation 3.76, considering the following notation simplification: 𝜃𝑖(𝜓)=𝑎𝑡𝑎𝑛2(𝑢,𝑣), (3.78) where, 𝑢=𝐺𝐶𝑘[𝑎𝑛𝑠𝑖𝑛(𝜓)+𝑏𝑛𝑐𝑜𝑠(𝜓)+ 𝑐𝑛], 𝑣=𝐺𝐶𝑘[𝑎𝑑𝑠𝑖𝑛(𝜓)+𝑏𝑑𝑐𝑜𝑠(𝜓)+ 𝑐𝑑], (3.79) and knowing that the derivative of 𝑎𝑡𝑎𝑛2(𝑢,𝑣) is given by, −𝑢𝑣′ 𝑣2+𝑢2+𝑣𝑢′ 𝑣2+𝑢2, (3.80) one can obtain, 𝑑𝜃𝑖 𝑑𝜓=𝑎𝑡𝑠𝑖𝑛(𝜓)+𝑏𝑡𝑐𝑜𝑠(𝜓)+𝑐𝑡 𝑣2+𝑢2, (3.81) where, 𝑎𝑡=𝐺𝐶𝑘(𝑐𝑛𝑏𝑑−𝑏𝑛𝑐𝑑), 𝑏𝑡=𝐺𝐶𝑘(𝑎𝑛𝑐𝑑−𝑐𝑛𝑎𝑑), 𝑐𝑡=𝐺𝐶𝑘(𝑎𝑛𝑏𝑑−𝑏𝑛𝑎𝑑). (3.82) The stationary points of the function 3.76 (𝜓0) can be obtained making 𝑑𝜃𝑖 𝑑𝜓=0 and using a change of variable known as Weierstrass-substitution method, 𝜓0=2𝑎𝑟𝑐𝑡𝑎𝑛(𝑎𝑡±√𝑎𝑡2+𝑏𝑡2−𝑐𝑡2 𝑏𝑡−𝑐𝑡). (3.83) According to the value of 𝑎𝑡2+𝑏𝑡2−𝑐𝑡2, the function 3.76 can assume three distinct behaviors:
52 1. When 𝑎𝑡2+𝑏𝑡2−𝑐𝑡2>0 there are two stationary points. The two generic profiles that can result in this case can be seen in Figure 3.18–a) and b). The difference between the two cases is that in the second situation 𝜃(𝜓) crosses the boundaries of the atan2 function domain ([−𝜋,𝜋]), which leads to discontinuities. a) b) Figure 3.18 – 𝜃(𝜓) generic profile for joints 1, 3, 5, and 7 when stationary points exist: a) 𝜃(𝜓) does not cross the atan2 domain boundaries; b) 𝜃(𝜓) crosses the atan2 domain boundaries. 2. If 𝑎𝑡2+𝑏𝑡2−𝑐𝑡2<0 no stationary points exist, and the profile of the function 3.76 is monotonic. The generic case can be observed in Figure 3.19 (where the apparently abrupt variation is related to the atan2 domain). 3. If 𝑎𝑡2+𝑏𝑡2−𝑐𝑡2=0 a singularity exists. 𝜃(𝜓) becomes indeterminate because both 𝑢 and 𝑣 of equation 3.78 turn out to be 0 (Sections 3.2.3 and 3.2.4). In this case, the generic profiles of the function 3.76 have a discontinuity that should not be mistaken with the one caused by the boundaries of the atan2 function domain (Figure 3.20–a) to b)). Figure 3.19 – 𝜃(𝜓) generic profile for joints 1, 3, 5, and 7 when no stationary points exist.
53 a) b) Figure 3.20 – 𝜃(𝜓) generic profile for joints 1, 3, 5, and 7 when a singularity exists: a) 𝜃(𝜓) does not cross the atan2 domain boundaries; b) 𝜃(𝜓) crosses the atan2 domain boundaries. Knowing the generic profiles of the function 3.76, it is now helpful to determine the values of the arm angle where the joints cross the limits (if they exist), i.e., the values of 𝜓 where the generic profiles 𝜃(𝜓) cross the limits 𝜃𝑙 or 𝜃𝑢. For that, one can use the equation that results from applying the Weierstrasssubstitution method to the equation 3.76, 𝜓=2𝑎𝑟𝑐𝑡𝑎𝑛(−𝑏𝑝±√𝑏𝑝2−4𝑎𝑝𝑐𝑝 2𝑎𝑝), (3.84) where, 𝑎𝑝=𝐺𝐶𝑘[(𝑐𝑑−𝑏𝑑)𝑡𝑎𝑛(𝜃)+(𝑏𝑛−𝑐𝑛)], 𝑏𝑝=2𝐺𝐶𝑘[𝑎𝑑𝑡𝑎𝑛(𝜃)−𝑎𝑛], 𝑐𝑝=𝐺𝐶𝑘[(𝑏𝑑+𝑐𝑑)𝑡𝑎𝑛(𝜃)−(𝑏𝑛+𝑐𝑛)]. (3.85) Finally, the following procedure can be followed to obtain the joints 1, 3, 5, and 7 feasible intervals: 1. If 𝜃(𝜓) crosses its limits (𝜃𝑙 and 𝜃𝑢 of the above figures), the corresponding 𝜓 values are usually given by equation 3.84. The generic profiles previously studied allow to understand that two or four 𝜓 values are obtained 22 , which should be arranged in ascending order (like [𝜓1 𝜓2 𝜓3 𝜓4]). Subsequently, the signal of 𝜃′(𝜓1) is calculated (using equation 3.81), and compared with the one of 𝜃(𝜓1) (which will be 𝜃𝑙 or 𝜃𝑢). If the signal is the same then the arm angle feasible intervals are: [−𝜋→𝜓1; 𝜓2→ 𝜓3; 𝜓4→𝜋]. Otherwise: [𝜓1→ 𝜓2; 𝜓3→ 𝜓4]. 22 When the function 𝜃(𝜓) crosses the limits 𝜃𝑙 or 𝜃𝑢, it does not always crosses two times each of them. Although, the equation 3.84 will still have two solutions. As such, one of them has to be discarded. To know which one should be, the obtained 𝜓 values can be used to calculate the correspondent 𝜃 (equations 3.60, 3.61, 3.71, and 3.72). The one which is different from 𝜃𝑙 or 𝜃𝑢 must be rejected.
54 2. If it is not possible to obtain any intersection between 𝜃(𝜓) and its limits (𝜃𝑙 and 𝜃𝑢) the calculation of 𝜃 using any 𝜓 in the equations 3.60, 3.61, 3.71, or 3.72 will reveal if the arm angle feasible interval is [−𝜋→𝜋] or null. Following the same procedure presented for the generic equation 3.76 (related to joints 1, 3, 5, and 7) with 3.77 (concerns the joints 2 and 6), first, its derivative is calculated, 𝑑𝜃𝑖 𝑑𝜓=−𝐺𝐶𝑘(𝑎𝑐𝑜𝑠(𝜓)−𝑏𝑠𝑖𝑛(𝜓) 𝑠𝑖𝑛(𝜃𝑖)). (3.86) Subsequently, the extremes of the equation 3.77 (𝜓0) can also be obtained making 𝑑𝜃𝑖 𝑑𝜓=0, 𝜓0,1=𝑎𝑡𝑎𝑛2(𝑎,𝑏), 𝜓0,2=𝑎𝑡𝑎𝑛2(−𝑎,−𝑏). (3.87) In the present case, two generic profiles can arise. The first is represented in Figure 3.21–a) and happens when no arm angle corresponds to a singular configuration. In the opposite situation (when a singular configuration exists for a specific arm angle), the generic profile is similar to the one in Figure 3.21–b). In both situations, 𝜃(𝜓) is a continuous function defined in [−𝜋,0] or [0,𝜋] rad depending on 𝐺𝐶𝑘. a) b) Figure 3.21 – 𝜃(𝜓) generic profile for joints 2 and 6: a) without singular configuration; b) with singular configuration. To test if the 𝜃(𝜓) profile has a singular configuration, one should recall from Section 3.3.1 that singularities happen when the joints 2 or 6 are in the zero position. As the equation 3.77 is always between 0 and 𝜋 rad, or −𝜋 and 0 rad (depending on the 𝐺𝐶𝑘) one knows that if a singular configuration exists it corresponds to an extreme of the 𝜃(𝜓) profile. As such, one can test the 𝜓 values that result from making the derivative of the profile equal to zero (𝜓0,1 and 𝜓0,2 obtained with the equations from 3.87) using the following condition (because when 𝜃 is zero 𝑎sin(𝜓)+𝑏cos(𝜓)+ 𝑐 becomes equal to 1),
61 midpoints of these intervals (to increase manipulability) (Dou et al., 2022; Wiedmeyer et al., 2021). This will also be the approach used in this section. The definition of the paths is divided into two major steps: first, the possible paths’ starting points for each map are determined, considering the centers of the feasible intervals for the first pose (black circle and triangle of Figure 4.7); second, from the starting points, paths are established, guided by the midpoints of the intervals (orange and blue paths of Figure 4.7). To better understand the first step, one should consider Figure 4.8 and recall that the method presented in Section 3.3 gives the arm angle feasible intervals in a one-dimensional array, with values between −𝜋 and 𝜋, where each value is a boundary of a feasible interval. For the feasible intervals present in Figure Figure 4.6 – Example of a map that results from the scanning step (for a specific solution of the IK and workspace position). Figure 4.7 – Two major steps used in the present section: 1 – Definition of the paths’ starting points (black triangle and circle); 2 – Paths established from the previously defined starting points (in orange and blue).
62 4.8 the returned array would be [−𝜋,−𝜋2,−𝜋4,𝜋4,3𝜋 4,𝜋]. It should be noted that although the method presented in Section 3.3 returns the intervals in the domain from −𝜋 to 𝜋, at the −𝜋/𝜋 boundary there is no discontinuity, i.e., the arm angle can cross it without abrupt joint variations. This finding is proven in the same section, in the study of the joints variation with the arm angle. Thus, in the example given in Figure 4.8 the intervals [−𝜋,−𝜋2] and [3𝜋 4,𝜋] are actually the same. Considering the previously presented explanation, determining the centers of the intervals that do not cross the −𝜋/𝜋 boundary is straightforward. They can be obtained simply by calculating the mean between the boundary values of the intervals. For instance, the center of the interval [−𝜋4,𝜋4] present in Figure 4.8 could be determined by, (−𝜋4+𝜋4 ) 2=0. On the other hand, when the feasible interval crosses the −𝜋/𝜋 boundary, it is impossible to use such a direct approach. Thus, first, the interval is converted in a way that where it was considered the −𝜋/𝜋 boundary now will be placed the origin of the arm angle domain. For the interval [−𝜋,−𝜋2] and [3𝜋 4,𝜋] of Figure 4.8, this origin change can be observed in Figure 4.9. The bottom values in this figure are the original and the upper ones result from the origin change. The upper values are calculated using the differences between the ones of the bottom. In the example of Figure 4.9, −𝜋−(−𝜋2)=−𝜋2, 𝜋−3𝜋 4=𝜋4. With this scale, it is already possible to obtain the middle of the interval using the mean (Figure 4.10), Figure 4.8 – Different cases that can arise in the definition of the arm angle series’ initial values. Figure 4.9 – Origin change to consider the lateral continuity in the −𝜋/𝜋 boundary. m 0 ose m ose
63 (−𝜋2+𝜋4 ) 2=−𝜋8, which can be reconverted to the original scale by making (Figure 4.10), −𝜋−(−𝜋8)=−7𝜋 8. The procedure exposed above allowed to calculate the center points of the intervals presented in Figure 4.8 (the possible paths’ starting points, represented as 𝜓(𝑡−1,1) and 𝜓(𝑡−1,2) in Figure 4.11), but it can be generalized for different cases as shown next in pseudocode. Arm angle values calculation for the first pose 1: for each map 2: allow ← boundaries of the feasible intervals in the first pose 3: if allow(1) is −𝜋 and allow(end) is 𝜋 4: neg ← −𝜋 − allow(2) 5: pos ← 𝜋 − allow(end−1) 6: meanValue ← mean(neg, pos) 7: if meanValue ≥ 0 8: armAngle(1) ← 𝜋− meanValue 9: else 10: armAngle(1) ← −𝜋− meanValue 11: end 12: if length(allow) > 4 13: for(j = 3; j ≤ length(allow) – 2; j = j + 2) 14: armAngle(end + 1) ← mean(allow(j), allow(j + 1)) 15: end 16: end 17: else 18: for(j = 1; j ≤ length(allow); j = j + 2) 19: armAngle(end + 1) ← mean(allow(j), allow(j + 1)) 20: end 21: end 22: end For every map, each of the determined arm angle values is used as a starting point for a path, which one establishes from the bottom up, pose by pose. Going back to the example of Figure 4.8, where one has Figure 4.10 – Calculation of the center of an interval considering the lateral continuity in the −𝜋/𝜋 boundary. m ose
64 two initial arm angle values (as represented in Figure 4.11: 𝜓(𝑡−1,1) and 𝜓(𝑡−1,2)), there is now the need to obtain the arm angle values for pose 2. Starting with the more straightforward case, 𝜓(𝑡−1,2), the first step is to find the feasible interval of pose 2 that contains 𝜓(𝑡−1,2). This interval is represented in green in Figure 4.11. With this interval and with the previous arm angle (in this case 𝜓(𝑡−1,2)), is possible to use the following equation (proposed by Faria et al. (2018)) to determine the arm angle for pose 2, 𝜓(𝑡)= 𝜓(𝑡−1)+𝐾(𝜓𝑢−𝜓𝑙 2)[e−𝛼(𝜓(𝑡−1)−𝜓𝑙 𝜓𝑢−𝜓𝑙)−e−𝛼(𝜓𝑢−𝜓(𝑡−1) 𝜓𝑢−𝜓𝑙)], (4.8) where, ➢ 𝜓(𝑡) is the arm angle to be determined. ➢ 𝜓(𝑡−1) is the arm angle from the previous pose (in this case 𝜓(𝑡−1,2)). ➢ 𝜓𝑙 and 𝜓𝑢 are the lower and upper limits of the current pose feasible interval that contains 𝜓(𝑡−1) (for the present example is the green one from Figure 4.11), respectively. ➢ 𝐾 ∈[0,1] is a constant that controls the strength of repulsion from the interval limits. ➢ α ∈ ℝ+ is a constant that controls the distance to the borders from where the repulsion begins. When using this equation, the parameters 𝐾 and α are tuned so that the value of the arm angle powerfully tends to the center of the feasible intervals. Thus, a high 𝐾 and a low α are used (𝐾=1, α=7). A lower value for α is not used because that would make the arm angle control overly reactive, which could negatively affect the smoothness of the movements. This tuning is an advantage of using this equation over directly using the average value of the intervals. Despite this, when the feasible intervals expand or shrink rapidly, this combination of parameters can cause an abrupt variation in the arm angle. As such, the variation is limited to 0.1 radians. This procedure allows finding an arm angle value for the pose 2 of Figure 4.11 (𝜓(𝑡,2) in Figure 4.12), which, together with the arm angle 𝜓(𝑡−1,2), would constitute a segment of a path that not only avoids joint limits and singularities but also tries to increase the distance to them. Furthermore, the variation between the arm angles is smooth. If this method is used iteratively, from pose to pose, a path that crosses a whole map can be found. Figure 4.11 – Growth of the paths from the arm angle values found for pose 1. m 0 ose ose 2
65 It should be noted that when the feasible interval crosses the −𝜋/𝜋 boundary (first interval of pose 2 in Figure 4.12), the values of 𝜓(𝑡−1), 𝜓𝑙, and 𝜓𝑢 cannot be directly inserted in equation 4.8. This is because one does not have 𝜓𝑙 and 𝜓𝑢 in the format of a single interval, and thus, an origin change is needed (similar to the one presented in the calculation of the intervals’ centers for the first pose). Consequently, 𝜓(𝑡−1) needs to be converted to take into consideration the new origin as well. After this, one can use equation 4.8, but the result must be reconverted because all the other procedures are based on the domain from −𝜋 to 𝜋. The following pseudocode summarizes these three steps (origin change; calculation of 𝜓(𝑡) using equation 4.8; origin reconversion). Path generation when the feasible intervals cross the −𝝅/𝝅 boundary 1: allow ← boundaries of the feasible intervals for the actual pose 2: 𝜓(𝑡−1) ← previous arm angle, which is contained by the intervals of the actual pose 3: neg ←−𝜋 − allow(2) 4: pos ← 𝜋− allow(end−1) 5: if 𝜓(𝑡−1)≥−𝜋 and 𝜓(𝑡−1)≤ allow(2) 6: 𝜓(𝑡−1),𝑐𝑜𝑛𝑣←−𝜋−𝜓(𝑡−1) 7: else 8: 𝜓(𝑡−1),𝑐𝑜𝑛𝑣←𝜋−𝜓(𝑡−1) 9: end 10: Calculate 𝜓(𝑡),𝑐𝑜𝑛𝑣 using equation 4.8 (𝜓(𝑡−1) is 𝜓(𝑡−1),𝑐𝑜𝑛𝑣; 𝜓𝑙 is neg; 𝜓𝑢 is pos) 11: if 𝜓(𝑡),𝑐𝑜𝑛𝑣≤ 0 12: 𝜓(𝑡)←−𝜋−𝜓(𝑡),𝑐𝑜𝑛𝑣 13: else 14: 𝜓(𝑡)←𝜋−𝜓(𝑡),𝑐𝑜𝑛𝑣 15: end The procedures presented in this section give rise to a group of paths (arm angle series), like those represented in blue and orange in Figure 4.7, that allow solving the maps determined in Section 4.1.1 (Scanning stage). These paths are guided by the centers of the intervals because this approach tends to boost manipulability. Still, it can fail to solve some maps. Despite this, those usually have interval limits appearing abruptly near the current arm angle (Figure 4.13). This case is dangerous because joint limits or singularities will be close, but they will not be reflected in the arm angle feasible intervals. In these Figure 4.12 – Determination of the arm angle value of a pose (pose 2) based on the arm angle of the previous pose (pose 1), considering manipulability and smoothness. m 0 ose ose 2
66 cases, it is even convenient that the approach fails. When it does not, the chosen arm angle will be close to limits, which decreases, at least momentarily, the manipulability. 4.1.3 Arm angle series choice With the different possibilities of arm angle series determined, it is now necessary to choose one that boosts manipulability, also considering the joint 4 values associated with these series (this joint is independent of the arm angle, thus has to be considered separately). Starting specifically with them (arm angle series/paths), the first step is to calculate the minimum distance, in each pose, of the calculated arm angles to the boundaries of the feasible interval in which they are contained. As the centers of the intervals guide the paths, the distance to the two boundaries is usually similar (black arrows in Figure 4.14). Although, it will only be the same in the first pose because, in the others, the centers are not strictly followed to avoid abrupt variations and an overly reactive control (as explained in Section 4.1.2). Thus, the shortest distances are saved for safety in each pose, and then the minimum (𝜓𝑚𝑖𝑛) and mean (𝜓𝑚𝑒𝑎𝑛) values of all the minimal distances are calculated (this procedure is done for all paths). A similar procedure must be applied to the joint 4 values associated with each path. For all poses, the distance to its limit (120º/-120º) and singularity (0º) is calculated, and the minimum value of these two is saved. This procedure gives rise to a set, and its minimum (𝜃4 𝑚𝑖𝑛) and mean (𝜃4 𝑚𝑒𝑎𝑛) values are calculated. With the data of 𝜓𝑚𝑖𝑛, 𝜓𝑚𝑒𝑎𝑛, 𝜃4 𝑚𝑖𝑛, and 𝜃4 𝑚𝑒𝑎𝑛 for each path, one can attribute a score (𝑚𝑠) to all using the following metric, 𝑚𝑠=𝜓𝑚𝑖𝑛 𝑚𝑎𝑥(𝜓𝑚𝑖𝑛)+ 𝜓𝑚𝑒𝑎𝑛 𝑚𝑎𝑥(𝜓𝑚𝑒𝑎𝑛)+𝜃4 𝑚𝑖𝑛 𝑚𝑎𝑥(𝜃4 𝑚𝑖𝑛)+𝜃4 𝑚𝑒𝑎𝑛 𝑚𝑎𝑥(𝜃4 𝑚𝑒𝑎𝑛). (4.9) Figure 4.13 – Example of a situation in which joint limits appear abruptly near the path that was being generated (represented in blue).
67 Concerning the proposed metric, some aspects can be presented in more detail: ➢ Both the minimum and mean values are used in this equation because, if one used only the mean, extensive distances could hide narrow ones. This would compromise the goal of increasing manipulability because joint values would be close to the limits or singularities in certain poses. ➢ The division for the maximum values intends to make equal the influence of each term. Because the values related to 𝜓 tend to be greater than the values associated to 𝜃4, a less significant variation in 𝜓 could easily match a higher one in 𝜃4. ➢ One could argue that different equation terms should have different impacts, and weights could be used for that purpose, but, as will be seen in the next section, this tunning is not necessary to obtain good results. ➢ For safety, when the terms 𝜓𝑚𝑖𝑛 𝑚𝑎𝑥(𝜓𝑚𝑖𝑛) and 𝜃4 𝑚𝑖𝑛 𝑚𝑎𝑥(𝜃4 𝑚𝑖𝑛) are less than 0.3, the path is not considered. The proposed metric tends to give the higher scores to paths like the one in Figure 4.15, associated with joint 4 values like those depicted in Figure 4.16. This is because both the paths and the joint 4 keep consistently a high distance to joint limits and singularities (increasing manipulability). Figure 4.14 – Distance of the paths to the boundaries of the feasible intervals. Figure 4.15 – Example of a path that the proposed metric tends to choose. 2 m 4 m 0
68 A score is calculated for each path. The one with the highest score, associated with a trajectory position and IK solution, is selected. Then, the joint values to be sent to the robot’s controller are generated using the IK resolution presented in Section 3.2. With the proposed method explained, it is now convenient to present some tests to verify if the originated joint values can track the acquired trajectory and keep a high manipulability consistently. This will be the focus of the next section. 4.2 Method validation This section is dedicated to testing the trajectory tracking method proposed in the previous subchapter. First, the generated joint values are analyzed to verify if they consistently keep a high distance to the limits and singularities. Then, the trajectory that one obtains with these joint values is compared to the desired one, both in simulation and in the real world. Also, with the real manipulator, the deformations induced in the leather pieces are compared with the ones that are needed. Although the trajectories acquisition is not in the scope of this work, before presenting all the other contents, a brief presentation of how the trajectories are obtained will be exposed for contextualization purposes. 4.2.1 Trajectories acquisition The computer vision system described in this section was developed in the same project as this dissertation but gave rise to a different one (Ribeiro, 2022). This system uses information of the hands to generate the positions and of the leather pieces to obtain the necessary orientations. Regarding the position, first, it extracts the 3D coordinates of 21 key points (relative to the camera). Then, one of these Figure 4.16 – Example of joint 4 values that the proposed metric tends to choose. 0 00 0 200 2 0 00 0 ose number 0 20 40 0 0 00 20 oint 4 angle (deg)
69 points is used for hand position tracking. To ensure that the selected point is always close to the leather pieces and does not tend to be occluded, some restrictions are imposed on the hand, namely by considering a fixed configuration that the demonstrator must fulfill (Figure 4.17). In terms of orientation, as it was necessary to resort to the information about the leather piece configuration during the manipulation, a 3D tracking system was used (Figure 4.18) to obtain a mesh representing the object's surface (Figure 4.19). After this, the gradient was taken in the direction of the object's length and width on the points near the grasping position. With these gradients, a coordinate system was constructed (Figure 4.19), and the corresponding orientation matrix was computed. The latter was corresponded manually to the referential used in the extremity of the end-effector. Figure 4.17 – Hand posture that must be used in the demonstration. Figure 4.18 – 3D tracking system used in the orientations acquisition.
70 This computer vision system made it possible to obtain two different types of inspection movements: the first bends concavely or convexly the object and moves its concavity extremity along its length; the second twists it on different axes. The obtained trajectories were exported in the format described in Section 4.1.1 (matrix in which each line corresponds to a pose; the first three columns match the position – x, y, and z coordinates; the last three columns concern the orientation – Euler angles), and were used to obtain the results described in the following sections. 4.2.2 Manipulability analysis To obtain the results presented in this section, in the scanning phase (Section 4.1.1) of the developed method was used a volume (500×500×500 mm) in a convenient place to be covered by two manipulators placed side by side (centered in the coordinates (250; 250; 450) mm in respect to the robot's base referential). It is intended that the final system of the project in which this dissertation is inserted has two robotic arms: the first will be active and responsible for performing the inspection movements; the second will be passive and have a holding function (the latter can not be only a fixed support because it will have to help in the grasping task and relocate the tip to the place where the manipulability is increased). For the first trajectory acquired with the system presented in the previous chapter, the path that obtained the biggest score (𝑚𝑠= 3.75) can be observed in Figure 4.20. It corresponds to the trajectory that has its initial point in the coordinates (500; 500; 650) mm (in respect to the robot's base referential) and to the second solution of the IK (joints 2 and 6 will be positive, and joint 4 negative). This path leads to the variations in the joint angles exposed in Figure 4.21. A summary of the distances to the joint limits (from joint 1 to joint 7 are, respectively, ±170º, ±120º, ±170º, ±120º, ±170º, ±120º, and ±175º) and singularities (happen when the joints 2, 4, or 6 are 0º) can be observed in Table 4.1. Using the latter, it can be argued that the arm maintains a high manipulability in every pose. This statement is sound Figure 4.19 – Object surface reconstruction and obtained frame for determining the orientations.
77 zeros; the conditional statement of the line 13 intends to compensate for delays that can happen in the simulator when one is trying to achieve a pose; in line 15, linear interpolations between the joint values are done, to increase the number of values that are sent to the robot and obtain a smoother movement. 2. The research team in the MARLab already had CoppeliaSim scenarios prepared to work with the Matlab files described above, but with different manipulators and grippers. As such, the arm originally placed was eliminated, and the Kuka LBR iiwa 14 R820 was inserted. The gripper (OnRobot RG2) was then assembled to the robot's tip and manually closed (because the leather pieces have a minimal thickness). The floor’s dimensions were reduced to mimic better the base on which the robot is mounted. Finally, a graph was attached to the robot’s tip for two reasons: it is represented with a coordinate frame, that can be made equal to the last one of the Denavit- Hartenberg convention, allowing to understand if the desired orientations are achieved; it can leave a track of a specific color which makes possible to see if the desired positions are reached. These elements can be observed in Figure 4.24 25 . To simulate the tracking of a specific trajectory, first, the trajectory is imported to the scenario previously described. To achieve this, one can use the option “Import path from CSV”. The selected CSV should have the trajectory’s data in the format described in Section 4.1.1 (each line corresponds to a pose; the first three columns match the position – x, y, and z coordinates; the last three columns concern the orientation – Euler angles (XYZ)). An example of a trajectory imported to CoppeliaSim can be observed in 25 In Figure 4.24 the graph is not exactly attached to the gripper’s tip because the robot’s flange dimension has a minor error. As such, the graph is farther from the tip to compensate for this offset and represent the actual manipulator and gripper’s dimensions. Figure 4.24 – Elements inserted in the CoppeliaSim scenario. Robot s stand Kuka iiwa model nRobot RG2 model Graph Followed trajectory track
78 Figure 4.25–a) and b). With the desired trajectory in the scenario, one can send the joint values as explained before. During the simulation, different verifications can be done: the arm can not make abrupt movements; the line described by the graph attached to the tip of the robot must overlap the line which represents the trajectory (as in the Figure 4.25–c) the dark blue line is overlapping the light blue one); the axes of the tip’s graph must overlap the frames that represent the orientations in each pose (like in the Figure 4.25–d)); the manipulator can not collide with its stand. The simulations were successful considering the aspects previously presented for the two acquired trajectories (Section 4.2.1). a) b) c) d) Figure 4.25 – Trajectory tracking in CoppeliaSim: a) representation of a trajectory without orientation information; b) representation of a trajectory with the orientations in each pose (represented by frames); c) position evaluation; d) orientations evaluation. Full simulation available in: https://youtu.be/TcV9hgg4SVo.
79 In the trajectory tracking simulations, only a visual analysis was done because CoppeliaSim can not accurately reproduce the behavior of the arm’s controller. As such, a detailed evaluation of the simulations would not be valuable. Although, they allowed to make a rough validation of the method and ensured that it was safe to test the generated joint values in the real robot, which will be the subject of the next section. 4.2.4 Practical validation of the proposed method To validate the proposed method with the real robot was necessary to mount a testing setup. Before the beginning of the present dissertation, it was already decided that the active manipulator to be used was the Kuka LBR iiwa 14 R820. LBR stands for “leichtbauroboter”, which means lightweight robot in German (weights 29.9 kg), iiwa for “intelligent industrial work assistant”, 4 is the robot's payload in kilograms (Annex I), and R820 is the distance from the shoulder to the wrist in millimeters. This arm is designed for human-robot collaboration scenarios and, as such, includes features like rounded edges, torque and velocity monitoring, and collision detection. Other important characteristics of this manipulator, like joint limits, maximum velocities, and torques, can be consulted in Table 4.4. Table 4.4 – Kuka LBR iiwa 14 R820 joint limits, maximum velocities, and torques. Joint Angular limit (deg) Maximum velocity (deg/s) Maximum torque (N-m) 1 ±170 85 320 2 ±120 85 320 3 ±170 100 176 4 ±120 75 176 5 ±170 130 110 6 ±120 135 40 7 ±175 135 40 Although the manipulator was already defined, other decisions were not made (e.g., the gripper and the type of command to be used in the arm). As such, before presenting the obtained results, these decisions are discussed. Starting with the gripper, there were two possibilities. The first was to use an already existing gripper in the laboratory where this dissertation was developed (Schunk PG 070 C). The second was to buy a new one. As the first option could save thousands of euros, some experiments were done. Unfortunately, they were not well succeeded because the gripper was several years old, and thus, not all the instructions manuals were available. Moreover, Schunk no longer supported that gripper model. As
80 such, a new one had to be selected. Both aspects of the laboratory and the specific project in which this dissertation is inserted were taken into consideration: ➢ Be collaborative: like the manipulator, the gripper must also be collaborative because the presence of people in their vicinity will be allowed. ➢ Maximum stroke and load: at least 60 mm and 2 kg, respectively, to allow for gripping the wide range of objects used in the laboratory (e.g., bottles and tubes). ➢ Adjustable force and stroke: like the previous requirement, these can also increase the number of objects that can be grabbed. ➢ Simple communication interface: to speed up the setup process. Table 4.5 presents the characteristics (related to the previously presented requirements) of some of the most popular collaborative grippers currently on the market (compatible with the robot to be used). Table 4.5 – Most significant characteristics of some collaborative grippers that could be used on the project in which this dissertation is inserted (information obtained with possible suppliers). Manufacturer and model Stroke control (mm) Force control (N) Maximum load (kg) Communication interface OnRobot RG2 Yes, [0–110] Yes, [3–40] 2 Ethernet or digital IO OnRobot 2FG7 Yes, [1–39] or [35–73] Yes, [0–110] 7 Ethernet or digital IO Schunk Co–act EGP– C 40–N–N No, [16; 28] Yes, [35; 70; 105; 135] 0.7 Digital IO Robotiq 2F–140 Yes, [0–140] Yes, [10–125] 2.5 Modbus RTU (RS–485) Robotiq Hand–E Yes, [0–50] Yes, [20–185] 4.7 Modbus RTU (RS–485) From Table 4.5 the grippers OnRobot RG2 and Robotiq 2F–140 stand out with adjustable wide strokes. Moreover, they comply with the force and load requirements. Although the Ethernet interface available in the OnRobot gripper could be considered a bit more simple, the decision between the two should be made mainly by the price. The OnRobot gripper is approximately 450 euros cheaper and thus, was the selected one.
81 The gripper OnRobot RG2 (Figure 4.26) when acquired for the robot Kuka LBR iiwa comes with a group of accessories: ➢ Compute box: the gripper’s controller. ➢ Adapter/quick changer: to be mounted on the robot’s flange, allowing the gripper to be attached. ➢ Connection cables: Ethernet and connection cable between the compute box and adapter. ➢ Velcro tapes: to strap the cable that goes from the compute box to the adapter/quick changer to the arm. The installation of these components is a quick process in which only very general precautions have to be taken into account. For example: the tightening torque of the adapter’s bolts must be 10 N-m; the cable that connects the compute box and the adapter must be strapped to the arm with extra length, to ensure that it is not pulled when the robot moves. Also, the adapter has a cable holder that must be used to prevent any excessive strain on the cable’s connector (Figure 4.26); the metallic enclosure of the arm’s controller and of the compute box can not be connected (no galvanic connection between the two) (OnRobot, 2021). Two procedures must be followed when a gripper is attached to the arm for the first time. First, using the software Kuka Sunrise.Workbench (robot’s development environment), one has to create an object template for the tool, adding properties like the mass, Center of Gravity (CG), and principal moments of inertia. Only the first two were inserted (1 kg and (0; 0; 114.3) mm (relative to the tip’s frame–Figure Figure 4.26 – OnRobot RG2 installation. Adapter Compute box connection nRobot RG2 Adapter Velcro tape
82 3.5), respectively 26 ). OnRobot did not provide the principal moments of inertia. Also, it was impossible to obtain a 3D model of the gripper with mass properties, which would allow obtaining the desired values with a CAD software (e.g., SolidWorks). Moreover, the robot’s controller has an option to determine this kind of property, however it is not reliable for grippers with such a reduced mass. This problem can be considered minor because, with the present mass and dimensions, the principal moments of inertia will be residual compared to the maximum permissible, which is 0.3 kg-m², and the mass and CG are known. Concerning these latter, the payload diagram of the robot can be observed (Annex I) to ensure that the load capacity is respected. Additionally, a procedure associated with the relation between the mechanical robot axes' positions and the motors’ angles needs to be done (position mastering). This process can be easily triggered using a preprogrammed option present in the robot’s teach pendant (Kuka, 2019). A Kuka technician validated all these procedures. The setup needed is constituted by the gripper, arm, and two more computers 27 , and all communicate via Ethernet. A router is used to connect all the devices. It should be noted that the network settings were adapted to be in accordance with the robot’s controller default IP: 172.31.1.147 (subnet mask: 255.255.0.0), and all the devices were defined with a static one, like 172.31.1.XXX (subnet mask: 255.255.255.0) (to ensure that they would not change every time the setup was used). These two procedures can be done using the router configuration menu (which can be accessed with its IP and an Internet browser). However, when dealing with the gripper, there is a minor detail to consider. There are four switches on its back, and following the instructions given by OnRobot, the combination between them should be the one present in Figure 4.27 (1, 2, and 3 down, and 4 up). Otherwise, it will not be possible to attribute the desired static IP to the gripper (OnRobot, 2021). 26 Only the data of the gripper and adapter was used because the leather pieces to be grabbed have a negligible mass. 27 As it will be seen, the robot's command will be done using a computer running Ubuntu, but Kuka Sunrise.Workbench only runs on Windows. As such, two computers are needed. Figure 4.27 – Switches combination (in the gripper’s compute box) that allows the attribution of a static IP.
83 Using the gripper’s I and an Internet browser is possible to access a GUI, which allows one to control different aspects, e.g., opening and closing the fingers (Figure 4.28), configure I/O signals, and observe the state of the sensors. The robot’s command could be done using different interfaces. ne could use the arm’s official development environment, Kuka Sunrise.Workbench, or other nonofficial interfaces such as the ones developed in the University of Sheffield (Mokaram et al., 2017; Mokaram et al., 2018), Coimbra (Safeea & Neto, 2019a; Safeea & Neto, 2019b), or Munich (Hennersperger et al., 2017; Virga et al., 2019). To choose the adequate one for this dissertation application, one should recall some requirements: ➢ Use ROS (Robot Operating System): ROS is a framework with a set of software libraries and tools, organized in packages, that can speed up the development of robotic applications and the integration of different pieces of equipment (e.g., in future works, the integration of the robot and gripper’s command will be easier). ROS can also be seen as a communication interface. To better understand its basics, some concepts should be briefly presented: nodes are executables that can be run simultaneously and communicate with each other. A node that pretends to share an information, publisher , sends it on a message to a topic . This latter will transmit it to all the nodes that subscribed to that topic, subscribers . Nodes can also communicate using services. Here, a service client sends a request to a service server , which answers with a response . The communication of the different elements in a ROS network is coordinated by a ROS master (Sepúlveda, 2018). ➢ Allow online commands: in this work, all the possible decisions must be taken considering that in future works online corrections will be introduced in the followed trajectories (when the desired deformations are not being achieved in the leather pieces). Thus, the chosen interface Figure 4.28 – GUI that allows to open and close the gripper (with adjustable width and force).
84 should be capable of commanding the arm online. Particularly, the motion class SmartServo from the Kuka package Sunrise.Servoing should be used for two reasons: it is recommended for visual servoing applications; it will be easier to obtain smooth and safe movements because it has velocity, acceleration, and jerk limitations (Kuka, 2018). With these restrictions, the interface IIWA STACK, from the University of Munich, was selected. The one from Sheffield uses ROS but without the package Sunrise.Servoing, and the Coimbra’s one employs this latter, but not the SmartServo motion class, and it is not in ROS. With this decision, the instructions from Virga et al. (2019) were followed to install the package IIWA STACK on an Ubuntu 18 computer and make the necessary changes using Kuka Sunrise.Workbench. As Matlab can be connected with ROS (using the ROS Toolbox), and it is the primary programming platform used in this dissertation, two procedures were executed so that it was possible to work with the IIWA STACK package from it, and to make this process less cumbersome. The first procedure consisted of using the ROS Custom Message add-on to create the package’s ROS custom messages in Matlab. The second was to create a class (ros_interface.m) where some functions were implemented to make sending and receiving messages to/from topics and calling services more straightforward. Finally, a script that uses these functions, like the one presented below, was written to send the joint values to the arm online. Strategy used to command the arm with the IIWA STACK package through the MathWorks ROS Toolbox 1: rosinit //connects Matlab to the ROS network 2: initialize ros_interface class 3: joints ← matrix with the joint values (each row respects a pose and each column a joint) 4: set joint velocity, acceleration, acceleration override 5: for (j = 1; j ≤ number of poses) 6: send joints(j, 1:7) 7: wait 0.2 // intentional delay for making the readings in the next line ready 8: while time to reach joint(j, 1:7) > 0.6 // time in seconds 9: end 10: end Although, before using it, the command roscore must be used in the Ubuntu command line. Immediately after or before, an application on the robot’s controller must also be initiated. There are two ways of doing this procedure: the application can be run with the arm’s teach pendant, which is problematic because it requires the enabling switch to be continuously pressed (to authorize the robot's movement); the application can be initialized externally. The latter option only requires the specification, using the Kuka Sunrise.Workbench, of two points: the robot’s application to be externally activated; the IP and port of the
85 computer used for external control. Moreover, one will need a program that uses UDP (User Datagram Protocol) to initialize the previously selected application (the Java one present in the instructions manual of the robot can be used) (Kuka, 2019). As this second option is more convenient, it was the chosen one. To verify if the desired deformations on the leather pieces could be reproduced during the trajectory tracking with the robot some elements had to be used additionally to the active arm and gripper–Figure 4.29. The passive arm, for simplicity, is not yet a manipulator. A grasp support, which is compliant in two degrees of freedom 28 (rotation and translation in an axis perpendicular to the ground) (Figure 4.29–A), was used to secure the leather between two metal strips (Figure 4.29–B). It should be noted that the contact area of the gripper's fingertips with the deformable object is increased with a card (approximately 86×54 mm) to mimic the human fingers better (Figure 4.29–C). This setup allowed to verify that the desired deformations in the leather piece were reproduced when the joint values generated by the proposed trajectory tracking method were sent to the robot–Figure 4.30. While the manipulator did the movements present in Figure 4.30, the joint values were read each time a new pose was sent. Then, with FK, the tip’s pose at that moment was calculated and compared with the one of the desired trajectory, allowing to obtain the following data: ➢ The manipulator reached the acquired poses with a mean positioning error of 5.5 mm (standard deviation: 3.3 mm). 28 In this reproduction, it was essential to have a compliant passive manipulator because it made the system tolerant to errors. These errors result, for example, from the difficulty that is to reproduce the initial relative position between the gripping supports, which can lead to excessive stretching. Figure 4.29 – Aditional elements to the gripper and active manipulator used to verify if the desired deformations could be reproduced. C A
86 ➢ The mean angular deviations of the x, y, and z unit vectors that specify the orientations were, respectively: 2.8º, 2.7º, and 0.8º (standard deviations: 1.7º, 1.8º, and 0.6º, respectively). It should be noted that this accuracy was negatively affected to favor the safety and smoothness of the movements. Despite this, as shown in Figure 4.30, it is in accordance with the task's requirements. The torsion movement present in the other sections of this chapter could not be validated with the real setup due to a loss of synchronism between the orientations and positions in the trajectory acquisition. 1 2 3 Figure 4.30 – Robotic system reproducing the demonstrated bending movements (original movement in the upper left corner): 1 – Leather piece bent convexly and movement of its concavity extremity along its length; 2 – Transition between the situation 1 and 3; 3 – Leather piece bent concavely and movement of its concavity extremity along its length. Full video available in: https://www.youtube.com/watch?v=sbY8fS4se0U.
93 Garcia, N., Rosell, J., & Suarez, R. (2019). Motion planning by demonstration with human-likeness evaluation for dual-arm robots. IEEE Transactions on Systems, Man, and Cybernetics: Systems , 49 (11), 2298–2307. https://doi.org/10.1109/TSMC.2017.2756856 Gong, M., Li, X., & Zhang, L. (2019). Analytical inverse kinematics and self-motion application for 7-DoF redundant manipulator. IEEE Access , 7 , 18662–18674. https://doi.org/10.1109/ACCESS.2019.2895741 Gutzeit, L., Fabisch, A., Otto, M., Metzen, J. H., Hansen, J., Kirchner, F., & Kirchner, E. A. (2018). The BesMan learning platform for automated robot skill learning. Frontiers in Robotics and AI , 5 . https://doi.org/10.3389/frobt.2018.00043 Hennersperger, C., Fuerst, B., Virga, S., Zettinig, O., Frisch, B., Neff, T., & Navab, N. (2017). Towards MRI-based autonomous robotic US acquisitions: A first feasibility study. IEEE Transactions on Medical Imaging , 36 (2), 538–548. https://doi.org/10.1109/TMI.2016.2620723 Huang, S. H., Pan, J., Mulcaire, G., & Abbeel, P. (2015). Leveraging appearance priors in non-rigid registration, with application to manipulation of deformable objects. 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) , 878–885. https://doi.org/10.1109/IROS.2015.7353475 Kim, H., & Rosen, J. (2015). Predicting redundancy of a 7 DoF upper limb exoskeleton toward improved transparency between human and robot. Journal of Intelligent & Robotic Systems , 80 (1), 99– 119. https://doi.org/10.1007/s10846-015-0212-4 Kiyokawa, T. (2022). Onrobot ROS drivers for OnRobot Grippers. [Computer software]. GitHub. https://github.com/Osaka-University-Harada-Laboratory/onrobot Kreutz-Delgado, K., Long, M., & Seraji, H. (1992). Kinematic analysis of 7-DoF manipulators. The International Journal of Robotics Research , 11 (5), 469–481. https://doi.org/10.1177/027836499201100504
94 Kuhlemann, I., Schweikard, A., Jauer, P., & Ernst, F. (2016). Robust inverse kinematics by configuration control for redundant manipulators with seven DoF. 2016 2nd International Conference on Control, Automation and Robotics (ICCAR) , 49–55. https://doi.org/10.1109/ICCAR.2016.7486697 Kuka. (2018). Kuka Sunrise.Servoing 1.16 . Kuka. (2019). Kuka Sunrise.OS 1.16 and Kuka Sunrise.Workbench 1.16 . Kuka. (2020). Option media flange . Lee, S., & Bejczy, A. (1991). Redundant arm kinematic control based on parameterization. Proceedings. 1991 IEEE International Conference on Robotics and Automation , 1 , 458–465. https://doi.org/10.1109/ROBOT.1991.131621 McConachie, D., Dobson, A., Ruan, M., & Berenson, D. (2020). Manipulating deformable objects by interleaving prediction, planning, and control. International Journal of Robotics Research , 39 (8), 957–982. https://doi.org/10.1177/0278364920918299 McKerrow, P. (1991). Introduction to robotics . Addison-Wesley Publishing Company. Mokaram, S., Aitken, J. M., & Law, J. (2018). ROS-integrated API for the Kuka LBR iiwa collaborative robot. [Computer software]. GitHub. https://github.com/jonaitken/KUKA-IIWA-API.git Mokaram, S., Aitken, J. M., Martinez-Hernandez, U., Eimontaite, I., Cameron, D., Rolph, J., Gwilt, I., McAree, O., & Law, J. (2017). A ROS-integrated API for the Kuka LBR iiwa collaborative robot. 20th IFAC World Congress, 50(1), 15859–15864. https://doi.org/10.1016/j.ifacol.2017.08.2331 Moradi, H., & Lee, S. (2005). Joint limit analysis and elbow movement minimization for redundant manipulators using closed form method. In D. Huang, X. Zhang, & G. Huang (Eds.), Advances in Intelligent Computing (pp. 423–432). Springer Berlin Heidelberg. https://doi.org/10.1007/11538356_44
95 Myronenko, A., & Song, X. (2010). Point set registration: Coherent Point Drift. IEEE Transactions on Pattern Analysis and Machine Intelligence , 32 (12), 2262–2275. https://doi.org/10.1109/TPAMI.2010.46 Nenchev, D., Tsumaki, Y., & Takahashi, M. (2004). Singularity-consistent kinematic redundancy resolution for the S-R-S manipulator. 2004 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) (IEEE Cat. No.04CH37566) , 4 , 3607–3612. https://doi.org/10.1109/IROS.2004.1389975 Nielsen, M. A. (2015). Neural Networks and Deep Learning . Determination Press. https://books.google.pt/books?id=STDBswEACAAJ Oh, J., Bae, H., & Oh, J. (2017). Analytic inverse kinematics considering the joint constraints and selfcollision for redundant 7DoF manipulator. 2017 First IEEE International Conference on Robotic Computing (IRC) , 123–128. https://doi.org/10.1109/IRC.2017.46 OnRobot. (2021). User manual for Kuka robots . Ravichandar, H., Polydoros, A. S., Chernova, S., & Billard, A. (2020). Recent advances in robot learning from demonstration. Annual Review of Control, Robotics, and Autonomous Systems , 3 (1), 297– 330. https://doi.org/10.1146/annurev-control-100819-063206 Ribeiro, J. (2022). Development of an active vision system for robot inspection of complex objects [Master’s dissertation, Universidade do Minho]. RepositóriUM. https://hdl.handle.net/1822/77362 Rivas, P. (2020). Deep Learning for Beginners . Packt Publishing Ltd. https://www.packtpub.com/product/deep-learning-for-beginners/9781838640859 Safeea, M., & Neto, P. (2019a). Kuka Sunrise Toolbox: Interfacing collaborative robots with Matlab. IEEE Robotics & Automation Magazine , 26 (1), 91–96. https://doi.org/10.1109/MRA.2018.2877776
96 Safeea, M., & Neto, P. (2019b). IIWA control toolbox. [Computer software]. GitHub. https://github.com/Modi1987/IIWAContorlToolbox.git Saha, M., & Isto, P. (2007). Manipulation planning for deformable linear objects. IEEE Transactions on Robotics , 23 (6), 1141–1150. https://doi.org/10.1109/TRO.2007.907486 Sanchez, J., Corrales, J. A., Bouzgarrou, B. C., & Mezouar, Y. (2018). Robotic manipulation and sensing of deformable objects in domestic and industrial applications: A survey. International Journal of Robotics Research , 37 (7), 688–716. https://doi.org/10.1177/0278364918779698 Sanchez, J., Mohy El Dine, K., Corrales, J. A., Bouzgarrou, B., & Mezouar, Y. (2020). Blind manipulation of deformable objects based on force sensing and finite element modeling. Frontiers in Robotics and AI , 7 . https://doi.org/10.3389/frobt.2020.00073 Sariyildiz, E., Ucak, K., Oke, G., Temeltas, H., & Ohnishi, K. (2012). Support Vector Regression based inverse kinematic modeling for a 7-DOF redundant robot arm. 2012 International Symposium on Innovations in Intelligent Systems and Applications , 1–5. https://doi.org/10.1109/INISTA.2012.6247033 Schulman, J., Ho, J., Lee, C., & Abbeel, P. (2016). Learning from Demonstrations Through the Use of Non-rigid Registration. In M. Inaba & P. Corke (Eds.), Robotics Research: The 16th International Symposium ISRR (pp. 339–354). Springer International Publishing. https://doi.org/10.1007/978-3-319-28872-7_20 Sepúlveda, J. (2018). Desenvolvimento de um assistente robótico para neurocirurgias estereotáxicas: Solução baseada no robô Sawyer [Master’s dissertation, Universidade do Minho]. RepositóriUM. https://hdl.handle.net/1822/59471 Shimizu, M., Kakuya, H., Yoon, W., Kitagaki, K., & Kosuge, K. (2008). Analytical inverse kinematic computation for 7-DoF redundant manipulators with joint limits and its application to redundancy
97 resolution. IEEE Transactions on Robotics , 24 (5), 1131–1142. https://doi.org/10.1109/TRO.2008.2003266 Siciliano, B., Sciavicco, L., Villani, L., & Oriolo, G. (2009). Kinematics. In M. Grimble & M. Johnson (Eds.), Robotics: Modelling, Planning and Control (pp. 39–103). Springer London. https://doi.org/10.1007/978-1-84628-642-1_2 Silva, E. (2011). Reaching, grasping and manipulation in anthropomorphic robot systems [Doctoral dissertation, Universidade do Minho]. RepositóriUM. http://hdl.handle.net/1822/18243 Sutton, R. S., & Barto, A. G. (2018). Reinforcement learning: An introduction (Second edition). The MIT Press. Tang, T. (2020, March 15th). A framework for manipulating deformable linear objects by coherent point drift [Video]. YouTube. https://www.youtube.com/watch?v=21OJfrLfGQY Tang, T., Liu, C., Chen, W., & Tomizuka, M. (2016). Robotic manipulation of deformable objects by tangent space mapping and non-rigid registration. 2016 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) , 2689–2696. https://doi.org/10.1109/IROS.2016.7759418 Tang, T., Wang, C., & Tomizuka, M. (2018). A framework for manipulating deformable linear objects by coherent point drift. IEEE Robotics and Automation Letters , 3 (4), 3426–3433. https://doi.org/10.1109/LRA.2018.2852770 The MathWorks, Inc. (n.d.). atan2: Four-quadrant inverse tangent. https://www.mathworks.com/help/matlab/ref/atan2.html#bucseo2_vh Tian, X., Xu, Q., & Zhan, Q. (2021). An analytical inverse kinematics solution with joint limits avoidance of 7-DoF anthropomorphic manipulators without offset. Journal of the Franklin Institute , 358 (2), 1252–1272. https://doi.org/10.1016/j.jfranklin.2020.11.020
98 Tondu, B. (2006). A closed-form inverse kinematic modelling of a 7R anthropomorphic upper limb based on a joint parametrization. 2006 6th IEEE-RAS International Conference on Humanoid Robots , 390–397. https://doi.org/10.1109/ICHR.2006.321302 Vahrenkamp, N., Asfour, T., Metta, G., Sandini, G., & Dillmann, R. (2012). Manipulability analysis. 2012 12th IEEE-RAS International Conference on Humanoid Robots (Humanoids 2012) , 568–573. https://doi.org/10.1109/HUMANOIDS.2012.6651576 Virga, S., Esposito, M., Peters, A., Stoyanov, T. (2019). IIWA STACK. [Computer software]. GitHub. https://github.com/IFL-CAMP/iiwa_stack Vogt, D., Stepputtis, S., Grehl, S., Jung, B., & Ben Amor, H. (2017). A system for learning continuous human-robot interactions from human-human demonstrations. 2017 IEEE International Conference on Robotics and Automation (ICRA) , 2882–2889. https://doi.org/10.1109/ICRA.2017.7989334 Vogt, D., Stepputtis, S., Grehl, S., Jung, B., & Ben Amor, H. (2017). A system for learning continuous human-robot interactions from human-human demonstrations. 2017 IEEE International Conference on Robotics and Automation (ICRA) , 2882–2889. https://doi.org/10.1109/ICRA.2017.7989334 Vu, H. (2012). Control of an anthropomorphic manipulator involved in physical human-robot interaction [Master's dissertation, Universidade do Minho]. RepositóriUM. http://hdl.handle.net/1822/19955 Waldron, J., & Schmiedeler, J. (2016). Kinematics. In B. Siciliano & O. Khatib (Eds.), Springer Handbook of Robotics (pp. 11–36). Springer International Publishing. https://doi.org/10.1007/978-3-319- 32552-1_2
99 Wang, J., Lu, C., Zhang, Y., Sun, Z., & Shen, Y. (2021). A numerically stable algorithm for analytic inverse kinematics of 7-DoF S-R-S manipulators with joint limit avoidance. Journal of Mechanisms and Robotics , 1–15. https://doi.org/10.1115/1.4053375 Wiedmeyer, W. (2020). Kinematics . [Computer software]. GitHub. https://github.com/KITrobotics/rll_sdk/tree/master/kinematics Wiedmeyer, W. (2020). Kinematics . [Computer software]. GitHub. https://github.com/KITrobotics/rll_sdk/tree/master/kinematics Wiedmeyer, W., Altoé, P., Auberle, J., Ledermann, C., & Kröger, T. (2021). A real-time-capable closedform multi-objective redundancy resolution scheme for seven-DoF serial manipulators. IEEE Robotics and Automation Letters , 6 (2), 431–438. https://doi.org/10.1109/LRA.2020.3045646 Xie, Z., Zhang, Q., Jiang, Z., & Liu, H. (2020). Robot learning from demonstration for path planning: A review. Science China Technological Sciences , 63 (8), 1325–1334. https://doi.org/10.1007/s11431-020-1648-4 Xu, W., Yan, L., Mu, Z., & Wang, Z. (2016). Dual arm-angle parameterisation and its applications for analytical inverse kinematics of redundant manipulators. Robotica , 34 (12), 2669–2688. Cambridge Core. https://doi.org/10.1017/S0263574715000284 Yoshikawa, T. (1985). Manipulability and redundancy control of robotic mechanisms. Proceedings. 1985 IEEE International Conference on Robotics and Automation , 2 , 1004–1009. https://doi.org/10.1109/ROBOT.1985.1087283 Zaplana, I., & Basanez, L. (2018). A novel closed-form solution for the inverse kinematics of redundant manipulators through workspace analysis. Mechanism and Machine Theory , 121 , 829–843. https://doi.org/10.1016/j.mechmachtheory.2017.12.005 Zhang, H. (2019, May 16th). hand gesture control +trajectory RPD + 3d curve programming [Video]. YouTube. https://www.youtube.com/watch?v=I-mkXT_k8kA
100 Zhang, H., Liu, S., Lei, Q., He, Y., Yang, Y., & Bai, Y. (2020). Robot programming by demonstration: A novel system for robot trajectory programming based on robot operating system. Advances in Manufacturing , 8 (2), 216–229. https://doi.org/10.1007/s40436-020-00303-4 Zhang, T., McCarthy, Z., Jow, O., Lee, D., Chen, X., Goldberg, K., & Abbeel, P. (2018). Deep imitation learning for complex manipulation tasks from virtual reality teleoperation. 2018 IEEE International Conference on Robotics and Automation (ICRA) , 5628–5635. https://doi.org/10.1109/ICRA.2018.8461249 Zhu, Z., & Hu, H. (2018). Robot learning from demonstration in robotic assembly: A Survey. Robotics , 7 (2). https://doi.org/10.3390/robotics7020017
101 Annex I. PAYLOAD DIAGRAM FOR THE KUKA LBR IIWA 14 R820 This annex was adapted from Kuka (2020). Load center of gravity Permissible mass inertia at the design point (Lx, Ly, Lz): 0.3 kg-m². Payload diagram