1. Introduction
The growing demand for advanced industrial robotic applications such as machining and additive manufacturing highlights the importance of motion planning algorithms in this field [
1,
2]. As a consequence of this trend, a strong effort has been put into the improvement of the algorithm efficiency, especially in terms of reduction of the computing time. Moreover, researchers have investigated path and/or trajectory planners that are able to avoid collisions also taking into account the robot dynamics constraints [
3,
4,
5,
6].
The easiest motion planning problem consists in finding a collision-free point-to-point trajectory from a starting configuration to an end configuration without any constraints on the intermediate points. This problem is often addressed by means of path planning algorithms, which compute a suitable path between the points without taking into account constraints on velocity, accelerations, and torques [
7,
8,
9,
10]. The trajectory is then obtained by using a suitable time parametrization of the path [
11,
12]. Other approaches also consider constraints on velocity, acceleration and motor torque during the planning phase [
13,
14]. This class of problems is known as kinodynamic motion planning [
15].
The lack of constraints on the intermediate points is an important drawback in many applications. For example, one might want to keep the robot tool oriented toward the floor during the whole trajectory for safety reasons. Recent works addresssed problem of this kind when the closed form of the constraints is not known
a priori [
16,
17]. In this paper, we consider a more specific but still important class of trajectories, in which the number of degrees of freedom of the task is smaller than the one of the robot. This is a common scenario, as technological tasks often require to constrain only some of the Cartesian coordinates and velocities. Thus, the kinematic redundancy of the robot with respect to the task can be exploited to optimize a desired criterion [
18,
19,
20,
21]. It is worth stressing that, in this kind of tasks, path constraints are known
a priori. This is a fundamental difference with respect to [
16], because the dimension of the problem can be reduced by only exploring the subspace given by the kinematic redundancy.
The robotic machining and the additive manufacturing tasks are two significant technological examples where the use of industrial robots has become important and the motion planning strategies cover a crucial role [
20,
21]. However, the use of dedicated motion planning algorithms for these kind of applications is not common in the literature and in industry.
Thank to the improvements of robots kinematics and dynamics performance, the use of industrial robots in the field of machining applications has profitably increased during the last years [
22]. However, industrial robots still have low kinematics and dynamics performance if compared to CNC machines, hence a kinodynamic motion planning can be a suitable solution to tackle such limitations. In machining tasks, kinematics constraints strictly depend on the process and hence by the adopted tool. In general, all the machining processes using a rotating tool have at least one redundant degree of freedom (DoF). The redundancy permits to choose an optimized robot configuration among an infinite set of solutions, as also clarified in
Figure 1. Depending on the technological requirements of the specific machining task the redundant DoF/DoFs can be optimized to improve the process results [
23].
Another emerging field for industrial robots is represented by the additive manufacturing and laser cladding, that is, metal material deposition with techniques such as laser metal deposition or electron beam melting [
24,
25,
26]. The kinematic constraints with laser metal deposition technique consists in keeping the translation speed constant and identifying the best tilt of the laser head with respect to the underlying surface. [
27,
28,
29,
30] highlight that the process is feasible, although not optimal, for a large range of relative orientations between the deposition axis and the line perpendicular to the surface. Thus, it is possible to optimize the trajectory in order to keep the tilt angle as small as possible and respecting also kinodynamic constraints at the same time.
In particular, the main axis of the operating tool and the axis perpendicular to the surface to be machined/coated define an angle that should be always kept within certain limits depending on the specific process. As consequence, there is always (i) an operative redundancy (the rotation around the main axis of the operating tool) and (ii) a range of permitted angles around the axis perpendicular to the surface. The operative redundancy, namely the allowed cone around the axis perpendicular to the surface, can be exploited to find an optimal orientation able to satisfy both the technological constraints and the robot kinematics/dynamics limits.
Figure 2 describes the general idea of these motion planning issues in additive manufacturing. Pipe welding [
20] and gluing [
31] applications can also be described with a similar optimization problem.
Although
a-priori knowledge of closed-form Cartesian constraints reduces the complexity of the problem, it is not trivial to find the solution of the optimization problem. Indeed, the problem is PSPACE-hard [
32], highly nonlinear and the constraints make the feasible subset of the configuration space disconnected due to direct kinematics is surjective but not necessary injective. Moreover, to obtain an effective obstacles avoidance, collision checks are mandatory with a consequent increment of the computing time. Thus, solvers face local minima and computational burden issues. Many works proposed tailored solutions on the specific application or the number of redundant DoFs: welding [
20,
33], machining and 5-axes applications [
34,
35], additive manufacturing [
21]. However, there is a lack of a general solution for the entire family of problems. Looking at the 5-axes CNC machines, some works deal with a simplified version (because of the lower number of DoFsand the particular structure of CNC machines) of the technologically constrained planning problem. In [
36] a complete overview of motion planning for CNC machines is presented. In particular, the focus of the paper is on the definition of the tool orientation in order to: avoid collisions with gauges, preserve the position within joints limits, and get smooth speed profiles. Moreover, [
37] investigated the optimization of the orientation of the cutting tools in 5-axes machines. Unfortunately, most of the assumptions valid for a 5-axes CNC machine do not hold for industrial robots, where high rotation speed leads to high dynamic effort with resulting motion inaccuracies and vibrations.
This work proposes a unified framework to deal with kinodynamic motion planning applied to machining, welding, gluing, and additive manufacturing tasks. This allows us to cope with different technological constraints and objectives, avoiding the need of tailored solutions.
The approach is based on the formulation of the redundant task as a net, whose vertices are the admissible joint configurations and the edges are the movements between two subsequent configurations. In this formulation, path constraints define the set of admissible joint configurations, that is, the vertices of the net. Then, kinodynamics constraints determine the admissible edges. The resulting net represents the constrained motion planning problem.
The paper shows examples of industrial processes that can be expressed in this framework. It is worth noticing that also complex tasks can be addressed, such as the minimization of elastic deformations during milling processes. Moreover, the discrete nature of the approach also permits to set a trade-off between the quality of the solution and the computational time. This is especially true considering that the granularity of the discretization directly affects the number of collision checks that the algorithm needs to perform, which represent the main bottleneck from the computational point of view.
To solve the discrete motion planning problem, we propose a modified Ant Colony Optimization algorithm. Ant colony optimization is a meta-heuristic technique to find optimal path through graphs [
38]. It is inspired by the behavior of some species of ants to find the optimal route from the anthill to food resources. The idea behind the algorithm is that the ants release a pheromone track on the nodes, which attracts other ants. This track evaporates through iterations but is reinforced by other ants if the nodes belong to good paths. In the end, the high-pheromone tracks converge to the optimal route from the starting point to the goal. Ant colony optimization is particularly suitable for nonlinear high-dimensional discrete optimization problems, which makes it a good candidate for the problem at hand. Different variants of the ant colony algorithm have been proposed in the literature, as detailed in [
39]. In this paper, we combine two strategies to develop an improved Ant Colony solver. First, we exploit the rank-based ant-colony strategy proposed in [
40], in which only the best ants of each iteration are selected to update the pheromone trails. This approach is very promising for the problem considered in this paper, because it makes possible to dramatically reduce the computational burden by performing lazy collision checking (namely, to check collisions only for the most promising vertexes). Then, we use the modified version of the Ant Colony algorithm proposed in [
41] to avoid premature convergence to local minima, which is a typical issue in motion planning problems. In the proposed approach, a rank-based ant-colony with pheromone saturation is used to solve the planing problem. Comparison with other ant-colony approaches shows its effectiveness to manage redundancy in technological trajectories.
The proposed approach is applied to a real-work milling and additive manufacturing scenarios, where the deflection of the robot tool is successfully minimized throughout the process. Moreover, the proposed algorithm shows faster convergence rate compared to other Ant Colony Optimization solvers.
The paper is organized as follows.
Section 7 introduces the notation used in the paper. Definitions related to the technological processes and constraints are given in
Section 2.
Section 3 describes the proposed framework and the definition of the motion planning problem as a discrete optimization problem.
Section 4 focuses on the application of the proposed framework to common technological tasks in industrial processes.
Section 5 describes the modified Ant Colony Optimization solver used in this work. Then, case study on machining applications is discussed in
Section 6, where the proposed solver is compared with other ant-colony strategies. Conclusions are drawn in
Section 7.
3. Proposed Framework for Task Formalization
By considering constraints (
1)–(
2), the set
of feasibile Cartesian paths can be defined as the set of all possible transformation matrices
that satisfy (
1) and (
2) at each step
k, that is:
Technological tasks typically have a small number of redundant DoFs. For example, milling and deburring tasks require 5 DoFs and are typically performed by a 6-DoF manipulator. The exploration of the subset of Cartesian given by the redundancy is therefore practical. In particular, such space can be discretized and, for each sample, the closed-form inverse kinematics of the manipulator can be solved. We therefore refer to
as the discretization of the continuous set
. Inverse kinematic problem is then solved for all the elements of
. Details about the discretization process for different technological tasks are described in
Section 4.1 and
Section 4.2.
Definition 6. For each k, the feasible configuration set is the set of all joint configurations which correspond to a transformation matrix in and that respect the joint limits, that is: The elements of each set are the net vertex. The joint configuration is the element of set , while is the corresponding transformation matrix. The transition between the element of set to the element of set is the net edge.
In order to check if constraints (
3)–(
4) are satisfied, it is necessary to know the edges that connect
to
. We therefore define a network path as follows.
Definition 7. A network path p is an ordered sequence that connects the configuration sets .
This idea is also clarified in
Figure 3. Given a network path
p, it is possible to compute the finite-difference approximations of Cartesian velocities, joint velocities, joint accelerations, and joint efforts. Joint velocity and acceleration at step
k are computed as:
Joint effort can be computed using inverse dynamics:
Velocity and acceleration twists are computed as:
A path is feasible if these values are inside the joint limits and Equations (
3) and (
4) hold.
In order to evaluate the goodness of the paths, it is necessary to define a cost function which depends on both the vertices and the edges. Vertex costs depend only on the path, while edge costs depend on kinodynamics quantities. The following definition of the trajectory planning problem therefore can be applied:
Definition 8. The robot trajectory optimization is a minimization problem defined as follows:where:and where and are cost functions depending respectively on the vertices and the edges of the network path.