To resolve the aforementioned productivity issues, simulation and off-line programming was introduced in the early 1980s (Quinet 1995). Off-line programming is essentially a technology that can generate the text-based robot program by visualizing the robotic work cell using computer technology (see Fig. 2). The geometric information of the robot program can be automatically generated based on the 3D model information using CAD/CAM software packages (Siemens: process simulate for robotics and automation 2010; Robotmaster 2013). This information is then combined with the robot kinematic/dynamic model to form the completed robot program to be executed by the robot controller. Process parameters can be later integrated into the machine code via a provided code editor. The generated robot program can be simulated in the virtual environment for further verification before sending out to the robot controller. The advantages of off-line programming can be summarized as follows (Nof 1999; Biggs and MacDonald 2003):
• Reduce downtime
• Improve safety
• Utilize CAD/CAM software for complicated problems
• Enhance the work-cell setup through simulation
The subject of off-line programming and simulation has been well studied in the literature (Biggs and MacDonald 2003; Pan and Zhang 2008; Nagao et al. 2007). However, the focus of this chapter is on the emerging contact-type machining operations, where some level of interaction between the robot and the workpiece/environment is required, from a practical point of view.
Fig. 2 Off-line programming (www.osha.gov)
While off-line programming tries to replicate the actual environment in the simulated world to the best possible, nevertheless, there are always some differences, and in contact operations, these differences will lead to issues such as collisions, vibration due to poor path planning, and so on. In addition, procedures like work-cell calibrations to get better robot base frame to workpiece frame and tool center point to tool frame are required before the machining operation can be successfully executed. As a result, users are required to have much knowledge on other fields such as workspace digitalization, work-cell calibration, and so on. This chapter aims to provide readers an overview of the state of the art of the current industrial robot off-line programming. The focus will be on off-line programming for contact-type operations where the required robot/workpiece interaction usually results in complex robot motion during the execution. Practical considerations will also be provided throughout the case study section to further assist readers during the implementation phase.
In order to have an overview of these state-of-the-art robot programming methods, let us review on how a manufacturing task can be realized using industrial robotic systems. Generally, the robot programming process for a given task can be divided into the following steps:
1. Decomposition of the task into subtask in such a way that each subtask can be carried out by the robot with a fixed robot-workpiece setup. This step is currently carried out by human due to the lack of robot intellectuality.
2. Realization of each subtask by breaking it down into simple instructions/commands that can be executable by the robot controller. For example, if the subtask is to drill a hole at a specified location, a possible set of instructions can be:
• Pick up an appropriate drill bit from the tool change station
• Moving from the current position to a position that suits the drilling operation without colliding into the environment
• Perform the drilling operation at certain predefined process parameters
• Withdraw from the drilled hole to a safe position
• Move back to a home position if necessary
This task is also carried out by human as in the previous step.
3. Obtain feasible geometric information for all the moving instructions. For off-line programming, this geometric information can be obtained from the workpiece CAD and the robotic work-cell model. Reverse engineering to get digitalized data (costly and time-consuming) is required if workpiece’s CAD models are not available. Figure 3 presents the standard work flow of how to realize a contact-type operation in practice. The executability of the robot program mainly depends on the geometric information in this step.
4. Obtain feasible process parameters to achieve certain requirements. These process parameters depend on the machining process, the interaction of workpiece material and tool, user experiences, etc. For instance, for the above drilling process, the process parameters can be the rotation speed of the drill bit, how fast the drilling process will be carried out, what is the drilling strategy for the in-use material, etc.
5. Combine the above process parameters with the geometric information to form the robot instruction code in an ordered sequence.
Fig. 3 Industrial robot programming process
Since steps 1 and 2 require significant intellectual capability and human experience, research on how to improve the robot programming process mostly focus on the last three steps, especially steps 3 and 4. In fact, research in step 3 usually results in a so-called intuitive teaching method (i.e., how to intuitively obtain the geometric information), while research in step 4 mainly focuses on how to obtain the optimal process parameters. Although the ideal situation is to combine steps 3, 4, and 5 into one and execute this step in a real-time manner (i.e., the robot can measure the in situ geometric information of the workpiece to be processed, plan the trajectory based on the obtained information, and automatically adjust the process parameters during the machining process to achieve the desired specifications, all in a real-time manner), the above steps are still independently executed in practice. As a result of this decoupling, time and effort for realizing a machining task using a robot can be very significant. For example, Pan et al. (2012) pointed out that the programming time of a robotic arc welding system for the manufacture of a large vehicle hull is approximately 360 times the execution time. This observation could be one of the main hurdles that prevents the widely use of industrial robots in small and medium enterprises (SMEs) where high-mix low-volume scenario is usually required. Since using robot to improve the productivity and to gradually replace the fading-out skilled workforce (due to ageing problem) is a trend, it is reasonable to look for a method that can speed up the robot programming process and at the same time can make use of the experience of the skilled worker, i.e., intuitive robot programming by demonstration. The topic of robot programming by demonstration is out of the scope of this work. Readers can refer to Argall et al. (2009) for a comprehensive review on state of the art of this teaching method. An outline of industrial robot programming methods is illustrated in Fig. 4.
Fig. 4 Industrial robot programming methods
Fig. 5 Common frame assignments in industrial robot programming
As mentioned, the focus of this work is on the programming process for contact-type operations, where some level of interaction between the robot and the workpiece/environment are required. Due to this interaction, the 3D CAD model of the robot, its end-effector tools, the workpiece, and the work station are now critical components as depicted in Fig. 5. For example, the workpiece CAD model can be used to generate targets (Ttarget) along the desired path in such a way that the robot’s tool (TTCP) can approach the workpiece surfaces at a certain angle depending on the process requirements. 3D models of the robot and the environment are mainly used for collision checking during the path execution (in the simulation environment). With current CAD/CAM software, the desired robot paths/targets can be automatically generated with respect to the workpiece local frame (Twobj). The remaining issues for contact-type operations using industrial robots are mainly:
1. Optimal tool path generation and workpiece placement: these two problems are in fact coupled since some machining processes such as drilling or chamfering can have an “extra” degree of freedom (DOF) of the tool path. Individual description of each issue is as follows:
(a) “Extra” degree of freedom of the tool path: the easiest way to see this problem is through the drilling process. For a required hole location, it is easy to observe that the rotation along the drilling bit is free. In other words, there is an extra DOF while assigning the target frame to any drilling holes. As a result, depending on how users assign this extra rotation, the robot internal posture during the drilling process can be changed (for a fixed robot and workpiece setup). For instance, Fig. 6 depicted that two different assignments of the last rotation (about ztarget) resulted in two different solutions of the robot base frame (Tbase–1 and Tbase–2). For a trajectory, it is clear that there should be a policy for selecting this “extra” DOF for all targets along the path to ensure the path executability and maybe to optimize the robot internal posture during the path execution.
Fig. 6 Extra DOF during path planning
Currently, there are some software packages that can assist users to automatically assign this extra DOF such as the configurator option of Robotmaster (Robotmaster 2013). By plotting the configuration map for all joint angles (from -180o C to 180o C) of target points along the trajectory, users can have a good visualization of how the remaining DOF affects the path executability. Users can use this configuration map to optimize the generated tool path from CAD/CAM software.
(b) Workpiece placement problem: since the robot’s TCP needs to come into contact with the workpiece during the machining process, the robot’s internal posture can play a critical role during the machining process. For example, if the robot happens to go through a near singularity configuration during the machining process, external vibration (caused by the rotating spindle for instance) can be amplified and thus degraded the machined surface quality. In addition, since robot’s TCP and workpiece are in contact, the probability of collision between robot’s links and the workpiece or work cell is high compared to the noncontact-type operations. As a result, it is sometimes not obvious for the users to decide on the location of the workpiece with respect to the robot to guarantee the path executability, i.e., within the robot reach, singularity free, collision free, and within the robot joint limit. Figure 7 illustrates the described issues in the 2D form.
Fig. 7 Unreachable target (left), reachable target with collision (center), reachable target near singularity (right)
The subject of robot/workpiece placement has been considered by several authors (Feddema 1996; Pamanes and Zeghloul 1991; Lopes and Pires 2011; dos Santos et al. 2010; Vosniakos and Matsas 2010; Yang et al. 2009) in the literature. However, most of the research focused on developing a placement method for noncontact operations where there is no interaction/constraint between the robot and the workpiece and/or the working environment. For instance, Feddema (1996) introduced a searching method of the robot base frame subjected to a minimum time coordinated motion. In this work, the author assumed that the solution of the robot inverse kinematic problem is available. If the robot dynamic model is also available, one can further optimize the placement solution of a serial robot manipulator by taking into account the manipulability and mechanical power during the optimization process (dos Santos et al. 2010). To reduce the computation of the inverse kinematics, Yang et al. (2009) proposed a searching method based on impelling the workspace toward the target points with a set of constraints to assure the reachability of the end effector. Although this is a promising approach, the complexity of the algorithm can prevent its wide use in practice, especially in the small and medium enterprises (SMEs) context, where the shortage of skill workers is usually the major problem (Lim and Tao 2010).
As the above discussion, most of the proposals from the literature are only applicable for noncontact operations where there is no interaction between the robot and the working environment. In addition, the closed-form solution of the inverse kinematic problem is usually required during the searching process. For contact-type operations, the likelihood of collision between the robot and the workpiece and/or the environment is much higher. To tackle the aforementioned problems, an algorithm for the workpiece placement problem was proposed in Vuong et al. (2013). The problem formulation can be stated as follows:
Given:
• Ttargetswobj
• The robot kinematics and dynamics
• Robot joint limits
• The 3D model of the robot, workpiece, and working environment
Determine Twobj robot in such a way that the desired task executability is guaranteed. The proposed method can be summarized as follows (Vuong et al. 2013):
• Step 1: transform the workpiece placement problem into a control problem which is to bring all the robot base frames to a common location while staying within the work-cell constraints, such as joint limits, singularity free, collision free, and so on.
• Step 2: use the operational space control framework (Khatib 1987; Nakanishi et al. 2008) to pull the robot base frames together (via virtual force). Human input can be used during this step to accelerate the convergence rate.
• Step 3: the additional work-cell constraints, such as robot joint limits and so on, are incorporated into the null-space controller. By doing this, the nullspace controller will try to adjust the robot configuration to suite the constraints while maintaining all robot base frames at one common location.
For example, Fig. 8 illustrates the above steps for the 2D case where only 03 targets are considered. Figure 9 shows snapshots of the simulation using the above approach.
Fig. 8 Step 1, problem transformation (left); step 2, virtual pulling force (right)
Fig. 9 t = 0(s) (upper left), t = 0.03(s) (upper right), t = 0.25(s) (bottom left), t = 1.15(s) (bottom right) →
The key contributions of the proposed method are:
• No closed-form solution of the inverse kinematic problem is required. This is because the searching process is performed in the task space rather than in the joint space. Moreover, instead of approaching the problem from the optimization point of view, the framework proposed in this work allows the searching process to be carried out with physical meaning.
• Physical constraints such as joint limits and singularity and collision avoidance can be incorporated as artificial constraints. By making use of the operational space control framework (Khatib 1987), this paper introduces a unified framework to assist the searching of the workpiece location under user-specified constraints.
• User experiences can be incorporated during the searching process (hybrid searching). Since the operational space control framework in Khatib (1987) is the force-based control framework (Nakanishi et al. 2008), user inputs can easily be integrated as artificial force fields without alerting the searching procedure. This is an important feature since other methods using coefficients to guide the optimization may fail and there is no clear guidance of how users can adjust the coefficients (which do not have a clear physical interpretation) to obtain better results.
2. Robotic work-cell calibration: since relative position and orientation between the robot (robot base frame) and the workpiece (world object frame) are unknown, these location information need to be identified through a proper calibration process. For machining operations using robotic systems, two calibration processes need to be carried out:
(a) Workpiece location calibration: this is to find out the relationship between the Twobj and Trobot as depicted in Fig. 5.
(b) Tool center point (TCP) calibration: depending on the tool used, i.e., the drill bit in the above example, the contacting point between the tool and the workpiece needs to be identified. Usually, this relationship can be represented by TTFTCP as shown in Fig. 5.
External sensors may be needed in the calibration process and such equipment can be very costly. Human input is also sometimes involved in the process. Calibration can be a tedious process and sometimes need to be performed several times in order to achieve the required accuracy, and regular calibration is required to ensure consistent performance. How this calibration can be carried out is out of the scope of this work. Readers can refer to the robot calibration chapter in this handbook for a detailed discussion on this topic.
3. Process study: as mentioned, process parameters are meant to achieve certain finishing quality. To obtain these parameters, a proper process study is needed. This process study can be designed using design of experiment method (Montgomery 1984). Note that this process study usually requires the assist from domain experts.
As is seen, off-line programming for machining operations usually results in additional issues especially during the work-cell setup. To further assist readers in the implementation of machining processes using robotic systems, a case study on automated surface grinding process is presented in the below section.