Autonomous mobile robots are playing an increasingly significant role in modern smart orchards by supporting precision agricultural operations such as target-oriented spraying and autonomous harvesting. Nevertheless, achieving high-precision trajectory tracking and stable motion in complex, unstructured orchard environments remains challenging, because tracking deviations induced by uneven terrain and low-traction soil can directly affect operational safety and efficiency. To address this challenge, the present study proposes an adaptive tracking controller which integrates model-driven and data-driven approaches. Firstly, a six-state planar dynamic model based on Newton–Euler equations is established to describe motion characteristics. Secondly, an improved Particle Swarm Optimization (PSO) algorithm is employed for offline parameter optimization under representative operating conditions. The process thus engenders a mapping dataset that relates the real-time motion states of the orchard mobile robot to the optimized horizon parameters and weights. Finally, an Adaptive Neuro-Fuzzy Inference System (ANFIS) is trained using this dataset, enabling adaptive adjustment of MPC parameters according to the robot motion state. Simulation and experimental results demonstrate that, in Double-Lane-Change (DLC) and serpentine simulations, the proposed controller reduced lateral and heading Root-Mean-Square (RMS) errors to 0.0109 m/0.0081 rad and 0.0102 m/0.0117 rad, achieving reductions of 49.30–85.58% and 68.60–88.02% compared with Pure Pursuit, Stanley, Linear Quadratic Regulator (LQR), and traditional MPC, respectively. In orchard field tests with circular and Figure-8 trajectories at 0.3–0.6 m/s, the lateral RMS errors were recorded as 0.0112–0.0182 m and 0.0156–0.0262 m, respectively, corresponding to reductions of 46.94–61.52% relative to traditional MPC, while the heading RMS error remained below 0.0510 rad. These findings substantiate the efficacy of the proposed controller in enhancing the accuracy and adaptability of the system, thereby providing a resilient and precise control framework for operation within orchard environments.
In factory workshops, wearing safety helmets is vital for worker safety. However, current deep learning-based detection methods are often hindered by large model parameters and high computational demands, limiting their deployment in resource-constrained settings. This article introduces YOLO-AFL, a novel lightweight model designed to solve these problems. The algorithm introduces several key optimizations to improve performance without increasing computational load. Firstly, the K-Means++ algorithm is applied during the anchor box preprocessing stage, along with a new distance metric (1 − AIoU), which enhances anchor box size estimation and boosts performance without additional overhead. Secondly, by introducing a lightweight PConv operation into the C3 module, the complexity of the model is significantly reduced. Finally, a dual attention network (LDA-GC) is designed to compensate for any accuracy loss caused by the model’s simplifications. Experimental results on a custom dataset show that the proposed algorithm achieves an mAP50 of 94.1%. Compared to the baseline model, it reduces the number of parameters by 19.1% and decreases computational complexity by 16.9%, demonstrating its superior performance and efficiency in safety helmet wearing detection.