Abstract:In narrow farm roads, the planning of farm machinery movement trajectories affects the smoothness of the driving trajectory, as well as the quality and efficiency of field operations. Aiming to address the current issues in farm machinery path planning—such as large trajectory curvature, insufficient smoothness, and imprecise speed planning at narrow turns, which hinder optimal tracking performance, a method for precise farm machinery movement trajectory planning was proposed based on Hybrid A* and optimal control. By obtaining the prior grid map of the field entry, the initial pose, and the target pose, the Hybrid A* algorithm was used to obtain the optimal or near-optimal field entry path that satisfied the agricultural machinery’s kinematic constraints. Time information was assigned to path nodes, and initial solutions required for solving nonlinear problems were obtained through data preprocessing. Using the optimal control problem method, a multi-objective cost function was established under multiple constraints, including agricultural machinery kinematic constraints, two-point boundary value constraints, dynamic constraints, and obstacle avoidance constraints, to achieve the objectives of shortening transfer time, improve agricultural machinery maneuverability, and enhance trajectory smoothness;the optimal control problem was converted into a nonlinear programming (NLP) problem and solved by using a nonlinear solver to obtain the agricultural machinery field entry and exit trajectory and velocity sequence. Using the Yanmar VP6E rice transplanter as the experimental platform, simulations and real-vehicle experiments were conducted in two scenarios: the agricultural machinery head facing away from the field access channel and the head facing toward the field access channel. Experimental results showed that the average trajectory curvature was 0.2312~0.2517m-1, indicating good trajectory smoothness consistent with vehicle kinematic characteristics. In the trajectory tracking real-vehicle experiments, the average absolute lateral deviation was from 1.56cm to 2.59cm, the average absolute heading angle deviation was 0.97° to 1.54°, the maximum absolute speed deviation was 0.058m/s to 0.102m/s, and the average absolute speed was 0.454m/s to 0.528m/s. Therefore, the rice transplanting machine effectively tracked the trajectory generated by the trajectory planning method, enabling precise and rapid field entry and exit on narrow farm roads.