1 Introduction

Robots are becoming increasingly popular in workplaces to work next to humans and may always need humans to program them for tasks. Technicians may make mistakes that cause unexpected consequences resulting from a lack of understanding, or control of work processes. In the face of increasing demands in rapidly changing markets, the most important challenges for manufacturing industries are creating high-quality products and minimizing invalid operations. To improve fabrication capacity and reduce production expenses, adequate and systematic technologies must be developed for manipulators, which will ensure advanced automation, increased productivity, and effective and economical production processes, all while lowering prices and time constraints.

Without requiring advanced knowledge, the hand-guided operation is currently the easiest method of programming for technicians to teach the robot [1]. Recently, collaborative robot is prevalent in smart factories [2]. It is still a challenge to have robots and technicians sharing the same space for the risk of injuries [3], not to mention being in an extremely harsh working environment. The outbreak of the coronavirus COVID-19 has affected the world in varying ways in the manufacturing industry. The fact is that employers tend to increase automation and robots rather than hiring new workers in many cases.

Owing to the simultaneous interpolation movement on the revolving axes on a six-axis robotic arm, the derivation of the six-axis trajectory path is more complex than that of the lower DOF trajectory path. For that reason, a specified postprocessor has to be used to convert end-effector pose posture data from a task planning system to CNC units. Despite superior control units that can accept end-effector pose locations to accomplish a task in real-time without post-processing support, they are relatively costly and utilized in some specific operations only. A typical problem facing the singularity is that a robotic arm fails one or more degrees of freedom. Specific configurations make the robot end-effector block in certain postures. Another severe problem that will cause very high joint velocities is close to the singular positions. In order to reach the desired posture, the revolving axes may lead to a quick return while the end-effector traverse closes singular positions. Facing such a situation without any protection, the unpredictable motion will cause harmful results during the task. A technician can apply an empirical way to guide the end-effector to retract along the end-effector axis at a secure distance away from the reserved position, revolve joints to the appropriate angles, and approach along the end-effector axis back to the intended position. Invalid operations result in a loss of productivity. To ensure a smooth trajectory in robotic arm motion control, the linearization method may be used. The cost of such a minor deviation operation is that accuracy must be compromised by dividing small step movements. On the contrary, the target position data is refined and regenerated to traverse in joint space for 6-axis robotic arms by an intuitive kinematics transformation system proposed in this work.

There are many candidate solutions for a 6R robot that are comparable to the same end-effector position. Traditionally, analytical and numerical methods are two main directions widely used to develop inverse kinematic (IK) techniques on robotic arms. Analytical closed-form solutions with analytical expressions can be achieved either algebraically or geometrically [4, 5]. Husty et al. [6] provided polynomial solutions of general 6R-chains to solve inverse kinematic problems. The numerical solution implementations are computational and iterative while using multidimensional Newton-Raphson or similar techniques to provide a solution [7, 8]. Apparently, numerical implementations are much slower in converging to all the admissible solutions. The human machine interface (HMI) system provides a perfect tool for speeding task planning. As shown in the flowchart in Fig. 1, the relationship between forward and inverse kinematics illustrates the consideration that the D-H transformation is not the only way to find postures of arbitrary end-effectors. By using the analytical method to build a solution domain provides all potential solutions and selects one default by the minimum rotary angle in this paper.

Fig. 1
figure 1

A flowchart of the forward and inverse kinematics solver

Some efficient methods of inverse kinematics procedure based on D-H representation have been proposed for 6R robot [9,10,11,12]. At present, several different studies using various robots and methods have been developed in the field of robotics. To find closed-form solution of a hybrid robot, [13] proposed a numerical method to convert the higher order kinematic equation to a 4th-order polynomial. A modified product-of-exponential method is proposed to formulate a kinematic calibration method [14]. A further kinematic calibration method through machine vision for 6R robot can be found in [15]. The method with extra constraints for robotic machining is employed time-optimal motion planning [16]. Another path smoothing and feed rate planning based on B-spline is presented by [17]. The robot configuration is evaluated to improve the machining accuracy by a stiffness-based method [18, 19]. Applying the quaternion interpolation algorithm and concluding all cutting tool angles influence, an efficient model is developed to predict achievable precision for drilling [20]. A new parallel robot for minimally invasive surgery is constructed [21]. The singularity analysis for this parallel robot is presented in the robot workspace for design optimization of the robot [22]. Recently, some intelligent techniques to solve the IK problem have been proposed. These soft-computing methods have attracted more attention to solving the IK problem [23,24,25,26,27,28,29,30]. These methods can explore the answer without prior knowledge of the robot models. Most of the processes solve IK problems using the mapping function from the Cartesian space to joint space based on the intelligence attained through several training phases.

Numerical techniques can achieve a solution by successive approximation algorithms, and the accuracy depends on iterations required for a suitable convergence from a starting point [31]. Increasing the step size in numerical methods reduces the error at the cost of computational iterations. This time-consuming process is hard to be used in the controller to real-time compute the position of the end-effector for online monitoring. The numerical methods [32, 33] find approximate solutions iteratively, which are close to the initial estimations, and it searches only one angle solution. Numerical solvers usually do not return all the solutions. Some numerical solutions may not correspond to physical postures. To avoid the limitation that comes from the numerical method, analytical solutions are desired to have complete forward kinematics solutions for different configurations of robotic arms [34]. Compared with numerical methods, direct and analytic computations of IK are extremely arduous because of the non-linearity of forward kinematics for high-DOF robotic arms [35]. Moreover, the structure of the robotic arm has to comply with certain kinematics rules. Although obtaining all the intermediate joint coordinates can be very difficult due to the large size and complexity of the analytic expressions that must be handled in the calculations. This paper illustrates the first comprehensive expressions to tackle the IK for 6R robotic arms that find multiple distinct joint solutions for given target positions fast.

The rest of the paper is structured as follows. First, a fast path planning system based on an intuitive concept is pointed out. Section 2 depicts the industrial six-axis robotic arms and D-H transformation. In Section 3, the organization of kinematics by constructing a mathematical model is proposed. Section 4 describes the derivation of the analytical module to transform end-effector poses to the numerical control commands. A 3D intuitive GUI system is developed to create a path strategy for complicated tasks. Section 5 illustrates some practical examples to perform the effectiveness and feasibility of the proposed method is discussed. Finally, Section 6 concludes this work.

2 D-H notation and transformation

It has always been difficult to evaluate which type of mechanism is superior, parallel, or serial. Table 1 shows a simple summary of the essential concept between parallel and serial mechanisms [34]. It is complex and difficult to determine the mechanism differentiation measure. Advancement has always been proposed to improve modeling tasks. A new parameterization method was introduced to simplify the mathematical model of parallel robots straightforwardly [36]. It completely depends on geometrical considerations and the requirements of the tasks performed.

Table 1 Summary of serial and parallel models

On simplifying transformations, a robotic arm can be regarded as links connected in a set of joins. Except for very high speed and under the concern of limited costs, the configuration of a fully serial system provides a noticeable potential benefit over the hexapod. Figure 2 illustrates the mechanical structure of the proposed six-axis robotic arm, which is the prototype of a planned reconfigurable robotic arm for a multi-task and multi-target unit.

Fig. 2
figure 2

Proposed six-axis robotic arm

In order to find the orientation of the end-effector in joint space, the relationships of every two connecting links should be developed. An open-loop kinematic chain can be constructed by the revolute joints linked together. The structural model of a six-axis robot can be therefore regarded as a combination of the individual kinematic models of the links. The revolute joint turns the propulsion of the link about the corresponding Z-axis. The proposed kinematic transformation of the six-axis robotic arm in this study is illustrated in Fig. 3. The desired joint positions are provided, and the end-effector Cartesian tip will be obtained through the forward kinematic. To determine the posture of each successive link, using symbols O1 − O6 represent the links of the proposed kinematic chain. One local coordinate system is connected to one link. All local coordinate systems are applied by the number of the link, which the ith coordinate system attaches to link i. To represent spatial mechanisms, the most commonly used parametric convention is the Denavit–Hartenberg (D–H) notation.

Fig. 3
figure 3

Chain of the proposed kinematic transformation of the six-axis robotic arm

To build a successive homogeneous transformation matrix, the representation is described by four parameters. They are two directions of translation and two axes of rotation, including link length, angle, offset, and twist angle. Homogeneous transformation matrices have been used to describe the position and orientation of the end-effector. One transformation merges translation and rotation into one matrix. As shown in (1), the linear transformation from one coordinate system to the successive coordinate system is built by combining four homogeneous transformation matrices. The transformation matrix between adjacent coordinate frames (i − 1)th and ithfor the D–H representation changes in the proposed convention as follows:

$${\displaystyle \begin{array}{l}{{}^{i-1}H}_i= Trans\left(0,0,{b}_i\right) Rot\left(z,{\theta}_i\right) Trans\left({a}_i,0,0\right) Rot\left(x,{\alpha}_i\right)\\ {}=\left[\begin{array}{cccc}\cos {\theta}_i& -\sin {\theta}_i\cos {\alpha}_i& \sin {\theta}_i\sin {\alpha}_i& {a}_i\cos {\theta}_i\\ {}\sin {\theta}_i& \cos {\theta}_i\cos {\alpha}_i& -\cos {\theta}_i\sin {\alpha}_i& {a}_i\sin {\theta}_i\\ {}0& \sin {\alpha}_i& \cos {\alpha}_i& {b}_i\\ {}0& 0& 0& 1\end{array}\right]\end{array}}$$
(1)

As illustrated in Fig. 4, Oi and Oi + 1 are the two adjacent coordinate systems presented as follows. Oi is the origin and placed on the intersection of Zi and common normal to both the (i − 1)th and ith joint axes. Where Zi − axis represents the direction of the ith joint axis, Xi − axis is onward the common normal vector, and Yi − axis is defined by the cross product of the Zi − axis and Xi − axis.

Fig. 4
figure 4

D-H notation for link transformation

The derivation of forward kinematics of the proposed algorithm follows the D-H convention. To begin with, define the (i − 1)th link. Next, label and place the (i − 1)th and ith joints. Step three, build the local coordinate system. Specify the Zi − axis to perform the rotary motion. Step four, place the base Oi between links i − 1 and i. Both Xi and Yi axes are determined to construct a right-hand coordinate system. Step five, define the Xi − axis onwards the common normal of Zi − 1 − axis and Zi − axis; the Xi − axisis perpendicular to Zi − axis and passes through Oi, where \({\overrightarrow{x}}_i=\pm \left({\overrightarrow{z}}_{i-1}\times {\overrightarrow{z}}_i\right)/\left\Vert \left({\overrightarrow{z}}_{i-1}\times {\overrightarrow{z}}_i\right)\right\Vert\). Step six, determine the Yi − axisto form a right-hand coordinate system completely, \({\overset{\rightharpoonup }{y}}_i=\pm \left({\overrightarrow{z}}_i\times {\overset{\rightharpoonup }{x}}_i\right)/\left\Vert \left({\overrightarrow{z}}_i\times {\overset{\rightharpoonup }{x}}_i\right)\right\Vert\). Step seven, create a parameter table for bi, θi, ai, and αi. Step eight, compute the homogeneous transformation matrices from the above parameter table into (1). Step nine, calculate 0H7 = 0H11H22H33H44H55H66H7. The desired position and orientation of the end-effector based on Cartesian space can be obtained.

The D-H parameters are defined sequentially as:

b i: offset length from location Oi − 1 to the common normal along Zi − 1 − axis,

θ i: rotate angle about the Zi − 1 − axis, between the Xi − 1 − axis and theXi − axis,

a i: span length from Zi − 1 − axis to Zi − axis along the common normal,

α i: twist angle about the Xi − axis, between the Zi − 1 − axis and theZi − axis.

The geometric dimensions of the proposed robotic arm are described in Fig. 5 and Table 2. In this case, each two links i and i + 1 employ a rotary mechanism. To the final, link 6 and link 7 implement the end-effector tool length.

Fig. 5
figure 5

Illustration of the geometric dimensions of the proposed six-axis robotic arm

Table 2 D-H parameters of the proposed example in Fig. 5
$${{}^6H}_7= Trans\left(0,0,{b}_6\right) Rot\left(z,{\theta}_6\right) Trans\left(0,0,0\right) Rot\left(x,0\right)=\left[\begin{array}{cccc}\cos {\theta}_6& -\sin {\theta}_6& 0& 0\\ {}\sin {\theta}_6& \cos {\theta}_6& 0& 0\\ {}0& 0& 1& {b}_6\\ {}0& 0& 0& 1\end{array}\right]{\left({{}^6H}_7\right)}^{-1}=\left[\begin{array}{cccc}\cos {\theta}_6& \sin {\theta}_6& 0& 0\\ {}-\sin {\theta}_6& \cos {\theta}_6& 0& 0\\ {}0& 0& 1& -{b}_6\\ {}0& 0& 0& 1\end{array}\right]$$
(2)

The matrix 6H7, for example, indicating the D-H movements is computed by post-multiplying the four matrices specifying four transfer steps from frame 6 to 7 as shown in (2). Provide the significant geometric structure of the manipulator and the prescribed values of the joints. The forward kinematics is implemented to obtain the relative distance and orientation of any two adjacent members. The transformation for the proposed serial-chain robot shown in Fig. 5 is

$${{}^0H}_7=\prod \limits_{i=1}^7{{}^{i-1}H}_i={{}^0H}_1{{}^1H}_2{{}^2H}_3{{}^3H}_4{{}^4H}_5{{}^5H}_6{{}^6H}_7$$
(3)

It indeed needs a compact tool to achieve the pose of the robot. The homogeneous transformations provide such a compact representation. The computational efficiency for calculating the forward kinematics seems to underperform in computation. A reduction can be obtained by performing the separation of the position and orientation portions of the transformation. Since 0H1 only indicates the relative displacements between base and foundation, to simplify the calculation and reduce the computation burden, it may be possible to remove 0H1 first and then apply back in the final.

$${{}^1H}_7=\left[\begin{array}{cccc}{n}_x& {o}_x& {a}_x& {p}_x\\ {}{n}_y& {o}_y& {a}_y& {p}_y\\ {}{n}_z& {o}_z& {a}_z& {p}_z\\ {}0& 0& 0& 1\end{array}\right]=\left[\begin{array}{cccc}{r}_{11}& {r}_{12}& {r}_{13}& {p}_x\\ {}{r}_{21}& {r}_{22}& {r}_{23}& {p}_y\\ {}{r}_{31}& {r}_{32}& {r}_{33}& {p}_z\\ {}0& 0& 0& 1\end{array}\right]=\left[\begin{array}{cccc}{{}^1\textrm{n}}_7& {{}^1\textrm{o}}_7& {{}^1\textrm{a}}_7& {{}^1\textrm{p}}_7\\ {}0& 0& 0& 1\end{array}\right]$$
(4)

3 Mathematical solvers of inverse kinematics

Prior to modeling a mathematical solver of inverse kinematics, computing forward kinematics has to be solved first. A set of active-joint variables can define the pose of the end-effector uniquely. According to the matrix multiplications of (4), the final positions and orientations of the end-effector can be obtained.

The position vector is

$${{}^1\boldsymbol p}_7=\left[p_x\;p_y\;p_z\right]^T$$
(5)

where the position of three components:

$${\displaystyle \begin{array}{c}{p}_x=\left(-\left(\left({C}_1{C}_2{S}_3+{C}_1{S}_2{C}_3\right){C}_4+{S}_1{S}_4\right){S}_5+\left({C}_1{C}_2{C}_3-{C}_1{S}_2{S}_3\right){C}_5\right){b}_6\\ {}+\left({C}_1{C}_2{C}_3-{C}_1{S}_2{S}_3\right){b}_4+\left({C}_1{C}_2{S}_3+{C}_1{S}_2{C}_3\right){a}_3+{C}_1{S}_2{a}_2\end{array}}$$
(6)
$${\displaystyle \begin{array}{c}{p}_y=\left(-\left(\left({S}_1{C}_2{S}_3+{S}_1{S}_2{C}_3\right){C}_4-{C}_1{S}_4\right){S}_5+\left({S}_1{C}_2{C}_3-{S}_1{S}_2{S}_3\right){C}_5\right){b}_6\\ {}+\left({S}_1{C}_2{C}_3-{S}_1{C}_2{S}_3\right){b}_4+\left({S}_1{C}_2{S}_3+{S}_1{S}_2{C}_3\right){a}_3+{S}_1{S}_2{a}_2\end{array}}$$
(7)
$${\displaystyle \begin{array}{c}{p}_z=\left(-\left({C}_2{C}_3-{S}_2{S}_3\right){C}_4{S}_5+\left(-{C}_2{S}_3-{S}_2{C}_3\right){b}_4+\left(-{C}_2{S}_3-{S}_2{C}_3\right){C}_5\right){b}_6\\ {}+\left({C}_3{a}_3+{a}_2\right){C}_2-{S}_2{S}_3{a}_3+{b}_0+{b}_1\end{array}}$$
(8)

To simplify the expressions in this study, cosθi, sinθi, cos(θi + θj), and sin(θi + θj) are abbreviated to Ci, Si, Cij, and Sij, respectively.

The unit normal vector is

$${{}^1\boldsymbol n}_7=\begin{bmatrix}n_x&n_y&n_z\end{bmatrix}^T=\left[r\begin{array}{ccc}{}_{11}&r_{21}&r_{31}\end{array}\right]^T$$
(9)

where the normal direction of three components:

$$r{}_{11}=\left(\left(\left({C}_1{C}_2{C}_3+{C}_1{S}_2{C}_3\right){C}_4+{S}_1{S}_4\right){C}_5+\left({C}_1{C}_2{C}_3-{C}_1{S}_2{S}_3\right){S}_5\right){C}_6+\left(-\left({C}_1{C}_2{S}_3+{C}_1{S}_2{C}_3\right){S}_4+{S}_1{C}_4\right){S}_6$$
(10)
$${r}_{21}=\left(\left(\left({S}_1{C}_2{S}_3+{S}_1{S}_2{C}_3\right){C}_4-{C}_1{S}_4\right){C}_5+\left({S}_1{C}_2{C}_3-{S}_1{S}_2{S}_3\right){S}_5\right){C}_6+\left(-\left({S}_1{C}_2{S}_3+{S}_1{S}_2{C}_3\right){S}_4-{C}_1{C}_4\right){S}_6$$
(11)
$${r}_{31}=\left(\left({C}_2{\textrm{C}}_3-{\textrm{S}}_2{\textrm{S}}_3\right){\textrm{C}}_4{\textrm{C}}_5+\left(-{\textrm{C}}_2{\textrm{S}}_3-{\textrm{S}}_2{\textrm{C}}_3\right){\textrm{S}}_5\right){\textrm{C}}_6-\left({\textrm{C}}_2{\textrm{C}}_3-{\textrm{S}}_2{\textrm{S}}_3\right){\textrm{S}}_4{\textrm{S}}_6$$
(12)

The unit orientation vector is

$${{}^1\boldsymbol {o}}_7={\left[\begin{array}{ccc}{o}_x& {o}_y& {o}_z\end{array}\right]}^T={\left[r\begin{array}{ccc}{}_{12}& {r}_{22}& {r}_{32}\end{array}\right]}^T$$
(13)

where the orientation direction of three components:

$${r}_{12}=-\Big(\left(\left({\textrm{C}}_1{\textrm{C}}_2{\textrm{S}}_3+{\textrm{C}}_1{\textrm{S}}_2{\textrm{C}}_3\right){\textrm{C}}_5+\left({\textrm{C}}_1{\textrm{C}}_2{\textrm{C}}_3-{\textrm{C}}_1{\textrm{S}}_2{\textrm{S}}_3\right){\textrm{S}}_5\right){\textrm{S}}_6+\left(-\left({\textrm{C}}_1{\textrm{C}}_2{\textrm{S}}_3+{\textrm{C}}_1{\textrm{S}}_2{\textrm{C}}_3\right){\textrm{S}}_4+{\textrm{S}}_1{\textrm{C}}_4\right){\textrm{C}}_6$$
(14)
$${r}_{22}=-\left(\left(\left({\textrm{S}}_1{\textrm{C}}_2{\textrm{S}}_3+{\textrm{S}}_1{\textrm{S}}_2{\textrm{C}}_3\right){\textrm{C}}_4-{\textrm{C}}_1{\textrm{S}}_4\right){\textrm{C}}_5+\left({\textrm{S}}_1{\textrm{C}}_2{\textrm{C}}_3-{\textrm{S}}_1{\textrm{S}}_2{\textrm{S}}_3\right){\textrm{S}}_5\right){\textrm{S}}_6+\left(-\left({\textrm{S}}_1{\textrm{C}}_2{\textrm{S}}_3+{\textrm{S}}_1{\textrm{S}}_2{\textrm{C}}_3\right){\textrm{S}}_4-{\textrm{C}}_1{\textrm{C}}_4\right){\textrm{C}}_6$$
(15)
$${r}_{32}=-\left(\left({\textrm{C}}_2{\textrm{C}}_3-{S}_2{S}_3\right){C}_4{C}_5+\left(-{C}_2{S}_3-{S}_2{C}_3\right){S}_5\right){S}_6-\left({C}_2{C}_3-{S}_2{S}_3\right){S}_4{C}_6$$
(16)

The unit approach vector is

$${{}^0\boldsymbol{a}}_7={\left[a\begin{array}{ccc}{}_x& {a}_y& {a}_z\end{array}\right]}^T={\left[r\begin{array}{ccc}{}_{13}& {r}_{23}& {r}_{33}\end{array}\right]}^T$$
(17)

where the approach direction of three components:

$${r}_{13}=-\left(\left({C}_1{C}_2{S}_3+{C}_1{S}_2{C}_3\right){C}_4+{S}_1{S}_4\right){S}_5+\left({C}_1{C}_2{C}_3-{C}_1{S}_2{S}_3\right){C}_5$$
(18)
$${r}_{23}=-\left(\left({S}_1{C}_2{S}_3+{S}_1{S}_2{C}_3\right){C}_4-{C}_1{S}_4\right){S}_5+\left({S}_1{C}_2{C}_3-{S}_1{S}_2{S}_3\right){C}_5$$
(19)
$${r}_{33}=-\left({C}_2{C}_3-{S}_2{S}_3\right){C}_4{S}_5+\left(-{C}_2{S}_3-{S}_2{C}_3\right){C}_5$$
(20)

For serial-chain manipulators, the inverse kinematic problem involves the values of all the geometric link parameters and the joint variables. This simplified statement is only applicable to serial-chain robots. That can determine the position and orientation of the end-effector relative to the base in the Cartesian coordinate system. The more general statement is to solve the values of all the joint directions and positions for any kind of manipulator. It is more complex to solve inverse kinematics than forward kinematics, not to mention modeling the parameter table is always a challenge for engineers. Once the formulation of the results of (5)–(20) is examined, the inverse kinematics solution applies the positions and directions (px, py, pz, φn, φo, φa) of the end-effector can be obtained. Roll (φa), pitch (φo), and yaw (φn) are basically a sequence of three rotations about Z, Y, and X axis respectively for free orientation in space. The final matrix in (4) has been known to determine the joint variables (θ1, θ2, θ3, θ4, θ5, θ6). It is possible to group the variables into two categories. The first three variables form the arm-like structure, while the last three variables perform the wrist-like mechanism. By inspection of the illustration and focus on the last three joints, the DOF axes of these three local coordinate systems intersect at a point that is independent of the three variables θ4, θ5, and θ6.

Inspired by this feature, only the first three joints θ1, θ2, and θ3 should be considered in advance when determining the position of a certain point. Apply the results of the forward kinematics, the inverse kinematic of the proposed robot can be derived as below. Follow the analytic procedure, the inverse kinematics solution is calculated for all the joint parameters θi through the formulation matrix (4). To derive θ1, (4) may firstly reorganized as

$${{}^1H}_6={{}^1H}_2{{}^2H}_3{{}^3H}_4{{}^4H}_5{{}^5H}_6=\left[{m}_{ij}\right]$$
(21)

where

$${m}_{14}=\left(-{S}_1{S}_2{S}_3+{S}_1{C}_2{C}_3\right){b}_4+{S}_1{S}_2{C}_3{a}_3+{S}_1{C}_2{S}_3{a}_3+{S}_1{S}_2{a}_2={S}_1(k)$$
(22)
$${m}_{24}=\left(-{C}_1{S}_2{S}_3+{C}_1{C}_2{C}_3\right){b}_4+{C}_1{S}_2{C}_3{a}_3+{C}_1{C}_2{S}_3{a}_3+{C}_1{S}_2{a}_2={C}_1(k)$$
(23)
$${H}_7^1{\left({H}_7^6\right)}^{-1}=\left[\begin{array}{cccc}{r}_{11}\cos {\theta}_6-{r}_{12}\sin {\theta}_6& {r}_{11}\sin {\theta}_6+{r}_{12}\cos {\theta}_6& {r}_{13}& -{r}_{13}{b}_6+{p}_x\\ {}{r}_{21}\cos {\theta}_6-{r}_{22}\sin {\theta}_6& {r}_{21}\sin {\theta}_6+{r}_{22}\cos {\theta}_6& {r}_{23}& -{r}_{23}{b}_6+{p}_y\\ {}{r}_{31}\cos {\theta}_6-{r}_{32}\sin {\theta}_6& {r}_{31}\sin {\theta}_6+{r}_{32}\cos {\theta}_6& {r}_{33}& -{r}_{33}{b}_6+{p}_z\\ {}0& 0& 0& 1\end{array}\right]$$
(24)

It is noted that the elements m14 and m24 can be utilized to define θ1.

$$\theta {}_1={\tan}^{-1}\left(\frac{p{}_y-r{}_{23}b{}_6}{p{}_x-r{}_{13}b{}_6}\right)$$
(25)

Once θ1 is obtained, the first link inverse transformation matrix is pre-multiplied by the second part of Eq. (12) to find the inverse kinematics solution for θ3 as a function of the known elements as follows:

$$\left({\left({{}^1H}_2\right)}^{-1}\right){{}^1H}_2{{}^2H}_3{{}^3H}_4{{}^4H}_5{{}^5H}_6={{}^2H}_3{{}^3H}_4{{}^4H}_5{{}^5H}_6={{}^2H}_6=\left[{m}_{ij}\right]$$
(26)

where

$${m}_{14}=\left(-{S}_2{S}_3+{C}_2{S}_3\right){b}_4+{S}_2{C}_3{a}_3+{C}_2{S}_3{a}_3+{S}_2{a}_2={b}_4{C}_{23}+{a}_3{S}_{23}+{a}_2{S}_2$$
(27)
$${m}_{24}=\left({S}_2{C}_3+{C}_2{S}_3\right){b}_4-{C}_2{C}_3{a}_3+{S}_2{S}_3{a}_3-{C}_2{a}_2={b}_4{S}_{23}-{a}_3{C}_{23}-{a}_2{S}_2$$
(28)

With the known elements,

$${{}^2H}_6={\left({{}^1H}_2\right)}^{-1}\left({{}^1H}_7\right){\left({{}^6H}_7\right)}^{-1}=\left[{m}_{ij}\right]$$
(29)

where

$${m}_{14}={C}_1\left(-{r}_{13}{b}_6+{p}_x\right)+{S}_1\left(-{r}_{23}{b}_6+{p}_y\right)$$
(30)
$${m}_{24}={r}_{33}{b}_6-{p}_z+{b}_1$$
(31)

Square both sides and add of (27), (28), (30), and (31) it yields as

$$A\cos \left(-{\theta}_3\right)+B\sin \left(-{\theta}_3\right)=D$$
(32)

The joint θ3 can be obtained,

$${\theta}_3=\pm {\cos}^{-1}\left(\frac{D}{C}\right)+\varphi$$
(33)

where \(C=\sqrt{{\left(2{a}_2{a}_3\right)}^2+{\left(2{a}_2{b}_4\right)}^2}\), A = C cos φ, B = C sin φ, \(\varphi ={\tan}^{-1}\left(\frac{2{a}_2{b}_4}{2{a}_2{a}_3}\right)\),

$$D={\left({C}_1\left(-{r}_{13}{b}_6+{p}_x\right)+{S}_1\left(-{r}_{23}{b}_6+{p}_y\right)\right)}^2+{\left({r}_{33}{b}_6-{p}_z+{b}_1\right)}^2-{b}_4^2-{a}_3^2-{a}_2^2.$$
(34)

Once θ1 and θ3 are obtained, the similar process of inverse transformation matrixes is pre-multiplied to find the second joint variable solution for θ2 as a function of the known elements as follows:

$${\left({{}^2H}_3\right)}^{-1}{\left({{}^1H}_2\right)}^{-1}\left({{}^1H}_2\right)\left({{}^2H}_3\right)\left({{}^3H}_4\right)\left({{}^4H}_5\right)\left({{}^5H}_6\right)={{}^3H}_4{{}^4H}_5{{}^5H}_6={{}^3H}_6=\left[{m}_{ij}\right]$$
(35)

where

$${m}_{14}=-\cos {\theta}_3\sin {\theta}_4$$
(36)

With the known elements,

$${{}^3H}_6={\left({{}^2H}_3\right)}^{-1}{\left({{}^1H}_2\right)}^{-1}\left({{}^1H}_7\right){\left({{}^6H}_7\right)}^{-1}=\left[{m}_{ij}\right]$$
(37)

where

$${m}_{14}=\left(-{b}_6{r}_{13}+{p}_x\right)+\sin {\theta}_1\left(-{b}_6{r}_{23}+{p}_y\right)\Big)-\cos {\theta}_2\left({b}_6{r}_{33}+{b}_1-{p}_z\right)-{a}_2$$
(38)

By rearranging the above equations, (36) and (38) can be rewritten as

$$A\cos \left({\theta}_2\right)-B\sin \left({\theta}_2\right)=D$$
(39)

The joint θ2 can be obtained,

$${\theta}_2=\pm {\cos}^{-1}\left(\frac{D}{C}\right)-\varphi$$
(40)

where \(C=\sqrt{{\left({b}_1-{p}_z+{r}_{33}{b}_6\right)}^2+{\left(\cos {\theta}_1\left({p}_x-{r}_{13}{b}_6\right)+\sin {\theta}_1\left({p}_y-{r}_{23}{b}_6\right)\right)}^2}\), A = C cos φ, B = C sin φ,

$$\varphi ={\tan}^{-1}\left[\frac{\cos {\theta}_1\left({p}_x-{r}_{13}{b}_6\right)+\sin {\theta}_1\left({p}_y-{r}_{23}{b}_6\right)}{b_1-{p}_z+{r}_{33}{b}_6}\right],D={b}_4\sin {\theta}_3-{a}_3\cos {\theta}_3-{a}_2.$$
(41)

Once θ1, θ2, and θ3 are obtained, the corresponding link inverse transformation matrixes are pre-multiplied to find the inverse kinematics solution for θ4 as a function of the known elements as follows:

$${\left({{}^3H}_2\right)}^{-1}{\left({{}^2H}_3\right)}^{-1}{\left({{}^1H}_2\right)}^{-1}\left({{}^1H}_2\right)\left({{}^2H}_3\right)\left({{}^3H}_4\right)\left({{}^4H}_5\right)\left({{}^5H}_6\right)\left({{}^6H}_7\right)={{}^4H}_5{{}^5H}_6{{}^6H}_7={{}^4H}_7=\left[{m}_{ij}\right]$$
(42)

where

$${m}_{13}=-\cos {\theta}_4\sin {\theta}_5$$
(43)
$${m}_{23}=-\sin {\theta}_4\sin {\theta}_5$$
(44)
$${m}_{31}=\sin {\theta}_5\cos {\theta}_6$$
(45)
$${m}_{32}=-\sin {\theta}_5\sin {\theta}_6$$
(46)
$${m}_{33}=\cos {\theta}_5$$
(47)

With the known elements,

$${{}^4H}_7={\left({{}^3H}_4\right)}^{-1}{\left({{}^2H}_3\right)}^{-1}{\left({{}^1H}_2\right)}^{-1}\left({{}^1H}_7\right)=\left[{m}_{ij}\right]$$
(48)

where

$${m}_{13}=\left({S}_3{C}_2+{C}_3{S}_2\right){C}_1{r}_{13}+\left({S}_3{C}_2+{C}_3{S}_2\right){S}_1{r}_{23}+\left({C}_3{C}_2-{S}_3{S}_2\right){r}_{33}$$
(49)
$${m}_{23}={S}_1{r}_{13}-{C}_1{r}_{23}$$
(50)
$${m}_{31}=\left({C}_3{C}_2-{S}_3{S}_2\right){C}_1{r}_{11}+\left({C}_3{C}_2-{S}_3{S}_2\right){S}_1{r}_{21}-\left({S}_3{C}_2+{C}_3{S}_2\right){r}_{31}$$
(51)
$${m}_{32}=\left({C}_3{C}_2-{S}_3{S}_2\right){C}_1{r}_{12}+\left({C}_3{C}_2-{S}_3{S}_2\right){S}_1{r}_{22}-\left({S}_3{C}_2+{C}_3{S}_2\right){r}_{32}$$
(52)
$${m}_{33}=\left({C}_3{C}_2-{S}_3{S}_2\right){C}_1{r}_{13}+\left({C}_3{C}_2-{S}_3{S}_2\right){S}_1{r}_{23}-\left({S}_3{C}_2+{C}_3{S}_2\right){r}_{33}$$
(53)

Calculating the division of (43), (44), (49), and (50) on both side it yields as

$$\tan {\theta}_4=\frac{m_{23}}{m_{13}}$$
(54)

The joint θ4 can be obtained,

$${\theta}_4={\tan}^{-1}\left(\frac{m_{23}}{m_{13}}\right)={\tan}^{-1}\left[\frac{S_1{r}_{13}-{C}_1{r}_{23}}{\left({S}_3{C}_2+{C}_3{S}_2\right){C}_1{r}_{13}+\left({S}_3{C}_2+{C}_3{S}_2\right){S}_1{r}_{23}+\left({C}_3{C}_2-{S}_3{S}_2\right){r}_{33}}\right]$$
(55)

Since (51), (52), and (53) are known, comparing the elements of (47) and (53) the θ5 yields as

$${\theta}_5=\pm {\cos}^{-1}\left({m}_{33}\right)=\pm {\cos}^{-1}\left(\left({C}_3{C}_2-{S}_3{S}_2\right){C}_1{r}_{13}+\left({C}_3{C}_2-{S}_3{S}_2\right){S}_1{r}_{23}-\left({S}_3{C}_2+{C}_3{S}_2\right){r}_{33}\right)$$
(56)

By dividing the element m32 by m31, the joint θ6 can be obtained,

$${\theta}_6={\tan}^{-1}\left(-\frac{m_{32}}{m_{31}}\right)={\tan}^{-1}\left(-\frac{\left({C}_3{C}_2-{S}_3{S}_2\right){C}_1{r}_{12}+\left({C}_3{C}_2-{S}_3{S}_2\right){S}_1{r}_{22}-\left({S}_3{C}_2+{C}_3{S}_2\right){r}_{32}}{\left({C}_3{C}_2-{S}_3{S}_2\right){C}_1{r}_{11}+\left({C}_3{C}_2-{S}_3{S}_2\right){S}_1{r}_{21}-\left({S}_3{C}_2+{C}_3{S}_2\right){r}_{31}}\right)$$
(57)

Inverse problems are the opposite to forward problems, and the aim is to recover the causes given the task with an end-effector. The goal is to find one or more configurations to perform the desired pose of end-effector in inverse kinematics. If there exists a set of joint angles that satisfies the target positions and directions of the end-effector, there is expected a distinct inverse to the forward kinematics exists. This well-defined inverse can be built as the function of forward kinematics and is well-posed. In practical, as the target position is given, the challenge is to discover the causes shortly. The task is to detect a certain set of joint angles to meet the desired end-effector position, to find a well-defined inverse to the forward kinematic function. However, without pre-defined constraints, the inverse kinematics problem may result in ill-posed because of no solution or infinite solutions. Owing to the geometric limits, if the target location exceeds the reachable workspace of the robotic arm, there is no solution performed by inverse kinematics because the point is infeasible. In this work, the inverse kinematics problem is solved by the proposed analytical closed-form solutions. Meanwhile, inverse kinematic equations can provide multiple solutions. Given the desired Cartesian description of end-effector within the reachable workspace, six-axis robotic arms can perform up to eight possible configurations for the same end-effector pose.

4 Postprocessor for a six-axis robotic arm

A flowchart is shown in Fig. 6, which illustrates the main procedure of the proposed method to find a superior solution. First of all, within the frame refer to machine base point and provide desired Cartesian space coordinates. At stage I, the pre-processor plays the role to provide positions and directions for the end-effector in Cartesian space. Then, after target coordinates x, y, and z are defined, refine and yield the normal and orientation vectors as approach vector is known already at stage II. Feasible positions and orientations for the end-effector are verified at this stage. At stage III, a solution domain provides all potential solutions and selects one default by minimum rotary angle. The consideration that performs the determination of joint solutions in coding is interpreted in Fig. 7. Finally, all of the appropriate numerical control commands are generated for the controller system at stage IV.

Fig. 6
figure 6

Illustration of the main procedure of the proposed method

Fig. 7
figure 7

Determination flowchart of joint angles

A solid model of the industrial six-axis robotic arm proposed in this study is illustrated in Fig. 8. This device comprises six axes, whereas reconfigurable end-effectors are mounted on the sixth link of the manipulator. The transformation data are obtained from the Cartesian space in the software GUI system to the joint space in the CNC system through a postprocessor. The corresponding commands are converted to the controller and executed to propel the end-effectors to the desired positions. As described in Fig. 1, postprocessors primarily use inverse kinematics to obtain the joint parameters that perform the desired end-effector posture given in Cartesian space. The postprocessor is a unidirectional implementation. Any corrections made in the commands at the controller are executed immediately. Instructions provided to the manipulator are applied immediately. Postprocessors are used to embed forward kinematics and maintain the end-effector’s trajectory accuracy. To examine the effective performance of the proposed method, a Windows-based path planning system was programmed under the Windows 10 coding environment. The kernel and GUI are developed by Visual Studio, which displays the mathematical solver of kinematics. The model can transfer variable lengths of changeable end-effector immediately. By building a robotic library, users may select the model type and choose the corresponding parameter table. This proposed system will generate the appropriate NC commands for the configured robotic arm automatically.

Fig. 8
figure 8

Schematic of the proposed robotic mechanism

As the proposed example in Fig. 5, the complete geometric model has been configured based on Cartesian coordinate convention. All significant parameters are defined completely, as illustrated in Table 3. To organize path planning, the desired postures have to move from the fundamental origin to the center of the first joint and then from the center of the first joint to the center of the second joint. The rests follow the same steps as describe above. Finally, the target pose moves from the center of the sixth joint to the center of the end-effector tip. Abiding by the procedure, all desired locations are determined. The entire NC codes are created thereby.

Table 3 D-H parameters table of the proposed six-axis robotic arm

In Fig. 9, an illustration is prepared to show the movements and geometric positions of the arranged path with a 10 mm end-effector on the robotic arm. The off-line path consists of eight significant positions are provided to verify the transformation between Cartesian location inputs and joint NC outputs. In the proposed methodology, joint NC format uses the machine coordinate system as the reference and Cartesian location format is referenced to the work coordinate system. By equipping a 10 mm long end-effector, Fig. 10 shows the transformation of six joint angles on position 1, where the Y coordinate value is zero and maintain the same orientation as home position, whereas Fig. 11 shows the orthographic views of home position and position #1 (220, 0, 830). By substituting the corresponding parameters in Table 3 into (3), at the home position, the computed value of the distance from the end-effector tip to the center of the bottom face of the base performs (574, 0, 975.5). This is verified by geometric measurement of the robotic arm. The geometric measurement of the robotic arm verifies the coordinates, and Fig. 12 shows the locations of the home position.

Fig. 9
figure 9

Test path for the proposed robotic arm

Fig. 10
figure 10

Homogeneous matrix and transformation interface of the proposed system

Fig. 11
figure 11

Extract the coordinate values on orthographic views

Fig. 12
figure 12

Illustration of the test locations about home position

There are two portions of the data combine together to form the robot posture, end-effector tip positions and directions in the work coordinate system. The following verification will describe how a pre-defined target point transformed to the end-effector tip position. From the illustration in Fig. 11, position number one hold the end-effector location data (x, y, z, n, o, a), (x, y, z) = (220, 0, 830) for position on X, Y, and Z axes. The direction is formed by three unit vector. n = [0, 0, 1] is the normal vector, o = [0, -1, 0] is the orientation vector, and a = [1, 0, 0] is the approach vector. According to the proposed algorithm, the normal, orientation, and approach vectors have to be refined as the input variables before implementing the DH transformation. In contrast to end-effector tip location data, NC commands for six-axis robotic arm uses coordinates of joint rotary angles represented in machine coordinate system. The relevant NC data of the above position for six-axis robotic arm is “MOVJ C1 = 0.0 C2 = -45.0281 C3 = 44.8982 C4 = 0.0 C5 = 0.1227 C6 = 0.0 FJ50 PL10.” The graphical user interface of the proposed system for the transformation information between the end-effector tip Cartesian point and the joint space NC data is illustrated in Fig. 10.

5 Implementation of simulation and verification

Since the proper desired path arises from the complicated computation in each step of the process as shown in Fig. 1. Therefore, all corresponding parameters must be examined to guarantee the validity of the overall task trajectory. The robot motion planning of desired locations relies on the calculation of an end-effector, which builds up the tasks based on Cartesian coordinate space applied on a computer-aided planning model. Drive the end-effector to the target postures. A specified task may serve as an example to evaluate the performance of the proposed system. For the purpose to verify the effectiveness and feasibility, the restricted end-effector must maintain the posture toward the normal direction of the side face of a hexahedron was designated. This path positioning strategy on this task is located in front of a box with a 10 mm long end-effector. Six-axis robotic arm positioning was applied on the specified CNC equipped with a Syntec 81R NC unit. The predefined desired targets are shown in Table 4. The final solution for all joints through the proposed inverse kinematic calculation is shown in Table 5. The third position is displayed as shown in Fig. 13 with a wireframe representation, and the total eight different target locations are demonstrated as shown in Fig. 14. The proposed solver was evaluated to show the effectiveness and performance of the specified robotic arm. The detail at each target location of the end-effector was also shown in Fig. 15. Constructing the end-effector location conditions for the positioning task is a prerequisite; such constraint conditions are generated in the GUI system by using the proposed solver. Figures 16 and 17 illustrate the positioning locations and path NC codes, and Fig. 18 displays the simulated positioning movements. The demonstration shows the proposed kinematic solver can be applied to practical industrial six-axis robotic arms successfully.

Table 4 The pre-defined eight targets of the desired task
Table 5 Final solution for pre-defined targets with 10 mm long end-effector
Fig. 13
figure 13

The pre-defined third position with 10 mm long end-effector

Fig. 14
figure 14

Wireframe illustration of the pre-defined eight target locations

Fig. 15
figure 15

Detailed illustration of the eight target locations

Fig. 16
figure 16

Positioning locations of the proposed six-axis robotic arm

Fig. 17
figure 17

A brief script of the NC commands of the six-axis articulated robot

Fig. 18
figure 18

The proposed experimental six-axis robotic arm. First (left) and third (right) positions

Figure 19 depicts the corresponding trajectories of joint angle for the default solution, i.e., trajectory for all the joints of the proposed robotic arm during its motion along desired target locations. A common typical robotic arm has three large links follows by three smaller links near the end-effector. The last three arms are used primarily to tune the attitude of the end-effector about the target. Given the desired Cartesian description of end-effector within reachable workspace, there can be up to eight different possible options to approach the destination. In this proposed case, weight is applied in consideration of determining the closest solution. The potential selection favors smaller joints rather than large joints to reduce moving loading as little as possible. The eight solutions for position #1 through its inverse kinematic calculation is shown in Table 6, and the corresponding postures are shown in Fig. 20. Follow the inverse kinematic solution tree as shown in Fig. 7, one can examine the behavior according to the configurations in Table 6. The first joint provides two possible options, left (Fig. 20(a, b, e, and f)) or right (Fig. 20(c, d, g, and h)). The next two joints also provide two possible options, up (Fig. 20(a, b, c, and d)) or down (Fig. 20(e, f, g, and h)). These first three joints yield four different configurations with a combination of waist, shoulder, and elbow. Similarly, the last three joints can behave two different options, flip or not, with a combination of forearm, wrist pitch, and wrist roll. Equation (58) shows the relationship between wrist orientations, flip or not. Equation (59) shows the relationship of θ4 and θ6 with flip or not according to Eq. (58). The eight solutions for position #3 through its inverse kinematic calculation is shown in Table 7.

$${\theta}_{5\left(\textrm{Flip}\right)}=-{\theta}_{5\left(\textrm{No}\textrm{flip}\right)}$$
(58)
$${\theta}_{4\left(\textrm{Flip}\right)}={\theta}_{4\left(\textrm{No}\textrm{flip}\right)}\pm {180}^o,{\theta}_{6\left(\textrm{Flip}\right)}={\theta}_{6\left(\textrm{No}\textrm{flip}\right)}\pm {180}^o$$
(59)
Fig. 19
figure 19

Trajectories of joint angle with 10 mm long end-effector

Table 6 All possible configurations for position #1
Fig. 20
figure 20

Postures for the eight potential solutions of the 6-DOF robot at #1 position

Table 7 All possible configurations for position #3

It is obviously suitable for quick positioning with automatic end-effector change system; a 100 mm long end-effector was changed to mount on the sixth link as shown in Fig. 21. Perform the same pre-defined targets are shown in Table 4. Compare to manual operations, the effects of the fast planning system are demonstrated by post-processing Cartesian desired locations for multi-axis paths. Incorporating the position refinement, an advanced postprocessor is presented. Figure 22 reveals a schematic flowchart of the proposed fast planning system. Under the implementation, after all the original end-effector locations are confirmed, the smoothness and connection conditions are detected. The final solution for all joints through the proposed inverse kinematic calculation is shown in Table 8. The corresponding trajectories of joint angle for the default solution, i.e., trajectory for all the joints of the proposed robotic arm during its motion along desired target locations is shown in Fig. 23.

Fig. 21
figure 21

The pre-defined retract position with 100 mm long end-effector

Fig. 22
figure 22

A schematic flowchart of the proposed system

Table 8 Final solution for pre-defined targets with 100 mm long end-effector
Fig. 23
figure 23

Trajectories of joint angle with 100 mm long end-effector

In multi-axis CNC articulated robotic arm positioning, it is often causing singularities while equips propelling axes with more degrees of freedom. Such an error occurs when the axes of joint 4 and joint 6 turn into coincident. This singularity is quite commonly encountered in end-effector traveling with the condition corresponds to θ5 = 0. At the wrist singularity, the wrist pitch angle crosses zero position and the end-effector remains motionless while the wrist turns about the coaxial axes of joint 4 and joint 6. Owing to numerical problems, if the end-effector cannot cross the singularity without stopping, it is also impossible for the end-effector to do this crossing in Cartesian space. In such a situation, the inverse kinematics-based post-processing module plays a very important role in quick off-line path planning. The module dominates the transformation from Cartesian space to joint space to generate a more robust positioning path. The difficulties are associated with solving processes for forward and inverse kinematics transformation. Passing through such singular locations using common strategies may result in disconnected trajectories, causing a delay in the real executing feed rate during the positioning path. Inevitably affect processing quality and production efficiency, reduced competitiveness may become unavoidable. Although the rearrangement of the current sequence to appropriate paths is the easiest way to avoid a singular situation, the better way is to create the suitable joint space movements for each propelling axis robustly and smoothly. The above tasks may not be accomplished in Cartesian space, because some configurations will block the Cartesian movements of the end-effector. Although it is intuitive to give Cartesian space motion commands, it may impede the control calculation. The posture of the end-effector determined by the kinematic mapping in terms of the joint variables may often lead to large joint velocities and restrict instantaneous mobility. The significant advantage of using the Joint space motion command is that the only time the robot will suspend is when a joint hits the limit or a mechanical interference occurs. The appropriate implementation recommended is to provide the desired set of joint variables to propel each joint to the desired position simultaneously and linearly.

Programming industrial robots can be tedious and monotonous. Efficiency may be improved by removing these steps from the manufacturing process. The fact is that a lot of experience and expert knowledge in the domain of robotics is required to realize even trivial operations. In order to save costs, reduce mistakes, and increase efficiency, a novel robotic task assistant system was developed to allow non-experts in the domain of robotics to program robots to cope with numerous changeable tasks quickly. After applying the proposed system, quick path planning can be implemented to achieve the expected efficiency and robustness by specifying the position and orientation in a limited time. Once a better path is identified, a higher performance operating situation can be obtained, and a lot of operating time can be saved. The presented algorithm can realize auto-programming of the positioning path of the desired tasks and is easy to be customized for industrial six-axis robotic arms.

A graphical user interface provides a set of tools to facilitate the operation of determining desired locations and calibrating suitable orientations. Within the proposed interface, there are two primary coordinate systems, global and local (i.e., base and end-effector). The two coordinate systems are distinguished by their colors in the GUI as illustrated in Fig. 24. The location of the origin and three primary axes always remain fixed. The global coordinate system is unchangeable throughout the implementation of any specified model. Each link in the model, including the end-effector, has a local coordinate system. The figure shows the orientation vectors displayed in this tab and visualizes the local coordinate system. The target position can be defined manually by typing in its coordinates, or by clicking the intended direction in the simulation space with the slider. The target location can be updated manually, or can be adjusted by clicking and dragging on one of the primary-axis or approach vectors. The location display will update automatically.

Fig. 24
figure 24

The proposed GUI system for position modification

Similar to the previous task, a fast implementation with a different length of end-effector was demonstrated to generate the NC positioning path codes, a 207 mm long gripper was changed to mount on the sixth link as shown in Fig. 25. First, the path planning system is employed to guide the robotic arm to reach a specified location by a visual user interface in a short time. The rest is to manipulate the end-effector to follow the pre-defined positions and maintain the original orientation as shown in Fig. 26. The positioning path is employed directly on the specified model in the working space, and the poses of the robotic gripper are then defined along the path and visualized. The corresponding trajectories of the joint angle for the default solution are shown in Fig. 27. The case shows that all feasible postures are connected to complete a desired task cycle in a quick operating procedure, even changing the gripper frequently.

Fig. 25
figure 25

The proposed six-axis robotic arm with 207 mm long gripper at home position

Fig. 26
figure 26

Fast implementation with 207 mm long end-effector of the original eight target locations

Fig. 27
figure 27

Trajectories of joint angle with 207 mm long end-effector

This proposed module system is an open architecture, and users can add new robot models and parameters by themselves. However, a professional technique is required to develop a new post-processor if it is an industrial six-axis robotic arm with a new configuration. Postprocessors are the bridge between the offline programming software and the robotic arm. Once the right postprocessor is specified, the real robotic arm will move exactly as it did in the simulation. The presented manipulator is one of the models as an example to demonstrate the simulation for robot programmers to assess and predict the behavior of the robot and to verify and evaluate the process path planning. Other postprocessors can also be provided a complete process to solve IK in the proposed system as shown in Fig. 28.

Fig. 28
figure 28

Wireframe illustration of a pre-defined contour path

6 Conclusion

The use of industrial robotic arms in automated applications is becoming increasingly common. They are more suitable than conveyors for moving objects from one place to another. The most difficult challenge is to develop a robotic arm that can traverse a trajectory over a long distance. Robotic arms are often used in dangerous and confined spaces; therefore, long-distance control or programming of a robotic arm to quickly and safely pick up and manipulate objects is ideal solutions. In some circumstances, there is a need to customize an available postprocessor for a specific controller or application.

Not only requires knowledge and experience, but creating a postprocessor is a delicate and dedicated process. Without completely correct code that communicates with the controller, there is a risk of damage and failure. In this study, a novel postprocessor for an industrial six-axis robotic arm was proposed, with the aim of meeting the requirement for fast and robust computations of inverse kinematics. Despite the teaching mode being the most popular implementation in the robotic market, a tendency toward real-time postprocessing in the machine control units has become apparent. This has created a need for a trusted path planning strategy based on inverse kinematics that can facilitate complex tasks with a speedy and robust implementation. To precisely follow the programmed trajectories, the locations and directions of the end-effector must be accurately determined based on the feasible NC commands. The joint space NC codes were created by the proposed solver from the corresponding Cartesian coordinate target information. Each NC robotic arm is equipped with a unique postprocessor developed by using the geometric model. In this study, a methodology for six-axis articulated robotic arms based on the generalized kinematic model was proposed. To reduce task planning time and effort required to process changing conditions, a fast path planning system was developed and tested to meet the conditions of obstacles and path constraints. Additionally, an analytical procedure is presented that enables creating and adding new postprocessors more systematically and efficiently than before. Online robotic control systems can estimate the state of the real world based on signals received from their sensors, but the state of the real world is not always predicted accurately. Five-axis and six-axis computer numerical control (CNC) robotic arms must be equipped with postprocessors to maximize efficiency. This study presents a modular method for constructing a postprocessor system for a specific six-axis CNC robotic arm. This method is unique in its ability to create a postprocessor architecture from the ground up and derive up to eight solutions simultaneously. Some limitations of the proposed system are that it is not applicable for real-time tasks and is not available for parallel robots currently. The future work will focus on performance improvement techniques, such as heuristic and genetic algorithms, to optimize robot control tasks in the proposed system.