# Position Selection and Collision-Free Path Planning for Fruit Picking Robots
## 3 Collision-Free Path Planning
### Comparison to Other Algorithms  
Common algorithms used in path planning for robotic manipulators include APF, RRT* and A*. The APF algorithm offers simplicity and fast computation for reaching a goal point but struggles with the inherent issue of local minima. The RRT* algorithm is  
Figure 8: Example of collision check: (**a**) point cloud; (**b**) clustered. flexible and adaptable to various environments by randomly expanding a tree, but it can produce inefficient paths and increase computation time due to detours. The A* algorithm guarantees an optimal path but has computational complexity, with excessive grids when dimensionality increases or grid size decreases. Examples of path planning using the MPAF, APF, RRT* and A* algorithms are illustrated in Figure 9b, where a 2-link manipulator moves from the starting point, represented by a red triangle, to the goal point, represented by a green triangle, in an environment with obstacles represented by black circles, as shown in Figure 9a. The movement trajectory of the manipulator for all the paths obtained in Figure 9b is shown in Figure 10. All algorithms except MPAF either fail to find a solution due to exceeding the workspace or lead to collisions, as it is impossible to change from the initial elbow-up configuration to the goal elbow-down configuration. Collisions occur even when using the elbow-down configuration as the initial pose, as shown in Figure 11. Table 1 presents the results corresponding to Figures 10 and 11. The safety distance was set to 0.05 m, and the table shows the minimum distances between each link center and the surrounding obstacles. Collisions occurred in all algorithms except MPAF. In particular, when using RRT* and A*, the generated paths extend beyond the manipulator's workspace, indicating that these methods are invalid for this task. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Algorithm** & **Configuration** & **Link1 (m)** & **Link2 (m)** & **Collision** & **Workspace** \\ \hline MPAPF & EU/ ED & 0.1174 & 0.1169 &
\begin{tabular}{c} Not \\ occurred \\ \end{tabular} & Within \\ \hline RRT* & EU & 0.0687 & 0.0497 & Occurred & Out \\ \hline A* & EU & 0.0354 & 0.0497 & Occurred & Out \\ \hline APF & EU & 0.0537 & 0.0468 & Occurred & Within \\ \hline RRT* & ED & 0.0430 & 0.0484 & Occurred & Out \\ \hline A* & ED & 0.0354 & 0.0303 & Occurred & Out \\ \hline APF & ED & 0.0537 & 0.0468 & Occurred & Within \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Minimum distance and validity check for each algorithm. Figure 9: Example of 2–link manipulator: (**a**) start and goal configuration; (**b**) generated path. The generated paths must be converted to joint-space paths through post-processing. The velocity trajectory and the inverse Jacobian matrix are generally used to convert paths to joint space, since multiple solutions may exist when solving inverse kinematics directly for the generated path points. Even in this approach, the Jacobian matrix may not have an inverse depending on configuration of the manipulator leading to constraints in posture adjustment [34]. The Jacobian matrix may not be a square matrix when redundancies are not present. Figure 11: Example of multiple solution: (**a**) APF; (**b**) RRT*; (**c**) A*. The dotted red lines are the generated paths, and the transparent traces represent intermediate steps. Figure 10: Example of path planning: (**a**) MPAPF; (**b**) APF; (**c**) RRT*; (**d**) A*. The dotted red lines are the generated paths, and the transparent traces represent intermediate steps. exist in the manipulator, making it difficult to achieve accurate conversion. Further, all of these algorithms, except for MPAPF, are point-based path planning methods and therefore cannot consider the geometry of the manipulator. Only the end-effector is considered fundamentally, leaving collisions at other points on the manipulator, joint limits, and the manipulator workspace entirely unaccounted for.