Self-adaptive control method and device for mowing robot, mowing robot and medium
By using lidar to collect 3D point cloud data to generate 2D feature images and perform environmental status recognition, the accuracy and cost issues of rainfall detection for lawn mowing robots have been solved. This enables precise adaptive operation control of lawn mowing robots, improving the stability and safety of the equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGTING INTELLIGENT TECHNOLOGY (SUZHOU) CO LTD
- Filing Date
- 2026-03-24
- Publication Date
- 2026-05-19
AI Technical Summary
Existing lawn mowing robots suffer from low accuracy and high cost in rainfall detection, making it difficult to achieve efficient and reliable adaptive operation control.
By collecting 3D point cloud data with LiDAR, generating 2D feature images, and using a pre-trained environmental state recognition model to identify the environmental state, the lawnmower robot can be directly controlled to execute the corresponding operation strategy without the need for additional sensing hardware.
It improves the reliability of rainfall detection, enables precise adaptive operation control of the lawnmower robot, ensures the stability and safety of the equipment during outdoor operations, and reduces maintenance costs.
Smart Images

Figure CN122056166A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lawn mowing robot technology, specifically to an adaptive control method, device, lawn mowing robot, and medium for a lawn mowing robot. Background Technology
[0002] With the increasing popularity of intelligent outdoor work equipment, lawn mowing robots have been widely used in courtyards, lawns, and other settings, enabling autonomous walking and unmanned mowing operations. Since lawn mowing robots operate in open-air environments for extended periods, weather changes such as rainfall directly impact their operational safety and continuity. Therefore, accurate identification of environmental conditions and the execution of adaptive operation control are core requirements for ensuring the stable and reliable operation of lawn mowing robots.
[0003] Currently, the industry commonly uses external, independent raindrop sensors for rain detection and operation control of lawnmower robots. These sensors acquire rainfall signals by adding a dedicated raindrop sensor to the robot's body, and the main control system uses this signal to directly decide whether to trigger the robot to return to the base station for shelter or continue operation. However, this traditional solution has several drawbacks in practical applications. Firstly, raindrop sensors are easily interfered with by external debris such as dew, fog, and grass clippings, making it difficult to accurately distinguish between rain and non-rain conditions, thus compromising the accuracy of the detection results. Secondly, dedicated raindrop sensors are additional hardware components, increasing the overall production cost of the robot and making it prone to aging and damage during long-term outdoor use, significantly increasing maintenance costs. In summary, existing environmental detection and operation control solutions for lawnmower robots suffer from low detection accuracy and high cost, making it difficult to support efficient and reliable adaptive operation control.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the Invention
[0005] This application provides an adaptive control method, device, lawnmower, and storage medium for a lawnmower robot, which can improve the reliability of rainfall detection and achieve precise adaptive operation control of the lawnmower robot without adding additional sensing hardware.
[0006] In a first aspect, embodiments of this application provide an adaptive control method for a lawnmower robot, including: Acquire 3D point cloud data of the lawnmower robot in its working environment using LiDAR; Based on the three-dimensional point cloud data, a corresponding two-dimensional feature image is generated; The two-dimensional feature image is input into a pre-trained environmental state recognition model to generate an environmental state recognition result of the current environment of the lawnmower robot. Based on the environmental state recognition results, the lawnmower is controlled to execute the corresponding preset operation strategy.
[0007] Furthermore, in some embodiments of this application, the three-dimensional point cloud data includes spatial coordinate information and laser reflection intensity information for each point, and the method further includes preprocessing the three-dimensional point cloud data to remove invalid points and retain only valid points on the radar shell.
[0008] Furthermore, in some embodiments of this application, generating a corresponding two-dimensional feature image based on the three-dimensional point cloud data includes: The acquired multi-frame 3D point cloud data is accumulated to obtain the accumulated point cloud data; Each point in the accumulated point cloud data is transformed into coordinates and mapped to a two-dimensional plane to obtain the projected pixel coordinates of each point. Based on the projected pixel coordinates, each point in the accumulated point cloud data is assigned to a preset two-dimensional grid to construct a projected grid; A two-dimensional feature image is generated based on the laser reflection intensity information of each point assigned to each projection grid.
[0009] Furthermore, in some embodiments of this application, the method further includes: When the number of frames of accumulated multi-frame 3D point cloud data has not reached the preset frame threshold, the next frame of 3D point cloud data is acquired for accumulation. When the number of accumulated frames reaches the preset frame threshold, the accumulated multi-frame 3D point cloud data is used as the accumulated point cloud data, and the coordinate transformation step of each point in the accumulated point cloud data is performed.
[0010] Furthermore, in some embodiments of this application, the step of transforming the coordinates of each point in the accumulated point cloud data and mapping it to a two-dimensional plane to obtain the projected pixel coordinates corresponding to each point includes: The three-dimensional spatial coordinates of each point in the accumulated point cloud data are converted into coordinates in the polar coordinate system to obtain the projection radius and projection angle corresponding to each point. Map the projection radius and projection angle in the polar coordinate system to the Cartesian plane coordinate system to obtain the position coordinates of each point in the temporary plane. The position coordinates in the temporary plane are translated to the center of the preset projection image to obtain the projected pixel coordinates of each point on the two-dimensional plane.
[0011] Furthermore, in some embodiments of this application, generating a two-dimensional feature image based on the laser reflection intensity information assigned to each point within each projection grid includes: The intensity values of all points falling within each projection grid are summed to obtain the cumulative intensity value of the projection grid. Count the number of valid points falling within each projected grid, where a valid point is a point with an intensity value greater than zero; Based on the accumulated intensity value and the number of valid points, the average intensity value of each projected grid is calculated to form a two-dimensional intensity distribution matrix; The two-dimensional intensity distribution matrix is converted into a two-dimensional feature image.
[0012] Furthermore, in some embodiments of this application, converting the two-dimensional intensity distribution matrix into a two-dimensional feature image includes: Each average intensity value in the two-dimensional intensity distribution matrix is mapped to a gray value to generate a grayscale image; For the projection grid regions in the grayscale image that are not covered by any points, a preset fixed grayscale value is filled.
[0013] Furthermore, in some embodiments of this application, converting the two-dimensional intensity distribution matrix into a two-dimensional feature image includes: According to the preset color mapping rules, each average intensity value in the two-dimensional intensity distribution matrix is mapped to the corresponding color value to generate a color visualization image.
[0014] Furthermore, in some embodiments of this application, the step of inputting the two-dimensional feature image into a pre-trained environmental state recognition model to generate an environmental state recognition result of the current environment of the lawnmower robot includes: The two-dimensional feature image is input into a pre-trained neural network model, and the image features of the two-dimensional feature image are extracted through the multi-layer convolutional structure of the neural network model; Based on the extracted image features, the classification layer of the neural network model outputs the probability distribution of the two-dimensional feature image belonging to a preset category; Based on the probability distribution, it is determined whether the current environment of the lawnmower robot is in a rainy or non-rainy state.
[0015] Furthermore, in some embodiments of this application, the training method of the neural network model includes: Multiple two-dimensional feature image samples collected in history are obtained, and each two-dimensional feature image sample is labeled with a corresponding rainfall state label or non-rainfall state label to form a training dataset; Data augmentation processing is performed on each two-dimensional feature image sample in the training dataset to obtain augmented training samples; The enhanced training samples are input into the initial neural network model, and the loss value between the prediction result output by the initial neural network model and the corresponding label is calculated. Based on the loss value, the parameters of the initial neural network model are adjusted using an optimization algorithm, and the model is iteratively trained until it converges, thus obtaining a trained neural network model.
[0016] Furthermore, in some embodiments of this application, the data augmentation process includes one or more combinations of random horizontal flipping, random vertical flipping, and random rotation. The label-smoothed cross-entropy loss function is used when calculating the loss value; the optimization algorithm is the AdamW optimization algorithm, and the OneCycleLR strategy is used to dynamically adjust the learning rate.
[0017] Furthermore, in some embodiments of this application, controlling the lawnmower robot to execute a corresponding preset operation strategy based on the environmental state recognition result includes: Determine whether the environmental state identification result indicates a rainfall condition; If the judgment result is yes, a return to base station instruction is generated to control the lawnmower robot to interrupt the current lawnmower operation and return to the preset base station; If the judgment result is negative, a maintenance operation instruction is generated to control the lawnmower robot to continue executing the current lawnmower operation strategy.
[0018] Furthermore, in some embodiments of this application, before controlling the lawnmower robot to execute a corresponding preset operation strategy based on the environmental state identification result, the method further includes: The process of repeatedly acquiring 3D point cloud data, generating 2D feature images, and obtaining environmental state recognition results is repeated multiple times to obtain multiple environmental state recognition results. Count the number of times the same state appears in the multiple environmental state identification results; Determine whether the number of times reaches a preset confidence threshold; if yes, then determine the state as the final environmental state identification result, and execute the step of controlling the lawnmower robot to execute the corresponding preset operation strategy based on the environmental state identification result; if no, then re-execute the multi-frame cumulative verification step.
[0019] The confidence threshold is dynamically adjusted according to a preset sensitivity level, wherein the higher the sensitivity level, the lower the corresponding confidence threshold.
[0020] Secondly, embodiments of this application provide an adaptive control device for a lawnmower robot, comprising: The data acquisition module is used to acquire three-dimensional point cloud data collected by the lawnmower robot in the working environment using LiDAR. The image generation module is used to generate a corresponding two-dimensional feature image based on the three-dimensional point cloud data; The environment recognition module is used to input the two-dimensional feature image into a pre-trained environment state recognition model to generate the environment state recognition result of the current environment of the lawnmower robot. The control module is used to control the lawnmower robot to execute the corresponding preset operation strategy based on the environmental state recognition result.
[0021] Thirdly, embodiments of this application provide a lawnmower robot, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the lawnmower robot adaptive control method as described in the first aspect.
[0022] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the lawnmower adaptive control method as described in the first aspect.
[0023] This application provides an adaptive control method, device, lawn mowing robot, and medium for a lawn mowing robot. First, by directly acquiring 3D point cloud data from LiDAR in the lawnmower's operating environment and generating corresponding 2D feature images, environmental state perception input can be achieved without the need for additional dedicated sensing hardware. Then, the 2D feature images are input into a pre-trained environmental state recognition model, which quickly and stably outputs the current environment's recognition results. The model's intelligent discrimination capabilities effectively improve the accuracy of environmental state determination. Finally, based on the recognition results, the lawnmower is directly controlled to execute a pre-set matching operation strategy, ensuring precise adaptation between the device's operational behavior and the actual environmental state. In summary, this application generates 2D feature images from point cloud data collected by LiDAR, uses an environmental state recognition model to identify environmental states, and controls the lawnmower to execute corresponding operation strategies. Without adding additional sensing hardware, it improves the reliability of rainfall detection, achieves precise adaptive operation control of the lawnmower, effectively ensures the stability and safety of the lawnmower during outdoor operations, and reduces subsequent maintenance costs. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is an application environment diagram of the adaptive control method for lawnmower robots provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the adaptive control method for a lawnmower robot provided in an embodiment of this application; Figure 3 This is a schematic diagram of the adaptive control device for a lawnmower robot provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of the lawnmower robot provided in the embodiments of this application. Detailed Implementation
[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of systems and methods consistent with those detailed in the appended claims or with some aspects of this application.
[0027] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover descriptions such as non-exclusive inclusion, so that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0028] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0029] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0030] To address the aforementioned technical problems and overcome the shortcomings of existing technologies, this application provides an adaptive control method, device, lawnmower, and medium for a lawnmower robot. This method can improve the reliability of rainfall detection and achieve precise adaptive operation control of the lawnmower robot without adding additional sensing hardware.
[0031] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of the adaptive control method for a lawn mower robot provided in this application embodiment. The application scenario is a lawn environment, where both the lawn mower robot 1 and base station 2 are located. When the lawn mower robot 1 performs automatic mowing operations in the lawn environment, it acquires three-dimensional point cloud data collected by a LiDAR scanner within the working environment. Based on the three-dimensional point cloud data, the lawn mower robot 1 generates a corresponding two-dimensional feature image. This two-dimensional feature image is then input into a pre-trained environmental state recognition model to generate an environmental state recognition result for the current environment of the lawn mower robot 1. Based on the environmental state recognition result, the lawn mower robot is controlled to execute a corresponding preset operation strategy. For example, it determines whether the environmental state recognition result indicates a rainy condition. If the environmental state recognition result indicates a rainy condition, a return-to-base-station instruction is generated, controlling the lawn mower robot 1 to interrupt the current mowing operation and return to the preset base station 2. If the environmental state recognition result indicates that the environmental state recognition result does not indicate a rainy condition, a maintain-operation instruction is generated, controlling the lawn mower robot 1 to continue executing the current mowing operation strategy, thereby achieving precise adaptive operation control of the lawn mower robot.
[0032] Please see Figure 2 , Figure 2 This is a flowchart illustrating an adaptive control method for a lawnmower robot according to an embodiment of this application. Specifically, the adaptive control method for a lawnmower robot according to an embodiment of this application may include the following steps: S1. Acquire 3D point cloud data collected by the lawnmower robot in the working environment using LiDAR; Furthermore, in some embodiments, the three-dimensional point cloud data includes spatial coordinate information and laser reflection intensity information for each point. The method also includes preprocessing the three-dimensional point cloud data to remove invalid points and retain only the valid points on the radar shell.
[0033] Specifically, in step S1, when the lawnmower robot is autonomously performing mowing or path walking in various outdoor work scenarios such as courtyard lawns, community green spaces, and park lawns, its onboard LiDAR continuously performs a 360° all-around three-dimensional laser scan of the working environment. By emitting laser pulses and receiving reflected signals, it collects and outputs three-dimensional point cloud data containing spatial coordinate information and laser reflection intensity information in real time. The three-dimensional point cloud data is the robot's raw perception data of the external environment, and the entire process is completed solely by the onboard LiDAR, without the need for additional dedicated environmental detection sensors. After the data collection is completed, the three-dimensional point cloud data can also be preprocessed. Invalid point cloud data in the scene is removed through data filtering logic, retaining only the valid point cloud data in the LiDAR shell area, filtering out irrelevant data interference, and ensuring the purity of the data for subsequent processing.
[0034] For example, when a lawnmower robot is mowing a lawn at a normal speed, the lidar continuously emits tens of thousands of laser pulses per second to collect the three-dimensional coordinates and reflection intensity data of the ground, grass, and airborne particles in the working area, forming a continuous three-dimensional point cloud data stream. At the same time, it automatically filters out invalid points that are too far away or have no practical reference significance, and only retains the effective point cloud on the surface of the lidar shell, providing accurate raw data for subsequent processing.
[0035] S2. Generate the corresponding two-dimensional feature image based on the three-dimensional point cloud data; Specifically, in step S2, using the 3D point cloud data acquired and preprocessed by the LiDAR as the sole processing basis, core information such as environmental spatial features and reflection intensity features contained in the 3D point cloud data is extracted, integrated, and converted in format. The point cloud data, originally stored in a 3D spatial form, is transformed into a 2D image conforming to image data format and readable and analyzable by intelligent recognition models. This ultimately generates a 2D feature image that fully characterizes the core features of the current working environment. This 2D feature image is a standardized image conversion result of the 3D point cloud data, which can intuitively present the key features of the environment, providing a standardized and resolvable image data carrier for subsequent environmental state recognition. For example, based on the core features contained in the 3D point cloud data, such as spatial distribution patterns and differences in laser reflection intensity, a 2D feature image that clearly reflects the current environmental state is generated through data conversion and feature mapping processing, transforming abstract point cloud data into concrete image data that can be used for intelligent recognition.
[0036] S3. Input the two-dimensional feature image into the pre-trained environmental state recognition model to generate the environmental state recognition result of the current environment of the lawnmower robot. Specifically, in step S3, the generated two-dimensional feature image is used as standard input data and fed into an environmental state recognition model that has been pre-trained with a large number of environmental samples and possesses the ability to automatically discriminate environmental features. This model, through its built-in intelligent recognition logic, comprehensively analyzes, matches, and classifies various environmental features in the two-dimensional feature image. Based on the correspondence between image features and environmental states, it accurately analyzes and outputs a state result that truly reflects the current actual working environment of the lawnmower robot, thus completing the automated and intelligent recognition of the environmental state. For example, after inputting the two-dimensional feature image carrying the current environmental features into the trained recognition model, the model performs in-depth analysis and discrimination of the features in the image, ultimately outputting a clear recognition result indicating whether the current working environment is in a rainy or non-rainy state, thus completing the accurate determination of the environmental state.
[0037] S4. Based on the environmental condition recognition results, control the lawnmower robot to execute the corresponding preset operation strategy; Specifically, in step S4, after receiving the final recognition result output by the environmental state recognition model, the central control system of the lawnmower robot matches the environmental state recognition result with the preset operation control strategy according to the pre-set control rules. Based on the matching result, it issues corresponding control commands to the robot's walking module, operation module, communication module, and other actuators, driving the robot to perform operation actions that are fully adapted to the current environmental state. This ensures that the robot's operation behavior is highly adapted to the actual environmental requirements, guaranteeing the safety, stability, and rationality of the equipment's operation in outdoor environments. For example, when the recognition result indicates a rainy condition, the main control system immediately matches a rain avoidance operation strategy, controlling the robot to stop mowing, plan a return path, and drive towards the base station; when the recognition result indicates a non-rainy condition, the main control system matches a normal operation strategy, controlling the robot to maintain the current mowing mode and continue to complete the operation task.
[0038] This embodiment uses the LiDAR built into the lawnmower as the core environmental perception component. Through a complete closed-loop process of 3D point cloud data acquisition and preprocessing, 2D feature image generation, intelligent environmental state model recognition, and adaptive adjustment of operation strategy based on recognition results, the lawnmower achieves autonomous adaptive control based on environmental state. Without the need for additional dedicated environmental detection hardware, the device can accurately perceive environmental changes and automatically adjust its operation behavior, thereby improving the intelligence, environmental adaptability, and operational reliability of the lawnmower in outdoor operations.
[0039] Furthermore, in some embodiments, step S2, "generating a corresponding two-dimensional feature image based on the three-dimensional point cloud data," may specifically include: S21. Accumulate the acquired multi-frame 3D point cloud data to obtain accumulated point cloud data; Specifically, in step S21, when the lawnmower robot is operating outdoors, its onboard LiDAR continuously outputs multiple sets of independent 3D point cloud frames at a fixed frequency. A single frame of point cloud data can only capture instantaneous environmental information, easily resulting in fragmented data and fluctuating features, failing to stably reflect the true state of the environment. Therefore, it is necessary to perform cumulative processing by overlaying and integrating the continuously acquired multi-frame 3D point cloud data. This involves aggregating and fusing information such as the spatial distribution and reflection characteristics of the point clouds within different time frames, weakening the randomness and instantaneous interference of single-frame data, and comprehensively summarizing the effective information from multiple frames to ultimately form cumulative point cloud data that comprehensively and stably reflects the overall characteristics of the environment. For example, if the LiDAR continuously acquires 50 frames of 3D point cloud data during operation, the point cloud information from these 50 frames is overlaid and integrated one by one, fusing the common features of multiple frames and eliminating the occasional fluctuations of single frames, ultimately resulting in more stable cumulative point cloud data.
[0040] S22. Perform coordinate transformation on each point in the accumulated point cloud data and map it to a two-dimensional plane to obtain the projected pixel coordinates of each point; Specifically, in step S22, the accumulated point cloud data is stored in three-dimensional spatial coordinates, containing three-dimensional spatial dimensional information. It cannot be directly used for constructing two-dimensional images and requires coordinate transformation to achieve dimensional adaptation. For each data point in the accumulated point cloud data, a coordinate transformation algorithm is used to convert it from three-dimensional spatial coordinates to two-dimensional planar coordinates. This accurately projects the point cloud data in three-dimensional space onto a two-dimensional plane, determining the pixel position of each point in the two-dimensional plane, ultimately obtaining standardized projected pixel coordinates that can be directly used for image construction. For example, point cloud data with three-dimensional coordinate information in three-dimensional space is converted into projected pixel coordinates containing only the horizontal and vertical position information of the plane through coordinate transformation, completing the accurate mapping from the three-dimensional point cloud to the two-dimensional plane.
[0041] S23. Based on the projected pixel coordinates, assign each point in the accumulated point cloud data to a preset two-dimensional grid to construct the projected grid; Specifically, for step S23, according to the generation standards of two-dimensional feature images, a two-dimensional grid with uniform size and regular cell layout is pre-set as the basic framework for the orderly arrangement of point cloud data. Based on the projected pixel coordinates corresponding to each point in the accumulated point cloud data, all point cloud data are precisely allocated and classified into cells with matching coordinates in the two-dimensional grid, allowing the scattered point cloud data to be arranged in an orderly manner according to the grid layout of the two-dimensional plane. After all point clouds are allocated, a well-structured projection grid that can completely contain all the accumulated point cloud data can be built. For example, a two-dimensional grid composed of evenly distributed square cells is preset. According to the projected pixel coordinates of each point cloud, the point cloud is placed into the grid cell with the corresponding coordinates. After all point clouds are allocated, a well-structured projection grid is formed, providing an orderly data structure for image generation.
[0042] S24. Generate a two-dimensional feature image based on the laser reflection intensity information of each point assigned to each projection grid; Specifically, in step S24, laser reflection intensity information is a core indicator reflecting environmental characteristics in point cloud data. Each cell of the projection grid contains laser reflection intensity data for the corresponding point cloud. Using the laser reflection intensity within each projection grid cell as the core basis for generation, the intensity values are converted into visual features of the image. Then, according to the overall layout of the projection grid, the visual features of all cells are integrated and stitched together to form complete image data. This image data fully carries the core reflection features of the accumulated point cloud and can clearly characterize the environmental state, thus becoming the target two-dimensional feature image. For example, the laser reflection intensity values within each projection grid cell are converted into corresponding image grayscale features. Higher reflection intensity corresponds to brighter grayscale, and lower reflection intensity corresponds to darker grayscale. After integrating the grayscale features of all grids, a complete two-dimensional feature image is generated.
[0043] This embodiment uses a complete process of multi-frame point cloud accumulation, coordinate projection transformation, grid allocation and arrangement, and image generation based on laser reflection intensity to stably transform scattered and fluctuating three-dimensional point cloud data into two-dimensional feature images with complete features and standard format. This effectively improves the stability of image data and the ability to represent the environment, providing an accurate and reliable image data foundation for subsequent environmental state recognition.
[0044] Furthermore, in some embodiments, the adaptive control method for the lawnmower robot also includes: S25. When the number of frames of accumulated multi-frame 3D point cloud data has not reached the preset frame threshold, continue to acquire the next frame of 3D point cloud data for accumulation; S26. When the accumulated number of frames reaches the preset frame threshold, the accumulated multi-frame 3D point cloud data is used as the accumulated point cloud data, and the coordinate transformation step of each point in the accumulated point cloud data is performed.
[0045] Specifically, the method provided in this embodiment also includes, during the process of performing cumulative processing on the multi-frame 3D point cloud data acquired by the lidar, continuously and accurately counting the total number of frames of 3D point cloud data that have been accumulated, and comparing the actual accumulated frame count with the pre-set frame count threshold in real time. By using quantitative comparison, it is determined whether the current accumulated data volume meets the basic requirements for subsequent processing, providing a clear basis for judgment for subsequent operation branches.
[0046] If, after the above comparison, it is determined that the number of accumulated 3D point cloud data frames is less than the preset frame threshold, it indicates that the current accumulated data volume is insufficient to provide stable and comprehensive environmental feature information for subsequent processing. In this case, the system will not interrupt the accumulation process, but will continue to control the LiDAR to acquire the next frame of 3D point cloud data and incorporate this frame of data into the already accumulated data, continuously advancing the accumulation process until the accumulated frame number meets the threshold requirement. For example, if the current accumulated 3D point cloud data frame number is 30 frames, which has not reached the preset threshold of 50 frames, the system will continue to acquire the 31st frame, 32nd frame, and so on, and accumulate them sequentially without performing subsequent coordinate transformation operations.
[0047] If, after comparison, it is determined that the number of accumulated 3D point cloud data frames is equal to or exceeds a preset frame threshold, it indicates that the current accumulated data volume is sufficient to support subsequent processing and can stably reflect the true characteristics of the environment. At this point, the system stops new point cloud data acquisition and accumulation operations, officially confirms all the currently accumulated multi-frame 3D point cloud data as the final accumulated point cloud data, and immediately initiates the coordinate transformation processing flow for this accumulated point cloud data. For example, when the number of accumulated 3D point cloud data frames reaches the preset threshold of 50 frames, the system no longer acquires new frame data, uses the accumulated point cloud data formed by integrating these 50 frames as the processing object, and begins to perform coordinate transformation operations on each point within it.
[0048] This embodiment uses a preset frame number threshold to quantitatively control the accumulation process of multiple frames of 3D point cloud data, ensuring that the accumulated point cloud data has sufficient data volume and stable environmental characteristics. This avoids the problem of incomplete data features and large fluctuations due to insufficient accumulated frames, and provides standard-compliant and reliable accumulated point cloud data for subsequent coordinate transformation processing.
[0049] Furthermore, in some embodiments, step S22, "transforming the coordinates of each point in the accumulated point cloud data and mapping it to a two-dimensional plane to obtain the projected pixel coordinates corresponding to each point," may specifically include: S221. Convert the three-dimensional spatial coordinates of each point in the accumulated point cloud data to coordinates in the polar coordinate system to obtain the projection radius and projection angle of each point; Specifically, for step S221, Each point in the accumulated point cloud data records its position information in three-dimensional spatial coordinates, which cannot be directly used for two-dimensional planar projection. A coordinate system transformation is required first. Through coordinate operations, the three-dimensional spatial coordinates of each point are transformed to a polar coordinate system. Redundant three-dimensional depth information is removed, and the projection radius (the straight-line distance from the point to the projection center) and projection angle (the azimuth angle of the point relative to the projection center) of the point on the projection plane are extracted. These two parameters completely characterize the point's position in polar coordinates, providing core basic parameters for subsequent planar coordinate mapping. For example, after polar coordinate transformation, the three-dimensional spatial coordinates of a point yield polar coordinate parameters with a projection radius of 60 units and a projection angle of 45°, accurately determining the point's position in the polar coordinate system.
[0050] S222. Map the projection radius and projection angle in the polar coordinate system to the Cartesian plane coordinate system to obtain the position coordinates of each point in the temporary plane; Specifically, for step S222, the polar coordinate form does not conform to the coordinate positioning rules of a two-dimensional image, and it is necessary to further convert the polar coordinate parameters into rectangular coordinate form. Based on the obtained projection radius and projection angle, trigonometric function operations are used to complete the mapping from polar coordinates to the Cartesian plane coordinate system (rectangular coordinate system), converting the polar coordinate parameters into horizontal and vertical coordinate values in the Cartesian plane, obtaining the temporary position coordinates of the point in the temporary two-dimensional plane, and completing the coordinate form adaptation conversion. For example, the polar coordinate parameters with a projection radius of 60 and a projection angle of 45° are converted into temporary position coordinates (x_temp, y_temp) in the Cartesian plane coordinate system through sine and cosine functions.
[0051] S223. Translate the position coordinates in the temporary plane to the center of the preset projection image to obtain the projected pixel coordinates of each point on the two-dimensional plane; Specifically, in step S223, since the origin of the temporary plane coordinates is offset from the center of the preset projection image, direct use would cause the point cloud projection position to deviate from the image center. Therefore, it is necessary to perform translation correction on the temporary position coordinates. Using the center of the preset projection image as a reference point, the position coordinates in the temporary plane are translated as a whole to ensure the origin of the coordinates is perfectly aligned with the center of the projection image, eliminating coordinate offset errors. This results in standard, regular projected pixel coordinates for the point on the two-dimensional projection plane. For example, the temporary position coordinates (x_temp, y_temp) are translated and corrected using the center of the 224×224 projected image as a reference, ultimately yielding standard projected pixel coordinates (x, y) that can be directly used for image construction.
[0052] This embodiment accurately completes the projection transformation of the accumulated point cloud from three-dimensional space to a two-dimensional plane through a coherent transformation process of converting three-dimensional spatial coordinates to polar coordinates, mapping polar coordinates to the Cartesian plane, and aligning coordinates with the image center. This ensures that the projected pixel coordinates are accurate and without offset, adapts to the image format, and provides standard and reliable coordinate data support for the subsequent construction of the two-dimensional projection mesh.
[0053] Furthermore, in some embodiments, step S24, "generating a two-dimensional feature image based on the laser reflection intensity information assigned to each point within each projection grid," may specifically include: S241. Accumulate the intensity values of all points falling within each projected grid to obtain the accumulated intensity value of the projected grid; Specifically, in step S241, the projection grid consists of multiple regularly and evenly arranged independent cells. Each cell contains several point data points from the accumulated point cloud, and each point data point has a corresponding laser reflection intensity value. For each cell in the projection grid, the laser reflection intensity values of all point cloud points within that cell are iterated, and these intensity values are continuously summed to obtain a total value. This total value is the intensity accumulation value corresponding to the current projection grid cell. By accumulating, the intensity feature information of all points within the cell can be completely collected. For example, if a projection grid cell contains 6 point cloud data points with corresponding laser reflection intensity values of 12, 18, 22, 15, 20, and 13, these values are successively accumulated: 12 + 18 + 22 + 15 + 20 + 13 = 100. The intensity accumulation value of this cell is 100.
[0054] S242. Count the number of valid points falling within each projected grid, where a valid point is a point with an intensity value greater than zero; Specifically, in step S242, the point cloud data within the projected grid cells may contain invalid data, failing to accurately reflect environmental characteristics. Therefore, validity screening is necessary. Using a laser reflection intensity value greater than zero as the sole criterion for valid points, each point cloud data point within the cell is checked one by one. Valid points meeting the criteria are selected, and then the number of valid points in the current cell is precisely counted. This process eliminates data interference from invalid points at the source, ensuring the accuracy of subsequent calculations. For example, if a projected grid cell contains 7 point cloud data points with intensity values of 0, 9, 16, 0, 21, 14, and 11, according to the valid point determination rules, the points with intensity values greater than zero are 9, 16, 21, 14, and 11, totaling 5. Therefore, the number of valid points in this cell is 5.
[0055] S243. Based on the cumulative intensity value and the number of valid points, calculate the average intensity value of each projected grid to form a two-dimensional intensity distribution matrix; Specifically, in step S243, after obtaining the cumulative intensity value and the number of valid points for a single projected grid cell, a division operation is performed with the cumulative intensity value as the dividend and the number of valid points as the divisor to obtain the average intensity value of the point cloud within that cell. This value can stably and objectively characterize the overall laser reflection characteristics of all point clouds within the cell. After the average intensity value has been calculated for all projected grid cells, all average intensity values are arranged in an orderly manner according to the original two-dimensional row and column arrangement rules of the projected grid, forming a two-dimensional data array covering the entire projected area. This array is the two-dimensional intensity distribution matrix, which completely records the intensity characteristic distribution of the entire area in numerical form. For example, if the cumulative intensity value of a cell is 100 and the number of valid points is 5, the calculated average intensity value is 100 ÷ 5 = 20. The average intensity values of all cells are arranged sequentially according to the row and column order of the grid, ultimately forming a complete two-dimensional intensity distribution matrix.
[0056] S244. Convert the two-dimensional intensity distribution matrix into a two-dimensional feature image; Specifically, in step S244, the two-dimensional intensity distribution matrix is merely a pure numerical array and cannot be directly processed by the subsequent recognition module. Therefore, a format conversion from numerical to image is required. Following a preset numerical-to-image feature mapping rule, the average intensity value at each position in the two-dimensional intensity distribution matrix is converted into corresponding image pixel features. Then, strictly adhering to the two-dimensional arrangement structure of the matrix, all pixel features are stitched together to ultimately generate a two-dimensional feature image that intuitively and completely reflects the distribution characteristics of environmental laser reflection intensity, thus completing the conversion from a numerical matrix to standardized image data. For example, the average intensity values in the two-dimensional intensity distribution matrix are mapped to corresponding pixel grayscale features according to their magnitude. Higher intensity values result in brighter pixel grayscale, while lower values result in darker pixel grayscale. The overall stitching forms a two-dimensional feature image that can be used for subsequent recognition.
[0057] This embodiment generates a two-dimensional intensity distribution matrix by intensity accumulation, effective point screening and statistics, and average intensity calculation. The matrix is then converted into a two-dimensional feature image, effectively eliminating invalid point interference, stably extracting the core intensity features of the projected grid, and generating a standardized two-dimensional feature image with clear features and reliable data, providing an accurate image data foundation for subsequent environmental state recognition.
[0058] Furthermore, in some embodiments, step S244, "converting the two-dimensional intensity distribution matrix into a two-dimensional feature image," may specifically include: Each average intensity value in the two-dimensional intensity distribution matrix is mapped to a gray value to generate a grayscale image; For the projection grid areas in the grayscale image that are not covered by any points, fill them with a preset fixed grayscale value.
[0059] Specifically, in step S244, the two-dimensional intensity distribution matrix is a numerical array composed of the average intensity values of all projected grids, arranged in the original two-dimensional row and column order of the grids. Each matrix position uniquely corresponds to the average intensity value of a projected grid. According to a pre-defined mapping rule between numerical values and grayscale values, the average intensity value at each position in the matrix is converted one by one into the grayscale value of the corresponding pixel in the grayscale image. The magnitude of the average intensity value corresponds one-to-one with the brightness of the grayscale pixel according to the rule. After completing the conversion and mapping of all numerical values to grayscale, a basic grayscale image containing only the point cloud coverage area is formed. This image visually represents the average intensity distribution characteristics of the entire point cloud area through the difference in grayscale brightness. For example, a pre-defined positive correlation mapping between average intensity values and grayscale values is used, with the average intensity value range being 0-60 and the grayscale value range being 0-255. If the average intensity value of a certain projected grid is 30, it is mapped to a grayscale value of 128; if the average intensity value of another grid is 50, it is mapped to a grayscale value of 212. After completing the grayscale conversion of all matrix values in sequence, a basic grayscale image is generated.
[0060] Furthermore, since some projected grids in the base grayscale image have no point cloud data falling into them, these areas lack corresponding grayscale pixels in the base grayscale image, presenting a blank state, which affects the integrity of the image and the standardization of subsequent recognition. By pre-setting a uniform fixed grayscale value as the filling standard, the entire projected grid area of the base grayscale image is traversed to accurately identify the blank grids not covered by the point cloud. The preset fixed grayscale value is then filled into these blank positions, ensuring that all grid areas of the grayscale image have complete grayscale pixels, eliminating image blankness defects, and forming a final grayscale feature image with regular size and complete data. For example, if the preset fixed filling grayscale value is 4, after traversal, 8 projected grids in the edge region of the grayscale image are detected as blank areas without point cloud coverage. These blank grids are uniformly filled with a grayscale value of 4, ultimately resulting in a grayscale image without missing pixels and with complete format.
[0061] This embodiment generates grayscale images through numerical mapping and fills blank areas with fixed values. This not only clearly presents the point cloud intensity distribution characteristics in grayscale form, but also ensures that the grayscale images are complete and without missing parts, and that the format is standardized. This provides complete and clearly defined grayscale image data for subsequent environmental state recognition.
[0062] Furthermore, in some embodiments, step S24, "converting the two-dimensional intensity distribution matrix into a two-dimensional feature image," may specifically include: According to the preset color mapping rules, each average intensity value in the two-dimensional intensity distribution matrix is mapped to the corresponding color value to generate a color visualization image.
[0063] Specifically, in addition to converting to grayscale, step S24 can also convert the two-dimensional intensity distribution matrix into a color image. Before performing the image conversion operation, based on the requirements for visual differentiation of environmental features, standardized mapping rules between average intensity values and color values are pre-defined. A fixed correspondence is established between the average intensity of different numerical ranges in the two-dimensional intensity distribution matrix and different color parameters (such as RGB color values, hue, saturation, etc.), allowing different intensity features to be intuitively distinguished through differentiated colors, providing a unified basis for subsequent color conversion. Following the inherent row and column arrangement order of the two-dimensional intensity distribution matrix, the average intensity value corresponding to each grid position within the matrix is completely traversed and read, ensuring coverage of intensity data for all grids, providing a comprehensive and complete numerical foundation for generating a full-area color image. For each average intensity value obtained through traversal, the preset color mapping rules are strictly followed, matching and converting it into the corresponding color parameter value in the rules, transforming abstract intensity numerical features into intuitive visual color features, so that the intensity information of each grid is accurately presented in color form. All converted color values are systematically combined and stitched together according to the original row and column positions and grid layout of the two-dimensional intensity distribution matrix, so that each color value corresponds to a specific pixel position in the visualization image, ultimately forming a complete color visualization image with regular size and perfectly matched color and intensity distribution.
[0064] For example, the preset mapping rule is that average intensity values of 0-15 correspond to dark blue, 16-35 to cyan, 36-60 to orange-yellow, and above 60 to bright red. Different intensity ranges are matched with highly recognizable colors to clearly distinguish intensity differences. For a 224×224 two-dimensional intensity distribution matrix, the average intensity value of each grid is read sequentially from the first row to the last row and from the first column to the last column to complete the full matrix data traversal. If the average intensity value of a grid is 30, it is matched with cyan according to the rule; if the average intensity value of another grid is 55, it is matched with orange-yellow according to the rule, and so on, completing the color conversion for all values one by one. The color values corresponding to all grids are arranged and stitched together in a 224×224 matrix layout to generate a color visualization image that can intuitively show the differences in intensity distribution in different areas.
[0065] This embodiment transforms the abstract two-dimensional intensity distribution matrix into an intuitive color visualization image, clearly presenting the intensity distribution characteristics of the entire area with color differences, making it easy to intuitively view, debug, and analyze environmental status information.
[0066] Furthermore, in some embodiments, step S3, "inputting the two-dimensional feature image into a pre-trained environmental state recognition model to generate an environmental state recognition result of the current environment in which the lawnmower robot is located," may specifically include: S31. Input the two-dimensional feature image into a pre-trained neural network model, and extract the image features of the two-dimensional feature image through the multi-layer convolutional structure of the neural network model; Specifically, in step S31, a two-dimensional feature image that fully characterizes the core features of the lawnmower robot's working environment is input as standard input data into a pre-trained neural network model capable of environmental state discrimination. This model incorporates a multi-layer convolutional structure, which scans, filters, and mines the input two-dimensional feature image layer by layer. It progressively extracts features from the image's basic texture and local details to the overall environmental representation, accurately selecting key image features related to the environmental state and filtering out redundant information without discriminative significance, providing core feature support for subsequent classification. For example, after inputting the two-dimensional feature image reflecting the current working environment into the neural network model, the model's multiple convolutional layers sequentially scan the entire image, extracting key information such as reflection features and particle distribution features related to rainfall, while removing irrelevant background and edge redundancy features.
[0067] S32. Based on the extracted image features, the classification layer of the neural network model outputs the probability distribution of the two-dimensional feature image belonging to the preset category; Specifically, in step S32, the neural network model transmits the core image features extracted in the previous step to the model's classification layer. The classification layer performs classification operations on the image features based on the correspondence logic between features learned during model training and environmental categories, calculating the probability value of each preset environmental category for the two-dimensional feature image. The probability values of all preset categories are combined to form a complete probability distribution, intuitively reflecting the likelihood of the image belonging to each environmental state category. For example, if the preset environmental state categories are rainfall and non-rainfall, the classification layer, after calculating based on the extracted image features, outputs a probability of 0.93 for rainfall and 0.07 for non-rainfall. This set of values represents the probability distribution of the current image's category.
[0068] S33. Based on the probability distribution, determine whether the current environment of the lawnmower robot is in a rainy or non-rainy state; Specifically, in step S33, the probability distribution results of the categories output by the classification layer are numerically compared and judged. The preset category with the highest probability value is selected as the final judgment result, thereby accurately determining the current environmental state of the lawnmower robot and completing the automated intelligent recognition of the environmental state. For example, comparing the probability distribution values of 0.93 for the rainy state and 0.07 for the non-rainy state, the probability of the rainy state is much higher than that of the non-rainy state. Therefore, it is determined that the lawnmower robot is currently in a rainy state.
[0069] This embodiment extracts image features through a neural network model, and then determines the environmental state by outputting the category probability distribution through a classification layer. This enables intelligent and accurate identification of the lawnmower robot's operating environment, and can quickly and reliably determine whether the environment is raining or not, providing an accurate environmental state basis for subsequent robot operation control.
[0070] Furthermore, in some embodiments, the training method of the neural network model may specifically include: S51. Obtain multiple two-dimensional feature image samples collected in history. Each two-dimensional feature image sample is labeled with a corresponding rainfall state label or non-rainfall state label to form a training dataset. Specifically, for step S51, a large number of two-dimensional feature image samples generated by the lawnmower robot under different outdoor environments and weather conditions are collected in advance, covering typical environmental scenarios such as rain and no rain, to ensure the diversity and representativeness of the samples. For each two-dimensional feature image sample, a unique classification label is assigned according to its actual corresponding environmental state, with the label type divided into rain state label and no rain state label. All labeled two-dimensional feature image samples are summarized and integrated to construct a standardized training dataset for model training, providing a realistic and accurately labeled sample foundation for training the neural network model. For example, 10,000 two-dimensional feature image samples are collected, of which 5,000 are samples generated in rainy environments and labeled with rain labels, and 5,000 are samples generated in rainless environments and labeled with no rain labels. These samples are integrated to form a complete training dataset.
[0071] S52. Perform data augmentation processing on each two-dimensional feature image sample in the training dataset to obtain augmented training samples; the data augmentation processing includes one or more combinations of random horizontal flipping, random vertical flipping, and random rotation. Specifically, in step S52, to improve the generalization ability of the neural network model and avoid overfitting during training, data augmentation transformation is performed on each two-dimensional feature image sample in the training dataset. The augmentation methods include one or more combinations of random horizontal flipping, random vertical flipping, and random rotation. By performing multi-angle and multi-form transformations on the original samples, new samples with the same features as the original samples but different shapes are generated, significantly expanding the quantity and diversity of training samples, resulting in standardized training samples after augmentation. For example, for a given original two-dimensional feature image sample, horizontal flipping and 90° random rotation are performed respectively to generate two new augmented samples. After performing the above augmentation processing on all samples in the dataset sequentially, a more abundant and diverse augmented training sample set is formed.
[0072] S53. Input the enhanced training samples into the initial neural network model, and calculate the loss value between the prediction result output by the initial neural network model and the corresponding labeled label; the label smooth cross-entropy loss function is used when calculating the loss value; Specifically, in step S53, the data-augmented training samples are used as input data and fed into the initial neural network model, which has not been trained and whose initial parameters are set to default values. The model first performs feature extraction and classification prediction on the input samples, outputting the corresponding prediction results. Then, the model's output prediction results are compared with the pre-labeled true labels of the samples. The label smoothing cross-entropy loss function is used to calculate the error value between the prediction results and the true labels. This error value is the current loss value of the model, used to quantify the accuracy of the model's predictions. For example, if the initial model predicts a rainfall probability of 0.6 and a non-rainfall probability of 0.4 for a certain augmented sample, while the true label of the sample is non-rainfall, the loss value of the current model calculated using the label smoothing cross-entropy loss function is 0.32.
[0073] S54. Based on the loss value, adjust the parameters of the initial neural network model using an optimization algorithm, and iterate the training until the model converges to obtain a trained neural network model; the optimization algorithm is the AdamW optimization algorithm, and the OneCycleLR strategy is used to dynamically adjust the learning rate; Specifically, in step S54, the AdamW (Adam with Weight Decay) optimization algorithm is used to optimize and update the internal parameters of the initial neural network model, based on the loss value calculated by the model. Simultaneously, a OneCycleLR (single-cycle learning rate scheduling) learning rate adjustment strategy is employed to dynamically change the learning rate during training, making model parameter updates more efficient and stable. After each parameter update, training samples are re-inputted for prediction and loss calculation, continuously repeating the iterative process of "input samples—prediction—loss calculation—parameter optimization" until the model's loss value stabilizes within a very small range and the prediction accuracy no longer fluctuates significantly, indicating that the model has reached convergence. Finally, a trained neural network model with accurate environmental recognition capabilities is obtained. For example, in the early stages of model training, the learning rate is gradually increased using the OneCycleLR strategy, maintained at the optimal learning rate in the middle stages, and gradually decreased in the later stages. Combined with the AdamW algorithm to continuously adjust the model weights, after 50 rounds of iterative training, the model loss value stabilizes below 0.05, the prediction accuracy reaches 99%, and the model has converged.
[0074] This embodiment employs a complete process of constructing a labeled sample set, data augmentation to expand the samples, label smoothing cross-entropy to calculate the loss, and AdamW algorithm combined with OneCycleLR dynamic parameter tuning and iterative training. This process trains a neural network model with strong generalization ability, high recognition accuracy, and excellent training efficiency, providing a high-performance model foundation for the accurate recognition of the environmental state of lawnmower robots.
[0075] Furthermore, in some embodiments, step S4, "controlling the lawnmower robot to execute the corresponding preset operation strategy based on the environmental state recognition result," may specifically include: S41. Determine whether the environmental status identification result indicates a rainfall condition; Specifically, in step S41, after acquiring the environmental state recognition result, the central control system of the lawnmower robot will accurately analyze and classify the result. It primarily verifies whether the current recognition result matches the pre-set rainfall state standard, distinguishing between rainfall and non-rainfall environmental states through clear classification logic. This provides a clear basis for subsequent execution of corresponding operation control commands, ensuring the accuracy of the control logic. For example, after receiving the environmental state recognition result, the control system quickly determines whether the result belongs to a rainfall state or a non-rainfall state according to preset judgment rules, completing the classification of the current environment of the lawnmower robot.
[0076] S42. If the judgment result is yes, then generate a return to base station command to control the lawnmower robot to interrupt the current lawnmower operation and return to the preset base station; Specifically, in step S42, when the control system determines that the current environmental state is rainy, to prevent rainwater from entering the equipment and to avoid outdoor rain affecting the robot's operational safety, the system will immediately generate a standardized return-to-base station control command. This command will be simultaneously sent to the robot's mowing execution module and walking drive module, first forcibly stopping the currently running workflow such as blade rotation and mowing operations, interrupting all mowing actions, and then driving the robot to plan a path back to the preset base station, controlling the robot to smoothly travel to the base station location, completing the equipment's rain protection operation. For example, after determining that the current environment is rainy, the system generates a return-to-base station command, the robot immediately stops the mowing blade rotation, pauses the current lawn mowing task, automatically plans the optimal route, and travels to the preset charging base station.
[0077] S43. If the judgment result is negative, then generate a maintenance operation instruction to control the lawnmower robot to continue executing the current lawnmower operation strategy; Specifically, in step S43, when the control system determines that the current environmental state is non-rainy, it indicates that the current outdoor working environment meets the safety conditions for continuous lawn mowing, and no adjustment to the work process is required. At this time, the system generates a maintenance control command, which is then sent to each execution module of the robot. The robot maintains all operational parameters, including its current walking speed, mowing mode, and work path, and continues mowing according to the original plan without interruption or alteration of the established work process, ensuring the continuous and efficient progress of the mowing task. For example, after determining that the current environment is non-rainy, the system generates a maintenance control command, and the robot continues to complete the lawn mowing task for the remaining area according to the original mowing route and working mode.
[0078] This embodiment uses a binary judgment of environmental conditions, such as rainfall and non-rainfall, to generate targeted control commands to return to the base station or maintain operation. This allows the lawnmower robot to automatically adapt its operation behavior according to the actual weather conditions. In case of rainfall, it can promptly interrupt the operation and return to the base station to protect the equipment. In case of no rain, it can continuously and stably complete the lawnmower task, achieving a precise match between the operation strategy and the environmental conditions, thus balancing equipment operation safety and lawnmower efficiency.
[0079] Furthermore, in some embodiments, before controlling the lawnmower to execute a corresponding preset operation strategy based on the environmental state identification result, the lawnmower adaptive control method further includes: S301. The process of repeatedly acquiring three-dimensional point cloud data, generating two-dimensional feature images, and obtaining environmental state recognition results is repeated multiple times to obtain multiple environmental state recognition results; Specifically, for step S301, before officially controlling the lawnmower robot to execute the work strategy based on the environmental state recognition results, to avoid random errors in single recognition results, the system will continuously and repeatedly execute the entire environmental state recognition process according to preset rules. Each time a complete recognition process is completed, a corresponding set of environmental state recognition results is generated. By repeatedly executing the process multiple times, multiple sets of independent environmental state recognition results are obtained, providing sufficient sample data for subsequent result verification. For example, if the environmental state recognition process is set to be executed continuously and repeatedly 5 times, 5 sets of recognition results will be obtained in sequence: raining state, raining state, no raining state, raining state, and raining state.
[0080] S302. Count the number of times the same state appears in multiple environmental state identification results; Specifically, in step S302, all environmental state identification results obtained from multiple repeated identifications are centrally sorted and categorized for counting. Based on two core types—rainfall and non-rainfall—the total number of occurrences of each type across multiple sets of results is calculated to quantify the frequency of different environmental states, providing intuitive data support for subsequent confidence level assessments. For example, statistical analysis of the above 5 sets of identification results shows that the rainfall state occurred 4 times, and the non-rainfall state occurred 1 time.
[0081] S303. Determine whether the number of attempts has reached the preset confidence threshold; if yes, then determine the state as the final environmental state recognition result and execute the step of controlling the lawnmower robot to perform the corresponding preset operation strategy based on the environmental state recognition result; if no, then re-execute the multi-frame cumulative verification step. The confidence threshold is dynamically adjusted according to the preset sensitivity level, where a higher sensitivity level corresponds to a lower confidence threshold.
[0082] Specifically, in step S303, if the comparison determines that the frequency of occurrence of a certain environmental state meets the confidence threshold requirement, it indicates that the state is a consistent result after multiple identifications and has high authenticity and credibility. At this time, the system officially determines the state as the final environmental state identification result, and subsequently controls the lawnmower robot to execute the matching operation strategy based on the final result. For example, if the rainfall state occurs 4 times, reaching the preset confidence threshold of 3 times, the system determines the rainfall state as the final environmental state identification result.
[0083] If, after comparison, the number of occurrences of any environmental state fails to reach the preset reliability threshold, it indicates that the multiple identification results are scattered and lack a unified direction, making it impossible to determine the true environmental state. In this case, the system does not output the final identification result but restarts the complete multi-frame cumulative verification process, acquiring multiple sets of identification results again and performing statistical analysis and comparison until a valid result meeting the threshold requirements is obtained. For example, if the five identification results are rain, no rain, rain, no rain, rain, and rain, and rain occurs three times (rain) and twice (no rain), and the preset threshold is four times, neither state meets the standard, the system re-executes the multi-frame cumulative verification process.
[0084] The confidence threshold is set as a dynamically adjustable parameter, its value being directly related to the system's preset sensitivity level. The system offers different sensitivity levels; a higher sensitivity level indicates a more responsive reaction to changes in environmental conditions, corresponding to a lower confidence threshold. Conversely, a lower sensitivity level corresponds to a higher confidence threshold. This dynamic threshold adjustment meets different recognition sensitivity requirements. For example, the system can set three sensitivity levels: high, medium, and low. A high sensitivity level corresponds to a confidence threshold of 2, a medium sensitivity level to 3, and a low sensitivity level to 4.
[0085] This embodiment employs a multi-level verification mechanism involving repeated identification, frequency statistics, and confidence threshold determination, combined with dynamic threshold adjustment based on sensitivity levels. This effectively eliminates random errors in single-time environmental state identification, improves the accuracy and stability of the final identification results, and ensures that the lawnmower robot executes its operational strategy based on real and reliable environmental conditions, thus avoiding malfunctions caused by identification errors.
[0086] To facilitate understanding of the adaptive control method for lawnmowers provided in this embodiment, which is mainly applied to systems including lawnmowers and base stations, the following will describe the specific implementation process: Step 1: Acquisition of LiDAR point cloud data.
[0087] During operation, the lawnmower continuously collects environmental point cloud data using an onboard LiDAR, forming point cloud frames containing spatial coordinates and intensity information. Furthermore, data preprocessing is performed after acquisition, retaining only valid points on the LiDAR housing and discarding invalid points. The intensity information refers to the signal intensity value returned after the laser pulse is reflected from the target surface, which is related to factors such as the target's reflectivity, material, surface roughness, incident angle, and distance, and is an inherent attribute of each point in the LiDAR point cloud.
[0088] Step 2: Accumulated processing of point cloud frames.
[0089] The multi-frame point cloud data output by the lidar is accumulated to enhance the stability of the projection results; where accumulation refers to the intensity accumulation and counting of points continuously collected from different frames at the same pixel.
[0090] If the cumulative number of frames does not reach the preset frame threshold (e.g., 50 frames), the accumulation continues. Once the threshold is reached, step 3 is executed.
[0091] Step 3: Point cloud coordinate transformation.
[0092] Perform the following transformation process on each point in the cumulative point cloud: Step 301: Convert the 3D coordinates of the point cloud from the spherical coordinate system to the polar coordinate system to obtain the projection radius and angle; Step 302: Map the polar coordinates to Cartesian plane coordinates; Step 303: Translate the Cartesian coordinates to the center of the projected image to obtain the projected pixel coordinates (x, y).
[0093] Step 4: Projection mesh construction and statistics.
[0094] Map the projection coordinates obtained in step 3 onto a two-dimensional grid of fixed size. The specific parameters of the fixed size can be that the projection width (kProjectionWidth) and projection height (kProjectionHeight) are both 224 pixels. This size is the size required for the subsequent AI classification model input. And perform the following steps: Step 401: Accumulate the point cloud intensity values within the same grid; Step 402: Count the number of points or valid points in the grid; the criterion for judging a valid point is that the intensity is greater than 0.
[0095] Step 403: Calculate the mean intensity for each grid, that is, sum and average all intensity values in the grid to obtain a two-dimensional intensity distribution matrix.
[0096] Step 5: Generate point cloud projection image.
[0097] The corresponding grayscale and color images are constructed based on the mean intensity, as follows: Step 501: Write the average intensity of each projection grid into the grayscale image by pixel to form the corresponding grayscale distribution; Step 502: For grids not covered by point cloud, fill them with preset gray values to ensure image integrity; Step 503: According to the preset category rules, color-code the average values of different intensities to generate corresponding color projection images for debugging and visualization. Step 504: Output the final point cloud projection grayscale image and color visualization image for subsequent rain recognition and system status analysis.
[0098] Step 6: Rain identification based on classification model.
[0099] The point cloud projection image (grayscale image) obtained in step 5 is input into the pre-trained AI classification model for recognition, including: Step 601: Use EfficientNet to extract features from the image; Step 602: Output the classification result as "Rainy" or "No Rain"; Step 603: Transmit the rainfall status to the lawnmower's main control system.
[0100] Step 7, Lawn mower action decision.
[0101] Based on the classification results of step 6, proceed as follows: Step 701: If it is identified as "no rain", maintain the current lawn mowing strategy; Step 702: If it is identified as "rain", immediately trigger the lawnmower to return to the base station for rain shelter and charging.
[0102] Furthermore, this embodiment addresses the false alarm problem caused by interfering factors such as dew, fog, and grass clippings by designing a dedicated filtering algorithm with tiered sensitivity threshold adjustment and multi-frame result accumulation verification. The algorithm first presets differentiated judgment thresholds corresponding to low, medium, and high sensitivity levels, which can be dynamically adjusted to adapt to different interference scenarios. Then, through multi-frame result accumulation and counting verification, it only determines rain when the rain detection result reaches the threshold, filtering out instantaneous and scattered false features of interfering factors.
[0103] In a specific embodiment, the AI classification model (i.e., the environmental state recognition model) uses EfficientNet-B0 as the core classification model architecture for rain recognition. It adapts to a 224×224 point cloud projection image input size, balancing feature extraction accuracy with the computational efficiency and real-time requirements of in-vehicle embedded devices. The model is designed based on a composite scaling principle, using MBConv (moving inverse bottleneck convolution) as its core backbone module. It integrates depthwise separable convolution and SE attention mechanisms to achieve lightweight feature extraction, effectively reducing the number of parameters and computational load. The number of network input channels supports flexible configuration (single-channel direct input / 6-channel cropped and stacked input), and the output layer is a 2D fully connected layer, adaptable to the "rain / no rain" binary classification task. The class probability is output through the Softmax activation function to complete the final classification. The model supports loading ImageNet pre-trained weights for transfer learning, significantly improving training convergence speed and scene adaptability.
[0104] The specific training process of AI classification models (a) Training environment and basic configuration Framework and Hardware: Training is based on the PyTorch deep learning framework and uses GPU acceleration (supporting single GPU / multi-GPU distributed training) to adapt to the computing power migration requirements of automotive embedded devices; Key parameters: 50 total training epochs, batch size 64, initial learning rate 0.001, weight decay coefficient 1e-4, 4 data loading worker threads, and print training progress every 16 batches.
[0105] (II) Dataset and Data Preprocessing Dataset Construction: A dedicated dataset was constructed based on point cloud projection images acquired by Livox LiDAR. The dataset was divided into training set and validation set and corresponding sample list files were generated. The samples included two categories of labels: "rainy" and "not rainy", covering different weather, lighting and lawn operation scenarios. Preprocessing and data augmentation: Basic transformation: Resize the image to a standard size of 224×224, normalize it with a mean of 0.0 and a standard deviation of 4.0, and fill the uncovered areas with a fixed value of 4. Training set enhancement: random horizontal / vertical flipping, random 180° rotation (with fixed padding to ensure image integrity) to improve model generalization ability and avoid overfitting; Validation set processing: Only size scaling and normalization are performed to ensure the objectivity of the validation results.
[0106] (III) Loss Function and Optimization Strategy Loss function: Label smoothing cross-entropy loss is adopted, with a smoothing coefficient set to 0.1 to alleviate the overfitting problem caused by hard labels and improve the robustness of the model; Optimizer: The AdamW optimizer is selected, which combines momentum and weight decay mechanisms to effectively suppress model parameter oscillations and improve training stability; Learning rate scheduling: The OneCycleLR learning rate scheduling strategy is adopted, with the maximum learning rate set to 10 times the initial learning rate and dynamically adjusted with the number of training epochs. This achieves the learning rate to first increase and then decrease, thereby improving the model's convergence accuracy. At the same time, it supports manual adjustment of the learning rate according to a specified number of epochs to adapt to changes in loss during the training process.
[0107] (iv) Model training process Model initialization: Load EfficientNet-B0 pre-trained weights (transfer learning), configure the number of input channels according to input requirements, and load the model and loss function onto the GPU; Training modes: Supports single-GPU training and multi-GPU distributed training. Distributed training automatically distributes batch size and number of worker threads evenly to improve training efficiency. Training iterations: Each round begins with the training process: the model is set to training mode, forward propagation calculates the output and loss, back propagation updates the parameters, and at the same time, the training set loss and accuracy are calculated, and the prediction results and true labels are recorded. After each training round, a validation process is performed: the model is set to evaluation mode (gradient calculation is turned off), forward propagation is performed on the validation set, and the validation set loss and accuracy are calculated to avoid overfitting; Model saving: Real-time monitoring of validation set accuracy during training, saving the model weights with the best validation set accuracy, and saving the model state and optimizer parameters for each training round, supporting breakpoint resume training.
[0108] In summary, the adaptive control method for lawnmowers provided in this embodiment utilizes point cloud data acquired by the existing LiDAR of the lawnmower. It generates a two-dimensional image through projection and combines this image with an artificial intelligence classification model for rain detection. Compared to traditional methods relying on independent raindrop sensors, this method offers advantages such as requiring no additional hardware, high detection accuracy, and strong environmental adaptability. This embodiment can effectively identify the reflection enhancement and noise characteristics caused by raindrops on the point cloud distribution, avoiding false alarms caused by dew, fog, and grass clippings. Simultaneously, it extends the environmental perception capability of the navigation radar to meteorological condition recognition, achieving integrated and intelligent equipment functionality. This improves the reliability and operational continuity of the lawnmower in outdoor environments and reduces long-term maintenance costs.
[0109] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0110] To facilitate better implementation of the adaptive control method for lawnmower robots according to the embodiments of this application, this application also provides an adaptive control device for lawnmower robots based on the above-described adaptive control method. The meanings of the terms used are the same as in the above-described adaptive control method for lawnmower robots, and specific implementation details can be found in the descriptions within the method embodiments.
[0111] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of the adaptive control device for a lawnmower robot provided in an embodiment of this application. The adaptive control device for a lawnmower robot may specifically include a data acquisition module 201, an image generation module 202, an environment recognition module 203, and a control module 204, as follows: Data acquisition module 201 is used to acquire three-dimensional point cloud data collected by the lawnmower robot in the working environment using LiDAR; The image generation module 202 is used to generate a corresponding two-dimensional feature image based on the three-dimensional point cloud data; The environment recognition module 203 is used to input the two-dimensional feature image into the pre-trained environment state recognition model to generate the environment state recognition result of the current environment of the lawnmower robot. The control module 204 is used to control the lawnmower robot to execute the corresponding preset operation strategy based on the environmental status recognition results.
[0112] Furthermore, in some embodiments, the image generation module 202 is specifically used for: The acquired multi-frame 3D point cloud data is accumulated to obtain the accumulated point cloud data; Each point in the accumulated point cloud data is transformed into coordinates and mapped to a two-dimensional plane to obtain the projected pixel coordinates of each point. Based on the projected pixel coordinates, each point in the accumulated point cloud data is assigned to a preset two-dimensional grid to construct the projected grid; A two-dimensional feature image is generated based on the laser reflection intensity information of each point assigned to each projection grid.
[0113] Furthermore, in some embodiments, the image generation module 202 is specifically used for: When the number of frames of accumulated multi-frame 3D point cloud data has not reached the preset frame threshold, the next frame of 3D point cloud data is acquired for accumulation. When the number of accumulated frames reaches the preset frame threshold, the accumulated multi-frame 3D point cloud data is used as the accumulated point cloud data, and the coordinate transformation step of each point in the accumulated point cloud data is performed.
[0114] Furthermore, in some embodiments, the image generation module 202 is specifically used for: Convert the three-dimensional spatial coordinates of each point in the accumulated point cloud data into coordinates in the polar coordinate system to obtain the projection radius and projection angle of each point. By mapping the projection radius and projection angle in the polar coordinate system to the Cartesian plane coordinate system, the position coordinates of each point in the temporary plane are obtained. The position coordinates in the temporary plane are translated to the center of the preset projection image to obtain the projected pixel coordinates of each point on the two-dimensional plane.
[0115] Furthermore, in some embodiments, the image generation module 202 is specifically used for: The intensity values of all points falling within each projected grid are summed to obtain the cumulative intensity value of the projected grid. Count the number of valid points falling within each projected grid, where a valid point is a point with an intensity value greater than zero; Based on the cumulative intensity value and the number of valid points, the average intensity value of each projected grid is calculated to form a two-dimensional intensity distribution matrix; Convert the two-dimensional intensity distribution matrix into a two-dimensional feature image.
[0116] Furthermore, in some embodiments, the image generation module 202 is specifically used for: Each average intensity value in the two-dimensional intensity distribution matrix is mapped to a gray value to generate a grayscale image; For the projection grid areas in the grayscale image that are not covered by any points, fill them with a preset fixed grayscale value.
[0117] Furthermore, in some embodiments, the image generation module 202 is specifically used for: According to the preset color mapping rules, each average intensity value in the two-dimensional intensity distribution matrix is mapped to the corresponding color value to generate a color visualization image.
[0118] Furthermore, in some embodiments, the environment recognition module 203 is specifically used for: The two-dimensional feature image is input into a pre-trained neural network model, and the image features of the two-dimensional feature image are extracted through the multi-layer convolutional structure of the neural network model. Based on the extracted image features, the classification layer of the neural network model outputs the probability distribution of the two-dimensional feature image belonging to the preset category; Based on the probability distribution, determine whether the current environment of the lawnmower robot is in a rainy or non-rainy state.
[0119] Furthermore, in some embodiments, the apparatus further includes a model training module, specifically used for: Acquire multiple two-dimensional feature image samples collected in history. Each two-dimensional feature image sample is labeled with a corresponding rainfall state label or non-rainfall state label to form a training dataset. Data augmentation is performed on each two-dimensional feature image sample in the training dataset to obtain augmented training samples. The enhanced training samples are input into the initial neural network model, and the loss value between the prediction result output by the initial neural network model and the corresponding label is calculated. Based on the loss value, the parameters of the initial neural network model are adjusted using an optimization algorithm, and the model is iteratively trained until it converges, resulting in a well-trained neural network model.
[0120] Furthermore, in some embodiments, the data augmentation process includes one or more combinations of random horizontal flipping, random vertical flipping, and random rotation. The label-smoothed cross-entropy loss function is used to calculate the loss value; the AdamW optimization algorithm is used, and the OneCycleLR strategy is employed to dynamically adjust the learning rate.
[0121] Furthermore, in some embodiments, the control module 204 is specifically used for: Determine whether the environmental status identification result indicates a rainfall condition; If the judgment result is yes, a return to base station instruction is generated to control the lawnmower robot to interrupt the current lawnmower operation and return to the preset base station; If the judgment result is negative, a maintenance operation instruction is generated to control the lawnmower robot to continue executing the current lawnmower operation strategy.
[0122] Furthermore, in some embodiments, the apparatus further includes a verification module, specifically used for: The process of repeatedly acquiring 3D point cloud data, generating 2D feature images, and obtaining environmental state recognition results is repeated multiple times to obtain multiple environmental state recognition results. Count the number of times the same state appears in multiple environmental state identification results; Determine whether the number of attempts has reached the preset confidence threshold; if so, determine the state as the final environmental state recognition result and execute the corresponding preset operation strategy steps based on the environmental state recognition result; if not, re-execute the multi-frame cumulative verification steps.
[0123] The confidence threshold is dynamically adjusted based on a preset sensitivity level; the higher the sensitivity level, the lower the corresponding confidence threshold.
[0124] Specific limitations regarding the adaptive control device for lawnmowers can be found in the limitations of the adaptive control method for lawnmowers described above, and will not be repeated here. Each module in the aforementioned adaptive control device for lawnmowers can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0125] The adaptive control device for lawn mowing robots provided in this embodiment generates two-dimensional feature images based on point cloud data collected by LiDAR. It completes environmental state recognition through an environmental state recognition model and controls the lawn mowing robot to execute corresponding operation strategies. Without adding additional sensing hardware, it improves the reliability of rainfall state detection, realizes precise adaptive operation control of lawn mowing robots, effectively ensures the stability and safety of lawn mowing robots when operating outdoors, and reduces subsequent maintenance costs of the equipment.
[0126] In one embodiment, a lawnmower robot is provided, the internal structure of which can be shown in the following diagram: Figure 4As shown, the lawnmower robot includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the lawnmower robot is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the methods described in any of the foregoing embodiments of this application.
[0127] This application also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the methods described in any of the foregoing embodiments of this application.
[0128] This application also provides a chip for executing instructions, which is used to perform the methods described in any of the foregoing embodiments executed by an electronic device as described in any of the foregoing embodiments of this application.
[0129] This application also provides a computer program product, which includes a computer program that, when executed by a processor, can implement the methods described in any of the foregoing embodiments executed by an electronic device as described in any of the foregoing embodiments of this application.
[0130] It should be noted that the functions or steps that the computer-readable storage medium or lawnmower robot can achieve are described in the relevant descriptions of the server side and client side in the aforementioned method embodiments. To avoid repetition, they will not be described one by one here.
[0131] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0132] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0133] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. An adaptive control method for a lawnmower robot, characterized in that, include: Acquire 3D point cloud data of the lawnmower robot in its working environment using LiDAR; Based on the three-dimensional point cloud data, a corresponding two-dimensional feature image is generated; The two-dimensional feature image is input into a pre-trained environmental state recognition model to generate an environmental state recognition result of the current environment of the lawnmower robot. Based on the environmental state recognition results, the lawnmower is controlled to execute the corresponding preset operation strategy.
2. The adaptive control method for a lawnmower robot according to claim 1, characterized in that, The step of generating a corresponding two-dimensional feature image based on the three-dimensional point cloud data includes: The acquired multi-frame 3D point cloud data is accumulated to obtain the accumulated point cloud data; Each point in the accumulated point cloud data is transformed into coordinates and mapped to a two-dimensional plane to obtain the projected pixel coordinates of each point. Based on the projected pixel coordinates, each point in the accumulated point cloud data is assigned to a preset two-dimensional grid to construct a projected grid; A two-dimensional feature image is generated based on the laser reflection intensity information of each point assigned to each projection grid.
3. The adaptive control method for a lawnmower robot according to claim 2, characterized in that, The step of transforming the coordinates of each point in the accumulated point cloud data and mapping it to a two-dimensional plane to obtain the projected pixel coordinates of each point includes: The three-dimensional spatial coordinates of each point in the accumulated point cloud data are converted into coordinates in the polar coordinate system to obtain the projection radius and projection angle corresponding to each point. Map the projection radius and projection angle in the polar coordinate system to the Cartesian plane coordinate system to obtain the position coordinates of each point in the temporary plane. The position coordinates in the temporary plane are translated to the center of the preset projection image to obtain the projected pixel coordinates of each point on the two-dimensional plane.
4. The adaptive control method for a lawnmower robot according to claim 2, characterized in that, The step of generating a two-dimensional feature image based on the laser reflection intensity information assigned to each point within each projection grid includes: The intensity values of all points falling within each projection grid are summed to obtain the cumulative intensity value of the projection grid. Count the number of valid points falling within each projected grid, where a valid point is a point with an intensity value greater than zero; Based on the accumulated intensity value and the number of valid points, the average intensity value of each projected grid is calculated to form a two-dimensional intensity distribution matrix; The two-dimensional intensity distribution matrix is converted into a two-dimensional feature image.
5. The adaptive control method for a lawnmower robot according to claim 4, characterized in that, The step of converting the two-dimensional intensity distribution matrix into a two-dimensional feature image includes: Each average intensity value in the two-dimensional intensity distribution matrix is mapped to a gray value to generate a grayscale image; For the projection grid regions in the grayscale image that are not covered by any points, a preset fixed grayscale value is filled.
6. The adaptive control method for a lawnmower robot according to claim 4, characterized in that, The step of converting the two-dimensional intensity distribution matrix into a two-dimensional feature image includes: According to the preset color mapping rules, each average intensity value in the two-dimensional intensity distribution matrix is mapped to the corresponding color value to generate a color visualization image.
7. The adaptive control method for a lawnmower robot according to claim 1, characterized in that, The step of inputting the two-dimensional feature image into a pre-trained environmental state recognition model to generate an environmental state recognition result of the current environment of the lawnmower robot includes: The two-dimensional feature image is input into a pre-trained neural network model, and the image features of the two-dimensional feature image are extracted through the multi-layer convolutional structure of the neural network model; Based on the extracted image features, the classification layer of the neural network model outputs the probability distribution of the two-dimensional feature image belonging to a preset category; Based on the probability distribution, it is determined whether the current environment of the lawnmower robot is in a rainy or non-rainy state.
8. The adaptive control method for a lawnmower robot according to claim 7, characterized in that, The training methods for the neural network model include: Multiple two-dimensional feature image samples collected in history are obtained, and each two-dimensional feature image sample is labeled with a corresponding rainfall state label or non-rainfall state label to form a training dataset; Data augmentation processing is performed on each two-dimensional feature image sample in the training dataset to obtain augmented training samples; The enhanced training samples are input into the initial neural network model, and the loss value between the prediction result output by the initial neural network model and the corresponding label is calculated. Based on the loss value, the parameters of the initial neural network model are adjusted using an optimization algorithm, and the model is iteratively trained until it converges, thus obtaining a trained neural network model.
9. The adaptive control method for a lawnmower robot according to claim 1, characterized in that, The step of controlling the lawnmower robot to execute a corresponding preset operation strategy based on the environmental state recognition result includes: Determine whether the environmental state identification result indicates a rainfall condition; If the judgment result is yes, a return to base station instruction is generated to control the lawnmower robot to interrupt the current lawnmower operation and return to the preset base station; If the judgment result is negative, a maintenance operation instruction is generated to control the lawnmower robot to continue executing the current lawnmower operation strategy.
10. The adaptive control method for a lawnmower robot according to claim 1, characterized in that, Before controlling the lawnmower robot to execute a corresponding preset operation strategy based on the environmental state recognition result, the method further includes: The process of repeatedly acquiring 3D point cloud data, generating 2D feature images, and obtaining environmental state recognition results is repeated multiple times to obtain multiple environmental state recognition results. Count the number of times the same state appears in the multiple environmental state identification results; Determine whether the number of times reaches a preset confidence threshold; if yes, then determine the state as the final environmental state identification result, and execute the step of controlling the lawnmower robot to execute the corresponding preset operation strategy based on the environmental state identification result; if no, then re-execute the multi-frame cumulative verification step.
11. An adaptive control device for a lawnmower robot, characterized in that, include: The data acquisition module is used to acquire three-dimensional point cloud data collected by the lawnmower robot in the working environment using LiDAR. The image generation module is used to generate a corresponding two-dimensional feature image based on the three-dimensional point cloud data; The environment recognition module is used to input the two-dimensional feature image into a pre-trained environment state recognition model to generate the environment state recognition result of the current environment of the lawnmower robot. The control module is used to control the lawnmower robot to execute the corresponding preset operation strategy based on the environmental state recognition result.
12. A lawnmower robot, characterized in that, The lawnmower robot includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the lawnmower robot adaptive control method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the adaptive control method for a lawnmower robot as described in any one of claims 1 to 10.