Control method of intelligent mower and computer storage medium

By employing a tiered recharge navigation strategy, combined with topology maps and visual sensors, the lawnmower can quickly and accurately return to the base station for charging, solving the problem of insufficient docking accuracy in existing technologies and achieving efficient base station docking.

CN122172839APending Publication Date: 2026-06-09QINGTING INTELLIGENT TECHNOLOGY (SUZHOU) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGTING INTELLIGENT TECHNOLOGY (SUZHOU) CO LTD
Filing Date
2026-03-12
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing technologies, when lawnmowers return to base stations to charge, the navigation accuracy depends on errors in maps and positioning systems, making it difficult to achieve accurate docking with base stations. This can easily lead to misalignment or collisions, resulting in docking failure.

Method used

A hierarchical recharge navigation strategy is adopted, which uses a topology map for global path planning and combines visual sensors to estimate the precise pose of the base station at the nearest point, generating a smooth local docking trajectory to ensure that the lawnmower can accurately dock with the base station.

Benefits of technology

It improved the success rate of lawnmower recharging, enhanced the system's robustness to dynamic environments and base station relocation, and ensured the accuracy and efficiency of docking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122172839A_ABST
    Figure CN122172839A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of garden robots, and discloses a control method of an intelligent mower and a computer storage medium, the method comprising the following steps: in response to a back-to-base instruction, acquiring a topological map and a preset pose of a base station; calculating a near-point pose according to the preset pose and a near-point distance; acquiring a current pose, and planning a global path from the current position to a near point in the topological map; controlling the mower to move along the global path, and estimating an accurate pose of the base station based on a visual sensor when the mower reaches the near point; generating a local docking trajectory according to the current pose and the accurate pose of the base station; and controlling the mower to move along the local docking trajectory to complete docking. The hierarchical strategy combining global path navigation and local precise alignment can guarantee the charging efficiency and realize precise docking, and effectively solves the problem that a single navigation mode cannot simultaneously guarantee long-distance navigation precision and end alignment reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of garden robot technology, and in particular to a control method for an intelligent lawnmower and a computer storage medium. Background Technology

[0002] After finishing their work or when their battery is low, automatic lawnmowers need to autonomously return to the base station for charging or maintenance. Achieving accurate and reliable recharging is one of the key technologies for ensuring the lawnmower's fully autonomous operation. In existing technologies, some solutions use global navigation to guide the lawnmower back to the base station, such as path planning based on topological maps or pre-built geometric maps.

[0003] However, this type of global navigation method has inherent limitations in practical applications. Navigation accuracy depends on the accuracy of the map and the cumulative error control of the positioning system. After long-distance movement, the lawnmower's position estimation often has deviations. When the lawnmower approaches the base station, due to limitations in map resolution and positioning errors, it is difficult to achieve the alignment accuracy required in the final docking stage, which can easily lead to misalignment or slight collision with the base station, resulting in docking failure. Summary of the Invention

[0004] Based on this, it is necessary to propose a control method for intelligent lawnmowers to address the technical problem of low docking accuracy between existing lawnmowers and base stations.

[0005] Firstly, a control method for an intelligent lawnmower is provided, the method comprising: In response to a return-to-base command, a topology map and a preset pose of the base station are obtained. The topology map includes multiple nodes and edges connecting two adjacent nodes. The multiple nodes include a base station node representing a base station. The pose of the nearest point is calculated based on the preset pose of the base station and the preset near point distance; Obtain the current pose of the smart lawnmower, and based on the current pose of the smart lawnmower and the pose of the nearest point, plan a global path from the current position of the smart lawnmower to the nearest point in the topology map; The intelligent lawnmower is controlled to move along the global path, and when the intelligent lawnmower is detected to have reached the nearest point during the movement, the precise pose of the base station is estimated based on at least one visual sensor. A local docking trajectory is generated based on the current pose of the intelligent lawnmower and the precise pose of the base station; The intelligent lawnmower is controlled to move along the local docking trajectory to complete the docking with the base station.

[0006] Secondly, a control device for an intelligent lawnmower is provided, the device comprising: The acquisition module is used to acquire a topology map and a preset pose of the base station in response to a return-to-base command. The topology map includes multiple nodes and edges connecting two adjacent nodes, and the multiple nodes include base station nodes representing base stations. The calculation module is used to calculate the pose of the nearest point based on the preset pose of the base station and the preset near point distance; The planning module is used to obtain the current pose of the smart lawnmower and, based on the current pose of the smart lawnmower and the pose of the nearest point, plan a global path from the current position of the smart lawnmower to the nearest point in the topology map. An estimation module is used to control the smart lawnmower to move along the global path, and when the smart lawnmower is detected to have reached the nearest point during the movement, it estimates the precise pose of the base station based on at least one visual sensor. The generation module is used to generate a local docking trajectory based on the current pose of the smart lawnmower and the precise pose of the base station; The docking module is used to control the intelligent lawnmower to move along the local docking trajectory in order to complete the docking with the base station.

[0007] Thirdly, a smart lawnmower is provided, including 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 control method of the smart lawnmower described above.

[0008] Fourthly, a computer storage medium is provided, which stores a computer program that, when executed by a processor, implements the above-described control method for an intelligent lawnmower.

[0009] This application employs a hierarchical recharge navigation strategy. During the global navigation phase, it utilizes a topology map for efficient long-distance path planning, enabling the lawnmower to quickly reach the vicinity of the base station and avoiding the low search efficiency caused by relying entirely on local perception. At the nearest point, it switches to precise local positioning, estimating the base station's precise pose in real time using visual sensors. This eliminates the risk of docking failure due to discrepancies between the map-stored pose and the actual pose. Furthermore, it achieves precise docking through smooth local trajectory generation and tracking control. This method significantly improves the docking success rate while maintaining recharge efficiency and enhances the system's robustness to dynamic environments and base station relocation. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] in: Figure 1 This is an application environment diagram of a control method for an intelligent lawnmower in one embodiment. Figure 2 This is a flowchart illustrating the control method of an intelligent lawnmower in one embodiment; Figure 3 This is a structural block diagram of the control device for an intelligent lawnmower in one embodiment; Figure 4 This is a structural block diagram of a smart lawnmower in one embodiment. Detailed Implementation

[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0013] Figure 1 This is a schematic diagram of an application scenario provided in an embodiment of this application, such as... Figure 1 As shown, this application scenario can be applied to a home garden environment. Taking the example of a smart lawnmower 100 needing to automatically return to the base station 200 for charging after completing lawn work, the user sets the lawnmower's working hours through an application on the terminal device or manually issues a return command. After receiving the return command, the smart lawnmower 100 does not immediately return to the base station in a straight line at maximum speed, but instead initiates a graded and precise return-to-charge navigation process.

[0014] The intelligent lawnmower 100 first reads a pre-built yard topology map from its memory. This map includes the preset pose of the base station 200 and the edges connecting the nodes in each area, with some edges marked as priority recharge channels. Based on the preset pose of the base station 200 and the preset proximity distance, the intelligent lawnmower 100 calculates a virtual proximity point directly in front of the base station. Then, starting from its current position, it plans a global path from its current position to this proximity point in the topology map. While moving along this global path, the intelligent lawnmower 100 continuously performs localization and compares the coordinates with those of the proximity point.

[0015] When the smart lawnmower 100 enters a circular area centered on the nearest point and with a switching radius as its radius, it automatically pauses global navigation, adjusts its body posture so that its head faces the base station 200, and activates its LiDAR and vision camera to accurately identify the base station 200. If it successfully identifies the reflective sticker or QR code 201 on the base station 200, it calculates the precise pose of the base station 200 relative to the smart lawnmower 100. Subsequently, the smart lawnmower 100 generates a smooth local docking trajectory based on its current pose and the precise pose of the base station 200, and slowly and precisely drives along this trajectory into the charging port of the base station 200 to complete the physical connection and charging.

[0016] If the LiDAR or camera fails to detect the base station 200 at a nearby location, the smart lawnmower 100 performs a fan-shaped scan centered on its current position, according to a preset angle range and step value, attempting to re-identify from different angles. If the fan-shaped scan still fails, it retreats a preset distance in the opposite direction of the current orientation, changes its observation position, and attempts to identify again. Throughout the recharging process, the smart lawnmower 100 manages the switching and anomaly recovery of each stage through a state machine, ensuring the reliable completion of the recharging task. After successful docking, the smart lawnmower 100 also compares the obtained precise pose of the base station with the preset pose in its memory. If the deviation exceeds a threshold, it updates the preset pose using a weighted average method, enabling the smart lawnmower 100 to adapt to the small displacements of the base station.

[0017] Please see Figure 2 As shown, Figure 2 A flowchart illustrating a control method based on an intelligent lawnmower provided in an embodiment of the present invention includes the following steps: S1. In response to the return-to-base command, obtain the topology map and the preset pose of the base station. The topology map includes multiple nodes and edges connecting two adjacent nodes. The multiple nodes include the base station node representing the base station.

[0018] Specifically, after receiving a return-to-base command during operation, the intelligent lawnmower first reads a pre-built and stored topology map from its memory. The return-to-base command can be automatically generated by the lawnmower when it detects that the battery level is below a set threshold, or it can be manually issued by the user via a mobile terminal. The topology map uses a graph structure to describe the lawnmower's working environment, containing multiple nodes and edges connecting adjacent nodes. Each node corresponds to a key location in the environment, such as the entrance to the lawn area, a path intersection, or the location of a base station. The node data records the coordinates of that location in the global coordinate system. Each edge represents a passable path between two nodes and can include path attributes, such as whether the path is a dedicated return-to-base channel and the passage cost. Nodes representing base stations are specially marked as base station nodes. These nodes store the base station's preset pose, which includes the base station's x-coordinate, y-coordinate, and orientation angle in the global coordinate system. This orientation angle typically points in the direction the base station is facing.

[0019] For example, when the lawnmower's battery drops to 15% while it's working on the lawn, the control system automatically generates a return-to-base command and then loads a pre-built home backyard topology map from its internal flash memory. The topology map contains a node marked as a base station, with a preset orientation of coordinates 10.5 meters and 3.2 meters, and an orientation angle of zero degrees, meaning it points due north.

[0020] S2. Calculate the pose of the nearest point based on the preset pose of the base station and the preset nearest point distance.

[0021] Specifically, the intelligent lawnmower calculates the pose of the near point using geometric calculations based on the preset pose of the base station obtained in step S1 and a preset proximity distance. The near point is a virtual control point that smoothly connects the global path navigation and local precise positioning stages. This near point is located directly in front of the base station, and the distance between them is determined by the preset proximity distance. The specific calculation method is as follows: First, determine the orientation of the base station, that is, the direction in which the front of the base station faces; then, translate the proximity distance in the opposite direction of this orientation, that is, directly in front of the base station, to obtain the position coordinates of the near point. At the same time, the orientation angle of the near point is set to the orientation angle of the base station rotated by 180 degrees. The purpose of this design is to ensure that when the intelligent lawnmower reaches the near point, its head is directly facing the base station, determining the optimal posture for subsequent identification and docking.

[0022] Determining the preset proximity distance requires comprehensive consideration of the sensor's effective working range, the robot's dimensions, and the smoothness requirements of control switching. The principle for selecting this distance is to ensure that the robot can reliably identify the base station at the proximity point, while allowing sufficient adjustment space for subsequent precise trajectory alignment.

[0023] The determination method includes the following steps: First, determine the upper limit based on the effective recognition distance of the visual sensor and LiDAR, typically taking 60% to 80% of the maximum distance at which the sensor can stably detect base station features. Second, determine the lower limit based on the robot's body length to ensure that the robot does not interfere with the base station when generating a local trajectory from the near point; this is typically taken as more than 1.2 times the robot's body length. Finally, calibrate the robot through field testing within the upper and lower limits, selecting the optimal value that balances recognition success rate and trajectory smoothness. For home lawnmower products, the near point distance is usually set between 1.2 meters and 1.5 meters.

[0024] For example, if the base station's preset pose obtained in step S1 shows that the base station is located at coordinates 10.5 meters and 3.2 meters, with an orientation angle of zero degrees (pointing due north), and the preset nearest point distance is 1.35 meters, then the nearest point's coordinates are calculated by moving the base station's coordinates 1.35 meters in the opposite direction of due north (due south), resulting in 10.5 meters and 1.85 meters. The orientation angle of the nearest point is then increased by 180 degrees from zero degrees, meaning the lawnmower should face due south at the nearest point, directly aligned with the base station.

[0025] S3. Obtain the current pose of the smart lawnmower, and based on the current pose of the smart lawnmower and the pose of the nearest point, plan a global path from the current position of the smart lawnmower to the nearest point in the topology map.

[0026] Specifically, the intelligent lawnmower first obtains its current pose in the map coordinate system through its own positioning system. This positioning system can integrate data from multiple sensors such as wheel encoders, inertial measurement units, and lidar, and uses algorithms such as adaptive Monte Carlo positioning to calculate the current coordinates and orientation angle of the intelligent lawnmower in real time, i.e., its current pose. After obtaining the current pose, the intelligent lawnmower uses the position in the current pose as the starting point and the position in the near point pose calculated in step S2 as the target, and performs global path planning on the topology map. During the planning process, the intelligent lawnmower calls a path search algorithm, such as the A* algorithm, to find an optimal node sequence from the nodes near the starting point to the base station node in the topology map. Considering that the near point is not a fixed node in the map, but a virtual point located in front of the base station node, the algorithm performs interpolation calculations on the last edge connecting the base station node after obtaining the node sequence, generating a path point whose coordinates match the near point position, and incorporates it into the final path sequence, thus forming a complete global path from the starting point to the near point. Furthermore, when calculating path costs, if edges marked as recharge channels exist in the topology map, the algorithm assigns these edges lower travel costs to prioritize guiding the intelligent lawnmower along smooth, unobstructed dedicated channels, thereby improving the safety and efficiency of the navigation process. After planning, the algorithm outputs a global path consisting of a series of waypoints. Each waypoint contains at least coordinate information and may include the desired orientation angle for subsequent path tracking control.

[0027] For example, suppose the smart lawnmower is currently located in the northwest corner of the lawn, with its current pose at coordinates 2.1 meters and 8.5 meters, and an orientation angle of 30 degrees; its near-point pose is at coordinates 11.85 meters and 3.2 meters, and an orientation angle of 180 degrees. The topology map pre-defines a recharge path from a nearby node directly to the base station node. The planning algorithm searches for the node sequence: node A, node B, and the base station node. It then interpolates a path point at coordinates 11.85 meters and 3.2 meters before the base station node. The resulting global path guides the smart lawnmower to move along the recharge path first, eventually reaching the near-point.

[0028] S4. Control the smart lawnmower to move along a global path, and when the smart lawnmower is detected to be approaching a nearby point during the movement, estimate the precise pose of the base station based on at least one visual sensor.

[0029] Specifically, the intelligent lawnmower activates its motion control system to track the global path planned and generated in step S3. During tracking, the motion control system uses path points on the global path as reference inputs. Through the underlying motion controller, such as a pure tracking controller or a model prediction controller, it calculates the speed commands of the left and right drive wheels in real time and sends these commands to the motor drivers, thereby driving the robot to move along the global path. During movement, the positioning system continuously updates the intelligent lawnmower's coordinates in the current map coordinate system and compares these coordinates with the nearest point coordinates calculated in step S2. When the Euclidean distance between the two is less than a preset switching radius, such as less than 0.3 meters, it is determined that the intelligent lawnmower has reached the nearest point area. Once the nearest point is determined, the intelligent lawnmower immediately pauses tracking the global path and automatically switches to local perception and docking mode. As part of the switching action, the intelligent lawnmower first adjusts its own posture to make its orientation angle consistent with the orientation angle of the nearest point, that is, to make the head of the machine face the base station, creating the best field of vision conditions for subsequent accurate identification. After the posture adjustment is completed, the intelligent lawnmower activates high-precision vision sensors, such as the onboard camera, and begins scanning the area in front. A visual sensor acquires real-time images of the base station and uses pre-stored visual features of the base station, such as QR codes, specific shapes, or reflective patterns, to detect the location of these features in the image using image processing algorithms. Then, combining the camera's intrinsic parameters and the fixed installation position relationship between the camera and the robot's center, coordinate transformation and pose calculation are used to estimate the precise pose of the base station relative to the smart lawnmower. This precise pose includes the relative horizontal coordinate, relative vertical coordinate, and relative orientation angle between the base station and the smart lawnmower.

[0030] For example, the smart lawnmower moves along the global path to a point 0.2 meters from the nearest point, determines that it has reached the nearest point, stops moving forward, and rotates its body to adjust its orientation from 30 degrees to 180 degrees towards the nearest point. Then, the camera is activated, captures the QR code on the base station, and calculates that the base station is located 1.2 meters directly in front of the smart lawnmower and 0.1 meters to the right, with its orientation relative to the lawnmower at 5 degrees. This is the precise pose of the base station.

[0031] S5. Generate a local docking trajectory based on the current pose of the smart lawnmower and the precise pose of the base station.

[0032] After obtaining the precise pose of the base station, the intelligent lawnmower uses this precise pose and its own current pose as input to activate the local trajectory generation module. This module calculates a local docking trajectory that smoothly moves from the current position to the docking position at the base station. Parametric curve fitting methods, such as cubic Bézier curves or B-spline curves, are used to generate the trajectory. These curves ensure the geometric smoothness and curvature continuity of the trajectory, thus ensuring the stability of subsequent motion control. In the specific construction process, a set of control points needs to be defined to determine the curve shape. The first control point is the intelligent lawnmower's current pose, serving as the starting point of the trajectory. The second control point is located a certain distance in front of the current pose along the current orientation, for example, 0.3 to 0.5 meters in front. Its function is to guide the direction of the initial segment of the trajectory, ensuring the robot maintains its current orientation when it starts. The third control point is set at a small distance directly in front of the base station's precise pose, for example, 0.1 meters in front. The orientation angle of this point is consistent with the orientation angle of the base station's precise pose. This point serves as the desired intermediate target point; the intelligent lawnmower should have essentially completed alignment when it reaches this point. The fourth control point is the precise pose of the base station itself, serving as the endpoint of the trajectory and the theoretical location for final docking. Substituting these four control points sequentially into the curve equation yields a smooth curve passing through the starting and ending points and influenced by intermediate points. After curve fitting, the curve needs to be discretized by sampling at intervals of a certain step size, such as 0.02 meters, generating a series of dense path points. Each path point contains coordinates and desired orientation angle information. Simultaneously, desired motion velocities are assigned to these path points, typically using trapezoidal velocity planning. This involves accelerating to a relatively low speed (e.g., 0.2 meters per second) in the first half of the trajectory, then linearly decelerating near the endpoint (e.g., in the last 0.5 meters) to ensure the velocity approaches zero upon reaching the endpoint, creating stable conditions for final physical docking.

[0033] For example, suppose the current pose of the intelligent lawnmower is at coordinates 0.2 meters and 0.3 meters, with an orientation angle of 178 degrees. The precise pose of the base station is at coordinates 1.2 meters and 0.1 meters, with an orientation angle of 5 degrees. Let the starting point S be the current pose. The first control point P1 is located 0.4 meters in front of S, along the 178-degree direction. The second control point P2 is located 0.1 meters in front of the precise pose of the base station, along the 5-degree direction. The third control point P3 is the precise pose of the base station. Using these four points, a cubic Bézier curve is generated. After discretization and sampling, approximately 60 path points are obtained. The planned speed for the initial segment is 0.2 meters per second, and the speed linearly decreases to 0 meters per second in the final 0.5-meter segment, thus forming a complete local docking trajectory.

[0034] S6. Control the intelligent lawnmower to move along the local docking trajectory to complete the docking with the base station.

[0035] Specifically, the intelligent lawnmower can employ either a pure tracking control algorithm or a model predictive control algorithm. Its core function is to convert continuous local docking trajectories into real-time motion commands. During tracking, the forward-looking distance is first dynamically calculated based on the intelligent lawnmower's current speed, for example, setting a baseline forward-looking distance of 0.3 meters, and then linearly adjusting according to the current speed. Next, a target point on the local docking trajectory is located at a distance exactly equal to this forward-looking distance from the robot's current position, and the lateral deviation of this target point relative to the robot's current orientation is calculated. Based on this lateral deviation and the forward-looking distance, the desired curvature is calculated, and then decomposed into rotational speed commands for the left and right drive wheels, which are executed by the motor drivers to achieve smooth movement along the trajectory. During movement, if onboard sensors, such as lidar, detect an obstacle intruding into a preset safety area, the local planning module can intervene in real time, generating a temporary obstacle avoidance path near the original local docking trajectory. After bypassing the obstacle, the robot re-docks onto the original trajectory. When the intelligent lawnmower moves along the local docking trajectory to near the endpoint, approximately 0.1 meters in front of the base station's precise pose, it automatically reduces its speed to near zero according to speed planning and enters a fine-tuning phase. During the fine-tuning phase, the intelligent lawnmower continuously uses visual sensors to acquire the latest relative pose of the base station and calculates the residual deviation between the robot's current position and the final docking position, including lateral deviation, longitudinal deviation, and angular deviation. If any deviation exceeds a preset threshold, such as a lateral deviation greater than 0.01 meters or an angular deviation greater than 0.05 radians, the controller sends small linear and angular velocity commands for slow correction until all deviations converge to within the threshold. The final determination of successful docking includes three conditions: First, the charging probe on the intelligent lawnmower chassis makes physical contact with the charging contacts on the base station, and the charging management circuit detects a stable charging current greater than a preset threshold, such as 0.5 amperes; second, the inertial measurement unit detects that the robot's angular velocity and linear acceleration are both less than the corresponding thresholds for at least two seconds, indicating that the robot is stationary; third, the speed command output by the controller remains zero. When all three conditions are met simultaneously, the control system determines that docking is complete and ends the recharging process.

[0036] For example, the intelligent lawnmower begins moving along a local docking trajectory containing 60 path points. The pure tracking controller calculates the forward-looking distance as 0.34 meters based on a speed of 0.2 meters per second and generates left and right wheel speed commands in real time. At a distance of 0.1 meters from the base station, the speed decreases to zero. At this point, the vision sensor detects that the robot is still 0.015 meters to the right, and the controller issues a slow leftward movement command until the offset disappears. Subsequently, the charging circuit detects a stable charging current of 0.6 amps, and the inertial measurement unit data indicates that the robot has been stationary for more than two seconds. The controller outputs zero commands, determining that the docking was successful.

[0037] This embodiment employs a hierarchical recharge navigation strategy. During the global navigation phase, it utilizes a topology map for efficient long-distance path planning, enabling the lawnmower to quickly reach the vicinity of the base station and avoiding the low search efficiency caused by relying entirely on local perception. At the nearest point, it switches to precise local positioning, estimating the base station's precise pose in real-time using visual sensors. This eliminates the risk of docking failure due to discrepancies between the map-stored pose and the actual pose. Furthermore, it achieves precise docking through smooth local trajectory generation and tracking control. This method significantly improves the docking success rate while maintaining recharge efficiency and enhances the system's robustness to dynamic environments and base station relocation.

[0038] In one possible embodiment, S2, calculating the pose of the near point based on the preset pose of the base station and the preset near point distance, includes: S21. Obtain the preset pose of the base station, wherein the preset pose includes the base station x coordinate dock_x, the base station y coordinate dock_y, and the base station orientation angle dock_yaw.

[0039] Specifically, after receiving a return-to-base command and initiating the recharging process, the intelligent lawnmower first reads pre-stored base station preset pose data from non-volatile memory. This preset pose is a set of static parameters measured and recorded in the topology map during the mapping phase or initial system installation, used to describe the accurate position and orientation of the base station in the global coordinate system. Specifically, the base station preset pose includes three independent parameters: the base station x-coordinate, representing the base station's position value along the horizontal axis in the global coordinate system; and the base station y-coordinate, representing the base station's position value along the vertical axis in the global coordinate system. These two coordinate parameters together determine the specific location of the base station on the planar map. The base station orientation angle represents the angle between the direction the base station faces and the positive direction of the horizontal axis of the global coordinate system. This angle is expressed in radians or degrees, and its range typically covers all directions around a circle, used to clearly define the base station's positive orientation. These three parameters constitute a complete pose description, serving as the basis for the intelligent lawnmower's subsequent geometric calculations and path planning.

[0040] For example, after receiving a return-to-station command, the intelligent lawnmower retrieves the attribute data associated with the base station node in the topology map. From this data, it reads that the base station's x-coordinate is 10.5 meters, its y-coordinate is 3.2 meters, and its orientation angle is zero radians. This means that the base station is located at a position of 10.5 meters x-coordinate and 3.2 meters y-coordinate in the global coordinate system, and the base station's frontal orientation is consistent with the positive direction of the horizontal axis of the coordinate system, i.e., due east.

[0041] S22. Calculate the pose of the near point according to the formula: near_x=dock_x+D*cos(dock_yaw), near_y=dock_y+D*sin(dock_yaw), near_yaw=dock_yaw+π; near_x represents the x-coordinate of the near point, near_y represents the y-coordinate of the near point, and near_yaw represents the orientation angle of the near point.

[0042] Specifically, after obtaining the preset pose and preset proximity distance of the base station, the intelligent lawnmower calculates the three pose parameters of the proximity point through geometric calculations. The proximity point is defined as a virtual control point located directly in front of the base station and maintaining a fixed distance from it. Its function is to smoothly connect the global path navigation and local precise positioning stages. When calculating the x-coordinate of the proximity point, the base station x-coordinate is used as the reference, plus the product of the proximity point distance and the cosine of the base station's orientation angle. When calculating the y-coordinate of the proximity point, the base station y-coordinate is used as the reference, plus the product of the proximity point distance and the sine of the base station's orientation angle. The physical meaning of these two calculation formulas is: starting from the location of the base station, moving in the opposite direction of the base station's orientation angle (i.e., directly in front of the base station), the horizontal and vertical coordinates of the position reached by moving the proximity point distance. The proximity point orientation angle is calculated by adding 180 degrees to the base station's orientation angle, i.e., adding π radians. The purpose of this setting is that when the intelligent lawnmower finally reaches the proximity point, its head direction is exactly facing the base station, creating the optimal observation posture and starting orientation for subsequent visual sensor recognition of the base station and precise docking.

[0043] For example, suppose the base station's x-coordinate in its preset pose is 10.5 meters, its y-coordinate is 3.2 meters, its orientation angle is 0 radians, and its preset near point distance is 1.35 meters. First, calculate the near point's x-coordinate: 10.5 meters plus 1.35 meters multiplied by a cosine of 0 degrees (0 radians equals 1), resulting in a near point x-coordinate of 11.85 meters. Next, calculate the near point's y-coordinate: 3.2 meters plus 1.35 meters multiplied by a sine of 0 degrees (0 radians equals 0), resulting in a near point y-coordinate of 3.2 meters. Finally, calculate the near point's orientation angle: 0 radians plus π radians, resulting in a near point orientation angle of π radians, approximately 180 degrees. Therefore, the complete near point pose is: near point x-coordinate 11.85 meters, near point y-coordinate 3.2 meters, and near point orientation angle 180 degrees. This embodiment converts the base station's preset pose into a near-point pose through explicit geometric relationships, providing a precise and reachable target point for global path planning. This calculation method does not rely on real-time sensor data; it only requires reading stored parameters and performing basic trigonometric operations. The calculation process is simple, reliable, and applicable to any embedded controller with basic computing capabilities. The design of the near point being located directly in front of and facing the base station allows the intelligent lawnmower to enter the local recognition stage in the optimal posture after completing global navigation. This ensures both the efficiency of global path planning and lays the spatial and directional foundation for subsequent high-precision visual recognition.

[0044] In one possible embodiment, when the distance between the current position of the smart lawnmower and the nearest point is less than a preset switching radius, the smart lawnmower is detected to have reached the nearest point.

[0045] Specifically, during global path tracking, the intelligent lawnmower continuously acquires its current position coordinates in the current map coordinate system through its positioning system. This positioning system typically integrates data from wheel encoders, inertial measurement units, and LiDAR, employing algorithms such as adaptive Monte Carlo positioning to update the robot's position estimate in real time at a certain frequency. Simultaneously, the intelligent lawnmower internally maintains the nearest point coordinates calculated in step S2, which are stored in memory as a target reference point. In each positioning update cycle, the intelligent lawnmower's controller calculates the Euclidean distance between the current position and the nearest point coordinates. This distance is calculated by subtracting the nearest point's x-coordinate from the current position's x-coordinate and then squaring the result; subtracting the nearest point's y-coordinate from the current position's y-coordinate and then squaring the result; adding the two squared values ​​and taking the square root. The controller compares the calculated Euclidean distance with a preset switching radius, which is a pre-set threshold parameter stored in the system, such as 0.3 meters. Its value determines the trigger range for switching from global navigation to local recognition mode. When the calculated Euclidean distance is less than the preset switching radius, the controller determines that the smart lawnmower has entered the proximity zone, thus meeting the condition for reaching the proximity point. Once this condition is met, the system's internal state machine triggers a mode switch, suspends global path tracking, and prepares to initiate subsequent base station identification and local docking processes.

[0046] For example, suppose the nearest point coordinates calculated in step S2 are 11.85 meters and 3.2 meters, and the system's set switching radius is 0.3 meters. During the intelligent lawnmower's movement along the global path, at a certain moment, the positioning system outputs the current position as 11.65 meters and 3.3 meters. Calculating the distance between the current position and the nearest point yields the square root of 11.65 minus the square of 11.85 plus the square of 3.3 minus the square of 3.2, which is the square root of 0.04 plus 0.01, approximately 0.224 meters. This value of 0.224 meters is less than the preset switching radius of 0.3 meters, therefore it is determined that the intelligent lawnmower has reached the nearest point, and a state switch is triggered.

[0047] This embodiment achieves accurate determination of the proximity arrival status by continuously calculating the Euclidean distance between the robot's position and the nearest point coordinates and comparing this distance with a preset switching radius. This determination method is entirely based on positioning data and preset parameters, without relying on additional sensor input or complex scene understanding. The calculation process is simple, efficient, and the results are objective and clear. This determination logic provides clear and quantifiable switching boundaries for the two stages of global navigation and local precision alignment, ensuring that the intelligent lawnmower accurately enters the recognition mode at the appropriate spatial location. This avoids both premature switching that prevents the sensors from effectively detecting the base station and late switching that causes missing the optimal recognition position and increases docking difficulty. Through this mechanism, the stage division of the entire recharge process is rigidly executed, providing a prerequisite guarantee for the reliable operation of subsequent steps.

[0048] In one possible embodiment, S4, estimating the precise pose of the base station based on at least one visual sensor, includes: S41. Acquire laser data collected by lidar, extract point clouds with reflection intensity exceeding a preset intensity threshold from the laser data, and cluster the extracted point clouds to obtain at least one point cloud cluster.

[0049] Specifically, after the intelligent lawnmower reaches the nearest point and completes its attitude adjustment, it activates its LiDAR for environmental perception. During the scanning process, the LiDAR emits laser beams in all directions and receives signals reflected from object surfaces. For each successfully transmitted and received sampling point, the LiDAR not only measures the distance and angle of that point relative to the sensor but also records the surface reflection intensity. The magnitude of the reflection intensity is related to the material, color, and reflective characteristics of the object's surface; highly reflective materials, such as reflective stickers, produce significantly higher reflection intensity values ​​than ordinary objects. After acquiring a complete frame of laser data, the intelligent lawnmower immediately filters the data. The processing first iterates through all laser points in the current frame, comparing the reflection intensity value of each point with a preset intensity threshold within the system. This preset intensity threshold is a parameter determined and stored during the system calibration phase based on the actual reflective characteristics of the base station's reflective stickers. Its value is set to be higher than the typical reflection intensity of natural environments such as lawns, soil, and trees, thus effectively filtering out high-reflectivity points that may belong to reflective stickers. All laser points with reflection intensities exceeding this threshold are retained, forming a point cloud containing only high-reflectivity points. After intensity filtering, the smart lawnmower performs spatial clustering analysis on the point cloud. The basic principle of clustering algorithms is that points that are close to each other in space are likely to originate from the same physical object. The algorithm selects highly reflective points one by one as seed points, searches for neighboring points within a preset cluster radius, and groups these points into the same point cloud cluster. This process is iteratively expanded until no new points are added around the cluster. Then, the next unclassified seed point is selected, and the above process is repeated. After the clustering process is completed, one or more point cloud clusters are output, each representing a spatial region where highly reflective objects may exist. These point cloud clusters may contain target clusters corresponding to base station reflective stickers, or they may contain noise clusters formed by other accidentally generated highly reflective points, which require further identification in subsequent steps. For example, assuming the system's preset intensity threshold is 8000, the smart lawnmower acquires a frame containing 360 laser points. Through intensity filtering, a total of 85 points with a reflectivity exceeding 8000 are selected. These points were then clustered with a clustering radius of 0.04 meters, resulting in 5 point cloud clusters. Two of these clusters contained a large number of points and were in the shape of regular stripes, while the other three clusters had few points and were scattered.

[0050] S42. Based on the preset reflective sticker features on the base station, identify a pair of point cloud clusters that match the reflective sticker features from the at least one point cloud cluster, and calculate the pose of the first base station based on the geometric center of the pair of point cloud clusters.

[0051] Specifically, after acquiring multiple point cloud clusters, the intelligent lawnmower matches and identifies these clusters based on the features of pre-set reflective stickers on the base station to determine which clusters correspond to the reflective stickers. The reflective stickers installed on the base station have pre-designed physical characteristics; for example, two rectangular reflective stickers are fixed vertically on the front of the base station, with a known fixed vertical distance between their centers, and their geometric centers are roughly aligned horizontally, meaning their horizontal coordinates are very similar. These feature parameters are measured during system deployment and stored in the intelligent lawnmower's memory as standard templates for matching and identification. The intelligent lawnmower first traverses all point cloud clusters, calculating the geometric center coordinates of each cluster. The geometric center is calculated by summing the coordinates of all laser points within the cluster and dividing by the total number of points, obtaining the average coordinates as the representative position of that cluster. After calculating the geometric centers of all point cloud clusters, the intelligent lawnmower pairs these clusters together and performs feature comparison on each pair. For each pair of point cloud clusters, the spatial straight-line distance between the two geometric centers is first calculated and compared with the preset distance between the reflector center. If the difference is less than a preset distance error tolerance, a second check is performed: the difference in the horizontal coordinates of the two geometric centers is compared to a preset horizontal deviation threshold to verify whether the two point cloud clusters are essentially on the same vertical line. When a pair of point cloud clusters simultaneously meets both conditions, the intelligent lawnmower determines that this pair of point cloud clusters corresponds to the base station reflector. After successful identification, the intelligent lawnmower uses the geometric centers of this pair of point cloud clusters to calculate the first base station pose. Specifically, the midpoint of the line connecting the two geometric centers is taken as the position coordinates of the base station in the LiDAR coordinate system. At the same time, the angle between the direction of the line connecting the two geometric centers and the reference axis of the LiDAR coordinate system is calculated, and based on the correspondence between the installation orientation of the reflector and the frontal orientation of the base station, this angle is converted into the orientation angle of the base station. The pose constructed in this way is the first base station pose, which describes the spatial position and orientation of the base station relative to the LiDAR sensor.

[0052] For example, suppose the center distance between two reflective patches on the base station is 15 cm, the preset distance error tolerance is 2 cm, and the horizontal deviation threshold is 1 cm. After the intelligent lawnmower calculates the geometric center of the 5 point cloud clusters obtained in step S41, it checks each pair and finds that the geometric center distance of two point cloud clusters is 14.8 cm, which is 0.2 cm less than 2 cm from 15 cm, and the difference in the horizontal coordinates of the two geometric centers is 0.6 cm less than 1 cm. The intelligent lawnmower determines that these two point cloud clusters are the target reflective patches. The midpoint coordinates of the two geometric centers are taken as the base station position, resulting in an abscissa of 1.2 meters and a ordinate of 0.15 meters. The angle between the direction of the line connecting the two centers and the horizontal axis of the lidar coordinate system is calculated to be 3 degrees. Combining the correspondence between the reflective patch installation direction and the base station orientation, the base station orientation angle is determined to be 5 degrees, thus forming the first base station pose.

[0053] S43. Acquire image data captured by the camera, and perform QR code detection on the image data.

[0054] Specifically, after reaching the nearest point and adjusting its posture, the intelligent lawnmower activates its camera to collect image data of the area in front. The camera uses a global shutter sensor to continuously acquire images of the area including the base station at a fixed frame rate. Each frame consists of a pixel array, recording color and brightness information of the scene. The intelligent lawnmower sends each frame of image data to its built-in image processing unit, which executes a QR code detection algorithm. This algorithm uses mature QR code recognition technologies, such as the AprilTag (QR code detection and localization) method. Its processing flow typically includes converting the image to grayscale to reduce data dimensionality, performing adaptive threshold segmentation on the grayscale image to highlight candidate regions, extracting and filtering contours from the segmented binary image, and decoding and verifying the filtered candidate regions. The detection algorithm traverses every possible region in the image, attempting to identify whether there are graphic features that conform to the QR code encoding rules. When the algorithm successfully locates and decodes a QR code, it outputs the QR code's identifier number and the coordinates of the four corner points of the QR code in the image. If no QR code is detected in the current frame, subsequent image frames are acquired and processed until detection is successful or the system's timeout expires. For example, a smart lawnmower camera captures a 640x480 resolution image, and the image processing unit uses the AprilTag detection algorithm. The algorithm locates a square marker in the right-center region of the image. After decoding, it confirms that the marker conforms to the QR code rules and outputs the QR code's identifier number as 5. Simultaneously, it outputs the pixel coordinates of the four corner points of the QR code in the image: x and y coordinates are 120, 150; 280, 150; 120, 310; 280, 310.

[0055] S44. When the QR code set by the base station is detected, the pose of the QR code relative to the camera is obtained, and the pose of the second base station is calculated based on the pose of the camera and the fixed transformation relationship between the camera and the smart lawnmower.

[0056] Specifically, after successfully detecting the QR code in the image data in step S43, the intelligent lawnmower immediately initiates the pose calculation process. First, using the pixel coordinates of the four corner points of the detected QR code in the image, combined with the camera's intrinsic parameter matrix and lens distortion coefficients, the pose of the QR code coordinate system relative to the camera coordinate system is calculated using the perspective transformation principle. This pose is a six-degree-of-freedom parameter containing a three-dimensional translation vector and a rotation matrix. In a planar motion scenario, it can be simplified to three components: lateral offset, longitudinal offset, and orientation angle, describing the spatial position of the QR code's center point relative to the camera's optical center and the rotation angle of the QR code plane relative to the camera's imaging plane. Since the QR code is fixedly installed on the base station, and there is a known correspondence between the QR code coordinate system and the base station coordinate system (e.g., the QR code center coincides with the front center of the base station, and the orientation of the QR code coordinate system is consistent with the front orientation of the base station), the calculated pose of the QR code relative to the camera actually represents the pose of the base station relative to the camera. After obtaining this relative pose, the intelligent lawnmower needs to transform it to the robot base coordinate system, as subsequent motion control uses the robot base as a reference. To this end, the intelligent lawnmower reads a pre-calibrated fixed transformation relationship stored in its memory. This fixed transformation relationship describes the translation and rotation of the camera coordinate system relative to the robot base coordinate system, and consists of precise parameters obtained through factory calibration or on-site calibration. The intelligent lawnmower multiplies the pose of the base station relative to the camera by the fixed transformation relationship between the camera and the robot base, i.e., performs a matrix multiplication operation of coordinate system transformation, to calculate the pose of the base station relative to the robot base. This result is the second base station pose. The second base station pose also includes three parameters: horizontal coordinate, vertical coordinate, and orientation angle, all with the robot base coordinate system as the reference. It can be directly used for subsequent trajectory generation and control. For example, assuming that a QR code numbered 5 is detected in step S43, the intelligent lawnmower calculates the position of the QR code relative to the camera using corner coordinates and camera intrinsic parameters as follows: horizontal coordinate 0.3 meters, vertical coordinate -0.05 meters, and orientation angle 3 degrees. By reading the pre-calibrated fixed transformation relationship, it was determined that the camera was installed 0.1 meters in front of the robot base and 0.15 meters above it, and the orientation of the camera coordinate system was completely consistent with that of the robot base coordinate system. After coordinate transformation calculation, the observation results of the camera coordinate system were transformed into the robot base coordinate system, and the pose of the second base station relative to the robot base was obtained as follows: horizontal coordinate 1.2 meters, vertical coordinate 0.1 meters, and orientation angle 5 degrees.

[0057] S45. The poses of the first base station and the poses of the second base station are fused to obtain the accurate pose of the base station.

[0058] Specifically, after obtaining the poses of the first and second base stations, the intelligent lawnmower fuses these two pose estimates to obtain more reliable and accurate base station positioning information. The first step in the fusion process is to ensure the temporal and spatial alignment of the two poses. For temporal alignment, the intelligent lawnmower marks the acquisition timestamps for both the LiDAR data and the camera image data. Only when the difference between the timestamps corresponding to the first and second base station poses is less than a preset time synchronization threshold is the two considered synchronous observations of the base station state at the same moment, and fusion calculation is initiated. If the time difference exceeds the threshold, the current fusion is discarded, and the system waits for the next synchronization. For spatial alignment, the first base station pose is typically expressed in the LiDAR coordinate system, and the second base station pose is expressed in the camera coordinate system. Both of these sensor coordinate systems have fixed transformation relationships with the robot's base coordinate system. The intelligent lawnmower uses pre-calibrated transformation parameters to uniformly transform the first and second base station poses to the same reference coordinate system, such as the robot's base coordinate system, to ensure that the two poses are compared and fused under the same spatial reference. After completing spatiotemporal alignment, the intelligent lawnmower calculates the final precise pose according to a preset fusion strategy. A typical fusion strategy is a confidence-weighted average. The intelligent lawnmower assigns a confidence weight to the first and second base station poses, which can be dynamically determined based on multiple factors during the recognition process, such as the number of points matching the point cloud cluster in laser recognition, the degree of fit between the point cloud cluster and the reflective sticker model, the accuracy of QR code decoding, and the corner point positioning accuracy. The confidence weight reflects the reliability of the current observation, and the sum of the two weights is one. The intelligent lawnmower multiplies the x-coordinate, y-coordinate, and orientation angle of the first base station pose by its confidence weight, and multiplies the x-coordinate, y-coordinate, and orientation angle of the second base station pose by its confidence weight, and then adds the corresponding components to obtain the fused pose parameters. If a sensor fails to recognize the pose, for example, the lidar does not detect the reflective sticker or the camera does not detect the QR code, the other successfully recognized pose is directly used as the precise pose. After fusion, the intelligent lawnmower outputs the precise pose of the base station, which is used for subsequent local docking trajectory generation and control. For example, assuming the time synchronization threshold is 50 milliseconds, the timestamp difference between the current poses of the first and second base stations is 20 milliseconds, satisfying the synchronization condition. After coordinate transformation and unification to the robot base coordinate system, the pose of the first base station is 1.20 meters x-coordinate, 0.15 meters y-coordinate, and 5.0 degrees orientation angle, assigned a confidence level of 0.6 based on the point cloud matching quality of laser recognition; the pose of the second base station is 1.21 meters x-coordinate, 0.12 meters y-coordinate, and 4.8 degrees orientation angle, assigned a confidence level of 0.4 based on the QR code decoding accuracy.After weighted averaging, the fused precise pose is calculated as follows: x-coordinate 1.20 x 0.6 + 1.21 x 0.4 = 1.204 meters, y-coordinate 0.15 x 0.6 + 0.12 x 0.4 = 0.138 meters, and orientation angle 5.0 x 0.6 + 4.8 x 0.4 = 4.92 degrees. Thus, the precise pose of the base station is calculated as follows: x-coordinate 1.204 meters, y-coordinate 0.138 meters, and orientation angle 4.92 degrees.

[0059] This embodiment achieves robust and accurate estimation of base station pose by fusing the results of laser recognition and visual recognition. Laser recognition utilizes the high reflectivity of reflective stickers, enabling stable base station detection even in environments with drastic lighting changes or blurred visual textures, providing reliable initial pose values. Visual recognition, through QR code decoding, provides higher-precision pose information and simultaneously acquires the unique identifier of the base station, effectively avoiding misidentification. The fusion of these two recognition methods leverages the advantages of each sensor while enhancing the system's fault tolerance through information redundancy. Even if one sensor fails due to environmental interference, the other sensor can still complete the recognition task. This method allows the intelligent lawnmower to acquire high-confidence, precise base station poses in real time, providing a solid data foundation for generating smooth and accurate local docking trajectories, thereby significantly improving the success rate of recharge docking and environmental adaptability.

[0060] Furthermore, the step of fusing the first base station pose and the second base station pose to obtain the precise pose of the base station includes: The poses of the first base station and the poses of the second base station are spatiotemporally synchronized, and weighted fusion is performed according to their respective confidence levels to obtain the precise pose of the base station.

[0061] Specifically, after obtaining the poses of the first and second base stations, the intelligent lawnmower needs to fuse these two observations from different sensors to obtain a more reliable and accurate base station positioning result. The first step in the fusion process is spatiotemporal synchronization. For time synchronization, the intelligent lawnmower records the timestamps of the acquisition times for both the LiDAR data and the camera image data. When the difference between the timestamps corresponding to the first and second base station poses is less than a preset time synchronization threshold, the intelligent lawnmower treats these two poses as observations of the base station state at the same moment and performs subsequent fusion calculations. If the time difference exceeds the threshold, it indicates that the two observations are out of sync, and the intelligent lawnmower will discard this fusion and wait for the next set of synchronized data. For spatial synchronization, the first base station pose is usually expressed in the LiDAR coordinate system, and the second base station pose is usually expressed in the camera coordinate system. There are fixed transformation relationships between these two sensor coordinate systems and the robot's base coordinate system. The intelligent lawnmower utilizes pre-calibrated and stored sensor installation parameters to transform the poses of the first and second base stations to the same reference coordinate system, such as the robot's base coordinate system, through coordinate transformation calculations. This ensures that the two poses are compared and fused under the same spatial reference. After completing spatiotemporal synchronization, the intelligent lawnmower enters the weighted fusion calculation stage. The core of the fusion calculation is assigning a confidence weight to each pose. This weight is a value between 0 and 1, reflecting the reliability of the current observation. The confidence level is determined based on factors such as the number of matching point cloud clusters during laser recognition, the geometric fit between the point cloud clusters and the reflective sticker model, the quality score of QR code decoding, and the accuracy of corner point positioning. The intelligent lawnmower generates a first confidence level for the first base station pose and a second confidence level for the second base station pose according to preset rules, and the sum of these two confidence levels equals one. Subsequently, the intelligent lawnmower multiplies the x-coordinate of the first base station pose by its confidence level, and then multiplies the x-coordinate of the second base station pose by its confidence level, before adding the two products to obtain the fused x-coordinate. Similarly, the same weighted averaging operation is performed on the y-coordinate and orientation angle. The final calculated x-coordinate, y-coordinate, and orientation angle constitute the precise pose of the base station. This precise pose combines the advantages of two sensors, exhibiting higher accuracy and robustness than any single sensor estimate.

[0062] In one possible embodiment, S5, generating a local docking trajectory based on the current pose of the smart lawnmower and the precise pose of the base station, includes: S51. The current pose of the intelligent lawnmower is used as the first control point.

[0063] Specifically, after obtaining the precise pose from the base station, the intelligent lawnmower enters the local docking trajectory generation stage. The first step in trajectory generation is to determine the starting reference point, which is the pose of the intelligent lawnmower at the current moment. The intelligent lawnmower acquires its current pose data in real time through its positioning system. This positioning system integrates data from wheel encoders, inertial measurement units, and LiDAR, enabling it to output the robot's precise position and orientation in the planned coordinate system. The current pose specifically includes three parameters: the robot's x-coordinate, y-coordinate, and orientation angle in the coordinate system. The intelligent lawnmower sets this current pose as the first control point, serving as the starting point for subsequent curve fitting. The role of the first control point is to determine where the local docking trajectory begins; the entire trajectory will extend outward from this point as a reference, ensuring that the generated trajectory perfectly matches the robot's actual position. For example, suppose that the current pose of the smart lawnmower obtained by the positioning system at the current moment is 0.2 meters on the horizontal axis, 0.3 meters on the vertical axis, and 178 degrees on the facing angle. Then the smart lawnmower will set this pose as the first control point, that is, the starting point coordinates of the trajectory are 0.2 meters and 0.3 meters, and the expected facing angle at the starting point is 178 degrees.

[0064] S52. The first preset distance in front of the current pose along the current orientation direction is taken as the second control point.

[0065] Specifically, after determining the first control point, the intelligent lawnmower needs to set a second control point to guide the initial direction of the soon-to-be-generated local docking trajectory. The position of this second control point is calculated based on the current pose represented by the first control point. Specifically, the intelligent lawnmower starts from the coordinate point in the current pose and measures forward a first preset distance along the direction indicated by the orientation angle in the current pose. The coordinates of the measured endpoint are used as the position of the second control point. Simultaneously, the orientation angle of the second control point is set to be consistent with the orientation angle of the current pose. This first preset distance is a pre-calibrated parameter stored in the system; its value directly affects the curvature of the initial segment of the trajectory. A larger value makes the initial segment of the trajectory smoother, while a smaller value makes the initial segment of the trajectory more abrupt. The core function of the second control point is to ensure that the smooth curve generated by subsequent steps is tangent to the current orientation of the intelligent lawnmower at the starting point, thus ensuring smooth movement of the robot when it starts and avoiding abrupt angle changes. For example, suppose the current position of the smart lawnmower is 0.2 meters x-coordinate, 0.3 meters y-coordinate, and 178 degrees azimuth angle. The first preset distance set for the smart lawnmower is 0.4 meters. Then, the x-coordinate of the second control point is equal to 0.2 meters plus 0.4 meters multiplied by the cosine of 178 degrees. The approximate value of the cosine of 178 degrees is -0.999, resulting in -0.2 meters. The y-coordinate of the second control point is equal to 0.3 meters plus 0.4 meters multiplied by the sine of 178 degrees. The approximate value of the sine of 178 degrees is 0.035, resulting in 0.314 meters. The azimuth angle of the second control point is set to be consistent with the current orientation, i.e., 178 degrees.

[0066] S53. The third control point is located at a second preset distance in front of the base station along the base station's orientation direction, based on the base station's precise pose.

[0067] Specifically, after setting the second control point, the intelligent lawnmower needs to determine a third control point. This control point guides the local docking trajectory as it approaches the base station at the end. The position calculation of the third control point uses the precise pose of the base station obtained in step S45 or step B1 as a reference. The intelligent lawnmower first extracts the position coordinates and orientation angle of the base station from its precise pose. The direction indicated by the orientation angle is the direction the base station faces. Considering that the intelligent lawnmower needs to approach the base station from directly in front to complete the docking, the third control point should be located directly in front of the base station. Therefore, starting from the position coordinates of the precise pose of the base station, the intelligent lawnmower measures a second preset distance forward along the opposite direction of the orientation angle, i.e., directly in front of the base station, and uses the position coordinates at the end of the measurement as the position of the third control point. At the same time, the orientation angle of the third control point is set to be consistent with the orientation angle of the base station. The second preset distance is a pre-set parameter stored in the system. Its value determines how far the intelligent lawnmower starts to enter the final straight alignment stage. An appropriate value ensures that the robot has basically aligned its posture when approaching the base station. The core function of the third control point is to ensure that the smooth curve generated by subsequent steps aligns with the orientation of the base station near its endpoint. This allows the robot to gradually align as it approaches the base station, creating favorable posture conditions for the final physical docking. For example, assuming the precise pose of the base station obtained in step S45 is 1.204 meters x-coordinate, 0.141 meters y-coordinate, and a base station orientation angle of 4.94 degrees, and the second preset distance set in the system is 0.1 meters, the third control point should be located directly in front of the base station, i.e., in the opposite direction of the base station orientation angle. Therefore, the x-coordinate of the third control point is equal to 1.204 meters minus 0.1 meters multiplied by the cosine of 4.94 degrees. The approximate value of the cosine of 4.94 degrees is 0.996, resulting in 1.104 meters. The y-coordinate of the third control point is equal to 0.141 meters minus 0.1 meters multiplied by the sine of 4.94 degrees. The approximate value of the sine of 4.94 degrees is 0.086, resulting in 0.132 meters. The orientation angle of the third control point is set to be consistent with the base station orientation, i.e., 4.94 degrees.

[0068] S54. Use the precise pose of the base station as the fourth control point.

[0069] After setting the third control point, the intelligent lawnmower enters the final control point determination stage. The fourth control point directly adopts the obtained precise pose of the base station without any modification or offset. This precise pose contains the complete pose information of the base station in the planned coordinate system, specifically including the horizontal coordinate, vertical coordinate, and orientation angle of the base station's precise pose. The fourth control point plays the role of the endpoint in the local docking trajectory, representing the position and attitude at which the intelligent lawnmower ultimately expects to reach and complete the docking. When the intelligent lawnmower moves to the fourth control point along the subsequently generated trajectory, its body pose should completely coincide with the precise pose of the base station, that is, the robot's charging probe should be aligned with the charging contacts on the base station, and the robot's orientation should be consistent with the frontal orientation of the base station. The setting of the fourth control point clearly defines the target endpoint of the entire local docking trajectory, and all trajectory generation and motion control are guided by the goal of ultimately reaching this point. For example, assuming the precise pose of the base station is 1.204 meters on the horizontal axis, 0.141 meters on the vertical axis, and 4.94 degrees on the azimuth angle, the smart lawnmower will directly set this pose as the fourth control point, that is, the coordinates of the trajectory endpoint are 1.204 meters and 0.141 meters, and the expected orientation at the endpoint is 4.94 degrees.

[0070] S55. Based on the first control point, the second control point, the third control point, and the fourth control point, a smooth curve is fitted and generated as the local docking trajectory.

[0071] Specifically, after setting four control points, the intelligent lawnmower uses a curve fitting algorithm to generate a trackable local docking trajectory. In practice, the intelligent lawnmower uses the first control point as the starting point of the trajectory, the fourth control point as the ending point, and the second and third control points as intermediate control points guiding the trajectory shape. The intelligent lawnmower uses a parametric curve model for fitting, such as a cubic Bézier curve or a cubic B-spline curve. The mathematical properties of these curves ensure that the trajectory positions at the starting and ending points are precisely matched. Furthermore, the tangent direction at the starting point is determined by the direction from the first control point to the second control point, and the tangent direction at the ending point is determined by the direction from the third control point to the fourth control point. This characteristic ensures that the initial segment of the generated trajectory aligns with the current orientation of the intelligent lawnmower, and the ending segment aligns with the orientation of the base station, thus achieving a smooth transition in posture. The overall shape within the curve is guided by the positions of the second and third control points, ensuring that the trajectory maintains continuous curvature without abrupt changes between the starting and ending points. After fitting and generating the curve equation, the intelligent lawnmower needs to discretize the curve. This involves sampling the curve at equal intervals according to a preset step size, such as 0.02 meters, to generate a series of dense path points. Each path point contains at least its x and y coordinates in the planned coordinate system. Simultaneously, the desired orientation angle at that point can be calculated based on the curve equation, facilitating subsequent trajectory tracking and control. These path points are arranged in order from the starting point to the ending point, forming a complete local docking trajectory. For example, the intelligent lawnmower sequentially inputs the four control points determined in steps S51 to S54 into a cubic Bézier curve generation function. The first control point has an x-coordinate of 0.2 meters, a y-coordinate of 0.3 meters, and an orientation angle of 178 degrees; the second control point has an x-coordinate of -0.2 meters, a y-coordinate of 0.314 meters, and an orientation angle of 178 degrees; the third control point has an x-coordinate of 1.104 meters, a y-coordinate of 0.132 meters, and an orientation angle of 4.94 degrees; and the fourth control point has an x-coordinate of 1.204 meters, a y-coordinate of 0.141 meters, and an orientation angle of 4.94 degrees. After fitting a smooth curve using the Bézier curve equation, the curve is sampled in steps of 0.02 meters to obtain approximately 50 path points from the starting point to the ending point. These path points and their corresponding desired orientations constitute the final local docking trajectory.

[0072] This embodiment defines a local docking trajectory using four control points, achieving smooth path planning from the robot's current position to the precise pose of the base station. The first and second control points ensure a natural connection between the trajectory's initial segment and the robot's current orientation, avoiding abrupt transitions at the start. The third and fourth control points ensure precise alignment between the trajectory's final segment and the base station's orientation, creating favorable attitude conditions for final physical docking. The combined use of these four control points allows the generated trajectory to maintain curvature continuity and geometric smoothness while satisfying start and end point constraints, reducing the difficulty of robot tracking and control.

[0073] In one possible embodiment, S3, the step of planning a global path from the current location of the smart lawnmower to the nearest point in the topology map, includes: S31. Map the current pose of the intelligent lawnmower onto the topology map, and take the node closest to the current pose as the starting node.

[0074] Specifically, when performing global path planning, the intelligent lawnmower first needs to map its position in continuous space to discrete nodes on the topology map. The intelligent lawnmower obtains its current pose through a positioning system, which includes the robot's x-coordinate, y-coordinate, and orientation angle in the global coordinate system. After obtaining the current pose, the intelligent lawnmower traverses all nodes stored in the topology map, each node recording its coordinates in the global coordinate system. For each node, the intelligent lawnmower calculates the Euclidean distance between the node's coordinates and its position coordinates in the current pose. The Euclidean distance is calculated by subtracting the node's x-coordinate from the current pose's x-coordinate and then squaring the result; then subtracting the node's y-coordinate from the current pose's y-coordinate and squaring the result; finally, the two squared values ​​are added together and the square root is calculated. After calculating the distances to all nodes, the intelligent lawnmower selects the node with the smallest distance value and designates it as the starting node. The starting node represents the corresponding position of the intelligent lawnmower's current location in the topology map and serves as the starting point for subsequent path searching. For example, suppose the current pose of the intelligent lawnmower is 2.1 meters x-coordinate and 8.5 meters y-coordinate. The topology map contains node A with coordinates of 2.0 meters and 8.3 meters, node B with coordinates of 3.0 meters and 7.0 meters, and node C with coordinates of 1.5 meters and 9.0 meters. The intelligent lawnmower calculates the distance between its current pose and node A as √(2.1 - 2.0²) + 8.5 - 8.3², which equals √(0.01 + 0.04) = 0.224 meters; the distance to node B as √(2.1 - 3.0²) + 8.5 - 7.0², which equals √(0.81 + 2.25) = 1.75 meters; and the distance to node C as √(2.1 - 1.5²) + 8.5 - 9.0², which equals √(0.36 + 0.25) = 0.78 meters. Comparing the three distance values, node A has the smallest value of 0.224 meters, so the smart lawnmower determines node A as the starting node.

[0075] S32. Using the base station node as the target node, a path search algorithm is used to search for the optimal path from the starting node to the base station node in the topology map. The optimal path consists of a node sequence and an edge sequence connecting adjacent nodes.

[0076] Specifically, after determining the starting node, the intelligent lawnmower sets the specially marked base station node in the topology map as the target node, and then initiates a path search algorithm to find the optimal path from the starting node to the target node. The path search algorithm employs classic graph search methods, such as A* algorithm or Dijkstra's algorithm. Taking A* algorithm as an example, the intelligent lawnmower starts from the starting node and gradually explores adjacent nodes in the topology map. During the exploration process, the algorithm calculates a cost value for each visited node, which consists of two parts: the actual travel cost from the starting node to the current node, and the estimated travel cost from the current node to the target node. The accumulation of the actual travel cost depends on the travel cost attribute attached to the edges connecting the nodes. When reading the cost of each edge, the intelligent lawnmower checks whether the edge is marked as a recharge channel. If the edge is a recharge channel, its travel cost is multiplied by a discount factor less than one, thus giving recharge channels higher priority in the path search. The estimated travel cost is usually calculated using the Euclidean distance between the current node and the target node. The algorithm continuously expands the nodes, comparing the cost of different paths until the target node, i.e., the base station node, is found. At this point, the smart lawnmower backtracks from the base station node to obtain the order of nodes traversed from the starting node to the base station node and the order of edges connecting these nodes; this is the optimal path. The optimal path is described in the form of a node sequence, indicating the key locations traversed, and in the form of an edge sequence, indicating the connection relationships between adjacent nodes. For example, suppose the starting node is node A and the base station node is node D. There are two feasible paths in the topology map. The first path is from node A to node D via nodes B and C, where the travel cost of edge AB is 1.0, the travel cost of edge BC is 1.2, and the travel cost of edge CD is 0.8, and none of them are rechargeable paths, for a total cost of 3.0. The second path leads from node A through nodes E and F to node D. The cost of edge AE is 1.5, the cost of edge EF is 1.3, and the cost of edge FD is 0.9. However, edges AE and EF are marked as recharge paths, with a discount factor of 0.6. Therefore, the actual cost after discounting is 1.5 multiplied by 0.6 plus 1.3 multiplied by 0.6 plus 0.9, which equals 2.58. The A* algorithm compares the total costs of the two paths and selects the second path with the smaller total cost as the optimal path, outputting the node sequence A, E, F, D and the corresponding edge sequence.

[0077] S33. Based on the edge direction determined by the preceding node adjacent to the base station node in the optimal path and the base station node, and the position of the nearest point, determine the nearest point on the line connecting the preceding node and the base station node.

[0078] Specifically, after obtaining the optimal path composed of the node sequence and edge sequence, the intelligent lawnmower needs to accurately locate the nearest point calculated in step S2 onto this path. Since the nearest point is a virtual point located directly in front of the base station, not a fixed node in the topology map, its specific location must be determined on the last edge of the optimal path. The intelligent lawnmower first identifies the preceding node adjacent to the base station node from the node sequence of the optimal path; this node is directly before the base station node in the sequence. The preceding node and the base station node are connected by an edge, and the direction of the line connecting these two nodes is the final direction into the base station. The intelligent lawnmower obtains the coordinates of the preceding node and the base station node, thereby determining the geometric parameters of the line connecting the two points. According to the definition of a nearest point, the nearest point is located directly in front of the base station, and the direction directly in front of the base station is exactly the same as the direction from the base station node to the preceding node. Therefore, the nearest point must fall on the line connecting these two points and be located on the side of the base station node closer to the preceding node. The intelligent lawnmower uses the line connecting the previous node and the base station node as a reference. Starting from the base station node, it measures the nearest point distance calculated in step S2 along the direction pointing towards the previous node. The position of the endpoint on the connecting line is the precise coordinate of the nearest point. This process ensures that the nearest point meets the requirement of maintaining a preset distance from the base station and is located on the extension line of the optimal path, allowing the global path to naturally extend to this virtual point. For example, suppose the node sequence of the optimal path is A, E, F, D, where D is the base station node and the previous node is F. The coordinates of node F are 10.0 meters and 3.5 meters, and the coordinates of base station node D are 11.85 meters and 3.2 meters. The nearest point distance calculated in step S2 is 1.35 meters, and the nearest point should be located directly in front of the base station, i.e., in the direction from D to F. Therefore, a distance of 1.35 meters is measured from base station node D along the direction pointing to F. The direction vector from D to F is negative 0.185 meters and negative 0.3 meters. After normalization, multiply by 1.35 meters to obtain the offset. The coordinates of the nearest point are calculated to be 10.5 meters and 3.2 meters. This point is exactly located on the line connecting node F and base station node D.

[0079] S34. Starting from the starting node, the path passes through each node in the optimal path except for the base station node, until the nearest point, thus generating a global path.

[0080] After obtaining the optimal path and the precise landing point of the nearest point on the last edge, the intelligent lawnmower begins to construct a complete global path. The global path is a sequence of continuous path points used to guide the intelligent lawnmower from its current position to the nearest point area. The intelligent lawnmower first uses the starting node determined in step S31 as the first path point of the global path; this node corresponds to the position of the intelligent lawnmower near its current pose. Subsequently, the intelligent lawnmower adds each node after the starting node and before the base station node to the global path in the order of the node sequence in the optimal path. Each node serves as a path point, representing a key location traversed from the starting point to the vicinity of the base station. When processing a node adjacent to the base station node in the optimal path, the intelligent lawnmower also adds this node to the path point sequence. Finally, the intelligent lawnmower adds the nearest point determined in step S33 as the last path point of the global path. The resulting path point sequence starts from the starting node, passes through each intermediate node on the optimal path, and finally terminates at the nearest point, forming a complete global path. Each path point in the global path contains at least coordinate information, which can be used by the subsequent path tracking module. For example, assuming the starting node is A, the optimal path node sequence is A, E, F, D, where D is the base station node, F is the preceding node adjacent to the base station node, and the nearest point coordinates determined in step S33 are 10.5 meters and 3.2 meters. The intelligent lawnmower first adds the coordinates of node A (2.0 meters, 8.3 meters) to the global path, then adds the coordinates of node E (5.0 meters, 6.0 meters), then adds the coordinates of node F (10.0 meters, 3.5 meters), and finally adds the nearest point coordinates (10.5 meters, 3.2 meters). The final generated global path contains four path points, namely 2.0 meters, 8.3 meters, 5.0 meters, 6.0 meters, 10.0 meters, 3.5 meters, and 10.5 meters, 3.2 meters.

[0081] This embodiment constructs a complete global path from the current position of the intelligent lawnmower to the nearest point by sequentially combining the starting node, intermediate nodes on the optimal path, and the nearest point. This path utilizes the node information of the topology map to ensure the correct macroscopic direction of the path, and the insertion of the nearest point ensures a smooth transition between the path endpoint and subsequent local docking stages. The starting node, as the path's starting point, corresponds to the actual position of the intelligent lawnmower; the intermediate nodes guide the robot along the optimal path; and the nearest point, as the path's endpoint, provides the precise spatial location for switching to local recognition mode.

[0082] Furthermore, the edges in the topology map include at least one recharge channel edge; When calculating path cost using the path search algorithm, edges marked as recharge channels are assigned a lower cost weight than edges not marked as recharge channels.

[0083] Specifically, when building a topology map, the intelligent lawnmower, in addition to recording the connections between nodes, also adds attribute information to each edge to distinguish different types of paths. One important edge attribute is the recharge channel marker, used to identify whether the path represented by the edge is a specially optimized recharge channel. Recharge channels are usually paths manually marked or automatically identified during the map building phase, such as a smooth, paved road from the main lawn area to the base station. These channels are characterized by fewer obstacles, a flat surface, and safe passage. In the topology map data structure, each edge marked as a recharge channel has a specific flag bit set in its attribute field, for example, setting the Boolean value representing a recharge channel to true. When the intelligent lawnmower executes a path search algorithm, such as running the A* algorithm in step S32, the algorithm first reads the attribute information of the edge when calculating the path cost of moving from the current node to the next node along an edge. If the recharge channel flag for an edge is detected as true, meaning the edge belongs to the recharge channel, the algorithm multiplies the edge's base travel cost by a preset discount factor, which is a positive number less than one, such as 0.6. If the edge does not belong to the recharge channel, meaning it belongs to the non-recharge channel, its base travel cost remains unchanged. In this way, recharge channel edges obtain lower travel costs in path search, making the algorithm more inclined to choose the path containing recharge channel edges as the optimal path when comparing the total costs of different paths. This mechanism guides the intelligent lawnmower to prioritize returning to the base station along safe and efficient recharge channels, thereby improving the overall safety and efficiency of the recharge process. For example, suppose the topology map contains two feasible paths from the starting node to the base station node. The first path consists of edges e1, e2, and e3, where e1 and e2 are both marked as recharge channel edges, and e3 is a non-recharge channel edge. The base cost of edge e1 is 1.5, the base cost of e2 is 1.3, and the base cost of e3 is 0.9. With a preset discount factor of 0.6, the discounted cost of e1 is 0.9, the discounted cost of e2 is 0.78, and e3 remains at 0.9. The total cost of the first path is 0.9 + 0.78 + 0.9 = 2.58. The second path consists of edges e4, e5, and e6, none of which are marked as recharge path edges; they are non-recharge path edges with base costs of 1.0, 1.2, and 0.8 respectively, for a total cost of 3.0. After comparing the total costs of the two paths, the path search algorithm prioritizes the first path with the lower total cost as the optimal path, thus achieving preferential utilization of recharge path edges.

[0084] This embodiment introduces a recharge channel edge attribute into the topology map and assigns a lower cost weight to the recharge channel edge in the path search algorithm, thus implementing a priority selection mechanism for recharge channels. This mechanism enables the intelligent lawnmower to proactively avoid complex or dangerous areas when planning its recharge path, prioritizing the return to the base station along flat, safe, and efficient dedicated channels, significantly improving the safety and path quality of the recharge process.

[0085] In one possible embodiment, it also includes: D1. If data acquisition by lidar or camera fails, data acquisition will be performed in a fan-shaped manner with the current position as the center, using a preset angle range and a preset angle step value. D2. If the fan-shaped data acquisition fails, retreat a preset distance according to the current orientation and then re-acquire data.

[0086] In step D1, after the smart lawnmower reaches the nearest point and initiates local recognition, if the LiDAR fails to detect the reflective sticker, causing the first base station pose calculation to fail, or the camera fails to detect the QR code, causing the second base station pose calculation to fail, the system automatically enters the exception handling process. The smart lawnmower first records its current coordinates and, using that position as the center point, initiates a fan-shaped scanning program. The execution of the fan-shaped scan relies on two preset parameters: the angle range and the angle step value, both of which are pre-stored in the system configuration. The angle range defines the width of the scan coverage, for example, 30 degrees to the left and right, for a total span of 60 degrees. The angle step value defines the interval between each rotation search, for example, 10 degrees. Starting from the current orientation, the smart lawnmower rotates its body sequentially according to the angle step value. Each time it rotates to a new orientation angle, it pauses movement and restarts the LiDAR or camera to collect data. By employing this progressively rotating fan-shaped scanning method, the smart lawnmower gradually covers various directions within a preset angle range from its current position until it successfully collects valid data in a certain direction, or confirms failure after scanning the entire angle range. For example, suppose the smart lawnmower's camera does not detect a QR code at a nearby point, and the system's angle range is set to 30 degrees to the left and right, with an angle step of 10 degrees. The smart lawnmower first attempts to collect data at the current direction (0 degrees). If this fails, it rotates 10 degrees to the right and attempts to collect data again at the 10-degree direction. If this also fails, it continues to rotate 10 degrees to the right to try at the 20-degree direction, and so on until it reaches 30 degrees. Then it returns to the starting point and rotates 10 degrees to the left to try at the -10-degree direction, until it reaches the -30-degree direction. If a QR code is successfully detected at the 20-degree direction, the scanning stops, and the data collected in that direction is used for pose calculation. If scanning the entire 60-degree range still fails, the fan-shaped data collection is considered a failure, and the process proceeds to step D2.

[0087] In step D2, if the intelligent lawnmower fails to acquire valid data after performing the fan-shaped data acquisition in step D1, it enters a higher-level anomaly recovery process. The intelligent lawnmower first determines its backward direction based on its current orientation angle. This backward direction is typically set to be opposite to the current orientation, i.e., moving directly backward. A preset backward distance parameter, such as 0.5 meters, determines the extent of the robot's backward movement. The intelligent lawnmower activates its motion controller and moves a preset distance in a straight line in the opposite direction of the current orientation to a new position. During the backward movement, the intelligent lawnmower continuously uses LiDAR to monitor the rear environment to avoid collisions. After reaching the new position, the intelligent lawnmower restarts the data acquisition process, typically re-executing the fan-shaped data acquisition in step D1, or directly starting forward recognition from the new position. Through the backward operation, the intelligent lawnmower changes its relative distance and observation angle with the base station, potentially avoiding obstructions that cause recognition failure or improving sensor observation conditions, thereby increasing the probability of subsequent successful recognition. For example, suppose that in step D1, the fan-shaped scan fails to detect the base station reflective sticker within a 30-degree range to the left and right, causing the smart lawnmower to determine that the fan-shaped data acquisition method has failed. The system's preset distance is 0.5 meters, and the current orientation is 180 degrees, i.e., directly facing the base station. The smart lawnmower retreats 0.5 meters in the opposite direction of 180 degrees, i.e., the 0-degree direction. After reaching the new position, it restarts the LiDAR and camera to collect data. Because the distance to the base station is slightly greater after retreating, the problem of limited field of view caused by the previous close proximity is alleviated, and the LiDAR successfully detects the reflective sticker and calculates the pose of the first base station.

[0088] This embodiment significantly improves the robustness of intelligent lawnmower recognition in complex environments through a two-tiered anomaly handling mechanism: fan-shaped scanning and back-retry. Fan-shaped scanning actively searches for base station targets within a preset angle range, centered on the current position. This effectively solves the problem of single-shot recognition failures caused by robot posture deviations or sensor field-of-view limitations, allowing the robot to expand its effective observation range without moving. The back-retry strategy overcomes recognition difficulties caused by close proximity, partial obstruction, or poor viewing angles by changing the observation position, providing the system with a second chance. These two mechanisms work together to significantly improve the success rate of the recharging process without increasing hardware costs, enabling the intelligent lawnmower to cope with uncertainties in various real-world scenarios and enhancing the system's autonomy and reliability.

[0089] In one possible embodiment, it further includes: E1. After the smart lawnmower successfully connects with the base station, determine whether the positional deviation between the precise pose of the base station and the preset pose of the base station is greater than the deviation threshold, or whether the angle deviation is greater than the angle threshold. E2. If yes, perform a weighted average of the precise pose and the preset pose to obtain the corrected pose; E3. Update the preset pose of the base station according to the corrected pose.

[0090] Step E1: After the smart lawnmower successfully docks with the base station, determine whether the positional deviation between the precise pose of the base station and the preset pose of the base station is greater than the deviation threshold, or whether the angle deviation is greater than the angle threshold.

[0091] In step E1, after the intelligent lawnmower completes the physical docking with the base station and detects a stable charging current, it determines that the docking is successful. At this time, the intelligent lawnmower obtains the precise pose of the base station estimated through multi-sensor fusion during this recharging process. This precise pose is expressed in the robot coordinate system and transformed to the global map coordinate system. Simultaneously, the intelligent lawnmower reads the pre-stored preset pose of the base station from non-volatile memory. Then, the intelligent lawnmower calculates the positional and angular deviations between the precise and preset poses. The positional deviation is calculated by subtracting the x-coordinate of the preset pose from the x-coordinate of the precise pose and then squaring the result; the y-coordinate of the precise pose is also subtracted from the y-coordinate of the preset pose and then squaring the result; the two squared values ​​are added together and the square root is taken to obtain the Euclidean distance between the two points. The angular deviation is calculated by taking the absolute value of the difference between the orientation angle in the precise pose and the orientation angle in the preset pose, and normalizing this absolute value to the range of -π to +π to obtain the minimum angular difference. The intelligent lawnmower compares the calculated positional deviation with a preset positional deviation threshold in the system, and the angle deviation with a preset angle threshold. If the positional deviation is greater than the positional deviation threshold, or the angle deviation is greater than the angle threshold, it is determined that the preset pose needs to be corrected; if neither exceeds the threshold, the preset pose remains unchanged and no update is performed. For example, suppose the accurate pose of the base station obtained after successful docking is 10.52 meters x-coordinate, 3.18 meters y-coordinate, and 1 degree azimuth angle in the global coordinate system, and the preset pose of the base station read from the memory is 10.50 meters x-coordinate, 3.20 meters y-coordinate, and 0 degrees azimuth angle. The calculated positional deviation is √0.02 squared plus -0.02 squared, which equals 0.028 meters, and the angle deviation is 1 degree. The system sets the positional deviation threshold to 0.05 meters and the angle threshold to 2 degrees. Since 0.028 meters is less than 0.05 meters and 1 degree is less than 2 degrees, the correction conditions are not met, and subsequent steps are not executed.

[0092] In step E2, when the position deviation or angle deviation determined in step E1 exceeds the position deviation threshold or angle threshold, the intelligent lawnmower initiates the pose correction process. The correction uses a weighted average method, fusing the precise pose obtained from the current observation with the historically stored preset pose. The weighted average requires assigning weights to both poses. The weight for the preset pose is a decay factor close to 1, such as 0.8 or 0.9, while the weight for the precise pose is 1 minus this decay factor, such as 0.2 or 0.1. The principle for setting the weights is to maintain the stability of historical poses while absorbing new observation information, avoiding drastic pose changes due to single observation errors. Specifically, the horizontal axis of the corrected pose is equal to the horizontal axis of the preset pose multiplied by the preset pose weight, plus the horizontal axis of the precise pose multiplied by the precise pose weight; the vertical axis of the corrected pose is calculated similarly. The calculation of the orientation angle for corrected pose needs to consider the periodicity of the angle. First, the difference between the accurate pose orientation angle and the preset pose orientation angle is calculated. This difference is multiplied by the accurate pose weight and then added to the preset pose orientation angle. The result is then normalized to keep it within the range of -π to π. The pose obtained after weighted averaging is the corrected pose. For example, suppose that in step E1, it is determined that correction is needed. The preset pose is 10.50 meters x-coordinate, 3.20 meters y-coordinate, and 0 degrees orientation angle. The accurate pose is 10.58 meters x-coordinate, 3.15 meters y-coordinate, and -2 degrees orientation angle. The preset pose weight is set to 0.8, and the accurate pose weight is set to 0.2. Then the corrected pose x-coordinate is 10.50 x 0.8 + 10.58 x 0.2 = 10.516 meters, and the y-coordinate is 3.20 x 0.8 + 3.15 x 0.2 = 3.19 meters. In the orientation angle calculation, the difference between the precise pose and the preset pose is -2 degrees. The weighted orientation angle is 0 degrees plus -2 degrees multiplied by 0.2, which equals -0.4 degrees, or 359.6 degrees. Thus, the corrected pose is obtained as x-coordinate 10.516 meters, y-coordinate 3.19 meters, and orientation angle -0.4 degrees.

[0093] In step E3, after obtaining the corrected pose, the intelligent lawnmower writes this corrected pose as the new base station preset pose into the non-volatile memory, replacing the original base station preset pose. The updated preset pose will be used in subsequent recharge tasks as a reference for calculating nearest points and as the coordinates of target nodes for path searching. Through this progressive update mechanism, the base station's preset pose can be slowly adjusted with each successful recharge, gradually approaching the base station's true position, thereby compensating for base station pose drift caused by long-term use, minor collisions, or environmental changes. After the update is completed, this correction process ends. For example, continuing from the example in step E2, the intelligent lawnmower updates the original base station preset pose stored in the memory from an x-coordinate of 10.50 meters, a y-coordinate of 3.20 meters, and an orientation angle of 0 degrees to a corrected pose with an x-coordinate of 10.516 meters, a y-coordinate of 3.19 meters, and an orientation angle of -0.4 degrees. At the start of the next recharge task, the intelligent lawnmower will read this updated preset pose for nearest point calculation and global path planning.

[0094] This embodiment achieves long-term tracking capability of base station pose changes by adaptively correcting the preset pose of the base station after successful docking. When the base station undergoes slight displacement due to external force or long-term use, the deviation between the accurate pose obtained with each recharge and the preset pose is cumulatively corrected, allowing the base station coordinates stored in the map to gradually adapt to real changes and avoiding the risk of docking failure due to a fixed pose. The weighted average update method absorbs new observation information while preserving the stability of historical data, preventing single errors from causing excessive disturbance to the preset pose. This mechanism enables the intelligent lawnmower to maintain accurate memory of the base station location throughout long-term operation, significantly improving the system's robustness and adaptability, and reducing reliance on manual recalibration.

[0095] Please see Figure 3 As shown, in one embodiment, an intelligent lawnmower autonomous mapping device is provided, the device comprising: The acquisition module 301 is used to acquire a topology map and a preset pose of the base station in response to a return command. The topology map includes multiple nodes and edges connecting two adjacent nodes. The multiple nodes include a base station node representing a base station. The calculation module 302 is used to calculate the pose of the near point based on the preset pose of the base station and the preset near point distance; The planning module 303 is used to obtain the current pose of the smart lawnmower and, based on the current pose of the smart lawnmower and the pose of the nearest point, plan a global path from the current position of the smart lawnmower to the nearest point in the topology map. The estimation module 304 is used to control the smart lawnmower to move along the global path, and when the smart lawnmower is detected to have reached the nearest point during the movement, it estimates the precise pose of the base station based on at least one visual sensor. The generation module 305 is used to generate a local docking trajectory based on the current pose of the smart lawnmower and the precise pose of the base station; The docking module 306 is used to control the intelligent lawnmower to move along the local docking trajectory to complete the docking with the base station.

[0096] For other details regarding the implementation of the above technical solution by each module in the control device of the above-mentioned intelligent lawnmower, please refer to the description in the control method of the intelligent lawnmower provided in the above-mentioned embodiments of the invention, which will not be repeated here.

[0097] In one embodiment, a smart lawnmower is provided, the internal structure of which can be shown in the following diagram: Figure 4 As shown, the intelligent lawnmower 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 is used to communicate with external clients via a network connection. When executed by the processor, the computer program implements the methods described in any of the foregoing embodiments of this application.

[0098] 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.

[0099] 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.

[0100] 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.

[0101] It should be noted that the functions or steps that the computer-readable storage medium or intelligent lawnmower can achieve are described in the relevant descriptions in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0102] 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. When executed, the computer program 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 may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of 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.

[0103] 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.

[0104] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention 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 the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A control method for an intelligent lawnmower, characterized in that, Includes the following steps: In response to a return-to-base command, a topology map and a preset pose of the base station are obtained. The topology map includes multiple nodes and edges connecting two adjacent nodes. The multiple nodes include a base station node representing a base station. The pose of the nearest point is calculated based on the preset pose of the base station and the preset near point distance; Obtain the current pose of the smart lawnmower, and based on the current pose of the smart lawnmower and the pose of the nearest point, plan a global path from the current position of the smart lawnmower to the nearest point in the topology map; The intelligent lawnmower is controlled to move along the global path, and when the intelligent lawnmower is detected to have reached the nearest point during the movement, the precise pose of the base station is estimated based on at least one visual sensor. A local docking trajectory is generated based on the current pose of the intelligent lawnmower and the precise pose of the base station; The intelligent lawnmower is controlled to move along the local docking trajectory to complete the docking with the base station.

2. The control method for the intelligent lawnmower according to claim 1, characterized in that, The step of calculating the pose of the nearest point based on the preset pose of the base station and the preset near point distance includes: Obtain the preset pose of the base station, which includes the base station x-coordinate dock_x, the base station y-coordinate dock_y, and the base station orientation angle dock_yaw; The pose of the near point is calculated using the formula: near_x = dock_x + D * cos(dock_yaw), near_y = dock_y + D * sin(dock_yaw), near_yaw = dock_yaw + π; near_x represents the x-coordinate of the near point, near_y represents the y-coordinate of the near point, near_yaw represents the orientation angle of the near point, and D represents the preset near point distance.

3. The control method for the intelligent lawnmower according to claim 1, characterized in that, When the distance between the current position of the smart lawnmower and the nearest point is less than a preset switching radius, the smart lawnmower is detected to have reached the nearest point.

4. The control method for the intelligent lawnmower according to claim 1, characterized in that, The step of estimating the precise pose of the base station based on at least one visual sensor includes: Acquire laser data collected by lidar, extract point clouds whose reflection intensity exceeds a preset intensity threshold from the laser data, and cluster the extracted point clouds to obtain at least one point cloud cluster. Based on the pre-set reflective sticker features on the base station, a pair of point cloud clusters matching the reflective sticker features are identified from the at least one point cloud cluster, and the pose of the first base station is calculated based on the geometric center of the pair of point cloud clusters. Acquire image data captured by the camera, and perform QR code detection on the image data; When the QR code set by the base station is detected, the pose of the QR code relative to the camera is obtained, and the pose of the second base station is calculated based on the pose of the camera and the fixed transformation relationship between the camera and the smart lawnmower. The poses of the first base station and the poses of the second base station are fused to obtain the precise pose of the base station.

5. The control method for the intelligent lawnmower according to claim 4, characterized in that, The step of fusing the first base station pose and the second base station pose to obtain the precise pose of the base station includes: The poses of the first base station and the poses of the second base station are spatiotemporally synchronized, and weighted fusion is performed according to their respective confidence levels to obtain the precise pose of the base station.

6. The control method for the intelligent lawnmower according to claim 1, characterized in that, The step of generating a local docking trajectory based on the current pose of the intelligent lawnmower and the precise pose of the base station includes: The current pose of the intelligent lawnmower is used as the first control point; The second control point is located at a first preset distance in front of the current pose along the current orientation direction; The third control point is located at a second preset distance in front of the base station along its orientation direction, based on the precise pose of the base station. The precise pose of the base station is used as the fourth control point; Based on the first control point, the second control point, the third control point, and the fourth control point, a smooth curve is fitted and generated as the local docking trajectory.

7. The control method for the intelligent lawnmower according to claim 6, characterized in that, The smooth curve is a Bézier curve or a spline curve.

8. The control method for the intelligent lawnmower according to claim 1, characterized in that, Planning a global path from the current location of the smart lawnmower to the nearest point in the topology map includes: The current pose of the intelligent lawnmower is mapped onto the topology map, and the node closest to the current pose is taken as the starting node; Using the base station node as the target node, a path search algorithm is used to search for the optimal path from the starting node to the base station node in the topology map. The optimal path consists of a node sequence and an edge sequence connecting adjacent nodes. Based on the edge direction determined by the preceding node adjacent to the base station node in the optimal path and the base station node, and the position of the nearest point, the nearest point is determined on the line connecting the preceding node and the base station node. Starting from the initial node, the path passes through each node in the optimal path except for the base station node, until the nearest point, generating a global path point sequence.

9. The control method for the intelligent lawnmower according to claim 8, characterized in that, The edges in the topology map include at least one recharge channel edge; When calculating path cost using the path search algorithm, edges marked as recharge channels are assigned a lower cost weight than edges not marked as recharge channels.

10. The control method for the intelligent lawnmower according to claim 1, characterized in that, Also includes: When the duration of the detection of charging current exceeding the current threshold, angular velocity being less than the angular velocity threshold, and linear acceleration being less than the acceleration threshold is longer than the duration threshold, the docking is considered successful.

11. The control method for the intelligent lawnmower according to claim 1, characterized in that, Also includes: If data acquisition by lidar or camera fails, data acquisition will be performed in a fan-shaped manner with the current position as the center, using a preset angle range and a preset angle step value. If the fan-shaped data acquisition fails, move back a preset distance according to the current orientation and then re-acquire data.

12. The control method for the intelligent lawnmower according to claim 1, characterized in that, Also includes: After the smart lawnmower successfully docks with the base station, it is determined whether the positional deviation between the precise pose of the base station and the preset pose of the base station is greater than the deviation threshold, or whether the angle deviation is greater than the angle threshold. If so, the precise pose and the preset pose are weighted and averaged to obtain the corrected pose; The preset pose of the base station is updated according to the corrected pose.

13. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, implements the control method for the intelligent lawnmower as described in any one of claims 1 to 12.