Positioning method and device of cleaning robot, computer equipment and medium

By extracting and matching the collection of line segments during the positioning process of cleaning robots, the positioning errors caused by incorrect positioning are solved, the positioning accuracy and cleaning efficiency are improved, and the risk of collision and fall is reduced.

CN119394286APending Publication Date: 2025-02-07IKITBOT (SHENZHEN) TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411474465.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

If the positioning of the cleaning robot is incorrect during the positioning process, it may lead to errors in positioning, which will affect the cleaning efficiency and safety.

Method used

By obtaining the original map pre-stored by the cleaning robot, multiple first line segments are extracted to form a first line segment set, and by adjusting the position of the position of the reflection point is obtained by emitting lasers, the second line segment is extracted to form a second line segment set, and two The pose with the largest matching score is selected for positioning.

Benefits of technology

Improve the accuracy of positioning, thereby improving the cleaning efficiency, reducing the probability of hitting walls or furniture and falling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119394286A_ABST
    Figure CN119394286A_ABST
Patent Text Reader

Abstract

The invention provides a cleaning robot positioning method and device, computer equipment and a medium, and the method comprises the steps: extracting a plurality of first line segments in an original map to obtain a first line segment set, and obtaining a second line segment set corresponding to each pose, and calculating the matching score of each second line segment set and the first line segment set, and selecting the pose corresponding to the second line segment set with the maximum matching score for positioning. The robot has the beneficial effects that the positioning accuracy is improved, then the cleaning efficiency is improved, and the probability that the robot collides with walls or furniture and even falls into stairs or steps is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a positioning method, device, computer equipment and medium for a cleaning robot. Background Art

[0002] Cleaning robots use lidar for positioning and mapping. Currently, during the positioning process, if the posture of the cleaning robot is incorrect, it may lead to positioning errors. Positioning errors may cause the robot to repeatedly clean the same area while missing other areas, reducing cleaning efficiency. In addition, if the robot incorrectly determines its own position, it may collide with walls or furniture, or even fall down stairs or steps. Summary of the invention

[0003] The main purpose of the present invention is to provide a cleaning robot positioning method, device, computer equipment and medium, aiming to solve the problem that incorrect posture may lead to easy positioning errors.

[0004] The present invention provides a cleaning robot positioning method, comprising:

[0005] Acquiring an original map pre-stored by the cleaning robot;

[0006] Extracting a plurality of first line segments in the original map to obtain a first line segment set;

[0007] The posture of the cleaning robot is adjusted multiple times, and the position information of multiple reflection points corresponding to each posture is obtained by emitting lasers to the surroundings;

[0008] Extracting multiple second line segments from the position information of multiple reflection points corresponding to each posture to obtain a set of second line segments corresponding to each posture;

[0009] Calculating a matching score between each of the second line segment sets and the first line segment set;

[0010] The posture corresponding to the second line segment set with the largest matching score is selected for positioning.

[0011] Furthermore, the step of calculating the matching score between each of the second line segment sets and the first line segment set includes:

[0012] Vectorizing each first line segment in the first line segment set to obtain a first vector corresponding to each first line segment, and generating a first line segment fingerprint based on each first vector, and vectorizing each second line segment in each second line segment set to obtain a second vector corresponding to each second line segment, and generating a second line segment fingerprint based on each second vector;

[0013] The similarity between the first line segment fingerprint and each of the second line segment fingerprints is calculated, and is used as a matching score between the second line segment set and the first line segment set.

[0014] Furthermore, the step of extracting a plurality of first line segments in the original map to obtain a first line segment set includes:

[0015] Inputting the original map into a preset feature extraction network to obtain a first line segment feature vector;

[0016] The first line segment feature vector is converted into a first grayscale image by a preset grayscale method, and the grayscale image is converted into a first grayscale image according to the formula Calculate a first pixel average value of a first grayscale image; wherein H represents the height of the grayscale image, W represents the width of the grayscale image, and P(x, y) represents a pixel value at a position where the width is x and the height is y;

[0017] According to the formula Preprocessing the first grayscale image to obtain a first preprocessed image;

[0018] Performing morphological corrosion on the first preprocessed image, and bridging discontinuous parts of the first preprocessed image by a morphological dilation method, to obtain a first target image;

[0019] The first line segments in the first target image are extracted to obtain a first line segment set.

[0020] Furthermore, the step of extracting a plurality of second line segments from the position information of a plurality of reflection points corresponding to each posture to obtain a set of second line segments corresponding to each posture includes:

[0021] Constructing a second grayscale image corresponding to each posture according to the position information of the multiple reflection points of each posture;

[0022] A plurality of second line segments are extracted from the second grayscale image to obtain a set of second line segments corresponding to each posture.

[0023] Furthermore, the step of selecting the posture corresponding to the second line segment set with the largest matching score for positioning includes:

[0024] Based on the position information of multiple reflection points corresponding to a second line segment set with the largest matching score, determine the distance and direction to the obstacle to construct a target map;

[0025] The target map is matched with the original map to obtain the position of the cleaning robot in the original map, thereby completing the positioning of the cleaning robot.

[0026] Furthermore, after the step of extracting a plurality of second line segments from the position information of a plurality of reflection points corresponding to each posture, the method further includes:

[0027] Calculate the length of each of the second line segments;

[0028] Eliminate the second line segment whose length is less than the preset length.

[0029] Furthermore, the step of adjusting the posture of the cleaning robot multiple times and emitting laser light to the surroundings to obtain position information of multiple reflection points corresponding to each posture includes:

[0030] Presetting the rotation angle of the cleaning robot;

[0031] The cleaning robot is rotated in a counterclockwise direction in sequence, and lasers are emitted to the surroundings after each rotation to obtain position information of multiple reflection points corresponding to each posture.

[0032] The present invention also provides a positioning device for a cleaning robot, comprising:

[0033] An acquisition module, used to acquire an original map pre-stored by the cleaning robot;

[0034] A first extraction module, used for extracting a plurality of first line segments in the original map to obtain a first line segment set;

[0035] An adjustment module, used for adjusting the posture of the cleaning robot multiple times, and acquiring position information of multiple reflection points corresponding to each posture by emitting lasers to the surroundings;

[0036] A second extraction module is used to extract multiple second line segments from the position information of multiple reflection points corresponding to each posture to obtain a set of second line segments corresponding to each posture;

[0037] A calculation module, used for calculating a matching score between each of the second line segment sets and the first line segment set;

[0038] A selection module is used to select the posture corresponding to the second line segment set with the largest matching score for positioning.

[0039] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0040] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.

[0041] The beneficial effects of the present invention are as follows: by extracting multiple first line segments in the original map to obtain a first line segment set, obtaining a second line segment set corresponding to each posture, and calculating the matching score between each second line segment set and the first line segment set, the posture corresponding to the second line segment set with the largest matching score is selected for positioning. This can improve the accuracy of positioning, thereby improving the cleaning efficiency, and effectively reducing the probability of hitting a wall or furniture, or even falling down stairs or steps. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flow chart of a positioning method of a cleaning robot according to an embodiment of the present invention;

[0043] Figure 2 It is a schematic block diagram of the structure of a positioning device of a cleaning robot according to an embodiment of the present invention;

[0044] Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application.

[0045] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not 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.

[0047] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly. The connection can be a direct connection or an indirect connection.

[0048] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone.

[0049] In addition, in the present invention, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0050] Reference Figure 1 The present invention proposes a positioning method for a cleaning robot, comprising:

[0051] S1: Acquire an original map pre-stored by the cleaning robot;

[0052] S2: extracting a plurality of first line segments in the original map to obtain a first line segment set;

[0053] S3: adjusting the posture of the cleaning robot multiple times, and emitting laser light to the surroundings to obtain position information of multiple reflection points corresponding to each posture;

[0054] S4: extracting multiple second line segments from the position information of multiple reflection points corresponding to each posture to obtain a second line segment set corresponding to each posture;

[0055] S5: Calculate the matching score between each of the second line segment sets and the first line segment set;

[0056] S6: Select the posture corresponding to the second line segment set with the largest matching score for positioning.

[0057] As described in the above step S1, the original map pre-stored by the cleaning robot is obtained, wherein the original map is a map pre-stored by the cleaning robot during the cleaning process, and can be directly extracted from the memory of the cleaning robot.

[0058] As described in step S2 above, multiple first line segments in the original map are extracted to obtain a first line segment set. Specifically, the line segments can be extracted by traversing the original map and extracting the start coordinates and end coordinates of each line segment, thereby obtaining multiple first line segments and then obtaining the first line segment set. That is, it should be noted that the line segments in the first line segment set are not only the lengths of each first line segment, but also their start coordinates and end coordinates.

[0059] As described in step S3 above, the posture of the cleaning robot is adjusted multiple times, and the position information of multiple reflection points corresponding to each posture is obtained by emitting lasers to the surroundings. That is, the position information of multiple reflection points is obtained through the laser radar on the cleaning robot, and each posture corresponds to multiple reflection points. , thereby achieving accurate recognition and positioning of the posture of the cleaning robot. In this way, the cleaning robot can perceive the surrounding environment more accurately, plan cleaning paths and perform cleaning tasks more effectively. At the same time, by continuously acquiring and updating posture information, the cleaning robot can also adjust its own motion trajectory in real time to adapt to complex and changeable environmental scenes and improve cleaning efficiency and coverage.

[0060] As described in step S4 above, multiple second line segments are extracted from the position information of multiple reflection points corresponding to each posture to obtain a second line segment set corresponding to each posture. The position information of multiple reflection points corresponding to each posture is obtained, and these position information can be expressed as two-dimensional or three-dimensional coordinates. For the reflection point set of each posture, some line segment extraction algorithms, such as Hough transform, RANSAC algorithm, etc., can be used to identify possible line segments. Through the above algorithm, the reflection points can be clustered and straight lines can be fitted to obtain line segments that meet certain conditions. Through the extracted line segments, the second line segment set corresponding to each posture can be obtained. The obtained second line segments can describe the characteristics of the surrounding environment, such as the edges of objects such as walls and furniture.

[0061] As described in step S5 above, the matching score of each of the second line segment sets and the first line segment set is calculated. Specifically, some line segment matching methods can be used, such as least squares fitting, nearest neighbor matching, etc. The specific steps are as follows: for each first line segment, calculate its matching score with all second line segments, and the matching score can be measured by calculating the distance, angle, overlap degree, etc. between the two line segments. For each first line segment, select the second line segment with the closest distance or angle to it, and calculate the matching score. Commonly used calculation methods include Euclidean distance, cosine similarity, etc. By weighted summing the matching score of each first line segment, the overall matching score of each second line segment set and the first line segment set is calculated according to the importance of matching different line segments. In a specific embodiment, matching can be performed by constructing a fingerprint. The specific matching calculation method will be described in detail later and will not be repeated here.

[0062] As described in step S6 above, the posture corresponding to the second line segment set with the largest matching score is selected for positioning. Through the second line segment set with the largest matching score, the cleaning robot can obtain the reference line segment that best matches the actual environment structure, thereby more accurately positioning its own position and posture. And the posture corresponding to the second line segment set with the largest matching score is selected, and the cleaning robot can use this posture as the current reference point to perform positioning according to the characteristics of the surrounding environment. This can improve the accuracy of positioning, thereby improving the cleaning efficiency, and effectively reducing the probability of hitting walls or furniture, or even falling down stairs or steps.

[0063] In one embodiment, the step S5 of calculating the matching score between each of the second line segment sets and the first line segment set includes:

[0064] S501: vectorizing each first line segment in the first line segment set to obtain a first vector corresponding to each first line segment, and generating a first line segment fingerprint based on each first vector, and vectorizing each second line segment in each second line segment set to obtain a second vector corresponding to each second line segment, and generating a second line segment fingerprint based on each second vector;

[0065] S502: Calculate the similarity between the first line segment fingerprint and each of the second line segment fingerprints, and use it as a matching score between the second line segment set and the first line segment set.

[0066] As described in the above steps S501-S502, for each line segment in the first line segment set, the endpoint coordinates of the line segment can be used to represent a two-dimensional or three-dimensional vector. For example, for a line segment in a plane, the two endpoint coordinates of the line segment can be used to represent x=(x1, y1) and y=(x2, y2), so the vector of the line segment can be represented as a vector V=(x2-x1, y2-y1), and the first vector is normalized, that is, divided by the length of the vector to ensure the accuracy of the direction information comparison. This is the vectorization process of the first line segment. For each first vector, a fingerprint map of the first line segment can be generated based on its characteristics such as direction and length, and various feature description methods, such as hash functions, feature extraction algorithms, etc., can be used to convert the vector into a comparable fingerprint representation. Similarly, for each second line segment in the second line segment set, vectorization is also performed, and then a fingerprint map of the second line segment is generated. By generating a fingerprint map of a line segment, it is more convenient to compare and match the features of the line segment. For the fingerprint of each first line segment and the fingerprint of each second line segment, some similarity measurement methods can be used to calculate the similarity between them, such as cosine similarity, Euclidean distance, Jaccard similarity coefficient, etc., and the obtained value is used as the matching score.

[0067] In one embodiment, the step S2 of extracting a plurality of first line segments in the original map to obtain a first line segment set includes:

[0068] S201: inputting the original map into a preset feature extraction network to obtain a first line segment feature vector;

[0069] S202: Convert the first line segment feature vector into a first grayscale image using a preset grayscale method, and Calculate a first pixel average value of a first grayscale image; wherein H represents the height of the grayscale image, W represents the width of the grayscale image, and P(x, y) represents a pixel value at a position where the width is x and the height is y;

[0070] S203: According to the formula Preprocessing the first grayscale image to obtain a first preprocessed image;

[0071] S204: performing morphological corrosion on the first preprocessed image, and bridging discontinuous parts of the first preprocessed image by a morphological dilation method to obtain a first target image;

[0072] S205: Extracting first line segments in the first target image to obtain a first line segment set.

[0073] As described in the above steps S201-S205, the extraction of the first line segment is achieved. The feature extraction network can be a convolutional neural network or a recurrent neural network. Since the present application is to extract line segments, only the line segment features in the image are considered in the feature extraction network. The first line segment feature vector is converted into a corresponding first grayscale image, and the color information can be ignored. Preprocessing can eliminate noise in the image and smooth the image. The preprocessing step may include but is not limited to image filtering, histogram equalization, sharpening, noise reduction, etc. Morphological erosion eliminates smaller details and noise in the image by performing a local minimum operation on the pixels in the image, thereby obtaining a smoother first line segment. By bridging the discontinuous parts in the image through the morphological expansion method, the interrupted parts in the first line segment can be connected, the gaps can be eliminated and a complete first line segment can be formed. Then the first line segment in the first target image is extracted to obtain a first line segment set.

[0074] In one embodiment, the step S4 of extracting a plurality of second line segments from the position information of a plurality of reflection points corresponding to each posture to obtain a set of second line segments corresponding to each posture includes:

[0075] S401: constructing a second grayscale image corresponding to each posture according to position information of multiple reflection points of each posture;

[0076] S402: Extract multiple second line segments from the second grayscale image to obtain a second line segment set corresponding to each posture.

[0077] As described in the above steps S401-S402, the second grayscale image corresponding to each posture is constructed according to the position information of multiple reflection points in each posture. At each posture, a new map can be formed according to the corresponding reflection points. The specific formation method is the existing technology and will not be repeated here. After the second grayscale map is formed, the second line segment set can be obtained by referring to the above method of extracting the first line segment set from the first grayscale map.

[0078] In one embodiment, the step S6 of selecting the posture corresponding to the second line segment set with the largest matching score for positioning includes:

[0079] S601: Determine the distance and direction to the obstacle based on the position information of multiple reflection points corresponding to a second line segment set with the largest matching score, so as to construct a target map;

[0080] S602: Match the target map with the original map to obtain the position of the cleaning robot in the original map, thereby completing the positioning of the cleaning robot.

[0081] As described in the above steps S601-S602, the distance and direction between the cleaning robot and each obstacle are calculated by using the position information of the reflection point in combination with the position and posture information of the cleaning robot. This can be done by calculating the distance and direction between the reflection point and the robot, and then calculating the position, distance and direction of the obstacle based on the relative position information. These distance and direction information are combined into a target map. The target map is matched with the original map, and a SLAM (Simultaneous Localization and Mapping) algorithm or other map matching algorithm can be used to estimate the position of the cleaning robot in the original map by matching map features. By matching the target map with the original map, an estimate of the position of the cleaning robot in the original map can be obtained, thereby completing the positioning of the cleaning robot.

[0082] In one embodiment, after the step S4 of extracting a plurality of second line segments from the position information of a plurality of reflection points corresponding to each posture, the method further includes:

[0083] S511: Calculate the length of each of the second line segments;

[0084] S512: Eliminate the second line segments whose length is less than the preset length.

[0085] In one embodiment, if the second line segment is too short, it may be an erroneously generated line segment that cannot be used to locate the cleaning robot. Therefore, the second line segment with a length less than a preset length may be removed to improve accuracy.

[0086] In one embodiment, the step S3 of adjusting the posture of the cleaning robot multiple times and emitting lasers to the surroundings to obtain position information of multiple reflection points corresponding to each posture includes:

[0087] S301: presetting the rotation angle of the cleaning robot;

[0088] S302: Rotate the cleaning robot in a counterclockwise direction in sequence, and emit laser light to the surroundings after each rotation to obtain position information of multiple reflection points corresponding to each posture.

[0089] As described in the above steps S301-S302, in order to prevent the cleaning robot from randomly rotating and ignoring some good postures, the rotation angle of the cleaning robot can be pre-set, and the cleaning robot can be rotated in a counterclockwise direction in sequence, and lasers are emitted to the surroundings after each rotation to obtain the position information of multiple reflection points corresponding to each posture. On the one hand, the posture can be detected in an all-round way, and on the other hand, it can also avoid setting too many postures for detection.

[0090] Reference Figure 2 The present invention also provides a positioning device for a cleaning robot, comprising:

[0091] An acquisition module 10 is used to acquire an original map pre-stored by the cleaning robot;

[0092] A first extraction module 20, configured to extract a plurality of first line segments in the original map to obtain a first line segment set;

[0093] An adjustment module 30, used for adjusting the posture of the cleaning robot multiple times, and acquiring position information of multiple reflection points corresponding to each posture by emitting lasers to the surroundings;

[0094] A second extraction module 40 is used to extract multiple second line segments from the position information of multiple reflection points corresponding to each posture to obtain a set of second line segments corresponding to each posture;

[0095] A calculation module 50, configured to calculate a matching score between each of the second line segment sets and the first line segment set;

[0096] The selection module 60 is used to select the posture corresponding to the second line segment set with the largest matching score for positioning.

[0097] In one embodiment, the calculation module 50 includes:

[0098] a vectorization submodule, configured to vectorize each first line segment in the first line segment set to obtain a first vector corresponding to each first line segment, and generate a first line segment fingerprint based on each first vector, and vectorize each second line segment in each second line segment set to obtain a second vector corresponding to each second line segment, and generate a second line segment fingerprint based on each second vector;

[0099] The calculation submodule is used to calculate the similarity between the first line segment fingerprint map and each of the second line segment fingerprint maps, and use it as the matching score between the second line segment set and the first line segment set.

[0100] In one embodiment, the first extraction module 20 includes:

[0101] An input submodule, used for inputting the original map into a preset feature extraction network to obtain a first line segment feature vector;

[0102] The conversion submodule is used to convert the first line segment feature vector into a first grayscale image by a preset grayscale method, and Calculate a first pixel average value of a first grayscale image; wherein H represents the height of the grayscale image, W represents the width of the grayscale image, and P(x, y) represents a pixel value at a position where the width is x and the height is y;

[0103] The preprocessing submodule is used to Preprocessing the first grayscale image to obtain a first preprocessed image;

[0104] a processing submodule, configured to perform morphological corrosion on the first preprocessed image, and bridge discontinuous parts of the first preprocessed image by a morphological dilation method to obtain a first target image;

[0105] The first line segment extraction module is used to extract the first line segments in the first target image to obtain a first line segment set.

[0106] In one embodiment, the second extraction module 40 includes:

[0107] A construction submodule, used to construct a second grayscale image corresponding to each posture according to the position information of multiple reflection points of each posture;

[0108] The second line segment extraction submodule is used to extract multiple second line segments from the second grayscale image to obtain a second line segment set corresponding to each posture.

[0109] In one embodiment, the selection module 60 includes:

[0110] A determination submodule, configured to determine the distance and direction to the obstacle based on the position information of the plurality of reflection points corresponding to the second line segment set with the largest matching score, so as to construct a target map;

[0111] The matching submodule is used to match the target map with the original map to obtain the position of the cleaning robot in the original map, thereby completing the positioning of the cleaning robot.

[0112] In one embodiment, the positioning device of the cleaning robot further includes:

[0113] A length calculation module, used for calculating the length of each of the second line segments;

[0114] The elimination module is used to eliminate the second line segments whose length is less than a preset length.

[0115] In one embodiment, the adjustment module 30 includes:

[0116] A rotation angle setting submodule, used to pre-set the rotation angle of the cleaning robot;

[0117] The rotation submodule is used to rotate the cleaning robot in a counterclockwise direction in sequence, and emit lasers to the surroundings after each rotation to obtain the position information of multiple reflection points corresponding to each posture.

[0118] The beneficial effects of the present invention are as follows: by extracting multiple first line segments in the original map to obtain a first line segment set, obtaining a second line segment set corresponding to each posture, and calculating the matching score between each second line segment set and the first line segment set, the posture corresponding to the second line segment set with the largest matching score is selected for positioning. This can improve the accuracy of positioning, thereby improving the cleaning efficiency, and effectively reducing the probability of hitting a wall or furniture, or even falling down stairs or steps.

[0119] Reference Figure 3 In an embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store various line segments, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the positioning method of the cleaning robot described in any of the above embodiments can be implemented.

[0120] Those skilled in the art will understand that Figure 3 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.

[0121] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the positioning method of the cleaning robot described in any of the above embodiments can be implemented.

[0122] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0123] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.

[0124] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0125] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0126] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the claims of the present invention.

Claims

1. A cleaning robot positioning method, characterized in that: include: Acquiring an original map pre-stored by the cleaning robot; Extracting a plurality of first line segments in the original map to obtain a first line segment set; The posture of the cleaning robot is adjusted multiple times, and the position information of multiple reflection points corresponding to each posture is obtained by emitting lasers to the surroundings; Extracting multiple second line segments from the position information of multiple reflection points corresponding to each posture to obtain a set of second line segments corresponding to each posture; Calculating a matching score between each of the second line segment sets and the first line segment set; The posture corresponding to the second line segment set with the largest matching score is selected for positioning.

2. The cleaning robot positioning method according to claim 1, characterized in that: The step of calculating the matching score between each of the second line segment sets and the first line segment set comprises: Vectorizing each first line segment in the first line segment set to obtain a first vector corresponding to each first line segment, and generating a first line segment fingerprint based on each first vector, and vectorizing each second line segment in each second line segment set to obtain a second vector corresponding to each second line segment, and generating a second line segment fingerprint based on each second vector; The similarity between the first line segment fingerprint and each of the second line segment fingerprints is calculated, and is used as a matching score between the second line segment set and the first line segment set.

3. The cleaning robot positioning method according to claim 1, characterized in that: The step of extracting a plurality of first line segments in the original map to obtain a first line segment set includes: Inputting the original map into a preset feature extraction network to obtain a first line segment feature vector; The first line segment feature vector is converted into a first grayscale image by a preset grayscale method, and the grayscale image is converted into a first grayscale image according to the formula Calculate a first pixel average value of a first grayscale image; wherein H represents the height of the grayscale image, W represents the width of the grayscale image, and P(x, y) represents a pixel value at a position where the width is x and the height is y; According to the formula Preprocessing the first grayscale image to obtain a first preprocessed image; Performing morphological corrosion on the first preprocessed image, and bridging discontinuous parts of the first preprocessed image by a morphological dilation method, to obtain a first target image; The first line segments in the first target image are extracted to obtain a first line segment set.

4. The cleaning robot positioning method according to claim 1, characterized in that: The step of extracting a plurality of second line segments from the position information of a plurality of reflection points corresponding to each posture to obtain a set of second line segments corresponding to each posture comprises: Constructing a second grayscale image corresponding to each posture according to the position information of the multiple reflection points of each posture; A plurality of second line segments are extracted from the second grayscale image to obtain a set of second line segments corresponding to each posture.

5. The cleaning robot positioning method according to claim 1, characterized in that: The step of selecting a posture corresponding to a second line segment set with the largest matching score for positioning includes: Based on the position information of multiple reflection points corresponding to a second line segment set with the largest matching score, determine the distance and direction to the obstacle to construct a target map; The target map is matched with the original map to obtain the position of the cleaning robot in the original map, thereby completing the positioning of the cleaning robot.

6. The cleaning robot positioning method according to claim 1, characterized in that: After the step of extracting a plurality of second line segments from the position information of a plurality of reflection points corresponding to each posture, the method further includes: Calculate the length of each of the second line segments; Eliminate the second line segment whose length is less than the preset length.

7. The cleaning robot positioning method according to claim 1, characterized in that: The step of adjusting the posture of the cleaning robot multiple times and emitting lasers to the surroundings to obtain position information of multiple reflection points corresponding to each posture includes: Presetting the rotation angle of the cleaning robot; The cleaning robot is rotated in a counterclockwise direction in sequence, and lasers are emitted to the surroundings after each rotation to obtain position information of multiple reflection points corresponding to each posture.

8. A positioning device for a cleaning robot, characterized in that: include: An acquisition module, used to acquire an original map pre-stored by the cleaning robot; A first extraction module, used for extracting a plurality of first line segments in the original map to obtain a first line segment set; An adjustment module, used for adjusting the posture of the cleaning robot multiple times, and acquiring position information of multiple reflection points corresponding to each posture by emitting lasers to the surroundings; A second extraction module is used to extract multiple second line segments from the position information of multiple reflection points corresponding to each posture to obtain a set of second line segments corresponding to each posture; A calculation module, used for calculating a matching score between each of the second line segment sets and the first line segment set; A selection module is used to select the posture corresponding to the second line segment set with the largest matching score for positioning.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Laser repositioning method, device and equipment of mobile robot and storage medium

    CN115100508A

  • Blood vessel image acquisition method and device based on endoscope

    CN116934697A

  • Indoor visual loopback detection method based on point-line feature global descriptor

    CN118038239A