Pineapple picking robot field turning control method, device and equipment and medium
By optimizing the turning control at the head of the pineapple field through multi-sensor collaborative perception and the Dubins algorithm, the positioning stability and turning efficiency of the pineapple field navigation system in complex environments were solved, realizing high-precision navigation and continuous operation of the pineapple picking robot.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-10
AI Technical Summary
Existing pineapple field navigation systems suffer from poor positioning stability in complex environments and lack scene adaptation capabilities when turning at the edge of the field, resulting in low efficiency and large deviations when switching between rows.
By employing multi-sensor collaborative perception technology, combining LiDAR, IMU, and depth camera, a 3D point cloud map is constructed using the SLAM algorithm. The shortest smooth turning path is generated using the Dubins algorithm, and the visual path is optimized through semantic segmentation to achieve turning control at the head of the pineapple field.
Stable centimeter-level positioning and path tracking were achieved in dense pineapple plantations and mountainous environments, improving the navigation accuracy and operational continuity of the pineapple harvesting robot.
Smart Images

Figure CN121635359A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics, and more particularly to a method for controlling the turning of a pineapple harvesting robot at the edge of the field, a corresponding device, electronic equipment, and a computer-readable storage medium. Background Technology
[0002] Currently, navigation systems in pineapple fields, especially those for tracked cross-row robots, suffer from low control precision and inability to identify field edges. Traditional navigation systems primarily use GNSS-based positioning systems, achieving centimeter-level accuracy in open farmland. However, performance significantly decreases in mountainous or densely planted areas. Pineapple plants, ranging from 1 to 1.5 meters in height, have large, rosette-shaped leaves that create natural shading zones, resulting in extremely weak GNSS signals. This easily leads to ridge deviation and plant crushing, failing to meet the centimeter-level positioning requirements for harvesting. In recent years, machine vision-based navigation systems have emerged, extracting navigation paths from field images captured by cameras. While offering low hardware costs, pineapple fields experience significant light variations, and the similar color of weeds and pineapple leaves can cause path misidentification. Traditional ridge contour recognition algorithms have low accuracy, and single-vision systems exhibit poor adaptability and insufficient robustness in complex terrain.
[0003] Currently, existing technologies have the following technical defects, including: Firstly, a single sensor system cannot withstand the triple interference of vegetation obstruction, light fluctuations, and terrain undulations in pineapple fields, resulting in poor positioning stability. Secondly, the multi-sensor fusion algorithm lacks adaptability to the nonlinear dynamic environment of pineapple fields, and its data fusion accuracy and dynamic response capability are insufficient. Third, the navigation system for turning at the edge of the field lacks scene adaptability, and the fixed radius design leads to low efficiency and large deviations when switching between different sections of the track.
[0004] In summary, existing technologies have limitations in addressing the issues that single-sensor systems cannot withstand the triple interference of vegetation shading, light fluctuations, and terrain undulations in pineapple fields, resulting in poor positioning stability, lack of scene adaptation capabilities for turning navigation at field edges, and low efficiency and large deviations in ridge switching due to fixed radius designs. The applicant has made corresponding explorations to address these problems. Summary of the Invention
[0005] The purpose of this application is to solve the above-mentioned problems by providing a method for controlling the turning of a pineapple picking robot at the edge of the field, a corresponding device, electronic equipment, and a computer-readable storage medium.
[0006] To achieve the various objectives of this application, the following technical solution is adopted: A method for controlling the turning of a pineapple harvesting robot at the edge of the field, proposed to meet one of the purposes of this application, includes: Obtain a three-dimensional point cloud map corresponding to the pineapple field to be harvested, and mark the turning point of each pineapple row in the field to be harvested in a certain order in the three-dimensional point cloud map; The harvesting robot is controlled to perform harvesting operations along the current pineapple field rows to obtain field images of pineapples to be harvested that contain the current pineapple field rows. The field images of pineapples to be harvested are input into a row segmentation model that has been trained to convergence for semantic segmentation to determine the mask image corresponding to the current pineapple field rows. Based on the mask image, a straight harvesting path of the harvesting robot in the current pineapple field rows is generated. When the Euclidean distance between the current position of the harvesting robot and the turning mark at the edge of the field is less than a preset distance threshold, the U-turn mode is triggered and the current position is used as the starting point of the turn. Based on the preset Dubins algorithm, the left or right turning path of the harvesting robot in the current pineapple field row is generated according to the starting point of the turn, the ending point of the turn, and the minimum turning radius of the harvesting robot. The harvesting robot is controlled to alternately travel along the left-turn path and the right-turn path. During the turn, the depth camera is called to extract the three-dimensional point cloud data of the target obstacle to determine whether the target obstacle is located on the left-turn path or the right-turn path. Then, the turn is paused and an audible and visual alarm is issued until the target obstacle is removed and the harvesting operation is resumed, thus completing the field turning control of the pineapple harvesting robot.
[0007] Optionally, the turning start point includes a left turn start point and a right turn start point, and the turning end point includes a left turn end point and a right turn end point, wherein the turning end point is the starting point of the next pineapple field row associated with the field end turning marker point.
[0008] Optionally, triggering a U-turn mode and using the current position as the starting point of the turn, and generating a left-turn path for the harvesting robot in the current pineapple field row based on a preset Dubins algorithm according to the starting point of the turn, the ending point of the turn, and the minimum turning radius of the harvesting robot, includes the following steps: Obtain the left-turn starting point and minimum turning radius corresponding to the harvesting robot, and take the starting point of the next pineapple field row associated with the field turning mark point as the left-turn ending point. The preset Dubins algorithm is invoked to calculate and determine the first center coordinates of the first left-turn constraint circle corresponding to the left-turn starting point based on the first direction angle of the left-turn starting point and the minimum turning radius; the second center coordinates of the second left-turn constraint circle corresponding to the left-turn ending point are calculated and determined based on the second direction angle of the left-turn ending point and the minimum turning radius, wherein the radii of the first left-turn constraint circle and the second left-turn constraint circle are both equal to the minimum turning radius; Calculate the first Euclidean distance between the first center coordinates and the second center coordinates to determine the first center distance between the first left-turn constraint circle and the second left-turn constraint circle. Using the rotation matrix method, calculate and determine the starting point coordinates and ending point coordinates of the first common tangent of the external common tangent between the first left-turn constraint circle and the second left-turn constraint circle based on the first center coordinates, the second center coordinates, the minimum turning radius, and the first center distance. The left-turn path corresponding to the picking robot is constructed based on the first starting arc from the left-turn starting point to the first common tangent starting point, the first common tangent segment from the first common tangent starting point to the first common tangent ending point, and the first ending arc from the first common tangent ending point to the left-turn ending point.
[0009] Optionally, triggering a U-turn mode and using the current position as the turning start point, and generating a right-turn path for the harvesting robot in the current pineapple field row based on a preset Dubins algorithm according to the turning start point, turning end point, and the minimum turning radius of the harvesting robot, includes the following steps: Obtain the right turn starting point and minimum turning radius corresponding to the harvesting robot, and take the starting point of the next pineapple field row associated with the field turning mark point as the right turn ending point; The preset Dubins algorithm is invoked to calculate and determine the third center coordinates of the first right-turn constraint circle corresponding to the right-turn starting point based on the third direction angle of the right-turn starting point and the minimum turning radius; the fourth center coordinates of the second right-turn constraint circle corresponding to the right-turn ending point are calculated and determined based on the fourth direction angle of the right-turn ending point and the minimum turning radius, wherein the radii of the first right-turn constraint circle and the second right-turn constraint circle are both equal to the minimum turning radius; Calculate the second Euclidean distance between the third and fourth center coordinates to determine the second center distance between the first and second right-turn constraint circles. Using the rotation matrix method, based on the third and fourth center coordinates, the minimum turning radius, and the second center distance, calculate and determine the starting point and ending point coordinates of the second common tangent of the external common tangent between the first and second right-turn constraint circles. The right-turn path corresponding to the picking robot is constructed based on the second starting arc, the second common tangent segment, and the second ending arc, with the starting point of the right turn to the starting point of the second common tangent and the ending point of the second common tangent as the second starting arc, the second common tangent segment, and the second ending arc.
[0010] Optionally, the steps of determining the corresponding 3D point cloud map of the pineapple field to be harvested include: The harvesting robot is controlled to travel around the perimeter of the pineapple field to be harvested, so as to obtain inertial measurement unit data of the harvesting robot traveling around the perimeter of the pineapple field to be harvested, as well as three-dimensional point cloud data corresponding to each pineapple field row; Based on the preset SLAM algorithm, a three-dimensional point cloud map corresponding to the pineapple field to be harvested is constructed according to the inertial measurement unit data and the three-dimensional point cloud data.
[0011] Optionally, the step of controlling a harvesting robot to perform harvesting operations along the current pineapple field rows to obtain a field image containing the current pineapple field rows to be harvested, inputting the field image of the pineapple field to be harvested into a row segmentation model trained to convergence for semantic segmentation to determine the mask image corresponding to the current pineapple field rows, and generating a straight harvesting path for the harvesting robot in the current pineapple field rows based on the mask image includes: The field image of the pineapple to be harvested is input into a row segmentation model that has been trained to convergence for semantic segmentation, so as to separate the pineapple field row area and the background area in the field image of the pineapple to be harvested, and obtain the mask image corresponding to the current pineapple field row. The mask image is binarized, and the pixels in the pineapple field row area are set to 255 and the pixels in the background area are set to 0. An image coordinate system is established with the upper left corner of the pineapple field image as the origin, the horizontal axis to the right as the horizontal axis, and the vertical axis downward as the vertical axis. The pixels are scanned row by row in the image coordinate system to extract the left edge information points where the pixel value changes from 0 to 255 and the right edge information points where the pixel value changes from 255 to 0. A sliding filter algorithm is used to constrain the coordinate deviation of adjacent edge information points to not exceed a preset pixel change threshold. The left edge information points and the right edge information points are then denoised to determine the denoised left edge information points and right edge information points. Based on the denoised left and right edge information points, a weighted average method is used to traverse each pixel row and fit the pixel coordinates of the midpoint of each row. The pixel coordinates of all midpoints of the rows are connected to construct the straight picking path of the picking robot in the current pineapple field row.
[0012] Optionally, the basic network architecture of the row segmentation model includes the YOLOv11n-seg model; the harvesting robot is a tracked harvesting robot.
[0013] A field-turning control device for a pineapple harvesting robot, provided for another purpose of this application, includes: The turning marker point determination module is set to obtain the corresponding three-dimensional point cloud map of the pineapple field to be harvested, and mark the turning marker points at the head of each pineapple row in the field to be harvested in a certain order in the three-dimensional point cloud map. The straight-line picking path determination module is configured to control the picking robot to carry out picking operations along the current pineapple field ridges, to obtain field images of pineapples to be picked that contain the current pineapple field ridges, input the field images of pineapples to be picked into a ridge segmentation model that has been trained to a converged state for semantic segmentation, to determine the mask image corresponding to the current pineapple field ridges, and generate the straight-line picking path of the picking robot in the current pineapple field ridges based on the mask image; The turning path determination module is configured to trigger a U-turn mode when the Euclidean distance between the current position of the harvesting robot and the turning mark at the edge of the field is less than a preset distance threshold, and take the current position as the starting point of the turn. Based on the preset Dubins algorithm, the module generates the left or right turning path of the harvesting robot in the current pineapple field row according to the starting point of the turn, the ending point of the turn, and the minimum turning radius of the harvesting robot. The obstacle detection module is configured to control the picking robot to alternately travel along the left-turn path and the right-turn path. During the turning process, the depth camera is called to extract the three-dimensional point cloud data of the target obstacle to determine whether the target obstacle is located on the left-turn path or the right-turn path. If so, the turning is paused and an audible and visual alarm is issued until the target obstacle is removed and the picking operation is resumed, thus completing the field turning control of the pineapple picking robot.
[0014] An electronic device provided for another purpose of this application includes a central processing unit and a memory, the central processing unit being used to invoke and run a computer program stored in the memory to perform the steps of the pineapple picking robot turning control method of this application.
[0015] A computer-readable storage medium is provided for another purpose of this application, which stores, in the form of computer-readable instructions, a computer program implemented according to the pineapple picking robot turning control method, which, when called by a computer, executes the steps included in the corresponding method.
[0016] Compared to existing technologies, this application addresses the problems of existing single-sensor systems being unable to withstand the triple interference of vegetation shading, light fluctuations, and terrain undulations in pineapple fields, resulting in poor positioning stability, lack of scene adaptation capability for field turning navigation, and low efficiency and large deviations due to fixed radius design. This application includes, but is not limited to, the following beneficial effects: Firstly, this application utilizes multi-sensor collaborative perception, combining LiDAR data, IMU data, and depth camera data, to compensate for the perception shortcomings caused by GNSS signal obstruction, visual lighting interference, and terrain undulations. This allows for stable output of positioning and path information even in complex environments such as dense pineapple plantations and mountainous terrain. By combining LiDAR SLAM with visual semantic segmentation, it overcomes the limitations of weak GNSS signals and optimizes visual path extraction through sliding filtering and weighted fitting, avoiding misidentification caused by similar colors of weeds and leaves, thus significantly improving anti-interference capabilities.
[0017] Secondly, extended Kalman filtering (EKF) is used to fuse photoelectric encoder and IMU data to correct angular velocity and acceleration errors, obtain more accurate velocity and pose information, adapt to the nonlinear dynamic environment of the pineapple field, solve the problem of insufficient dynamic response of traditional fusion algorithms, ensure timely data updates during navigation, and adapt to the dynamic movement requirements of robot operation.
[0018] Thirdly, using the Dubins algorithm as the core, combined with the reserved space at the edge of the pineapple field, the width between rows, and the minimum turning radius of the harvesting robot, the shortest smooth turning path is generated, replacing the fixed radius design and avoiding problems such as large deviations in row switching and crushing of plants. By marking field edge information points on a priori map and judging the real-time pose, the turning process is automatically triggered. Combined with NMPC nonlinear control, centimeter-level path tracking is achieved, realizing seamless connection between straight-line movement and turning, and improving the continuity of operation. Attached Figure Description
[0019] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1This is a flowchart illustrating the field-turning control method for the pineapple harvesting robot in an embodiment of this application. Figure 2 This is an overall flowchart of the field turning control method for the pineapple harvesting robot in the embodiments of this application; Figure 3 This is an exemplary hardware structure diagram of the field turning control system in the embodiments of this application; Figure 4 This is a flowchart illustrating the pineapple row path extraction process in an embodiment of this application. Figure 5 This is a flowchart of the sliding filter algorithm in the embodiments of this application; Figure 6 This is a flowchart illustrating the process of generating a turning path at the edge of a terrain in an embodiment of this application. Figure 7 This is a flowchart illustrating the information transmission process in an embodiment of this application. Figure 8 This is a schematic diagram of the three-dimensional point cloud map corresponding to the pineapple field to be harvested constructed in the embodiments of this application; Figure 9 This is a schematic diagram of the turning point at the head of each pineapple row in the field to be harvested, as shown in the embodiments of this application. Figure 10 This is a schematic diagram of pineapple field row division in an embodiment of this application; Figure 11 This is a schematic diagram of the left and right edge information points of the pineapple field rows in an embodiment of this application; Figure 12 This is a schematic diagram of the straight-line harvesting path in the pineapple field rows in the embodiments of this application; Figure 13 This is a schematic diagram illustrating the determination of a left turn path or a right turn path in an embodiment of this application; Figure 14 This is a schematic diagram illustrating the determination of the left-turn path of the harvesting robot in an embodiment of this application; Figure 15 This is a schematic diagram illustrating the determination of the right-turn path of the harvesting robot in an embodiment of this application; Figure 16 This is a schematic diagram illustrating the generation effect of the left-turn and right-turn paths in the embodiments of this application; Figure 17 This is a schematic diagram of the turning control device for the pineapple harvesting robot in the embodiments of this application; Figure 18 This is a schematic diagram of the structure of the computer device in the embodiments of this application. Detailed Implementation
[0020] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0021] Unless otherwise specified, all data involved in this application may be stored remotely on a server or on a local terminal device, as long as it is suitable for use by the technical solution of this application.
[0022] Those skilled in the art will understand that although the various methods in this application are described based on the same concept and thus present commonality among them, they can be performed independently unless otherwise specified. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept; therefore, concepts expressed in the same way, as well as concepts that are appropriately changed for convenience but are expressed differently, should be understood equivalently.
[0023] Unless otherwise expressly stated, the various embodiments disclosed in this application can be combined in a cross-cutting manner to flexibly construct new embodiments, as long as such combination does not depart from the inventive spirit of this application and can meet the needs of the prior art or solve a certain deficiency in the prior art. Those skilled in the art should be aware of such modifications.
[0024] Please see Figures 1 to 7 In one embodiment of the pineapple harvesting robot turning control method of this application, the method includes: Step S10: Obtain the corresponding three-dimensional point cloud map of the pineapple field to be harvested, and mark the turning point of each pineapple row in the field to be harvested in a certain order in the three-dimensional point cloud map; The field turning control system in the terminal device can acquire the corresponding three-dimensional point cloud map of the pineapple field to be harvested, and mark the turning point of each pineapple row in the field to be harvested in a certain order in the three-dimensional point cloud map. In some embodiments, this application achieves high-precision autonomous navigation and turning at the edge of the field in complex environments such as pineapple fields through multimodal perception complementarity, nonlinear fusion optimization, adaptive path planning, and model predictive control. The overall solution is based on the ROS system and implemented using Python and C++ programming languages. The tracked harvesting robot used in this experiment has dimensions of 1300mm (length), 2300mm (width), and 1250mm (height), with a track width of 150mm. Pineapple field planting requires a row spacing greater than 300mm and a space greater than 2500mm at the edge of the field.
[0025] In some embodiments, the step of determining the three-dimensional point cloud map corresponding to the pineapple field to be harvested includes: Step S101: Control the harvesting robot to travel around the perimeter of the pineapple field to be harvested, so as to obtain the inertial measurement unit data of the harvesting robot when it travels around the perimeter of the pineapple field to be harvested, as well as the three-dimensional point cloud data corresponding to each pineapple field row. Step S102: Based on the preset SLAM algorithm, construct a three-dimensional point cloud map corresponding to the pineapple field to be harvested according to the inertial measurement unit data and the three-dimensional point cloud data.
[0026] Specifically, please refer to Figure 8 The SLAM algorithm includes the FAST-LIO2 3D laser SLAM algorithm, etc., which can control the harvesting robot to travel around the perimeter of the pineapple field to be harvested, so as to obtain the inertial measurement unit data of the harvesting robot when traveling around the perimeter of the pineapple field to be harvested, as well as the 3D point cloud data corresponding to each pineapple row; and can construct the corresponding 3D point cloud map of the pineapple field to be harvested based on the FAST-LIO2 3D laser SLAM algorithm according to the inertial measurement unit data and the 3D point cloud data.
[0027] More specifically, FAST-LIO2 is a fast, robust, and universal lidar inertial odometry framework. Based on an efficient, tightly coupled iterative Kalman filter, it enables fast, robust, and accurate lidar mapping and navigation. When constructing a 3D point cloud map corresponding to a pineapple field to be harvested, a harvesting robot can be controlled by a remote controller to walk around a single pineapple field at 0.3 m / s. During this process, the lidar (10 Hz) and the IMU (Inertial Measurement Unit) (100 Hz) collect 3D point cloud data corresponding to each pineapple row in the field in real time. The point cloud is organized using an IKD-Tree, and motion distortion is eliminated through forward and backward propagation. The attitude is optimized by iterative Kalman filtering to generate the corresponding 3D point cloud map of the pineapple field.
[0028] Please see Figure 9 After constructing the corresponding 3D point cloud map of the pineapple field to be harvested, the turning point of each pineapple row is marked on the 3D point cloud map through the RVIZ visualization interface, so as to prepare data for the subsequent turning of the harvesting robot.
[0029] Step S20: Control the picking robot to perform picking operations along the current pineapple field rows to obtain field images of pineapples to be picked that contain the current pineapple field rows. Input the field images of pineapples to be picked into the row segmentation model that has been trained to convergence state for semantic segmentation to determine the mask image corresponding to the current pineapple field rows. Generate the straight picking path of the picking robot in the current pineapple field rows based on the mask image. A 3D point cloud map corresponding to the pineapple field to be harvested is obtained. After marking the turning points of each pineapple row in the field in a certain order on the 3D point cloud map, the harvesting robot is controlled to carry out harvesting operations along the current pineapple row to obtain an image of the pineapple field to be harvested containing the current pineapple row. The image of the pineapple field to be harvested is input into a row segmentation model that has been trained to convergence for semantic segmentation to determine the mask image corresponding to the current pineapple row. Based on the mask image, a straight harvesting path of the harvesting robot in the current pineapple row is generated. The basic network architecture of the row segmentation model includes the YOLOv11n-seg model; the harvesting robot is a tracked harvesting robot, etc.
[0030] In some embodiments, the step of controlling a harvesting robot to perform harvesting operations along the current pineapple field rows to obtain a field image of pineapples to be harvested containing the current pineapple field rows, inputting the field image of pineapples to be harvested into a row segmentation model trained to convergence for semantic segmentation to determine the mask image corresponding to the current pineapple field rows, and generating a straight harvesting path for the harvesting robot in the current pineapple field rows based on the mask image includes: Step S201: Input the field image of the pineapple to be harvested into the row segmentation model that has been trained to convergence state for semantic segmentation, so as to separate the pineapple field row area and the background area in the field image of the pineapple to be harvested, and obtain the mask image corresponding to the current pineapple field row. Step S202: Binarize the mask image, set the pixel value of the pineapple field row area to 255 and the pixel value of the background area to 0, establish an image coordinate system with the upper left corner of the pineapple field image as the origin, the horizontal axis to the right as the horizontal axis and the vertical axis to the bottom as the vertical axis, scan the pixels row by row in the image coordinate system, and extract the left edge information points where the pixel value changes from 0 to 255 and the right edge information points where the pixel value changes from 255 to 0. Step S203: Using a sliding filter algorithm to constrain the coordinate deviation of adjacent edge information points to not exceed a preset pixel change threshold, denoising the left edge information points and the right edge information points to determine the denoised left edge information points and right edge information points; Step S204: Based on the denoised left edge information points and the denoised right edge information points, the weighted average method is used to traverse each pixel row, and the pixel coordinates of the midpoint of the row of each pixel row are fitted and generated. The pixel coordinates of all the midpoints of the row are connected to construct the straight picking path of the picking robot in the current pineapple field row.
[0031] Specifically, please refer to Figures 10 to 12 The YOLOv11n-seg model, trained to convergence, identifies the pineapple rows in the field image of the pineapple field to be harvested, separates the background from the row area in the image, and obtains a mask image of the current pineapple row. Then, the mask image of the current pineapple row is binarized so that the pixels of the pineapple row area are changed to 255 to represent white and the pixels of the background area are changed to 0 to represent black. An image coordinate system is established with the upper left corner of the image as the origin, the horizontal axis to the right as the horizontal axis (X-axis), and the vertical axis downward as the vertical axis (Y-axis).
[0032] In the image coordinate system, pixels are scanned row by row. For a pixel with a value of 255, if the pixel value of the preceding position is 0 and the pixel value of the following position is 255, then this position is considered a left edge information point. Similarly, for a pixel with a value of 255, if the pixel value of the preceding position is 255 and the pixel value of the following position is 0, then this position is considered a right edge information point. In this way, left and right edge information points in the same row can be found, and the pixel coordinates corresponding to the left and right edge information points are recorded respectively. After scanning one row of pixels using the above method, the next row is processed until all pixels are scanned, thus obtaining all left and right edge information points of the current pineapple field row.
[0033] Furthermore, the preset pixel change threshold includes 10 pixels, etc.; a sliding filter algorithm is used to filter all left and right edge information points to eliminate noise in all left and right edge information points; by observing the binary row mask area, it can be found that the coordinate changes of edge information points on the same side are small, and the distance between two adjacent positions does not exceed 10 pixels. Therefore, a pixel change threshold needs to be set in the sliding filter algorithm of this application to adjust the data change; when a set of data is input into the algorithm, the data of the previous state is first used as a reference to predict the current state to prevent the data from changing too much. If the data of the current state exceeds the estimated value of the previous state, the data of the current state will be directly modified by adding or subtracting the threshold from the data in the previous state; otherwise, the data of the current state will be retained. In this way, all left and right edge information points are processed one by one, and the left and right edge information points are denoised to determine the denoised left and right edge information points.
[0034] Furthermore, based on the denoised left and right edge information points, a weighted average method is used to traverse each pixel row, fitting and generating the pixel coordinates of the midpoint of each row. The pixel coordinates of all midpoints are connected to construct the straight-line harvesting path of the harvesting robot in the current pineapple field row. Using the filtered left and right edge information data, the final navigation path can be fitted. This application uses a weighted average method, traversing the pixel coordinates of the left and right edge information points respectively, and performing a weighted average on the pixel coordinates of the left and right edge information points in the corresponding pixel row; thus, the fitted midpoint coordinates of the row in the same row can be obtained, where the weights on both sides of the left and right edge information points are 0.5. The expression for the pixel coordinates of the midpoint of the second fit is: in,( , ) is the first The pixel coordinates of the fitted midpoint, ( , ) is the first The pixel coordinates of the left edge information points, ( , ) is the first The pixel coordinates of the right edge information point.
[0035] Step S30: When the Euclidean distance between the current position of the harvesting robot and the turning mark at the edge of the field is less than a preset distance threshold, the turning mode is triggered and the current position is used as the turning start point. Based on the preset Dubins algorithm, the left turning path or right turning path of the harvesting robot in the current pineapple field row is generated according to the turning start point, the turning end point and the minimum turning radius of the harvesting robot. The harvesting robot is controlled to harvest pineapples along the current ridges in the pineapple field to obtain an image of the pineapples to be harvested that includes the current ridges. This image is then input into a ridge segmentation model that has been trained to convergence for semantic segmentation to determine the mask image corresponding to the current pineapple ridge. Based on the mask image, a straight harvesting path for the harvesting robot in the current pineapple ridge is generated. When the Euclidean distance between the current position of the harvesting robot and the turning point at the edge of the field is less than a preset distance threshold, a U-turn mode is triggered, and the current position is used as the starting point for the turn. Based on a preset Dubins algorithm, a left-turn or right-turn path for the harvesting robot in the current pineapple ridge is generated according to the starting point, the ending point, and the minimum turning radius of the harvesting robot. The starting point includes both left-turn and right-turn starting points, and the ending point includes both left-turn and right-turn ending points. The ending point is the starting point of the next pineapple ridge associated with the turning point at the edge of the field.
[0036] Specifically, as the harvesting robot gradually approaches the edge of the current pineapple row, the image recognition of the current pineapple row will become shorter and shorter, and the extracted straight harvesting path of the current pineapple row will also become shorter and shorter, until the current pineapple row can no longer be recognized, that is, the straight harvesting path of the current pineapple row cannot be extracted. At this time, the system enters the edge judgment state, and judges by the position difference between the current position point and the edge turning mark point. When the Euclidean distance between the current position point of the harvesting robot and the edge turning mark point is less than a preset distance threshold, the system switches to the edge turning state, triggers the U-turn mode, and uses the current position point as the turning starting point.
[0037] In a further embodiment, the step of triggering a U-turn mode and using the current position as the starting point of the turn, and generating a left-turn path for the harvesting robot in the current pineapple field row based on a preset Dubins algorithm according to the starting point of the turn, the ending point of the turn, and the minimum turning radius of the harvesting robot, includes: Step S301: Obtain the left turn starting point and minimum turning radius corresponding to the picking robot, and take the starting point of the next pineapple field row associated with the field turn marker as the left turn ending point. Step S302: Call the preset Dubins algorithm to calculate and determine the first center coordinates of the first left-turn constraint circle corresponding to the left-turn starting point based on the first direction angle of the left-turn starting point and the minimum turning radius; calculate and determine the second center coordinates of the second left-turn constraint circle corresponding to the left-turn ending point based on the second direction angle of the left-turn ending point and the minimum turning radius, wherein the radii of the first left-turn constraint circle and the second left-turn constraint circle are both equal to the minimum turning radius; Step S303: Calculate the first Euclidean distance between the first center coordinates and the second center coordinates to determine the first center distance between the first left-turn constraint circle and the second left-turn constraint circle. Using the rotation matrix method, calculate and determine the starting point coordinates and ending point coordinates of the first common tangent of the external common tangent between the first left-turn constraint circle and the second left-turn constraint circle based on the first center coordinates, the second center coordinates, the minimum turning radius, and the first center distance. Step S304: Using the left turn starting point to the first common tangent starting point as the first starting arc, the first common tangent starting point to the first common tangent ending point as the first common tangent segment, and the first common tangent ending point to the left turn ending point as the first ending arc, the left turn path corresponding to the picking robot is constructed based on the first starting arc, the first common tangent segment, and the first ending arc.
[0038] Specifically, please refer to Figure 13 and Figure 14 ,like Figure 13 As shown, It can indicate the starting point of a left turn; It can indicate the end point of a left turn; This represents the coordinates of the first center of the first left-turn constraint circle corresponding to the starting point of the left turn. This represents the coordinates of the second center of the second left-turn constraint circle corresponding to the left-turn termination point. It can represent the first heading angle (heading angle) at the starting point of a left turn. It can represent the second heading angle (heading angle) at the end of a left turn. This indicates the minimum turning radius of the harvesting robot; This represents the first center distance between the first left-turn constraint circle and the second left-turn constraint circle; like Figure 14 As shown, It can represent the first starting arc; It can represent the first common tangent segment; It can represent the first terminating arc; This can represent the coordinates of the starting point of the first common tangent line between the first left-turn constraint circle and the second left-turn constraint circle; This represents the coordinates of the endpoint of the first common tangent line between the first left-turn constraint circle and the second left-turn constraint circle.
[0039] Obtain the left-turn starting point corresponding to the harvesting robot. and minimum turning radius The starting point of the next pineapple field row associated with the aforementioned turning point is taken as the left turn termination point. The preset Dubins algorithm is invoked, based on the left turn starting point. First direction angle With the minimum turning radius Calculate and determine the starting point of the left turn. The coordinates of the first center of the corresponding first left-turn constraint circle According to the left turn termination point Second direction angle With the minimum turning radius Calculate and determine the left turn termination point The coordinates of the second center of the corresponding second left-turn constraint circle Wherein, the radii of the first left-turn constraint circle and the second left-turn constraint circle are both equal to the minimum turning radius. ; Calculate the coordinates of the first circle center Coordinates of the second circle center The first Euclidean distance between them is used to determine the first center distance between the first left-turn constraint circle and the second left-turn constraint circle. The rotation matrix method is used based on the coordinates of the first circle center. The coordinates of the second center of the circle The minimum turning radius and the first center distance The coordinates of the starting point of the first common tangent line between the first left-turn constraint circle and the second left-turn constraint circle are calculated and determined respectively. Coordinates of the endpoint of the first common tangent ; More specifically, the coordinates of the starting point of the first common tangent of the external common tangent between the first left-turn constraint circle and the second left-turn constraint circle. The calculation formula is expressed as: , Coordinates of the endpoint of the first common tangent line between the first left-turn constraint circle and the second left-turn constraint circle. The calculation formula is expressed as: .
[0040] Starting point of the left turn To the starting point of the first common tangent The first starting arc The starting point of the first common tangent To the end of the first tangent line The first common tangent segment End point of the first tangent To the end of the left turn The first terminating arc is based on the first starting arc. The first common tangent segment and the first terminating arc To construct the left-turn path corresponding to the harvesting robot. .
[0041] In a further embodiment, the step of triggering a U-turn mode and using the current position as the starting point of the turn, and generating a right-turn path for the harvesting robot in the current pineapple field row based on a preset Dubins algorithm according to the starting point of the turn, the ending point of the turn, and the minimum turning radius of the harvesting robot, includes: Step S3001: Obtain the right turn starting point and minimum turning radius corresponding to the harvesting robot, and take the starting point of the next pineapple field row associated with the field turning mark point as the right turn ending point. Step S3002: Call the preset Dubins algorithm to calculate and determine the third center coordinates of the first right turn constraint circle corresponding to the right turn starting point based on the third direction angle of the right turn starting point and the minimum turning radius; calculate and determine the fourth center coordinates of the second right turn constraint circle corresponding to the right turn ending point based on the fourth direction angle of the right turn ending point and the minimum turning radius, wherein the radii of the first right turn constraint circle and the second right turn constraint circle are both equal to the minimum turning radius; Step S3003: Calculate the second Euclidean distance between the third center coordinates and the fourth center coordinates to determine the second center distance between the first right-turn constraint circle and the second right-turn constraint circle. Using the rotation matrix method, calculate and determine the starting point coordinates and ending point coordinates of the second common tangent of the external common tangent between the first right-turn constraint circle and the second right-turn constraint circle based on the third center coordinates, the fourth center coordinates, the minimum turning radius, and the second center distance. Step S3004: Using the right turn starting point to the second common tangent starting point as the second starting arc, the second common tangent starting point to the second common tangent ending point as the second common tangent segment, and the second common tangent ending point to the right turn ending point as the second ending arc, construct the right turn path corresponding to the picking robot based on the second starting arc, the second common tangent segment, and the second ending arc.
[0042] Please see Figure 13 and Figure 15 ,like Figure 13 As shown, It can indicate the starting point of a right turn; It can indicate the end point of a right turn; This indicates the coordinates of the third center of the first right-turn constraint circle corresponding to the starting point of the right turn; This indicates the coordinates of the fourth center of the second right-turn constraint circle corresponding to the right-turn termination point; This indicates the minimum turning radius of the harvesting robot; This can represent the second center distance between the first right-turn constraint circle and the second right-turn constraint circle; for example... Figure 15 As shown, It can represent the second starting arc; It can represent the second common tangent segment; It can represent the second terminating arc; This can represent the coordinates of the starting point of the second common tangent line between the first right-turn constraint circle and the second right-turn constraint circle; This represents the coordinates of the endpoint of the second common tangent line between the first right-turn constraint circle and the second right-turn constraint circle.
[0043] Obtain the right turn starting point corresponding to the harvesting robot. and minimum turning radius The starting point of the next pineapple field row associated with the aforementioned turning point is taken as the right turn termination point. The preset Dubins algorithm is invoked, and the third azimuth angle at the right turn starting point and the minimum turning radius are used as the basis for the calculation. Calculate and determine the coordinates of the third center of the first right-turn constraint circle corresponding to the right-turn starting point. Based on the fourth direction angle of the right turn termination point and the minimum turning radius Calculate and determine the coordinates of the fourth center of the second right-turn constraint circle corresponding to the right-turn termination point. ; Calculate the coordinates of the third circle center With the coordinates of the fourth circle center The second Euclidean distance between them is used to determine the second center distance between the first right-turn constraint circle and the second right-turn constraint circle. The rotation matrix method is used based on the coordinates of the third circle center. The coordinates of the fourth circle center The minimum turning radius And the second circle center distance, respectively, calculate and determine the coordinates of the starting point of the second common tangent of the external common tangent between the first right turn constraint circle and the second right turn constraint circle. Coordinates of the endpoint of the second common tangent Wherein, the coordinates of the starting point of the second common tangent of the external common tangent between the first right-turn constraint circle and the second right-turn constraint circle are... The calculation formula is expressed as: Coordinates of the endpoint of the second common tangent of the external common tangent between the first right-turn constraint circle and the second right-turn constraint circle The calculation formula is expressed as: .
[0044] Starting point of the right turn To the starting point of the second tangent line For the second starting arc The starting point of the second common tangent To the end of the second tangent line The second common tangent segment End point of the second tangent To the end of the right turn For the second terminating arc Based on the second starting arc The second common tangent segment and the second terminating arc To construct the right-turn path corresponding to the harvesting robot. .
[0045] Step S40: Control the picking robot to alternately drive along the left-turn path and the right-turn path. During the turning process, call the depth camera to extract the three-dimensional point cloud data of the target obstacle to determine whether the target obstacle is located on the left-turn path or the right-turn path. Then pause the turning and issue an audible and visual alarm until the target obstacle is removed and the picking operation is resumed to complete the field turning control of the pineapple picking robot.
[0046] The system triggers a U-turn mode and uses the current location as the starting point for the turn. Based on the preset Dubins algorithm, and considering the starting and ending points of the turn, as well as the minimum turning radius of the harvesting robot, it generates a left-turn or right-turn path for the harvesting robot within the current pineapple field rows. The robot then alternates between these paths, sequentially driving along them. During the turn, a depth camera is used to extract 3D point cloud data of any obstacles to determine if they are located on the left-turn or right-turn path. If so, the turn is paused, and an audible and visual alarm is issued. Harvesting operations resume only after the obstacle is removed, thus completing the field-level turning control of the pineapple harvesting robot. For more details, please refer to [link to relevant documentation]. Figure 16During the turning process at the edge of the field, the harvesting robot is controlled to alternately travel along the left-turn and right-turn paths. The system uses a depth camera to detect in real time whether there are other target obstacles in front of the harvesting robot, such as people or boxes. During the turning process, the depth camera is called to extract the three-dimensional point cloud data of the target obstacle to determine whether the target obstacle is located on the left-turn or right-turn path. If the depth camera detects other target obstacles, it combines the depth information to extract the surface point cloud of the target obstacle to determine whether the target obstacle will affect the harvesting robot's movement. If the target obstacle is on the harvesting robot's path, the harvesting robot pauses turning and issues an alarm, waiting for personnel to remove the target obstacle. After the system no longer detects other target obstacles, the harvesting robot continues to work. If the target obstacle is not on the harvesting robot's path, it operates normally.
[0047] In some embodiments, since accurate velocity information is required for path tracking, EKF (Extended Kalman Filter) is used to fuse information from the photoelectric encoder and IMU (Inertial Measurement Unit) to obtain more accurate velocity information for the robot. The system's state vector, control vector, and observation vector are defined as follows: in, This indicates the heading angle of the harvesting robot in the world coordinate system; This represents the linear velocity of the harvesting robot along the x-axis (horizontal axis) in the world coordinate system; This represents the linear velocity of the harvesting robot along the y-axis (vertical axis) in the world coordinate system; This represents the displacement of the harvesting robot along the x-axis in the world coordinate system; This represents the displacement of the harvesting robot along the y-axis in the world coordinate system; This represents the acceleration of the harvesting robot along the x-axis in the world coordinate system. This represents the acceleration of the harvesting robot along the y-axis in the world coordinate system; This represents the angular velocity of the harvesting robot along the z-axis in the world coordinate system; These represent the observed values of displacement, rotation angle, and linear velocity of the harvesting robot in the world coordinate system, respectively.
[0048] The equations for the odometer's observation model are as follows: , , , The state update equations are as follows: , in, This represents the heading angle of the harvesting robot at time k; This represents the heading angle of the harvesting robot at time k-1; This indicates the corrected angular velocity of the IMU (Inertial Measurement Unit); This indicates the time interval for EKF filtering.
[0049] , , in, and These represent the corrected angular velocity and acceleration, respectively.
[0050] Because the model of the tracked harvesting robot chassis is nonlinear, this application uses NMPC (Nonlinear Model Predictive Control) for path tracking. The simplified kinematic model of the tracked harvesting robot chassis is as follows: , , , , Discretize the above continuous differential model into a difference model (difference interval dt), which includes: , , , , , in, This represents the predicted position coordinates of the harvesting robot in the world coordinate system at time k+1. This represents the actual linear velocity of the harvesting robot at time k; This represents the actual heading angle of the harvesting robot at time k; This represents the track turning angle of the harvesting robot at time k; Indicates the wheelbase of the robot's tracks; Let x represent the linear acceleration of the robot at time k. This represents the discretization time interval for nonlinear model predictive control.
[0051] Assume the trajectory that the harvesting robot needs to track consists of discrete points. It is obtained by cubic curve fitting and can be expressed as a function with the x-axis as the independent variable: , At each prediction step, this application can be based on the tracked harvesting robot. and Calculate the lateral tracking error deviation from heading The specific calculation formula is as follows: , , For solving an NMPC controller problem with a prediction step size of N, the following optimization objective function is designed: , Satisfy dynamic model constraints: , , , , , in, This represents the lateral tracking error at time k. The cubic curve function representing the desired path ( (), generated by fitting the midpoint of the pineapple field rows; This represents the heading deviation at time k (the difference between the expected heading angle and the actual heading angle). Indicates the desired path in The derivative at the desired heading angle (representing the tangent of the desired heading angle) ensures that the path tracking direction is correct.
[0052] Actuator constraints: , , Based on the above method, the tracked harvesting robot can be accurately tracked in the pineapple field, both in its straight-line path and its turning path (left turn or right turn).
[0053] As can be seen from the above embodiments, compared with the prior art, this application addresses the problems in the prior art where a single sensor system cannot resist the triple interference of vegetation shading, light fluctuations, and terrain undulations in pineapple fields, resulting in poor positioning stability, lack of scene adaptation capability for field turning navigation, and low efficiency and large deviation due to fixed radius design. This application includes, but is not limited to, the following beneficial effects: Firstly, this application utilizes multi-sensor collaborative perception, combining LiDAR data, IMU data, and depth camera data, to compensate for the perception shortcomings caused by GNSS signal obstruction, visual lighting interference, and terrain undulations. This allows for stable output of positioning and path information even in complex environments such as dense pineapple plantations and mountainous terrain. Furthermore, by combining LiDAR SLAM with visual semantic segmentation, it overcomes the limitations of weak GNSS signals and optimizes visual path extraction through sliding filtering and weighted fitting, avoiding misidentification caused by similar colors of weeds and leaves, thus significantly improving anti-interference capabilities. Secondly, extended Kalman filtering (EKF) is used to fuse optical encoder and IMU data to correct angular velocity and acceleration errors, obtain more accurate velocity and pose information, adapt to the nonlinear dynamic environment of the pineapple field, solve the problem of insufficient dynamic response of traditional fusion algorithms, ensure timely data updates during navigation, and adapt to the dynamic movement requirements of robot operation.
[0054] Thirdly, using the Dubins algorithm as the core, combined with the reserved space at the edge of the pineapple field, the width between rows, and the minimum turning radius of the harvesting robot, the shortest smooth turning path is generated, replacing the fixed radius design and avoiding problems such as large deviations in row switching and crushing of plants. By marking field edge information points on a priori map and judging the real-time pose, the turning process is automatically triggered. Combined with NMPC nonlinear control, centimeter-level path tracking is achieved, realizing seamless connection between straight-line movement and turning, and improving the continuity of operation.
[0055] Please see Figure 17A pineapple harvesting robot turning control device provided for one of the purposes of this application includes a turning marker point determination module 1100, a straight harvesting path determination module 1200, a turning path determination module 1300, and an obstacle detection module 1400; wherein, The turning marker point determination module 1100 is configured to acquire a 3D point cloud map corresponding to the pineapple field to be harvested, and mark the turning point at the head of each pineapple row in the field to be harvested in a certain order in the 3D point cloud map; the straight harvesting path determination module 1200 is configured to control the harvesting robot to perform harvesting operations along the current pineapple row, to acquire an image of the pineapple field to be harvested containing the current pineapple row, input the image of the pineapple field to be harvested into a row segmentation model that has been trained to convergence for semantic segmentation, to determine the mask image corresponding to the current pineapple row, and to generate a straight harvesting path for the harvesting robot in the current pineapple row based on the mask image; the turning path determination module 1300 is configured to determine the turning point when the current position of the harvesting robot is opposite to the turning point at the head of the pineapple row. When the Euclidean distance between points is less than a preset distance threshold, a U-turn mode is triggered, and the current position is used as the starting point of the turn. Based on the preset Dubins algorithm, the left-turn or right-turn path of the picking robot in the current pineapple field row is generated according to the starting point of the turn, the ending point of the turn, and the minimum turning radius of the picking robot. The obstacle detection module 1400 is configured to control the picking robot to alternately drive according to the left-turn path and the right-turn path. During the turn, the depth camera is called to extract the three-dimensional point cloud data of the target obstacle to determine whether the target obstacle is located on the left-turn path or the right-turn path. Then, the turn is paused and an audible and visual alarm is issued until the target obstacle is removed and the picking operation is resumed, thus completing the field turning control of the pineapple picking robot.
[0056] Based on any embodiment of this application, please refer to Figure 18 Another embodiment of this application also provides an electronic device, which can be implemented by a computer device, such as... Figure 18The diagram shows the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When the computer-readable instructions are executed by the processor, the processor can implement a method for controlling the turning point of a pineapple harvesting robot. The processor of the computer device provides computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the method for controlling the turning point of a pineapple harvesting robot according to this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 18 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0057] In this embodiment, the processor is used to execute... Figure 17 The memory stores the specific functions of each module, and stores the program code and various data required to execute the above modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules in the field turning control device of the pineapple picking robot of this application, and the server can call the server's program code and data to execute the functions of all modules.
[0058] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the pineapple harvesting robot turning control method described in any embodiment of this application.
[0059] This application also provides a computer program product, including a computer program / instructions that, when executed by one or more processors, implement the steps of the field turning control method for the pineapple picking robot described in any embodiment of this application.
[0060] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0061] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A pineapple harvesting robot end turn control method, characterized by, The method comprises the following steps: acquiring a three-dimensional point cloud map corresponding to a pineapple field to be picked, and marking a head-turning marker point of each pineapple ridge row in the three-dimensional point cloud map in a certain order; controlling a picking robot to perform picking work along a current pineapple ridge row to acquire a pineapple field image containing the current pineapple ridge row, inputting the pineapple field image into a ridge row segmentation model trained to a convergent state to perform semantic segmentation, determining a mask image corresponding to the current pineapple ridge row, and generating a straight picking path of the picking robot in the current pineapple ridge row based on the mask image; when the Euclidean distance between a current position point of the picking robot and the head-turning marker point is less than a preset distance threshold, triggering a U-turn mode and taking the current position point as a turning starting point, and generating a left turning path or a right turning path of the picking robot in the current pineapple ridge row based on a preset Dubins algorithm according to the turning starting point, a turning ending point and a minimum turning radius of the picking robot; controlling the picking robot to alternately travel along the left turning path and the right turning path in sequence, calling a depth camera to extract three-dimensional point cloud data of a target obstacle during the turning process, determining that the target obstacle is located on the left turning path or the right turning path, pausing the turning and issuing a sound and light alarm, and resuming the picking work after the target obstacle is removed to complete head-turning control of the pineapple picking robot.
2. The pineapple harvesting robot head turn control method of claim 1, wherein, The turning starting point comprises a left turning starting point and a right turning starting point, and the turning ending point comprises a left turning ending point and a right turning ending point. The turning ending point is a starting point of a next pineapple ridge row associated with the head-turning marker point.
3. The pineapple harvesting robot head turn control method of claim 2, wherein, The step of triggering the U-turn mode and taking the current position point as the turning starting point, and generating the left turning path of the picking robot in the current pineapple ridge row based on the preset Dubins algorithm according to the turning starting point, the turning ending point and the minimum turning radius of the picking robot comprises the following steps: acquiring a left turning starting point and a minimum turning radius corresponding to the picking robot, and taking a starting point of a next pineapple ridge row associated with the head-turning marker point as a left turning ending point; calling the preset Dubins algorithm to calculate and determine a first center coordinate of a first left turning constraint circle corresponding to the left turning starting point according to a first direction angle of the left turning starting point and the minimum turning radius, and calculate and determine a second center coordinate of a second left turning constraint circle corresponding to the left turning ending point according to a second direction angle of the left turning ending point and the minimum turning radius, wherein the radii of the first left turning constraint circle and the second left turning constraint circle are equal to the minimum turning radius; and calculating a first Euclidean distance between the first center coordinates and the second center coordinates to determine a first center distance between the first left-turn constraint circle and the second left-turn constraint circle, and calculating a first common tangent start point coordinate and a first common tangent end point coordinate of an outer common tangent between the first left-turn constraint circle and the second left-turn constraint circle according to the first center coordinates, the second center coordinates, the minimum turning radius and the first center distance by a rotation matrix method; taking the left-turn start point to the first common tangent start point as a first start circular arc, the first common tangent start point to the first common tangent end point as a first common tangent segment, and the first common tangent end point to the left-turn end point as a first end circular arc, and constructing a left-turn path corresponding to the picking robot based on the first start circular arc, the first common tangent segment and the first end circular arc.
4. The pineapple harvesting robot head turn control method of claim 2, wherein, triggering a U-turn mode and taking the current position point as a turning start point, and generating a right-turn path of the picking robot in a current pineapple field row based on a preset Dubins algorithm according to the turning start point, a turning end point and a minimum turning radius of the picking robot, including: obtaining a right-turn start point corresponding to the picking robot and a minimum turning radius, and taking a start point of a next pineapple field row associated with the field end turning mark point as a right-turn end point; calling a preset Dubins algorithm, calculating a third center coordinate of a first right-turn constraint circle corresponding to the right-turn start point according to a third direction angle of the right-turn start point and the minimum turning radius, and calculating a fourth center coordinate of a second right-turn constraint circle corresponding to the right-turn end point according to a fourth direction angle of the right-turn end point and the minimum turning radius, wherein the first right-turn constraint circle and the second right-turn constraint circle have a radius equal to the minimum turning radius; calculating a second Euclidean distance between the third center coordinates and the fourth center coordinates to determine a second center distance between the first right-turn constraint circle and the second right-turn constraint circle, and calculating a second common tangent start point coordinate and a second common tangent end point coordinate of an outer common tangent between the first right-turn constraint circle and the second right-turn constraint circle according to the third center coordinates, the fourth center coordinates, the minimum turning radius and the second center distance by a rotation matrix method; taking the right-turn start point to the second common tangent start point as a second start circular arc, the second common tangent start point to the second common tangent end point as a second common tangent segment, and the second common tangent end point to the right-turn end point as a second end circular arc, and constructing a right-turn path corresponding to the picking robot based on the second start circular arc, the second common tangent segment and the second end circular arc.
5. The pineapple harvesting robot head turn control method of claim 1, wherein, The steps of determining a three-dimensional point cloud map corresponding to the pineapple field to be picked include: controlling the picking robot to drive along the periphery of the pineapple field to be picked to obtain inertial measurement unit data of the picking robot when driving along the periphery of the pineapple field to be picked, and three-dimensional point cloud data corresponding to each pineapple field row; controlling the picking robot to drive along the periphery of the pineapple field to be picked to obtain inertial measurement unit data of the picking robot when driving along the periphery of the pineapple field to be picked, and three-dimensional point cloud data corresponding to each pineapple field row; constructing a three-dimensional point cloud map corresponding to the pineapple field to be picked according to the inertial measurement unit data and the three-dimensional point cloud data based on a preset SLAM algorithm.
6. The pineapple harvesting robot head turn control method of claim 1, wherein, The step of generating the straight picking path of the picking robot in the current pineapple field ridge based on the mask image includes: inputting the pineapple field image to be picked into a ridge segmentation model trained to a convergent state for semantic segmentation to separate the pineapple field ridge area and the background area in the pineapple field image to be picked, and obtaining the mask image corresponding to the current pineapple field ridge; performing binaryzation processing on the mask image, setting pixels in the pineapple field ridge area to 255 and pixels in the background area to 0, establishing an image coordinate system with the upper left corner of the pineapple field image to be picked as a coordinate origin, a horizontal right direction as a horizontal axis and a vertical downward direction as a vertical axis, scanning pixels row by row in the image coordinate system, and extracting left edge information points with pixel values changing from 0 to 255 and right edge information points with pixel values changing from 255 to 0; performing denoising processing on the left edge information points and the right edge information points by using a sliding filter algorithm to constrain the coordinate deviation of adjacent edge information points to be less than a preset pixel change threshold. The basic network architecture of the ridge segmentation model includes a YOLOv11n-seg model, and the picking robot is a crawler-type picking robot.
7. The pineapple harvesting robot corner turn control method according to any one of claims 1 to 6, characterized by, The step of generating the straight picking path of the picking robot in the current pineapple field ridge based on the mask image includes:
8. A pineapple harvesting robot head turn control device, characterized by, inputting the pineapple field image to be picked into a ridge segmentation model trained to a convergent state for semantic segmentation to separate the pineapple field ridge area and the background area in the pineapple field image to be picked, and obtaining the mask image corresponding to the current pineapple field ridge; performing binaryzation processing on the mask image, setting pixels in the pineapple field ridge area to 255 and pixels in the background area to 0, establishing an image coordinate system with the upper left corner of the pineapple field image to be picked as a coordinate origin, a horizontal right direction as a horizontal axis and a vertical downward direction as a vertical axis, scanning pixels row by row in the image coordinate system, and extracting left edge information points with pixel values changing from 0 to 255 and right edge information points with pixel values changing from 255 to 0; performing denoising processing on the left edge information points and the right edge information points by using a sliding filter algorithm to constrain the coordinate deviation of adjacent edge information points to be less than a preset pixel change threshold. The basic network architecture of the ridge segmentation model includes a YOLOv11n-seg model, and the picking robot is a crawler-type picking robot. The step of generating the straight picking path of the picking robot in the current pineapple field ridge based on the mask image includes: inputting the pineapple field image to be picked into a ridge segmentation model trained to a convergent state for semantic segmentation to separate the pineapple field ridge area and the background area in the pineapple field image to be picked, and obtaining the mask image corresponding to the current pineapple field ridge; performing binaryzation processing on the mask image, setting pixels in the pineapple field ridge area to 255 and pixels in the background area to 0, establishing an image coordinate system with the upper left corner of the pineapple field image to be picked as a coordinate origin, a horizontal right direction as a horizontal axis and a vertical downward direction as a vertical axis, scanning pixels row by row in the image coordinate system, and extracting left edge information points with pixel values changing from 0 to 255 and right edge information points with pixel values changing from 255 to 0; performing denoising processing on the left edge information points and the right edge information points by using a sliding filter algorithm to constrain the coordinate deviation of adjacent edge information points to be less than a preset pixel change threshold. The turning path determination module is configured to trigger a U-turn mode and take the current position point as a turning start point when a Euclidean distance between the current position point of the picking robot and the headland turning marker point is less than a preset distance threshold, and to generate a left turning path or a right turning path of the picking robot in a current pineapple field ridge row based on a preset Dubins algorithm according to the turning start point, a turning end point and a minimum turning radius of the picking robot. The obstacle detection module is configured to control the picking robot to alternately drive along the left turning path and the right turning path in sequence, to call a depth camera to extract three-dimensional point cloud data of a target obstacle during turning, to determine that the target obstacle is located on the left turning path or the right turning path, to pause turning and issue a sound and light alarm, and to resume picking work until the target obstacle is removed to complete field headland turning control of the pineapple picking robot.
9. An electronic device comprising a central processing unit and a memory, characterized in that The central processing unit is configured to call a computer program stored in the memory to execute steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored in the form of computer readable instructions and is implemented according to the method of any one of claims 1 to 7, and when the computer program is called and run by a computer, steps included in the corresponding method are executed.