Robot recharging method, robot and storage medium
By fusing and clustering the point cloud data of the mowing robot, the optimal docking point between the robot and the charging pile is calculated, which solves the problem of recharging failure caused by asynchronous point cloud data and achieves a higher recharging success rate and stability.
Patent Information
- Application Number
- CN202510721511.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-23
AI Technical Summary
During the recharging process, the lawn mower robot may experience lag or failure in recharging posture due to asynchrony of point cloud data and insufficient available point cloud data, affecting the user experience.
By obtaining multiple pre-processed point cloud frames of the target area, fusion processing and cluster analysis are performed to calculate the relative position of the robot and the optimal docking point, and control the robot's recharging.
Maintaining continuous pose estimation in long-distance scenarios improves the continuity and stability of the recharging process and increases the recharging success rate.
Smart Images

Figure CN120686813A_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the field of lawn mowing robots, and in particular to a robot recharging method, the robot, and a storage medium. [Background Technology]
[0002] Lawn mowing robots generally use lidar for environmental perception and charging pile positioning. For example, reflective stickers can be set on the charging pile, and the lidar can be used to obtain point cloud data at the reflective stickers to accurately locate the charging pile, and then control the robot to recharge.
[0003] However, since the laser emitter is constantly rotating during the point cloud data collection process, the rotational posture of the laser emitter in each frame is not necessarily exactly the same. Therefore, the position reached by the laser emitter is different from frame to frame, and the resulting point cloud is also different. In addition, the area of the reflective sticker on the charging pile is relatively small compared to the space that the lidar can scan. Therefore, when the robot is far away from the charging pile, it is easy for one frame or even two or three frames to fail to scan the reflective sticker, resulting in a small number of available point clouds or available point clouds appearing at intervals in the collected point cloud frames, causing the robot's charging posture to lag or fail to recharge, which is not conducive to the user experience. [Summary of the invention]
[0004] In view of this, it is necessary to propose a recharging method to solve the problem of robot recharging posture lag or recharging failure caused by point cloud data asynchrony and insufficient available point cloud data.
[0005] An embodiment of the present invention provides a recharging method, including: obtaining multiple pre-processed point cloud frames of a target area, where the target area is the area where a charging station is located; fusing the point cloud data in the multiple point cloud frames to obtain fused point cloud data; clustering the fused point cloud data to obtain cluster center point coordinates; calculating the relative position of a robot and an optimal docking point based on the cluster center point coordinates, where the optimal docking point is located at a preset distance directly in front of the charging station; and controlling the recharging of the robot based on the relative position of the robot and the optimal docking point.
[0006] An embodiment of the present invention also provides a robot, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the recharging method described above.
[0007] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the recharging steps described above are implemented.
[0008] In addition, the method of obtaining the preprocessed multiple point cloud frames as described above includes: obtaining multiple initial point cloud frames using a laser radar; filtering the multiple initial point cloud frames according to preset rules to obtain the preprocessed multiple point cloud frames; wherein the preset rules include eliminating at least one of the point cloud data in the initial point cloud frame whose reflection intensity is less than a first threshold, eliminating the point cloud data in the initial point cloud frame that is outside the preset range of the charging pile, and eliminating the point cloud data in the initial point cloud frame whose height difference with the laser radar is greater than a second threshold.
[0009] In addition, the point cloud data in the multiple point cloud frames are fused as described above to obtain fused point cloud data, including: converting the point cloud data in the multiple point cloud frames into a world coordinate system to obtain target point cloud frames corresponding to the multiple point cloud frames; if the number of point cloud frames currently saved by the robot is not greater than a first number, saving the target point cloud frame; if the number of point cloud frames currently saved by the robot is greater than the first number, first deleting the earliest point cloud frame saved by the robot, and then saving the target point cloud frame; superimposing and fusing the point cloud data in the target point cloud frame with the point cloud data in all point cloud frames currently saved by the robot, and when the number of superimposed point cloud data is greater than a third threshold, converting each superimposed point cloud data into the robot coordinate system to obtain the fused point cloud data.
[0010] In addition, as described above, the point cloud data in the multiple point cloud frames are all converted to the world coordinate system, including: converting the point cloud data in the multiple point cloud frames from the radar coordinate system to the world coordinate system according to the positions of the point cloud data in the multiple point cloud frames in the radar coordinate system, the position of the laser radar in the robot coordinate system, and the current position of the robot in the world coordinate system.
[0011] In addition, clustering is performed on the fused point cloud data as described above to obtain the coordinates of the cluster center points, including:
[0012] The fused point cloud data is clustered using a K-means algorithm to obtain at least two cluster center points; the number of the cluster center points is the same as the number of reflective stickers provided on the charging station.
[0013] In addition, the charging station as described above is provided with a first reflective sticker and a second reflective sticker, and the cluster center point coordinates include the first cluster center point coordinates and the second cluster center point coordinates, wherein the first cluster center point coordinates are used to indicate the position of the first reflective sticker, and the second cluster center point coordinates are used to indicate the position of the second reflective sticker.
[0014] In addition, the calculation of the relative position of the robot and the optimal docking point based on the cluster center point coordinates as described above specifically includes: calculating the center point coordinates of the charging station based on the first cluster center point coordinates and the second cluster center point coordinates; calculating a first relative position based on the center point coordinates of the charging station, the first relative position being the relative position of the center point of the charging station relative to the robot; calculating a third relative position based on the first relative position and a preset second relative position, the preset second relative position being the relative position of the optimal docking point relative to the center point of the charging station, and the third relative position being the relative position of the robot relative to the optimal docking point.
[0015] In addition, the controlling the robot to recharge according to the relative position of the robot and the optimal docking point as described above specifically includes: controlling the robot to perform forward, backward or rotational movements according to the third relative position until the robot docks with the charging station.
[0016] Compared with the existing technology, the embodiments of the present invention fuse point cloud data in the same coordinate system to obtain valid point clouds so as to maintain continuous pose estimation in long-distance scenes. By dynamically adjusting the size of the fusion window, the system can adapt to the point cloud quality in different environments. Through the fusion processing and coordinate transformation mechanism of multi-frame point cloud data, it effectively solves the problem of reduced positioning accuracy caused by the lack of valid point cloud data, improves the continuity and stability of the robot's recharging process, and improves the recharging success rate while ensuring real-time performance. [Brief Description of the Drawings]
[0017] One or more embodiments are exemplarily described by the figures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments.
[0018] Figure 1 This is a schematic diagram of the recharge method provided by an embodiment of the present invention. Figure 1 ;
[0019] Figure 2 An embodiment of the present invention provides a Figure 1 A specific flow chart of step 101 in FIG.
[0020] Figure 3 The present invention provides an embodiment based on Figure 1 Another specific flow diagram of step 101 in FIG;
[0021] Figure 4 An embodiment of the present invention provides a Figure 1 A specific flow chart of step 103 in FIG.
[0022] Figure 5 It is a schematic diagram of the robot structure provided by one embodiment of the present invention. [Specific implementation method]
[0023] To make the objectives, technical solutions, and advantages of the present invention more apparent, various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will appreciate that many technical details are provided in the various embodiments of the present invention to help readers better understand the present application. However, even without these technical details and the various variations and modifications based on the following embodiments, the technical solutions claimed in the present application can still be implemented.
[0024] In the description of the embodiments of the present invention, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly indicate the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.
[0025] Robot lawn mower recharging refers to the process in which the robot automatically returns to the charging station to recharge after completing a task or when the battery is low. The robot lawn mower is equipped with a non-repetitive 3D lidar. When recharging is needed, the robot lawn mower uses the lidar to collect point clouds around the charging station. Because the charging station is affixed with highly reflective reflective stickers, a point cloud with intensity characteristic information can be obtained. By analyzing and processing the point cloud data, the position data of the charging station relative to the current robot coordinate system can be obtained, and the robot recharging can be controlled based on this data. However, since the laser emitter is constantly driven to rotate, the rotation posture of the laser emitter in each scanning cycle is not necessarily exactly the same, so the point cloud data between each frame of the point cloud is different. In addition, because reflective stickers are generally made of multiple 80mm*140mm stickers made of highly reflective materials, they are relatively small objects compared to the space that the laser radar can scan. Therefore, when the robot is far away from the charging pile, one frame or even two or three frames may not be able to scan the reflective stickers, resulting in fewer available point clouds in the obtained point cloud frames, or the available point clouds are sometimes available and sometimes not, making it impossible to accurately calculate the position of the charging pile or the machine's charging posture may be stuck, which in turn causes recharging failure.
[0026] To solve the above problems, the present invention proposes a recharging method, which effectively solves the problem of reduced positioning accuracy caused by the lack of valid point cloud data through the fusion processing and coordinate transformation mechanism of multi-frame point cloud data, improves the continuity and stability of the robot recharging process, and improves the recharging success rate. Figure 1 As shown, this embodiment specifically includes the following steps:
[0027] Step 101: Acquire multiple pre-processed point cloud frames of the target area, and perform fusion processing on the point cloud data in the multiple point cloud frames to obtain fused point cloud data.
[0028] Specifically, the target area is the area where the charging station is located. In this embodiment, after collecting point cloud data frame by frame in the radar coordinate system, preprocessing is first performed. Preprocessing can be used to filter out point cloud data that is useless for the positioning of the charging pile. Since the point cloud data in the initially collected point cloud frame is in the radar coordinate system and the robot is in motion, the reference coordinate system of the point cloud (radar coordinate system) is constantly changing. At this time, the point cloud data cannot be fused and needs to be adjusted to a unified coordinate system (a coordinate system in which the origin position does not change) for fusion, thereby obtaining fused point cloud data in the same coordinate system.
[0029] In one example, Figure 2 As shown, the acquisition of multiple pre-processed point cloud frames of the target area in step 101 specifically includes the following steps:
[0030] Step 1011: Acquire multiple initial point cloud frames using a laser radar.
[0031] Specifically, a laser radar is used to scan the target area where the charging pile is located. During the scanning process, an initial point cloud frame of the target area can be obtained by dynamically adjusting the scanning parameters (such as scanning angle and frequency). In this embodiment, the laser radar continuously emits a laser beam at a frequency of 10 Hz (10 scanning cycles per second), and each scanning cycle lasts for 100 milliseconds. The point cloud data collected within this 100 millisecond period is a frame.
[0032] Step 1012: Filtering the multiple initial point cloud frames according to a preset rule to obtain multiple pre-processed point cloud frames;
[0033] The preset rules include: removing point cloud data in the initial point cloud frame whose reflection intensity is less than a first threshold, removing point cloud data in the initial point cloud frame that is outside a preset range of the charging pile, or removing point cloud data in the initial point cloud frame whose height difference from the lidar is greater than a second threshold. Specifically, to improve point cloud quality and positioning accuracy, this embodiment uses preset screening rules to perform feature screening on the point cloud data in the initial point cloud frame. The preset screening rules can be constructed based on physical properties of the point cloud data (such as reflection intensity threshold, distance range) or geometric features (such as point cloud distribution density), and exclude interference points generated by environmental noise or non-charging facilities. For example, by setting a reflection intensity threshold, high-reflectivity patches on charging piles can be effectively identified, while distance screening can filter out invalid points that are too close or too far. In addition, the screening process can also adopt a dynamic threshold adjustment strategy to adaptively optimize the screening parameters based on changes in ambient lighting or the robot's motion state. This embodiment does not limit the specific screening rules. In this embodiment, the preset rules include: a first filtering rule, and / or a second filtering rule, and / or a third filtering rule; wherein the first filtering rule is to eliminate point cloud data in the initial point cloud frame whose reflection intensity is less than a first threshold; the second filtering rule is to eliminate point cloud data in the initial point cloud frame that is outside the preset range of the charging pile; the third preset rule is to eliminate point cloud data in the initial point cloud frame whose height difference with the laser radar is greater than a second threshold.
[0034] Specifically, due to the strong reflection (almost the original light intensity reflection) characteristics of the reflective tape, this embodiment can be based on the reflection intensity of each point cloud data in the initial point cloud frame for screening, filtering out point cloud data with a reflection intensity less than a second threshold value, the second threshold value can be up to 255, and this embodiment does not impose specific restrictions on the value of the second threshold value. This embodiment can also be filtered based on the spatial range through the second screening rule. Since the purpose of this embodiment is to locate the charging pile, the point cloud data outside the charging pile range can be filtered out. The charging pile range can be determined by the pre-stored charging pile position. For example, the charging pile coordinates in the pre-stored position are used as the reference point, and the preset lengths are extended in the positive and negative directions of the X, Y, and Z axes to construct a spatial cube. The preset length is determined according to the actual size of the charging pile. For example, the charging pile coordinates are used as the reference point, and 0.5 meters (preset length) are extended in the positive and negative directions of the X, Y, and Z axes to construct a spatial cube. For example, if the coordinates of the charging pile are (x0, y0, z0), the boundary range of the spatial cube is [x0-0.5, x0+0.5], [y0-0.5, y0+0.5], [z0-0.5, z0+0.5]. This embodiment does not limit the specific value of the preset length. In addition to the range of the charging pile, since the laser radar is tilted forward, the points on the rear side of the robot are relatively sparse and have low credibility, and the point cloud data in the rear direction of the robot can also be filtered out. In addition, it is also possible to screen and filter based on the distance relationship between the point cloud data in the initial point cloud frame and the laser radar, and eliminate the point cloud data in the initial point cloud frame whose height difference with the laser radar is greater than the third threshold. The third threshold can be 30cm, and this embodiment does not impose specific restrictions on this.
[0035] In another example, Figure 3 As shown, step 101: fusing the point cloud data in the plurality of point cloud frames to obtain fused point cloud data may specifically include the following steps:
[0036] Step 1013: convert the point cloud data in the multiple point cloud frames into the world coordinate system to obtain a target point cloud frame corresponding to the multiple point cloud frames.
[0037] Since the initial point cloud frame recognized by the radar is based on the radar coordinate system, the pre-processed point cloud frame is also based on the radar coordinate system. Since the robot is in motion, the reference coordinate system of the acquired point cloud frame is constantly changing. Therefore, the multiple pre-processed point cloud frames acquired in step 101 cannot be directly fused in the radar coordinate system.
[0038] Therefore, the point cloud data in multiple point cloud frames are uniformly converted to the world coordinate system to obtain target point cloud frames corresponding to the multiple point cloud frames, so as to facilitate subsequent point cloud fusion. The point cloud frames converted to the world coordinate system are recorded as target point cloud frames.
[0039] Specifically, in one example, the step 1013 of converting the point cloud data in the plurality of point cloud frames into the world coordinate system includes:
[0040] The point cloud data in the multiple point cloud frames are converted from the radar coordinate system to the world coordinate system according to the position of each point cloud data in the multiple point cloud frames in the radar coordinate system, the position of the lidar in the robot coordinate system, and the current position of the robot in the world coordinate system.
[0041] Specifically, this embodiment needs to establish a conversion relationship from the radar coordinate system to the robot coordinate system. The specific conversion can be completed by cascading multiple coordinate transformation matrices. The position of each point cloud data in multiple point cloud frames in the radar coordinate system, that is, the coordinate transformation matrix that transforms the radar coordinate system to the point cloud data coordinate system (the coordinate system with any point cloud data as the origin) is denoted as The position of the laser radar in the robot coordinate system, that is, the coordinate transformation matrix of the robot coordinate system to the laser radar coordinate system (hereinafter referred to as the radar coordinate system) is recorded as The current position of the robot in the world coordinate system, that is, the coordinate transformation matrix from the world coordinate system to the robot coordinate system is recorded as By calculation The position of each point cloud data in the world coordinate system can be obtained.
[0042] Step 1014: If the number of point cloud frames currently saved by the robot is not greater than the first number, save the target point cloud frame.
[0043] Step 1015: If the number of point cloud frames currently saved by the robot is greater than the first number, the earliest point cloud frame saved by the robot is deleted first, and then the target point cloud frame is saved.
[0044] Specifically, after obtaining the target point cloud frame, it is necessary to manage the currently stored point cloud frames based on the number of frames currently stored by the robot. This embodiment uses a sliding window-like mechanism to manage the stored point cloud data. When the number of stored point cloud frames does not reach a first number, the new frame (the target point cloud frame) is directly added to the queue; when the number exceeds the first number, the oldest frame is automatically removed to maintain the window size.
[0045] Step 1016: Superimpose and fuse the point cloud data in the target point cloud frame with the point cloud data in all point cloud frames currently saved by the robot. When the number of superimposed point cloud data is greater than a third threshold, convert all superimposed point cloud data into the robot coordinate system to obtain the fused point cloud data.
[0046] If the number of point clouds in all the point cloud frames currently saved by the robot is greater than the third threshold, it means that there are sufficient valid point clouds and the subsequent charging pile positioning can be performed. If the number of point clouds in the point cloud frames currently saved by the robot is not greater than the third threshold, it means that there are insufficient valid point clouds and it is necessary to continue to acquire new point cloud frames until there are sufficient valid point clouds. The third threshold can be 15, and this embodiment does not impose any specific restrictions on this.
[0047] In another example, clustering the fused point cloud data in step 102 to obtain the coordinates of the cluster center point includes:
[0048] The K-means algorithm is used to cluster the fused point cloud data to obtain at least two cluster centers; the number of cluster centers is the same as the number of reflective stickers installed on the charging station.
[0049] Specifically, after obtaining the fused point cloud data, to better calculate the relative positional relationship between the robot and the charging station, the fused point cloud data is clustered in the robot coordinate system. The K-means clustering analysis algorithm is used to extract the charging station's feature points. The point cloud cluster containing the reflective stickers is identified through clustering, and its spatial centroid coordinates are calculated as the location coordinates of the cluster center. This process not only extracts the charging station's location information but also suppresses noise interference through redundant observation of multiple frames of data. The coordinates of the cluster center can be calculated using weighted averaging or robust estimation methods to further improve positioning accuracy. This embodiment does not limit the specific method for determining the cluster center.
[0050] In one example, a first reflective sticker and a second reflective sticker are provided on the charging station, and the cluster center point coordinates include the first cluster center point coordinates and the second cluster center point coordinates, wherein the first cluster center point coordinates are used to indicate the position of the first reflective sticker, and the second cluster center point coordinates are used to indicate the position of the second reflective sticker.
[0051] Specifically, a preset clustering algorithm is used to cluster the fused point cloud data in the robot coordinate system. When the clustering result meets the first preset condition, at least two position coordinates are determined as the cluster center coordinates based on the position of the cluster center in the clustering result (i.e., the position of the two reflective stickers). In this embodiment, if there are two reflective stickers, there are two cluster center coordinates, including: a first cluster center coordinate and a second cluster center coordinate, wherein the first cluster center coordinate is used to indicate the position of the first reflective sticker, and the second cluster center coordinate is used to indicate the position of the second reflective sticker; wherein the first preset condition is that the number of cluster centers is at least two and is consistent with the number of reflective stickers on the charging pile. It should be noted that this embodiment does not impose a specific restriction on the number of cluster centers.
[0052] In another example, the relative position of the robot and the optimal docking point is calculated according to the coordinates of the cluster center point in step 103, such as Figure 4 As shown, the following steps are included:
[0053] Step 1031: Calculate the center point coordinates of the charging station according to the first cluster center point coordinates and the second cluster center point coordinates.
[0054] Specifically, after obtaining the coordinates of the two cluster centers, first calculate the geometric midpoint of the line connecting the two points as the coordinates of the charging pile center. Assuming the coordinates of the two cluster centers are P1(x_a, y_a) and P2(x_b, y_b), the coordinates of the charging pile center are ((x_a+x_b) / 2, (y_a+y_b) / 2).
[0055] Step 1032: Calculate a first relative position based on the coordinates of the center point of the charging station, where the first relative position is the relative position of the center point of the charging station relative to the robot. The position of the robot is represented by the position of the center of the rear axle of the robot.
[0056] Step 1033: Calculate a third relative position based on the first relative position and a preset second relative position, where the preset second relative position is the relative position of the optimal docking point relative to the center point of the charging station, and the third relative position is the relative position of the robot relative to the optimal docking point.
[0057] Specifically, after obtaining the first relative position, the robot can be combined with the second relative position of the optimal docking point relative to the center point of the charging station to derive a third relative position of the robot relative to the optimal docking point. The third relative position includes the translation amount and rotation angle of the robot relative to the optimal docking point.
[0058] The specific calculation process can be carried out as follows: the center point (x_a, y_a) and the midpoint of (x_b, y_b) of the two highly reflective reflective stickers are used as the center point P of the charging pile. charge , and get the normal vector of the center point;
[0059] The center coordinate of the charging pile P charge Relative to the rear axle center P of the lawn mower o The coordinate transformation matrix is denoted as
[0060] Determine the optimal docking point P docking Relative to the center point coordinate P of the charging pile charge The coordinate transformation matrix is Among them, the best docking point P docking The rear axle center P of the lawn mower when it is docked with the charging pile oSince the charging port of the lawn mower described in this solution is located at the front end of the lawn mower, the optimal docking point P docking Located in front of the center of the charging pile and at the same angle as the center of the charging pile P charge The difference between them is about the distance of a fuselage, and this application does not impose any specific restrictions on this. It should be noted that since the charging station includes a main body and a bottom plate, when the robot is successfully docked, the entire body is located on the bottom plate, so the optimal docking point P docking Still on the charging station, not outside of it.
[0061] Calculate the optimal docking point P docking Relative to the rear axle center P of the lawn mower o The relative position relationship (coordinate transformation matrix ),in Inverse solution to obtain the rear axle center P of the lawn mower O Relative to the ideal docking position P docking The relative position relationship (coordinate transformation matrix );
[0062] in
[0063] according to The final relative position parameters between the robot and the optimal docking point, i.e., the third relative position [Δx, Δy, yaw], are obtained. The relative position parameters [Δx, Δy, yaw] are sent to the robot's path planning module. The path planning module adjusts the robot's posture according to the parameters [Δx, Δy, yaw] indicated by the third relative position until the robot docks with the charging station.
[0064] In another example, controlling the robot to recharge according to the relative position of the robot and the optimal docking point in step 104 includes the following steps:
[0065] Determine the Δy value in [Δx, Δy, yaw];
[0066] If Δy≠0, it means the robot is not on the central axis of the charging station. At this time, first rotate the robot's front end in place so that the front end stops at a preset angle (to ensure that the charging pile is within the optimal scanning area of the lidar). Depending on the positive or negative value of Δy, control the robot to move forward or backward in a straight line so that Δy=0 (that is, return to the central axis of the charging station). Then rotate the front end in place so that yaw=0. Then, control the robot to move forward in a straight line in the x-axis direction until it docks with the charging station (making Δx=0). If Δy≠0 and yaw≠0 during the straight-line forward process, control the robot's front end direction for fine-tuning.
[0067] If Δy = 0 (ideal value), it means the robot is exactly on the central axis of the charging station. At this time, rotate the vehicle head so that yaw = 0. Then, control the robot to move forward in a straight line along the x-axis until it docks with the charging station (making Δx = 0). If Δy ≠ 0 and yaw ≠ 0 during the straight-line movement, control the vehicle head direction for fine-tuning.
[0068] When Δy=0, yaw=0 (indicating that the robot is on the central axis of the charging station and the front of the vehicle is facing the charging station), the robot is controlled to move forward in a straight line until it docks with the charging station (making Δx=0). If Δy≠0, yaw≠0 during the straight-line movement, the direction of the vehicle head is controlled for fine-tuning.
[0069] By locating the charging station, the robot, and the optimal docking point, and combining the mutual conversion between coordinate systems to determine the relative position relationship between the robot and the optimal docking point (the third relative position), this relative position relationship is represented by translation distance and rotation angle. Based on the third relative position, the robot is controlled to recharge until the translation distance and rotation angle between the robot and the optimal docking point are both zero, completing the recharge. This solution decouples the location of environmental features from the mission target posture, achieving a direct mapping from perception to control, reducing computational complexity, and improving the accuracy and probability of successful recharge.
[0070] Another embodiment of the present invention relates to a robot, such as Figure 5 As shown, it includes: at least one processor 202; and a memory 201 that is communicatively connected to the at least one processor 202; wherein the memory 201 stores instructions that can be executed by the at least one processor 202, and the instructions are executed by the at least one processor 202 to enable the at least one processor 202 to execute any of the above method embodiments.
[0071] Among them, the memory 201 and the processor 202 are connected in a bus manner. The bus can include any number of interconnected buses and bridges. The bus connects one or more processors 202 and various circuits of the memory 201 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits. These are all well known in the art and, therefore, are not further described in this article. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 202 is transmitted on the wireless medium via the antenna. Furthermore, the antenna also receives data and transmits the data to the processor 202.
[0072] Processor 202 is responsible for bus management and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 201 can be used to store data used by processor 202 when performing operations. It should be noted that the robot in this embodiment is the lawn mowing robot described in the aforementioned embodiments.
[0073] An embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of the recharge method embodiment recorded in any of the above embodiments are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be repeated here.
[0074] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0075] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solutions disclosed herein comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken with respect to user personal information to prevent unauthorized access to user personal information data and maintain the security of user personal information and network security.
[0076] An embodiment of the present invention also provides a computer-readable storage medium, which stores programs or instructions. When the program or instructions are executed by a processor, the various processes of the embodiments of the recharge method such as any one of the above-mentioned ones are implemented, and the same technical effects can be achieved. To avoid repetition, they will not be repeated here.
[0077] That is, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.
[0078] In an embodiment of the present invention, the point cloud data obtained by the lidar is preprocessed and, based on coordinate transformation relationships, fused within the same coordinate system to produce fused point cloud data. Clustering and relative position calculations are then performed based on the fused point cloud data to determine the relative positional relationship between the robot and the optimal docking position. Posture adjustments are then made based on this relative positional relationship to achieve docking with the robot. Through the fusion processing and coordinate transformation mechanism of multi-frame point cloud data, the problem of reduced positioning accuracy caused by the lack of valid point cloud data is effectively resolved. Continuous pose estimation can be maintained in long-distance scenarios, improving the continuity and stability of the robot's recharging process and increasing the recharging success rate while ensuring real-time performance.
[0079] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present invention, and that in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A robot recharging method, characterized in that: The method comprises the following steps: Acquire multiple pre-processed point cloud frames of a target area, where the target area is an area where the charging station is located; performing fusion processing on the point cloud data in the plurality of point cloud frames to obtain fused point cloud data; Performing clustering processing on the fused point cloud data to obtain the coordinates of the cluster center point; Calculating the relative position of the robot and an optimal docking point based on the coordinates of the cluster center point, wherein the optimal docking point is located at a preset distance directly in front of the charging station; The robot is controlled to recharge according to the relative position of the robot and the optimal docking point.
2. The recharging method according to claim 1, characterized in that: The obtaining of the plurality of pre-processed point cloud frames comprises: Use LiDAR to acquire multiple initial point cloud frames; The multiple initial point cloud frames are filtered according to preset rules to obtain multiple preprocessed point cloud frames; wherein the preset rules include eliminating at least one of the point cloud data in the initial point cloud frame whose reflection intensity is less than a first threshold, eliminating the point cloud data in the initial point cloud frame that is outside the preset range of the charging pile, and eliminating the point cloud data in the initial point cloud frame whose height difference with the laser radar is greater than a second threshold.
3. The recharging method according to claim 1, characterized in that: The fusing point cloud data in the plurality of point cloud frames to obtain fused point cloud data includes: Converting the point cloud data in the plurality of point cloud frames into a world coordinate system to obtain target point cloud frames corresponding to the plurality of point cloud frames; If the number of point cloud frames currently saved by the robot is not greater than the first number, saving the target point cloud frame; If the number of point cloud frames currently saved by the robot is greater than the first number, first deleting the earliest point cloud frame saved by the robot, and then saving the target point cloud frame; The point cloud data in the target point cloud frame is superimposed and fused with the point cloud data in all point cloud frames currently saved by the robot. When the number of superimposed point cloud data is greater than a third threshold, each superimposed point cloud data is converted to the robot coordinate system to obtain the fused point cloud data.
4. The recharging method according to claim 3, characterized in that: The step of converting the point cloud data in the plurality of point cloud frames into a world coordinate system includes: The point cloud data in the multiple point cloud frames are converted from the radar coordinate system to the world coordinate system according to the positions of the point cloud data in the multiple point cloud frames in the radar coordinate system, the position of the laser radar in the robot coordinate system, and the current position of the robot in the world coordinate system.
5. The recharging method according to claim 1, characterized in that: The clustering process is performed on the fused point cloud data to obtain the coordinates of the cluster center point, including: Using a K-means algorithm to cluster the fused point cloud data to obtain at least two cluster centers; The number of the cluster centers is the same as the number of reflective stickers provided on the charging station.
6. The recharging method according to claim 5, characterized in that: The charging station is provided with a first reflective sticker and a second reflective sticker, and the cluster center point coordinates include the first cluster center point coordinates and the second cluster center point coordinates, wherein the first cluster center point coordinates are used to indicate the position of the first reflective sticker, and the second cluster center point coordinates are used to indicate the position of the second reflective sticker.
7. The recharging method according to claim 6, characterized in that: Calculating the relative position of the robot and the optimal docking point according to the cluster center point coordinates includes: Calculating the center point coordinates of the charging station according to the first cluster center point coordinates and the second cluster center point coordinates; Calculating a first relative position according to the coordinates of the center point of the charging station, where the first relative position is a relative position of the center point of the charging station relative to the robot; A third relative position is calculated based on the first relative position and a preset second relative position, where the preset second relative position is the relative position of the optimal docking point relative to the center point of the charging station, and the third relative position is the relative position of the robot relative to the optimal docking point.
8. The recharging method according to claim 7, characterized in that: The controlling the robot to recharge according to the relative position between the robot and the optimal docking point specifically includes: The robot is controlled to perform a forward, backward or rotational movement according to the third relative position until the robot docks with the charging station.
9. A robot, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the recharging method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that A computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the recharging method according to any one of claims 1 to 8 are implemented.