# Optimization Algorithm for 3D Smooth Path of Robotic Arm in Dynamic Obstacle Environments
## 3 Method Description  
The proposed algorithm divides path planning into two phases. In the first phase, the scene is treated as a short-term static scene, and the initial path is designed through static path planning. During the implementation of the robotic arm's path, obstacle detection is performed. When it is found that the path is blocked by obstacles due to the emergence of dynamic targets in the environment, the path is dynamically adjusted in the local dynamic environment with minimal adjustments, and the interfered path in the dynamic environment is updated. For the initial path generation in static scenarios, focusing on path planning for multi-joint robotic arms in static obstacle environments, a search tree adaptive angle guidance strategy is proposed. This strategy improves the directionality of the random tree, enhances the quality of the initial path, and reduces the probability of falling into local optima. Then, the path is simplified by flowing back from the target node to the source node to reduce its length. Finally, the Catmull-Rom algorithm is used to smooth the path obtained by the random-tree-guided path back-to-source update algorithm, eliminating turning points and avoiding robotic arm jitter, which aligns more closely with the actual spatial movement of the robotic arm. For local path updates in dynamic environments, focusing on path planning for multi-joint robotic arms in dynamic obstacle environments, an algorithm combining APF and RRT is proposed. The algorithm uses the random-tree-guided path back-to-source update algorithm as the initial path generation algorithm. When the planned initial static path is affected by dynamic obstacles, the algorithm can quickly replan the local path to generate a new collision avoidance path. It dynamically adjusts the weight ratio of APF and RRT based on the obstacle configuration, forming a hybrid path planning strategy adapted to dynamic environmental changes. This ensures rapid response to dynamic obstacles while overcoming the limitations of single methods. Experiments have shown that this method can significantly reduce replanning time and path length. The specific process is illustrated in Figure 1. The proposed path planning framework consists of three main modules: obstacle detection and tracking, static path planning, and local dynamic path replanning. Obstacle detection and tracking: Utilizing RGB depth cameras and point cloud analysis, the system detects and tracks dynamic obstacles. The iterative closest point (ICP) algorithm is applied to continuously register obstacle positions and orientations. Static path planning: An RRT-based path planner generates an initial trajectory with adaptive angle extension for directional efficiency. Further optimizations, including path simplification and 3D path smoothing, enhance the trajectory's continuity and feasibility. Local dynamic path replanning: When dynamic obstacles interfere with the static path, a hybrid RRT-APF approach recalculates an optimal trajectory. This process includes obstacle discrimination, local search weight adjustment, and path-switching execution to ensure real-time adaptability. Unlike traditional approaches, this framework dynamically integrates global and local path planning, ensuring both efficiency and collision avoidance in complex environments. The obstacle detection and tracking algorithm based on point cloud analysis accomplishes obstacle tracking by segmenting the environmental point cloud data and utilizing the iterative closest point (ICP) algorithm [41]. Specifically, the process begins by isolating the static obstacle point cloud data from the overall environment. Subsequently, the ICP algorithm is employed to register the static obstacle model with the point cloud, tracking changes in its position and orientation. The ICP (iterative closest point) algorithm mainly includes point cloud correspondence, transformation matrix estimation, point cloud update, and iterative optimization. 1.