The current research on path tracking primarily focuses on improving control algorithms, such as adaptive and predictive models, to enhance tracking accuracy and stability. To address the issue of low tracking accuracy caused by variable-curvature paths in automatic navigation within agricultural environments, this study proposes a fuzzy control-based path-tracking method. Firstly, a pure-pursuit model and a kinematic model were established based on a Four-Wheel Independent Steering and Four-Wheel Independent Driving (4WIS-4WID) structure. Secondly, a fuzzy controller with three inputs and one output was designed, using the lateral deviation, de; heading deviation, θe; and bending degree, c, of the look-ahead path as the input variables. Through multiple simulations and adjustments, 75 control rules were developed. The look-ahead distance, Ld, was obtained through fuzzification, fuzzy inference, and defuzzification processes. Next, a speed-control function was constructed based on the agricultural machinery’s pose deviations and the bending degree of the look-ahead path to achieve variable speed control. Finally, field tests were conducted to verify the effectiveness of the proposed path-tracking method. The tracking experiment results for the two types of paths indicate that under the variable-speed dynamic look-ahead distance strategy, the average lateral deviations for the variable-curvature paths were 1.8 cm and 3.3 cm while the maximum lateral deviations were 10.1 cm and 10.5 cm, respectively. Compared to the constant-speed fixed look-ahead pure-pursuit model, the average lateral deviation was reduced by 56.1% and the maximum lateral deviation by 50.4% on the U-shaped path. On the S-shaped path, the average lateral deviation was reduced by 56.0% and the maximum lateral deviation by 58.9%. The proposed method effectively improves the path-tracking accuracy of agricultural machinery on variable-curvature paths, meeting the production requirements for curved operations in agricultural environments.
In response to the limitations of existing methods in differentiating between vegetables and all types of weeds in farmlands, a new image segmentation method is proposed based on the improved YOLOv7-tiny. Building on the original YOLOv7-tiny framework, we replace the CIoU loss function with the WIoU loss function, substitute the Leaky ReLU loss function with the SiLU activation function, introduce the SimAM attention mechanism in the neck network, and integrate the PConv convolution module into the backbone network. The improved YOLOv7-tiny is used for vegetable target detection, while the ExG index, in combination with the OTSU method, is utilized to obtain a foreground image that includes both vegetables and weeds. By integrating the vegetable detection results with the foreground image, a vegetable distribution map is generated. Subsequently, by excluding the vegetable targets from the foreground image using the vegetable distribution map, a single weed target is obtained, thereby achieving accurate segmentation between vegetables and weeds. The experimental results show that the improved YOLOv7-tiny achieves an average precision of 96.5% for vegetable detection, with a frame rate of 89.3 fps, Params of 8.2 M, and FLOPs of 10.9 G, surpassing the original YOLOv7-tiny in both detection accuracy and speed. The image segmentation algorithm achieves a mIoU of 84.8% and an mPA of 97.8%. This method can effectively segment vegetables and a variety of weeds, reduce the complexity of segmentation with good feasibility, and provide a reference for the development of intelligent plant protection robots.