Kinematic analysis and trajectory planning for a tree planting robot in forest environment

. Tree Planting Machine (TPM) is subject to a Tree-Planting Robot (TPR) with desired tracking trajectory planning. In this topic, taking the TPR proposed as the analysis object, the positive and inverse solutions of the kinematics are analyzed to explore the optimal trajectory planning. An improved position/posture algorithm, based on the analytical solution of the inverse kinematics of the TPR, is proposed. The trajectory planning strategy for TPR in Cartesian coordinate system and Joint coordinate system is discussed, which is used for parabolic transition linear programming optimization, and the simulation model of TPR trajectory planning is constructed by MATLAB module. Numerical simulation results indicate that the deviation of the TPR trajectory from the expected value is significantly reduced. The proposed improved position/posture algorithm is verified by kinematic analysis, and the TPR followability and trajectory planning accuracy are greatly improved. Toward this goal, a variable trajectory planning can be effectively, and stability adjusted by pre-designed TPM system in the field of ecological tree planting.


Introduction
Domestic forestry operations today still rely on human labor to get the job done, especially drilling deep afforestation, which is done by hand. This method is not only time-consuming, but also labor-intensive and inefficient, greatly reducing the speed of afforestation [1][2][3]. Forest tree planting is a complex undertaking, with labor costs generally account for more than 60 % to 80 % of the actual cost. Labor force is also facing a phase of transformation from manual labor to skilled labor, with the cost of manual labor increasing year on year [4][5][6]. Considering the increase in labor costs, available labor is limited, and production costs are increasing, therefore, TPRs are urgently needed to perform and simplify these field construction operations mechanically. In addition, as people's living standards improve and their demand for timber increases, the rate of artificial afforestation is not yet as fast as the growth of people's demand for timber [7]. There has been some research and applications in addressing the inverse kinematics and path planning of robots. However, these studies have focused on industrial robots in unconstrained workspaces with homogeneous objects. TPRs integrate sensing tests, simulation calculations, manipulation and control systems to perform forest tree planting operations with artificial intelligence technology. Moreover, the successful adoption of these technologies requires a combination of the TPR's capabilities and the environment in which it operates in the forest. The environment in which trees are planted is known to be complex. TPR and end effectors attributed to them are likely to collide with adjacent branch obstacles, thus reducing the efficiency of tree planting. The application of TPR technology in forestry operating environments faces considerable challenges. In order to successfully adopt robots in forestry, it is necessary to develop an efficient motion planning algorithm that allows TPRs to complete tree planting tasks.
Forestry is a constrained and dynamic environment with working objects of varying shapes, sizes, positions and orientations. The target attitude of the TPR in each planting task is unknown and the path from the starting point to the target point needs to be re-planned for each target point of the planting task. Furthermore, in order to meet the picking efficiency of TPR, the computational speed of the motion planning algorithm should be motion planning algorithm should be high. Therefore, in order to meet the above requirements, not only a motion planning algorithm is required, but also a motion planning algorithm. The motion planning algorithm for TPR needs to solve not only the inverse kinematic problem of obtaining picking poses for tree picking through a small number of iterations, but also to obtain picking poses through a small number of iterations based on information about the forest environment, and to determine the picking path quickly enough to avoid collisions between the TPR and branching obstacles. This study is based on the above considerations, a motion path planning method for TPR based on the above research is proposed, the simulation results confirm that the proposed motion planning method enables the TPR to avoid obstacles in the workspace and to complete the tree planting task efficiently. The contradiction between the high cost of artificial afforestation, the shortage of labor, the slow pace of afforestation and the increasing demand for timber in people's daily lives is becoming increasingly apparent. The design of the robot has been specially developed by the team of co-authors (whose patent for the invention has been granted), as shown in Fig. 1.
This paper presents a novel tree-planting robot (TPR) with a 6-degree of freedom (DOF) that grasps poplar saplings from a walking mechanism and places them in drilled holes. The most novel aspect of this topic is the optimization of a series of control strategy problems for the TPM. A more detailed kinematic analysis of the TPR is elaborated, which is a prerequisite for the TPM control strategy optimization scheme, which also plays an important foundation for the subsequent TPR dynamics, trajectory planning and off-line programming.

D-H model for kinematics solution
In this paper, a Denavit-Hartenberg (D-H) coordinate system for TPR modelling is proposed based on the D-H parametric approach, as shown in Fig. 2. The linkage parameters of the corresponding D-H model are shown in Table 1, where, 1 = 25 mm, 2 = 560 mm, 3 = 35 mm, 4 = 515 mm. represents the joint angle variable of each joint of TPR, indicates the joint torsion angle, −1 denotes the length of the link rod, is the offset of the link rod.
Using the modified D-H model coordinate transformation [8][9][10], the transformation expression is written as Eq. (1): The coordinate system is transformed according to the modified D-H transformation order, and the connecting rod parameters in Table 1

Reverse kinematic solutions for TPR position
This topic adopts the closed analysis method, and takes the KR10 R1100 robot, the main body of the TPR, as the target of the analysis of the kinematic mechanism. According to the judgment standard of the reverse solution of the articulated robot proposed by Pieper [14][15][16], the 4th, 5th, and 6th axes of the TPR are preset to intersect at one point, which leads to a closed numerical solution of TPR.
Separate the part of Eq. (2) that contains from the right-hand side of the equation 1 to facilitate numerical solution of 1 . Rectify the two sides of Eq. (2) and multiply by the matrix 1 0 −1 [17]: Herein, the left-hand side of Eq. (3) is expanded and represented by the following matrix: Herein, the right-hand end of Eq. (3) is expanded and the following matrix is written: Setting the elements of the variables on both sides of Eq. (3) equal, the following equation is listed: Using the trigonometric constant conversion, the expression is written: where, = √ 2 + 2 , = tan 2( , ). Substituting Eq. (5) into Eq. (4), the analytical solution for 1 in terms of differential angular quantities is expressed as: Assuming that the elements of the variables on both sides of Eq. (3) are equal [18], the following equation is written as: JOURNAL OF VIBROENGINEERING. MAY 2023, VOLUME 25, ISSUE 3 By combining Eq. (7) and Eq. (4), the following equation is derived: Using the trigonometric transformation, the analytic solution of the parameter 3 is expressed as: Rearranging from the Eq. (3), the following equation is described as: Let, set the parameter elements on both sides of Eq. (10) to be equal [19], the following equation is shown as: Modifying Eq. (11), the following equation is expressed as: Simultaneous Eq. (9) and Eq. (12), the analytical solution of parameter 2 is described as:

Reverse kinematic solutions for TPR posture
According to the above Eq. (10), the analytical solution of the parameter 4 is written as [20]: Reorganizing Eq. (10) further, the following equation is expressed as: Let, set the parameter elements on both sides of Eq. (15) to be equal [21], the analytical solution of parameter 5 is: Rearrange the Eq. (15), set the parameter elements on both sides of the Eq. (15) to be equal, and the analytical solution of the parameter 6 is shown as: 6 = tan 2( 6 , 6 ).
Throughout the above inverse solution analysis results, the inverse solution for the same posture of the TPR at the same point in space is not unique. The TPM is expressed as eight sets of inverse solutions for the same spatial posture, some of which are discarded due to limitations in the range of joint motion, and of the remaining inverse solutions, the one closest to the current TPR posture is preferred.

Trajectory planning analysis for TPM
In this paper, the linear interpolation of the parabolic transition is used to study the TPR trajectory planning of the TPM in the Cartesian coordinate system and the joint coordinate system, and through the numerical verification of MATLAB, the simulation results in the two coordinate systems are compared and analyzed, and the planning method is selected and evaluated.
Considering that the coordinate system 6 is located at the intersection of the 4th, 5th, and 6th axes of the manipulator, it is convenient to simplify, and the end effector of the manipulator is established in the coordinate system C, as shown in Fig. 3. The position transformation matrix of coordinate system C under coordinate system 6 is deduced. In Fig. 3, the posture of the coordinate system C of the end effector of the TPM manipulator is set to be consistent with the posture of the coordinate system 6. The position moment of coordinate system C under coordinate system 6 is written as [22]: where, is the distance between coordinate system 6 and coordinate system C in the direction of the -axis, the value of which is shown as = 322.93 mm. The starting point 0 , the ending point and the three intermediate points 1 , 2 and 3 of the TPR end-effector in the planned path are marked out, and the position and pose of each of these points and the moment of each point are planned under the base coordinate system 0 of TPR. The numerical simulation analysis data is shown in Table 2.

Trajectory planning in Cartesian coordinate system
The position components of coordinate system 6 relative to coordinate system 0 at each point of the path were found using the " " transformation sequence according to Table 2 and 6 0 = 0 6 −1 ( = 0~), as shown in Table 3. Setting the acceleration time of the parabolic transition section, solving for the velocity and acceleration of the attitude components at each    point, the trajectory is simulated in MATLAB as shown in Fig. 4. With the above planning method, the displacement and velocity profiles of the position component of coordinate system 6 with respect to coordinate system 0 and the angular displacement profiles of the six joints are shown in Fig. 5 and Fig. 6 respectively.

Trajectory planning in Joint coordinate system
According to the path points set in Table 2 for trajectory planning in the joint coordinate system, the kinematic inverse solution of the poses of the points in Table 2 is carried out to obtain the six joint angle values of the manipulator at each path point to, as shown in Table 4.
Setting the acceleration time = 1.5 s for the parabolic transition section, the velocities and accelerations of the six joint angles were solved for and the motion trajectory is simulated in MATLAB as shown in Fig. 7.  The angular displacement and angular velocity curves for the six joints under this planning method and the three displacement component curves for the origin of the coordinate system C under the Cartesian coordinate system are shown in Fig. 8 and Fig. 9 respectively. By comparing Fig. 4 and Fig. 7, it can be seen that when the trajectory planning method with parabolic transition linear interpolation is used for trajectory planning in a right-angle coordinate system, the trajectory at the end of the robot arm basically consists of straight-line segments and parabolic segments, and its trajectory matches the path planned at the beginning. When the trajectory planning method is used for trajectory planning in the joint coordinate system, the trajectory at the end of the robot arm basically consists of parabolic and some straight-line segments, and its final trajectory is different from the path planned at the beginning.
Poplar saplings avoid the platen in the compaction mechanism during the planting process, so that the saplings can be put into the pit more smoothly through the reserved gap in the platen. TPM uses parabolic transition linear interpolation in the joint coordinate system for trajectory planning. This planning method significantly reduces the amount of manipulation of the manipulator during the tree planting process. Under the planning method, the angular displacement of the six joints of the manipulator varies linearly, which effectively avoids the creation of odd shapes of the manipulator.

Conclusions
This paper proposes an improved D-H parameter method, analyzes the mathematical model of the actuator TPR in the TPM, solves the forward kinematic equation of the manipulator in the TPR by matrix transformation, and deduces the joints of the manipulator by using the separation of variables method. Inverse numerical solution. A linear programming method based on parabolic transition is used to plan the motion trajectory in Cartesian coordinate system and joint coordinate system. By comparing the planning results in the two coordinate systems, considering the structural characteristics of TPM, an appropriate planning method is selected, which provides a theoretical basis for the subsequent tree planting process of TPM.
This paper addresses some of the research in inverse kinematics and path planning for TPRs, breaking through the limitations of industrial robots concentrated in unconstrained workspaces with homogeneous objects, and successfully combining the capabilities of TPRs with the environment in which it operates in forests. Tree planting environments are known to be complex.

Data availability
The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.