Area alignment method and system based on cleaning robot, equipment and medium

By extracting and processing lidar data in the laser sweeping robot and determining the map correction angle, the room boundary occlusion and jagging problems are solved, accurate alignment and high-precision positioning of the map are achieved, and the work efficiency and user experience of the robot are improved.

CN119279450APending Publication Date: 2025-01-10IKITBOT (SHENZHEN) TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411474460.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

During the cleaning process of laser sweeping robots, due to the complexity of furniture arrangement and environment, the longest straight line group of room boundaries may be blocked or interrupted, resulting in angle judgment deviations, which in turn affects the accuracy and visual effect of the map. The map boundaries are often Jagged shape appears, affecting the robot's navigation performance.

Method used

By obtaining the lidar data collected by the cleaning robot during work, extracting straight lines and filtering candidate straight lines according to the preset length threshold, dividing straight lines groups, determining the group with the largest sum of straight lines lengths is the reference straight lines group, and calculating its average angle as map correction The angle is used and adjust the position in real time when walking and creating the map to align the map with the display screen.

Benefits of technology

Improve the accuracy and consistency of the map built by the cleaning robot, align the map with the display screen, enhance the user experience, and maintain high-precision positioning in a dynamic environment, improving the robot's work efficiency and coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119279450A_ABST
    Figure CN119279450A_ABST
Patent Text Reader

Abstract

The invention provides an area alignment method and system based on a cleaning robot, equipment and a medium, and relates to the technical field of information, and the method comprises the steps: obtaining laser radar data collected by the cleaning robot in a working process, the laser radar data comprises a plurality of key frame nodes, and each key frame node comprises a node pose and a node laser point; acquiring a node laser point of a first key frame node, extracting straight lines in the node laser point, and acquiring the length and angle of each straight line; acquiring an average angle of the reference straight line group, determining the average angle as a map correction angle, acquiring a current pose of the cleaning robot, and performing real-time adjustment according to the current pose and the map when the cleaning robot performs walking mapping to obtain a map aligned with a display screen. The accuracy and consistency of the map constructed by the cleaning robot are improved, so that the finally generated map can be aligned with the display screen, and the user experience is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a cleaning robot-based area alignment method and system, equipment and medium. Background Art

[0002] During the cleaning process of the laser sweeping robot, the room boundaries need to be accurately identified. However, due to the arrangement of furniture and the complexity of the environment, the longest straight line group may be blocked or interrupted, resulting in deviations in angle judgment. In addition, after the overall map is built, it is usually necessary to adjust the map to align with the display screen so that users can intuitively understand and operate it. However, in this process, the map boundaries often appear jagged, which not only affects the visual effect of the map, but may also cause a loss of map accuracy, thereby affecting the robot's navigation performance. Summary of the invention

[0003] The present invention provides a region alignment method based on a cleaning robot, which mainly includes:

[0004] Acquire laser radar data collected by the cleaning robot during operation, wherein the laser radar data includes a plurality of key frame nodes, each key frame node includes a node pose and a node laser point;

[0005] Obtain the node laser point of the first key frame node, extract all straight lines in the node laser point, and obtain the length and angle of each straight line;

[0006] According to a preset length threshold, straight lines whose length is greater than the preset length threshold are screened out as candidate straight lines;

[0007] According to a preset angle range, the candidate straight lines are divided into a plurality of straight line groups, each straight line group comprising candidate straight lines whose angles are within a corresponding preset angle range;

[0008] The sum of the lengths of the straight lines in each straight line group is obtained, and the straight line group with the largest sum of the straight line lengths is determined as the reference straight line group;

[0009] Obtaining an average angle of the reference straight line group, and determining the average angle as a map correction angle;

[0010] The current posture of the cleaning robot is obtained, and when the cleaning robot is walking and mapping, real-time adjustments are made according to the current posture and the map to obtain a map aligned with the display screen.

[0011] The present invention provides a regional alignment system based on a cleaning robot, which mainly includes:

[0012] A laser radar data acquisition module is used to acquire the laser radar data collected by the cleaning robot during operation, wherein the laser radar data includes a plurality of key frame nodes, each of which includes a node pose and a node laser point;

[0013] A key frame node processing module, used to obtain a node laser point of a first key frame node, extract straight lines in the node laser point, and obtain the length and angle of each straight line;

[0014] A line screening and grouping module, for screening out candidate lines whose lengths are greater than a preset length threshold according to a preset length threshold, and dividing the candidate lines into a plurality of line groups, each line group containing candidate lines whose angles are within a corresponding preset angle range;

[0015] A straight line group analysis module; used to obtain the sum of the straight line lengths in each straight line group, and determine the straight line group with the largest sum of straight line lengths as the reference straight line group;

[0016] The map correction module is used to obtain the average angle of the reference straight line group, determine the average angle as the map correction angle, obtain the current posture of the cleaning robot, and make real-time adjustments according to the current posture and the map when the cleaning robot is walking and mapping, so as to obtain a map aligned with the display screen.

[0017] The present invention provides an electronic device, comprising: one or more processors, and a memory; the processor and the memory are coupled; the memory is used to store computer program codes, the computer program codes comprising computer instructions;

[0018] When the processor executes the computer instructions, the electronic device executes the above-mentioned area alignment method based on the cleaning robot.

[0019] The present invention provides a computer-readable storage medium, which stores computer instructions or programs. When the computer instructions or programs are run on a computer, the computer executes the above-mentioned area alignment method based on a cleaning robot.

[0020] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:

[0021] The present invention discloses a method for regional alignment based on a cleaning robot. When starting to build a map, the present invention first obtains the offset angle, and adjusts the offset angle when building the map, directly obtaining a map aligned with the display screen, while correcting and building the map, so that no jagged edges will appear. Not only does it improve the accuracy and consistency of the map constructed by the cleaning robot, but it also enables the final generated map to be aligned with the display screen, thereby enhancing the user experience. In addition, the process of adjusting the map based on real-time posture ensures that high-precision positioning can be maintained even in a dynamic environment, thereby improving the robot's work efficiency and coverage. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 The present invention is a flow chart of a method for regional alignment based on a cleaning robot. DETAILED DESCRIPTION

[0023] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] like Figure 1 In this embodiment, a method for regional alignment based on a cleaning robot may specifically include:

[0025] S101. Obtain laser radar data collected by the cleaning robot during operation, wherein the laser radar data includes a plurality of key frame nodes, and each key frame node includes a node posture and a node laser point.

[0026] The laser radar data collected by the cleaning robot during the working process is obtained, and multiple key frame nodes are obtained by analyzing and processing the laser radar data. The pose of each key frame node is estimated, and the position and orientation of the node in the global coordinate system are determined by matching the odometer and the laser radar. According to the pose estimation result, the pose information of each key frame node is obtained, including the position coordinates and orientation angle of the node. The laser points collected by each key frame node are filtered, and the effective laser points of the node are obtained by removing noise points and outliers. The filtered laser points are converted to the global coordinate system, and the position of each laser point in the global map is determined according to the node pose information. The converted laser points are rasterized, and the laser points are mapped to the two-dimensional grid map to determine whether each grid is occupied by the laser point. According to the grid occupancy, the local grid map corresponding to each key frame node is obtained to represent the environmental information around the node. The pose of the key frame node is associated with the corresponding local grid map, and a topological map reflecting the environmental structure is formed by establishing a topological relationship between the nodes. The topological map is optimized, and globally consistent node poses and maps are obtained through loop detection and graph optimization algorithms, which serve as the basis for the navigation and positioning of the cleaning robot.

[0027] For example, during the working process, the cleaning robot collects environmental data at a frequency of 10Hz through the Silan A1 laser radar carried by it, and obtains 3600 laser points per second. The system analyzes and processes the collected laser data, extracts environmental features such as corner points and planes, selects data frames with large amounts of information as key frame nodes, and extracts a key frame every 5 seconds on average. For each key frame node, the encoder odometer and ICP laser matching algorithm are combined to calculate the position and posture of the node relative to the global coordinate system, with a position accuracy better than 5cm and a heading accuracy better than 2°. The system obtains the position coordinates (x, y) and the heading angle θ of the key frame node as the posture information. For the original laser point of the node, the voxel filtering algorithm is used to downsample at a resolution of 5cm to remove noise points; then, 5% of the outliers are removed through statistical filtering to obtain the valid laser point set of the node. According to the node posture, the filtered laser point coordinates are transformed to the global coordinate system. The system constructs a two-dimensional grid map with a resolution of 5 cm, maps each laser point to the corresponding grid, and uses a probability model to update the grid occupancy probability, and finally obtains a local occupancy grid map of each keyframe node, reflecting the environmental information within a range of 10 square meters around the node. By calculating the relative pose transformation between keyframe nodes and using the minimum spanning tree algorithm, the topological relationship between nodes is established to form an environmental topological map. Finally, the system detects that the robot is looping in the environment and triggers graph optimization. The g2o graph optimization library is used, with node pose as the optimization variable and laser matching as the observation constraint, to perform maximum likelihood estimation and optimize the global map. After convergence, a globally consistent map and node pose are obtained as the basis for robot navigation and positioning.

[0028] S102, obtaining a node laser point of a first key frame node, extracting all straight lines in the node laser point, and obtaining the length and angle of each straight line.

[0029] The laser point data of the first keyframe node is obtained, and the original point cloud information of the node is obtained by laser radar scanning. The obtained original point cloud data is preprocessed, and the noise points are removed by filtering algorithm to obtain a clean node laser point set. According to the distance relationship between laser points, the node laser point set is divided into multiple independent point cloud clusters by clustering algorithm. Linear fitting is performed on each point cloud cluster, and the line segments in the point cloud cluster are extracted by least squares method or RANSAC algorithm. The length of each extracted line segment is calculated, and the length of the line segment is obtained by Euclidean distance formula according to the coordinates of the end points of the line segment. If the length of the line segment is greater than 20cm, the line segment is retained; if the length of the line segment is less than or equal to 20cm, the line segment is discarded. For each retained line segment, its angle in the two-dimensional plane is calculated, and the angle between the line segment and the positive direction of the x-axis is obtained by the inverse tangent function. The length and angle information of each line segment are associated to obtain a set of all qualified lines in the node laser point. The line set is sorted according to the angle size, the main lines in different directions are determined, and a structured description of the node is formed.

[0030] Exemplarily, first obtain the original point cloud information of the first key frame node, which contains 10,000 three-dimensional points. Then use the statistical filtering algorithm to remove noise points, set the filter radius to 5 cm, and obtain 8,000 clean node laser points after filtering. Then use the Euclidean distance clustering algorithm, set the clustering radius to 10 cm, and divide the node laser points into 50 independent point cloud clusters. Use the RANSAC algorithm to perform straight line fitting for each point cloud cluster, set the inner point threshold to 2 cm, and extract a total of 100 straight line segments. Calculate the length of each straight line segment and retain 60 straight line segments with a length greater than 20 cm. For these 60 straight line segments, calculate the angle between the positive direction of the x-axis in the xoy plane by the inverse tangent function, and obtain an angle range of -90° to 90°. Associate the length and angle information of the straight line segment, and after sorting by angle, it is found that there are three main directions of 0°, 45° and 90°, corresponding to the front and back, oblique and left and right walls of the room, respectively. Finally, a structured description of the keyframe node is formed, which contains 60 straight line segments with the main directions of 0°, 45° and 90°. This structured description can be used for subsequent map construction and positioning navigation applications.

[0031] S103 . According to a preset length threshold, straight lines whose length is greater than the preset length threshold are screened out as candidate straight lines.

[0032] Get all the lines in the line group, and traverse the line group to get the starting and ending coordinates of each line in turn. According to the starting and ending coordinates, use the Euclidean distance formula to calculate the length of each line and get a line length list. Set a preset length threshold, and filter out lines with lengths greater than the preset threshold by comparing with the threshold as candidate lines. If the number of candidate lines is 0, reduce the preset length threshold by a fixed value, and re-execute step 3 until the number of candidate lines is greater than 0. Sort the candidate lines from large to small in length to get a sorted candidate line list. Take the first line in the sorted candidate line list, which is the longest line, and determine that the line group to which the line belongs is the longest line group. Calculate the angle of the longest line, and use the inverse tangent function to find the angle between the line and the horizontal direction according to the starting and ending coordinates of the longest line. Determine whether the angle is between 0 and 180 degrees. If it is not within the range, convert the angle to the range to get a normalized angle value. Output the information of the longest line group and the corresponding angle value as the result, and complete the extraction and angle calculation process of the longest line group.

[0033] For example, first, by traversing the straight line group, the starting point coordinates (x1, y1) and the end point coordinates (x2, y2) of each straight line are obtained in turn. Then, the Euclidean distance formula is used

[0034] sqrt((x2-x1)^2+(y2-y1)^2) calculates the length of each line and obtains a list of line lengths, such as [10.5, 8.2, 12.7, 6.9]. Next, set a preset length threshold, such as 10.0, and compare it with the threshold to filter out lines [10.5, 12.7] whose length is greater than the preset threshold as candidate lines. If the number of candidate lines is 0, reduce the preset length threshold by a fixed value, such as 0.5, and re-screen until the number of candidate lines is greater than 0. Sort the candidate lines by length from large to small to obtain a sorted list of candidate lines [12.7, 10.5]. Take the first line in the sorted list of candidate lines, which is the longest line with a length of 12.7, and determine that the line group to which the line belongs is the longest line group. Calculate the angle of the longest straight line using the inverse tangent function atan2(y2-y1,x2-x1). According to the coordinates of the starting point (2,3) and the end point (8,9) of the longest straight line, the angle between the straight line and the horizontal direction is 45.0 degrees. Determine whether the obtained angle is between 0 and 180 degrees. If it is not within the range, convert the angle to the range to obtain a normalized angle value. Finally, output the information of the longest straight line group and the corresponding angle value of 45.0 degrees as the result, completing the extraction of the longest straight line group and the angle calculation process.

[0035] S104. Divide the candidate straight lines into a plurality of straight line groups according to a preset angle range, each straight line group including candidate straight lines whose angles are within a corresponding preset angle range.

[0036] According to the preset angle range, the angle range is divided into multiple intervals, and each interval corresponds to a line group. Traverse each candidate line, calculate its angle, determine in which preset angle interval the angle falls, and divide the line into the corresponding line group. For each line group, traverse the lines in the group, accumulate and calculate the total length of all the lines in the group, and obtain the total length of the line group. Compare the total lengths of all line groups, find the line group with the largest length, and determine it as the longest line group. Get all the lines in the longest line group, calculate the average of the angles of these lines, and use it as the average angle of the line group. Take the average angle of the longest line group as a candidate angle and record it. If the number of lines in the longest line group is small, the group may be noise, ignore the group, select the second longest line group, and repeat steps 5-6. Divide the longest line group twice, and divide it into smaller angle intervals according to the angle to improve the angle accuracy. Repeat steps 5-7 in the subdivided longest line group to obtain the final accurate angle, which is output as the angle of the longest line.

[0037] Exemplarily, according to the preset angle range, 0 to 180 degrees can be divided into 18 intervals, each interval spanning 10 degrees, corresponding to 18 straight line groups. Traverse each candidate straight line and calculate its angle. For example, if the angle of a straight line is 63 degrees, it is divided into a straight line group of 60-70 degrees. For each straight line group, the lengths of all the straight lines in the group are accumulated to obtain the total length of the group. For example, the 60-70 degree group has 5 straight lines with lengths of 34, 27, 41, 38, and 29 pixels, respectively, and the total length of the group is 169 pixels. Compare the total lengths of the 18 straight line groups. Assuming that the 60-70 degree group has the largest length, it is determined to be the longest straight line group. Calculate the arithmetic mean of the angles of all the straight lines in the longest straight line group as the average angle of the group. For example, the angles of the 5 straight lines are 61, 63, 66, 67, and 69 degrees, respectively, and the average angle is 65.2 degrees, which is used as the candidate angle. If there are less than 3 lines in the longest straight line group, it may be noise. Ignore this group and select the second longest straight line group to repeat the above steps. Subdivide the longest straight line group again by angle. For example, divide the 60-70 degree group into smaller 2 degree intervals, 61-62 degrees, 63-64 degrees, etc., to improve the angle accuracy. In the subdivided longest straight line group, repeat the average angle calculation steps to obtain the precise angle as the final output. For example, there are 3 straight lines in the 63-64 degree interval, with angles of 63.2, 63.7, and 63.9 degrees, and an average angle of 63.6 degrees, which is the final angle of the longest straight line. Through grouping, summation, averaging, subdivision and other algorithms, find the longest straight line group from the candidate lines, extract its average angle, and improve the angle accuracy through secondary subdivision to finally obtain the accurate angle of the longest straight line.

[0038] S105, obtaining the sum of the lengths of the straight lines in each straight line group, and determining the straight line group with the largest sum of the straight line lengths as the reference straight line group.

[0039] According to the straight line detection algorithm, the straight line segments in the image are obtained to obtain the endpoint coordinates and length information of the straight line segments. The straight line segments are grouped according to the angle of the straight line segments to obtain straight line groups within different angle ranges. Each straight line group is traversed, and the lengths of all the straight line segments in the group are accumulated to obtain the sum of the straight line lengths of each straight line group. The sum of the straight line lengths of all straight line groups is compared to obtain the straight line group with the largest sum of straight line lengths. The straight line group with the largest sum of straight line lengths is determined as the reference straight line group, and the angle information of the straight line group is extracted. If the angle of the reference straight line group is within the preset angle range, the angle is used as the final angle angle; otherwise, the angle range is adjusted and steps 2-5 are re-executed. According to the determined angle angle, the straight line segments in the reference straight line group are screened to eliminate the straight line segments with a large deviation from the angle angle. The equation and angle of the fitted straight line are obtained by fitting the remaining straight line segments in the reference straight line group using the least squares method. The angle of the fitted straight line is used as the final angle angle for subsequent image processing and analysis.

[0040] Exemplarily, the Hough transform algorithm is used to detect straight lines in the image to obtain the endpoint coordinates and length information of the straight line segment. According to the angle of the straight line segment, it is divided into different angle ranges such as 0-30 degrees, 30-60 degrees, and 60-90 degrees, and the length of the straight line segment in each angle range is accumulated. It is found that the sum of the lengths of the straight lines in the range of 30-60 degrees is the largest, reaching 120 pixels, so this angle range is determined as the reference straight line group. Since 30-60 degrees is within the preset target angle range of 45±5 degrees, its average angle of 53 degrees is directly used as the angle angle. The straight line group is traversed again, and the straight line segments with a deviation of more than 10 degrees from 53 degrees are eliminated. The least squares method is used to fit the remaining straight line segments, and the fitted straight line equation is y=0.75x+20, and the angle is 53.13 degrees. Finally, 53.13 degrees is used as the angle angle of the image for subsequent image processing and analysis tasks such as tilt correction and text positioning.

[0041] S106: Obtain an average angle of the reference straight line group, and determine the average angle as a map correction angle.

[0042] Count the length of each line in the line group and get the length data of each line. Sort the line length data and find the line group with the longest length. Extract the angle of the longest line group and record this angle value. Get the angle data of all line groups and sort the data. Calculate the average of the obtained angle data to get the average angle. Format the average angle to adapt to subsequent use. Use the formatted average angle as the reference angle for map correction. Perform angle correction on the map data using the reference angle. Output the corrected map data to complete the map correction process.

[0043] Exemplarily, in the process of map correction, it is first necessary to identify the straight line elements in the map through image processing technology, and use the Hough transform algorithm to calculate the length of each straight line. For example, assume that the lengths of the straight lines detected by the Hough transform are 200 meters, 150 meters, 180 meters and 220 meters respectively. Next, sort these length data to find the longest straight line, that is, the 220-meter straight line. Then, extract the angle of this longest straight line, assuming it is 45 degrees. Subsequently, collect the angle data of all straight lines, such as 45 degrees, 30 degrees, 60 degrees and 45 degrees, and sort the data to calculate the average of these angles. Using the arithmetic mean method, the average angle is calculated to be (45+30+60+45) / 4=45 degrees. In order to adapt to subsequent use, this average angle is formatted to ensure that it conforms to the standard format of map data processing. With this formatted 45 degrees as the reference angle, the map data is angle-corrected by the map processing software to ensure that the direction of the map is consistent with the actual geographic direction. Finally, the corrected map data is output to complete the entire map correction process. In this way, through a series of information technology processing, the accuracy and practicality of map data are ensured.

[0044] S107, obtaining the current posture of the cleaning robot, and performing real-time adjustments according to the current posture and the map when the cleaning robot is walking and building a map, so as to obtain a map aligned with the display screen.

[0045] The current posture of the cleaning robot is rotated and transformed using the map correction angle to obtain the corrected posture; according to the corrected posture, the map created by the cleaning robot is adjusted in real time to keep the map aligned with the display screen; the process of obtaining the current posture, posture correction, and map adjustment is repeated until the cleaning robot completes mapping the entire area, and finally a complete map aligned with the screen is obtained.

[0046] Exemplarily, during the process of walking and mapping, the cleaning robot obtains a key frame node every 1 meter, records the position (x, y, θ) of the node and the laser point data obtained by 360-degree laser radar scanning. The laser point data of the first key frame node is analyzed, and the incremental method is used to extract the straight line. The distance threshold is set to 2cm, the angle threshold is set to 3°, and the minimum straight line length is 20cm. The extracted straight lines are divided into three groups according to the angle: the straight lines with angles in the range of 87°ˉ93°, 177°ˉ183°, and 267°ˉ273° are divided into one group respectively. For each group of straight lines, the lengths of all the straight lines in the group are summed to obtain the total length of the group. Compare the total lengths of the three groups of straight lines, and the group with the largest total length is the main direction. Calculate the average value of the angles of all the straight lines in the group and determine it as the map correction angle φ. During the mapping process, the cleaning robot obtains the current position (x', y', θ') every 10cm it moves. The current posture is transformed using a rotation matrix to obtain the corrected posture (x", y", θ"), where θ" = θ'-φ. The map is adjusted according to the corrected posture to keep it consistent with the screen coordinate system. The process of obtaining the posture, correcting the posture, and adjusting the map is repeated until the cleaning robot completes mapping the entire area, and finally a complete map is obtained that is aligned with the screen coordinate system.

[0047] S108. Planning a cleaning path for the cleaning robot according to the corrected map, and controlling the cleaning robot to perform cleaning work along the cleaning path.

[0048] According to the corrected map, the path planning algorithm is used to plan the cleaning path of the cleaning robot to obtain an optimal path covering the entire cleaning area. The planned cleaning path is converted into a series of control instructions, and the instructions are sent to the driving system of the cleaning robot through the controller. After receiving the control instructions, the driving system of the cleaning robot controls the movement of the motor and wheels to make the cleaning robot move along the planned cleaning path. In the process of the cleaning robot moving along the path, the position and posture information of the cleaning robot is obtained in real time through sensors such as odometers and gyroscopes. The obtained position and posture information is compared with the planned cleaning path to determine whether the cleaning robot has deviated from the predetermined path. If the cleaning robot deviates from the predetermined path, the correction control amount is calculated according to the deviation amount, and the correction instruction is sent through the controller to adjust the movement of the cleaning robot so that it returns to the predetermined path. During the movement of the cleaning robot, the cleaning robot cleans the ground through cleaning devices such as vacuum cleaners and mops to complete the cleaning task. During the cleaning process, the cleaning robot detects whether there is an obstacle in front of it in real time through the obstacle sensor. If an obstacle is detected, the cleaning robot is controlled to detour to avoid collision. When the cleaning robot completes the cleaning task of the entire cleaning path, the cleaning robot is controlled to return to the charging station for automatic charging to prepare for the next cleaning.

[0049] Exemplarily, based on the corrected map, the A* algorithm is used to plan the cleaning path of the cleaning robot. The A* algorithm is a heuristic search algorithm that selects the optimal path by calculating the evaluation function f(n)=g(n)+h(n) of each node, where g(n) represents the actual cost from the starting point to the current node, and h(n) represents the estimated cost from the current node to the target node. The planned cleaning path is converted into a series of control instructions, such as "forward 10 meters", "turn right 90 degrees", etc., and the instructions are sent to the driving system of the cleaning robot through the CAN bus. After receiving the control instructions, the driving system of the cleaning robot controls the movement of the motor and wheels through the PID control algorithm, so that the cleaning robot moves along the planned cleaning path. During the journey, the mileage is measured by the odometer, and the steering angle is measured by the gyroscope to obtain the position and posture information of the cleaning robot in real time. The acquired position and posture information is compared with the planned cleaning path. If the deviation error exceeds 5 cm, the correction control amount is calculated based on the deviation, such as "turn left 10 degrees" and "back 5 cm". The correction command is sent through the controller to adjust the movement of the cleaning robot so that it returns to the predetermined path. During the movement, the cleaning robot vacuums the ground with a vacuum cleaner and mops the ground to complete the cleaning task. At the same time, the ultrasonic sensor is used to detect in real time whether there are obstacles within a range of 1 meter. If an obstacle is detected, the cleaning robot is controlled to bypass it to avoid collision. When the cleaning robot completes the cleaning task of the entire cleaning path, it is controlled to return to the charging pile through infrared tracking for automatic charging to prepare for the next cleaning.

[0050] The present invention provides a regional alignment system based on a cleaning robot, which mainly includes:

[0051] A laser radar data acquisition module is used to acquire the laser radar data collected by the cleaning robot during operation, wherein the laser radar data includes a plurality of key frame nodes, each of which includes a node pose and a node laser point;

[0052] A key frame node processing module, used to obtain a node laser point of a first key frame node, extract straight lines in the node laser point, and obtain the length and angle of each straight line;

[0053] A line screening and grouping module, for screening out candidate lines whose lengths are greater than a preset length threshold according to a preset length threshold, and dividing the candidate lines into a plurality of line groups, each line group containing candidate lines whose angles are within a corresponding preset angle range;

[0054] A straight line group analysis module; used to obtain the sum of the straight line lengths in each straight line group, and determine the straight line group with the largest sum of straight line lengths as the reference straight line group;

[0055] The map correction module is used to obtain the average angle of the reference straight line group, determine the average angle as the map correction angle, obtain the current posture of the cleaning robot, and make real-time adjustments according to the current posture and the map when the cleaning robot is walking and mapping, so as to obtain a map aligned with the display screen.

[0056] The present invention provides an electronic device, comprising: one or more processors, and a memory; the processor and the memory are coupled; the memory is used to store computer program codes, the computer program codes comprising computer instructions;

[0057] When the processor executes the computer instructions, the electronic device executes the above-mentioned area alignment method based on the cleaning robot.

[0058] The present invention provides a computer-readable storage medium, which stores computer instructions or programs. When the computer instructions or programs are run on a computer, the computer executes the above-mentioned area alignment method based on a cleaning robot.

[0059] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A regional alignment method based on a cleaning robot, characterized in that: include: Acquire laser radar data collected by the cleaning robot during operation, wherein the laser radar data includes a plurality of key frame nodes, each key frame node includes a node pose and a node laser point; Obtaining a node laser point of a first key frame node, extracting straight lines in the node laser point, and obtaining the length and angle of each straight line; According to a preset length threshold, candidate straight lines whose length is greater than the preset length threshold are screened out, and the candidate straight lines are divided into a plurality of straight line groups, each straight line group including candidate straight lines whose angles are within a corresponding preset angle range; The sum of the lengths of the straight lines in each straight line group is obtained, and the straight line group with the largest sum of the straight line lengths is determined as the reference straight line group; The average angle of the reference straight line group is obtained, and the average angle is determined as the map correction angle. The current posture of the cleaning robot is obtained, and real-time adjustments are made according to the current posture and the map when the cleaning robot is walking and mapping, so as to obtain a map aligned with the display screen.

2. The method according to claim 1, characterized in that The extracting of the straight line in the node laser point comprises: Dividing the node laser points into a plurality of laser point groups, each laser point group includes at least two laser points; For each laser point group, a straight line is fitted according to the coordinates of each laser point in the laser point group, and is used as the fitting straight line of the laser point group.

3. The method according to claim 1, characterized in that The obtaining of the length and angle of each straight line includes: Get the endpoint coordinates of each straight line and calculate the length of the straight line based on the endpoint coordinates; The angle between each straight line and a preset reference line is obtained, and the angle is determined as the angle of the straight line.

4. The method according to claim 1, characterized in that The dividing the candidate straight lines into a plurality of straight line groups comprises: According to the preset angle step, the angle range of 0 to 360 degrees is divided into a plurality of preset angle ranges; The preset angle range to which the angle of each candidate straight line belongs is determined, and the candidate straight line is divided into a corresponding straight line group.

5. The method according to claim 1, characterized in that Before obtaining the average angle of the reference straight line group, the method further includes: For each straight line group, the angle of each straight line in the straight line group is obtained, the average angle of the straight line group is calculated, and the average angle is determined as the average angle of the straight line group.

6. The method according to claim 1, characterized in that The obtaining of the current posture of the cleaning robot comprises: The current position coordinates and current orientation of the cleaning robot are acquired, and the current position coordinates and the current orientation are determined as the current posture of the cleaning robot.

7. The method according to claim 1, characterized in that The step of performing real-time adjustment according to the current posture and the map when the cleaning robot is walking and mapping, and obtaining a map aligned with the display screen, includes: The map correction angle is used to rotate the current posture of the cleaning robot to obtain the corrected posture; According to the corrected posture, the map created by the cleaning robot is adjusted in real time to keep the map aligned with the display screen; The process of obtaining the current posture, posture correction, and map adjustment is repeated until the cleaning robot completes mapping of the entire area, and finally a complete map aligned with the screen is obtained.

8. A regional alignment system based on a cleaning robot, characterized in that: The system comprises: A laser radar data acquisition module, used to acquire laser radar data collected by the cleaning robot during operation, wherein the laser radar data includes a plurality of key frame nodes, each of which includes a node pose and a node laser point; A key frame node processing module, used to obtain a node laser point of a first key frame node, extract straight lines in the node laser point, and obtain the length and angle of each straight line; A line screening and grouping module, for screening out candidate lines whose lengths are greater than a preset length threshold according to a preset length threshold, and dividing the candidate lines into a plurality of line groups, each line group containing candidate lines whose angles are within a corresponding preset angle range; A straight line group analysis module; used to obtain the sum of the straight line lengths in each straight line group, and determine the straight line group with the largest sum of straight line lengths as the reference straight line group; The map correction module is used to obtain the average angle of the reference straight line group, determine the average angle as the map correction angle, obtain the current posture of the cleaning robot, and make real-time adjustments according to the current posture and the map when the cleaning robot is walking and mapping, so as to obtain a map aligned with the display screen.

9. An electronic device, characterized in that: include: One or more processors, and a memory; the processor and the memory are coupled; the memory is used to store computer program code, the computer program code includes computer instructions; When the processor executes the computer instructions, the electronic device executes the area alignment method based on the cleaning robot as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions or programs, and when the computer instructions or programs are executed on a computer, the computer executes the cleaning robot-based area alignment method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Robot positioning method, mobile robot and storage medium

    CN121577036A