Cleaning robot positioning method and cleaning robot
By transmitting a scan signal at the current positioning point of the cleaning robot, determining the reference line segment, and combining the positional relationship of the environmental grid map, the problem of abnormal positioning of the cleaning robot is solved, achieving higher positioning accuracy.
Patent Information
- Application Number
- CN202311810712.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
During operation, cleaning robots are prone to positioning abnormalities with large positioning deviations. The detection effect of this in the prior art is poor, reducing positioning accuracy.
The positioning status of the cleaning robot is determined by transmitting a scan signal at the current positioning point, and the reference segment is determined based on the positional relationship between the reference segment and the grid in the environmental grid map. When the positioning state is abnormal, the cleaning robot is controlled to reposition.
The detection effect of positioning abnormalities is improved, ensuring that the cleaning robot can reposition in time, thereby improving positioning accuracy.
Smart Images

Figure CN120203443A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of robots, and particularly to a positioning method for a cleaning robot and a cleaning robot. Background Art
[0002] With the development and progress of technology, robots have been more and more widely used in people's daily life and production.
[0003] Taking cleaning robots as an example, during their operation, relying on sensors such as lidar carried by themselves, they use Simultaneous Localization and Mapping (SLAM) technology to locate their own positions and sense the map of the surrounding environment.
[0004] Affected by its own program and environment, a cleaning robot may have positioning anomalies such as lost positioning or large positioning deviation. In related technologies, the detection effect of the positioning anomaly of the cleaning robot is poor, reducing the positioning accuracy. Summary of the Invention
[0005] Based on this, it is necessary to provide a positioning method for a cleaning robot and a cleaning robot for the above technical problems.
[0006] In a first aspect, this application provides a positioning method for a cleaning robot, including:
[0007] Determine a reference line segment according to the scanning signal emitted at the current positioning point;
[0008] Determine the positioning state of the cleaning robot at the current positioning point according to the positional relationship between each reference line segment and the grid in the environmental grid map;
[0009] When the positioning state of the cleaning robot is a positioning anomaly, control the cleaning robot to perform repositioning.
[0010] In one embodiment, determining the positioning state of the cleaning robot at the current positioning point according to the positional relationship between each reference line segment and the grid in the environmental grid map includes:
[0011] Convert each reference line segment to the environmental grid map, and obtain the intersection state between the reference line segment and the target grid in the environmental grid map; the target grid is the grid corresponding to the probability value greater than the probability threshold;
[0012] Determine the positioning state of the cleaning robot at the current positioning point according to the intersection state.
[0013] In one embodiment, determining the positioning state of the cleaning robot at the current positioning point according to the intersection state includes:
[0014] Determine the intersecting line segments that intersect with the target grid among all reference line segments, and determine the set of intersecting line segments based on all the intersecting line segments;
[0015] Determine the non-intersecting line segments that do not intersect with the target grid among all reference line segments, and determine the set of non-intersecting line segments based on all the non-intersecting line segments;
[0016] Determine the positioning state of the cleaning robot at the current positioning point according to the set of intersecting line segments and the set of non-intersecting line segments.
[0017] In one embodiment, the set of intersecting line segments includes at least one intersecting subset, and the set of non-intersecting line segments includes at least one non-intersecting subset; determining the positioning state of the cleaning robot at the current positioning point according to the set of intersecting line segments and the set of non-intersecting line segments includes:
[0018] Obtain the number of intersecting subsets and the number of intersecting line segments in the set of intersecting line segments;
[0019] Obtain the number of non-intersecting subsets and the number of non-intersecting line segments in the set of non-intersecting line segments;
[0020] When at least one of the number of intersecting subsets, the number of intersecting line segments, the number of non-intersecting subsets, and the number of non-intersecting line segments is greater than a preset quantity threshold, determine that the positioning of the cleaning robot at the current positioning point is abnormal.
[0021] In one embodiment, determining the set of intersecting line segments according to all the intersecting line segments includes:
[0022] Divide the intersecting line segments that are adjacent in scanning time sequence and form an angle less than the angle threshold among all the intersecting line segments into the same intersecting subset;
[0023] Determine the set formed by all the obtained intersecting subsets as the set of intersecting line segments.
[0024] In one embodiment, determining the set of non-intersecting line segments according to all the non-intersecting line segments includes:
[0025] Divide the non-intersecting line segments that are adjacent in scanning time sequence and form an angle less than the angle threshold among all the non-intersecting line segments into the same non-intersecting subset;
[0026] Determine the set formed by all the obtained non-intersecting subsets as the set of non-intersecting line segments.
[0027] In one embodiment, controlling the cleaning robot to perform repositioning includes:
[0028] Determine a candidate area according to the current positioning point in the environmental grid map;
[0029] For each candidate position point in the candidate region, using the candidate position point as the position point of the cleaning robot in the environmental grid map, convert the corresponding reference line segment to the environmental grid map;
[0030] Determine the target positioning information of the cleaning robot after repositioning according to the position distribution of the end points of the respective reference line segments corresponding to the respective candidate position points in the environmental grid map.
[0031] In one embodiment, determining the target positioning information of the cleaning robot after repositioning according to the position distribution of the end points of the respective reference line segments corresponding to the respective candidate position points includes:
[0032] For each candidate position point, determine the grids occupied by the corresponding end points in the environmental grid map;
[0033] Determine the matching scores of the respective candidate position points according to the probability values of the grids occupied by the end points;
[0034] Determine the target positioning information of the cleaning robot after repositioning according to the matching scores of the respective candidate position points.
[0035] In one embodiment, determining the target positioning information of the cleaning robot after repositioning according to the matching scores of the respective candidate position points includes:
[0036] When the highest matching score among all the matching scores is greater than or equal to the score threshold, use the positioning information of the candidate position point corresponding to the highest matching score as the target positioning information of the cleaning robot after repositioning;
[0037] When the highest matching score among all the matching scores is less than the score threshold, control the cleaning robot to move to update the reference line segment;
[0038] For each candidate position point in the candidate region, using the candidate position point as the position point of the cleaning robot in the environmental grid map, convert the corresponding updated reference line segment to the environmental grid map, and determine the matching scores of the respective candidate position points until the target positioning information of the cleaning robot after repositioning is obtained, then stop updating the reference line segment.
[0039] In one embodiment, the above method further includes:
[0040] When the number of updates reaches the upper limit, expand the candidate region, and determine the matching scores of the respective candidate position points in the expanded candidate region;
[0041] According to the matching scores of the respective candidate position points in the expanded candidate region, until the target positioning information of the cleaning robot after repositioning is obtained, then stop expanding the candidate region.
[0042] In a second aspect, the present application also provides a cleaning robot, including a memory, a processor, and a sensor that emits a scanning signal. The memory stores a computer program, and when the processor executes the computer program, the steps of any one of the above methods are implemented.
[0043] In the above positioning method of the cleaning robot and the cleaning robot, by determining a reference line segment according to the scanning signal emitted at the current positioning point, and determining the positioning state of the cleaning robot at the current positioning point according to the positional relationship between each reference line segment and the grid in the environmental grid map, and then controlling the cleaning robot to perform repositioning when the positioning state is abnormal. In the above method, the positional relationship between the reference line segment and the grid in the environmental grid map can accurately reflect the matching situation between the perceived environmental information of the cleaning robot at the current positioning point and the existing environmental information in the environmental grid map, and then accurately determine whether the positioning state of the cleaning robot at the current positioning point is abnormal, improving the detection effect of positioning abnormalities and performing repositioning in a timely manner to improve positioning accuracy. Description of the Drawings
[0044] Figure 1 It is the internal structure diagram of the cleaning robot in an embodiment;
[0045] Figure 2 It is the flowchart of the positioning method of the cleaning robot in an embodiment;
[0046] Figure 3 It is the schematic diagram of the reference line segment formed by the scanning signal in an embodiment;
[0047] Figure 4 It is the flowchart of determining the positioning state in an embodiment;
[0048] Figure 5 It is the schematic diagram of the positional relationship between the reference line segment and the target grid in an embodiment;
[0049] Figure 6 It is the flowchart of determining the positioning state in another embodiment;
[0050] Figure 7 It is the flowchart of determining that the positioning state is abnormal in an embodiment;
[0051] Figure 8 It is the flowchart of obtaining the set of intersecting line segments in an embodiment;
[0052] Figure 9 It is the flowchart of obtaining the set of non-intersecting line segments in an embodiment;
[0053] Figure 10 It is the flowchart of performing repositioning in an embodiment;
[0054] Figure 11 Schematic diagram of the process for determining target positioning information in one embodiment;
[0055] Figure 12 Schematic diagram of the process for determining target positioning information in another embodiment;
[0056] Figure 13 Schematic diagram of the process for the positioning method of a cleaning robot in another embodiment;
[0057] Figure 14 Schematic diagram of the process for the positioning method of a cleaning robot in another embodiment;
[0058] Figure 15 Block diagram of the structure of the positioning device of a cleaning robot in one embodiment. Detailed implementation manners
[0059] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0060] The positioning method of the cleaning robot provided by the embodiments of the present application can be applied to a cleaning robot, and its internal structure diagram can be as Figure 1 shown. The cleaning robot includes a processor, a memory, a communication interface, a display unit, an input device, and a sensor connected through a system bus. Among them, the processor of the cleaning robot is used to provide computing and control capabilities. The memory of the cleaning robot includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the cleaning robot is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication) or other technologies. When the computer program is executed by the processor, a positioning method of a cleaning robot is implemented. The display unit of the cleaning robot can be a liquid crystal display screen or an electronic ink display screen, and the input device of the cleaning robot can be a touch layer covered on the display screen, or a button, a trackball or a touchpad provided on the outer shell of the cleaning robot. The sensor of the robot is used to emit a scanning signal for environmental perception. The sensor can be a lidar or a TOF sensor.
[0061] It should be noted that the positioning method of the cleaning robot provided by the embodiments of the present application is applied to indoor positioning, and is applicable to both the scenario of cleaning while building a map and the scenario of building a map first and then cleaning.
[0062] Those skilled in the art can understand that Figure 1 The structure shown in Figure 1 is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the cleaning robot to which the solution of the present application is applied. The specific cleaning robot may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0063] In one embodiment, as Figure 2 shown, a positioning method for a cleaning robot is provided. Taking the cleaning robot in Figure 2 as an example, the method includes the following steps: Figure 1 For example, taking the cleaning robot in Figure 1 as an example, the method includes the following steps:
[0064] S210. Determine a reference line segment according to the scanning signal emitted at the current positioning point.
[0065] Among them, the reference line segment is a straight line segment connecting the starting point and the arrival point of the scanning signal. The starting point of the scanning signal is the position where the scanning signal is emitted, that is, the position where the cleaning robot is located; for the scanning signal that hits an obstacle in the driving environment, the arrival point is the point formed on the obstacle (that is, the position where the scanning signal is reflected back), and for the scanning signal that does not hit an obstacle in the driving environment, the arrival point is the position where the maximum range of the scanning signal reaches. The reference line segment can be used to characterize the environmental information perceived by the cleaning robot at the current positioning point (hereinafter referred to as "perceived environmental information").
[0066] Optionally, the cleaning robot controls the sensor to emit a scanning signal at the current positioning point to detect and scan the driving environment, and obtains the reference line segment corresponding to the scanning signal. Exemplarily, the cleaning robot can rotate a 2D lidar carried by itself to emit laser for detection and scanning. Among them, the 2D lidar is a sensor composed of a single-point laser emitter and a horizontal rotation component, which can perform scanning on the horizontal plane and return a circle of point clouds on the horizontal plane.
[0067] For example, as Figure 3 shown, the cleaning robot emits laser in a rotational scanning manner at the current positioning point O, takes the current positioning point O as the starting point of the laser, determines the distance between the arrival point and the emission point based on the emission time and reception time of a single beam of laser, and starts from the current positioning point O, extends the corresponding distance along the emission direction of each single beam of laser, and obtains the straight line segments L1, L2, L3... connecting the starting point and the arrival point of each single beam of laser as the reference line segments.
[0068] S220. Determine the positioning state of the cleaning robot at the current positioning point according to the positional relationship between each reference line segment and the grid in the environmental grid map.
[0069] Among them, the environmental grid map is the grid map of the driving environment constructed by the cleaning robot during the process of simultaneous localization and mapping. The environmental grid map includes multiple grids, and each grid corresponds to a probability value, which represents the probability that the grid is occupied by an obstacle. The probability values of the grids in the environmental grid map are used to represent the environmental information that the cleaning robot has already constructed (hereinafter referred to as "existing environmental information"). The positioning state of the cleaning robot can be normal positioning or abnormal positioning.
[0070] It should be noted that the positional relationship between the reference line segment and the grids in the environmental grid map can be used to reflect the matching situation between the perceived environmental information of the cleaning robot and the existing environmental information in the environmental grid map, and the matching situation between the perceived environmental information and the existing environmental information can characterize the positioning state of the cleaning robot at the current positioning point. Among them, when the perceived environmental information matches the existing environmental information, it indicates that the cleaning robot is normally positioned at the current positioning point; on the contrary, when the perceived environmental information does not match the existing environmental information, it indicates that the cleaning robot is abnormally positioned at the current positioning point.
[0071] Optionally, after the cleaning robot obtains the reference line segments formed by the scanning signals, it can convert each reference line segment to the environmental grid map to determine the positioning state of the cleaning robot at the current positioning point according to the positional relationship between each reference line segment and the grids in the environmental grid map.
[0072] S230. When the positioning state of the cleaning robot at the current positioning point is abnormal positioning, control the cleaning robot to perform repositioning.
[0073] Among them, repositioning means re-determining the positioning information of the current positioning point of the cleaning robot. Exemplarily, the positioning information includes the position and pose of the cleaning robot. The position of the cleaning robot can be the true coordinate position of the cleaning robot in the driving environment or the position in the environmental grid map, and the two can be converted to each other.
[0074] Optionally, when the cleaning robot determines that its positioning state at the current positioning point is abnormal positioning, it controls itself to perform repositioning to re-determine its positioning information at the current positioning point. Among them, when the cleaning robot determines that its positioning state at the current positioning point is normal positioning, there is no need to perform repositioning, and it can continue to maintain the current working state.
[0075] It should be noted that during the operation of the cleaning robot, positioning and mapping are carried out simultaneously. Mapping includes the process of the cleaning robot synchronously emitting scanning information during movement to construct or update the map based on the scanning signal. In the case of abnormal positioning, the cleaning robot pauses map updating until the positioning returns to normal and then continues map updating. The cleaning robot can synchronously display the constructed map and its own driving trajectory through the display unit. In the case of abnormal positioning, the driving trajectory will be disordered and overlapped in the map, such as the driving trajectory pressing over the wall contour in the map. After the cleaning robot resumes normal positioning after repositioning, the driving trajectory in the display unit will synchronously jump to present the driving trajectory after repositioning.
[0076] In the embodiments of the present application, by determining a reference line segment according to the scanning signal emitted at the current positioning point, and determining the positioning state of the cleaning robot at the current positioning point according to the positional relationship between each reference line segment and the grid in the environmental grid map, and then controlling the cleaning robot to perform repositioning in the case of abnormal positioning state. In the above method, the positional relationship between the reference line segment and the grid in the environmental grid map can accurately reflect the matching situation between the perceived environmental information of the cleaning robot and the existing environmental information in the environmental grid map, and then accurately determine whether the positioning state of the cleaning robot at the current positioning point is abnormal, improving the detection effect for abnormal positioning and performing repositioning in a timely manner to improve positioning accuracy.
[0077] Each grid in the environmental grid map corresponds to a probability value. Based on this, in one embodiment, as Figure 4 shown, the above S220, determining the positioning state of the cleaning robot at the current positioning point according to the positional relationship between each reference line segment and the grid in the environmental grid map, includes:
[0078] S410, converting each reference line segment to the environmental grid map and obtaining the intersection state between the reference line segment and the target grid in the environmental grid map; the target grid is a grid corresponding to a probability value greater than the probability threshold.
[0079] Among them, the probability value corresponding to the target grid being greater than the probability threshold indicates that the target grid is largely occupied by obstacles, and it can be determined that the position where the target grid is located is the position where the obstacle is located. The intersection state includes two states: intersection and non-intersection.
[0080] Optionally, the cleaning robot can determine the position point of the current positioning point in the environmental grid map based on its own positioning, use this position point as the starting point of each reference line segment, and extend linearly along the extension direction and length of each reference line segment respectively, so as to convert each reference line segment to the environmental grid map and obtain the intersection state between the reference line segment and the target grid in the environmental grid map.
[0081] Exemplarily, the cleaning robot can obtain the grids in the environmental grid map that intersect with the reference line segment, and compare the probability values corresponding to each intersecting grid with a probability threshold to determine whether the target grid is included in the intersecting grids, so as to obtain the intersection state of whether the reference line segment intersects with the target grid. As Figure 5 shown, taking the reference line segments L1 and L2 as an example, O is the position point of the cleaning robot in the environmental grid map, S is the target grid with a probability value greater than the probability threshold, the reference line segment L1 does not intersect with the target grid S, and the reference line segment L2 intersects with the target grid S.
[0082] S420. Determine the positioning state of the cleaning robot at the current positioning point according to the intersection state.
[0083] Optionally, after obtaining the intersection states between each reference line segment and the target grid in the environmental grid map, the cleaning robot can determine whether the positioning state at the current positioning point is abnormal based on this intersection state.
[0084] Theoretically, when the positioning of the cleaning robot is normal, the positioning information representing the current positioning point is accurate, and the sensed environmental information perceived by the cleaning robot at the current positioning point should match the existing environmental information at the corresponding position of the current positioning point in the environmental grid map. Based on this, when there is an intersection in the intersection states between each reference line segment and the target grid, it indicates that the scanning signal in the driving environment has passed through an obstacle, which means that the sensed environmental information perceived by the cleaning robot at the current positioning point does not match the existing environmental information at the corresponding position of the current positioning point in the environmental grid map. The cleaning robot can then determine that the positioning state at the current positioning point is positioning abnormal.
[0085] Optionally, to reduce computational interference and improve the reliability of the state determination result, the cleaning robot can count the number of line segments that intersect with the target grid or the number of line segments that do not intersect with the target grid among all reference line segments, compare the obtained number with a preset threshold, and determine that the positioning state of the cleaning robot at the current positioning point is positioning abnormal when the threshold is exceeded.
[0086] In the embodiments of the present application, each reference line segment is converted into the environmental grid map, and the intersection state between the reference line segment and the grid in the environmental grid map is obtained. Then, the positioning state of the cleaning robot at the current positioning point is determined according to the intersection state. In the above method, the process of obtaining the intersection state between the reference line segment and the target grid is simple and easy to implement, saving the time for determining the positioning state, improving the determination efficiency, and correspondingly improving the overall positioning efficiency.
[0087] Among all reference line segments, some reference line segments intersect with the target grid, and some reference line segments do not intersect with the target grid. Based on this, in one embodiment, as Figure 6As shown above, S420 determines the positioning state of the cleaning robot at the current positioning point according to the intersection state, including:
[0088] S610 determines the intersecting line segments that intersect with the target grid among all reference line segments, and determines an intersecting line segment set according to all the intersecting line segments.
[0089] Optionally, after obtaining the intersection states of all reference line segments and the target grid, the cleaning robot can screen out the reference line segments that intersect with the target grid, i.e., the intersecting line segments, among all reference line segments, and form an intersecting line segment set according to all the intersecting line segments. For example, all the intersecting line segments are summarized together to form an intersecting line segment set.
[0090] S620 determines the non-intersecting line segments that do not intersect with the target grid among all reference line segments, and determines a non-intersecting line segment set according to all the non-intersecting line segments.
[0091] Optionally, after obtaining the intersection states of all reference line segments and the target grid, the cleaning robot can screen out the reference line segments that do not intersect with the target grid, i.e., the non-intersecting line segments, among all reference line segments, and form a non-intersecting line segment set according to all the non-intersecting line segments. For example, all the non-intersecting line segments are summarized together to form a non-intersecting line segment set.
[0092] S630 determines the positioning state of the cleaning robot at the current positioning point according to the intersecting line segment set and the non-intersecting line segment set.
[0093] Optionally, when the cleaning robot divides all reference line segments into an intersecting line segment set and a non-intersecting line segment set, it can respectively count the number of reference line segments in the intersecting line segment set and the number of reference line segments in the non-intersecting line segment set, and then determine the positioning state of the cleaning robot at the current positioning point according to the number of reference line segments in the intersecting line segment set and the number of reference line segments in the non-intersecting line segment set.
[0094] Exemplarily, the cleaning robot can compare the number of reference line segments in the intersecting line segment set with a preset upper limit of the number, and compare the number of reference line segments in the non-intersecting line segment set with a preset lower limit of the number. If the number of reference line segments in the intersecting line segment set is greater than the preset upper limit of the number, and the number of reference line segments in the non-intersecting line segment set is less than the preset lower limit of the number, it is determined that the positioning state of the cleaning robot at the current positioning point is positioning abnormal; otherwise, it is determined that the positioning state of the cleaning robot at the current positioning point is positioning normal.
[0095] In the embodiments of the present application, intersecting line segments that intersect with the target grid are determined among all reference line segments, and an intersecting line segment set is determined based on all the intersecting line segments. Non-intersecting line segments that do not intersect with the target grid are determined among all reference line segments, and a non-intersecting line segment set is determined based on all the non-intersecting line segments. Thus, based on the intersecting line segment set and the non-intersecting line segment set, the state of the current positioning point is determined. In the above method, the intersecting states of the reference line segments are classified, the processing process of the reference line segments is refined, and the accuracy of the obtained positioning state is improved.
[0096] In practical applications, the intersecting line segment set includes at least one intersecting subset, and the non-intersecting line segment set includes at least one non-intersecting subset. Therefore, in one embodiment, the above S630, determining the positioning state of the cleaning robot at the current positioning point according to the intersecting line segment set and the non-intersecting line segment set, includes:
[0097] S710. Obtain the number of intersecting subsets and the number of intersecting line segments in the intersecting line segment set.
[0098] Wherein, the intersecting subset is a subset included in the intersecting line segment set, and the intersecting subset includes intersecting line segments. The intersecting line segment is a reference line segment that intersects with the target grid, and it can be understood that the scanning signal forming the intersecting line segment passes through an obstacle.
[0099] Optionally, the cleaning robot can count the intersecting subsets in the intersecting line segment set to determine the number of intersecting subsets in the intersecting line segment set, and summarize the intersecting line segments in all the intersecting subsets to obtain the number of intersecting line segments in the intersecting line segment set.
[0100] S720. Obtain the number of non-intersecting subsets and the number of non-intersecting line segments in the non-intersecting line segment set.
[0101] Wherein, the non-intersecting subset is a subset included in the non-intersecting line segment set, and the non-intersecting subset includes non-intersecting line segments. The non-intersecting line segment is a reference line segment that does not intersect with the target grid, and it can be understood that the scanning signal forming the non-intersecting line segment passes through an unobstructed area without obstacles.
[0102] Optionally, the cleaning robot can count the non-intersecting subsets in the non-intersecting line segment set to determine the number of non-intersecting subsets in the non-intersecting line segment set, and summarize the non-intersecting line segments in all the non-intersecting subsets to obtain the number of non-intersecting line segments in the non-intersecting line segment set.
[0103] S730. When at least one of the number of intersecting subsets, the number of intersecting line segments, the number of non-intersecting subsets, and the number of non-intersecting line segments is greater than a preset quantity threshold, determine that the positioning of the cleaning robot at the current positioning point is abnormal.
[0104] Among them, the preset quantity thresholds corresponding to the number of intersecting subsets, the number of intersecting line segments, the number of non-intersecting subsets, and the number of non-intersecting line segments can be different and can be determined in advance based on actual prior knowledge.
[0105] Optionally, the cleaning robot can compare the number of intersecting subsets, the number of intersecting line segments, the number of non-intersecting subsets, and the number of non-intersecting line segments with the corresponding preset quantity thresholds to determine whether the positioning state of the cleaning robot at the current positioning point is abnormal according to the comparison results. Among them, if at least one of the number of intersecting subsets, the number of intersecting line segments, the number of non-intersecting subsets, and the number of non-intersecting line segments is greater than the corresponding preset quantity threshold, the cleaning robot can determine that its own positioning at the current positioning point is abnormal.
[0106] Exemplarily, taking the number of intersecting subsets corresponding to the first quantity threshold, the number of intersecting line segments corresponding to the second quantity threshold, the number of non-intersecting subsets corresponding to the third quantity threshold, and the number of non-intersecting line segments corresponding to the fourth quantity threshold as an example, the cleaning robot can determine that the positioning of the cleaning robot at the current positioning point is abnormal when the number of intersecting subsets is greater than the first quantity threshold, the number of intersecting line segments is greater than the second quantity threshold, the number of non-intersecting subsets is greater than the third quantity threshold, and the number of non-intersecting line segments is greater than the fourth quantity threshold. Conversely, it is determined that the positioning of the cleaning robot at the current positioning point is normal.
[0107] In the embodiment of the present application, by obtaining the number of intersecting subsets and the number of intersecting line segments in the set of intersecting line segments, and obtaining the number of non-intersecting subsets and the number of non-intersecting line segments in the set of non-intersecting line segments, to determine that the positioning of the cleaning robot at the current positioning point is abnormal when at least one of the number of intersecting subsets, the number of intersecting line segments, the number of non-intersecting subsets, and the number of non-intersecting line segments is greater than the preset quantity threshold. In the above method, by statistically comparing the quantity of different types of information with the threshold to determine the state of the current positioning point, the process is not only simple and easy to implement, but also more applicable to complex driving environments and application scenarios for unknown areas not explored in the environmental grid map compared with the related technology of projecting the collected environmental point cloud onto the environmental grid map to calculate the matching equal division, reducing the missed judgment in complex driving environments and the misjudgment in unknown areas, thereby improving the detection effect of positioning abnormalities and correspondingly improving the positioning accuracy.
[0108] The set of intersecting line segments includes at least one intersecting subset. In an optional embodiment, as Figure 8 shown, the above S610, determining the intersecting line segments intersecting with the target grid among all reference line segments and determining the set of intersecting line segments according to all intersecting line segments, includes:
[0109] S810. Divide the intersecting line segments that are adjacent in scanning time sequence and form an angle less than the angle threshold among all the intersecting line segments into the same intersecting subset.
[0110] Optionally, after classifying the intersecting line segments among all the reference line segments, the cleaning robot can obtain the angle between the adjacent intersecting line segments in scanning time sequence as the first angle. Exemplarily, the cleaning robot emits 100 scanning signals in a clockwise rotation scanning manner at the current positioning point, and correspondingly obtains 100 reference line segments numbered from 1 to 100. After classification, it is determined that the reference line segments numbered from 1 to 38, 52 to 67, and 83 to 100 are intersecting line segments. The cleaning robot obtains the first angles between the adjacent intersecting line segments in scanning time sequence among the intersecting line segments numbered from 1 to 38, 52 to 67, and 83 to 100. Among the intersecting line segments numbered from 1 to 38, 52 to 67, and 83 to 100, the intersecting line segments 38 and 52, and 67 and 83 are also adjacent intersecting line segments in scanning time sequence.
[0111] Optionally, after obtaining all the first angles, the cleaning robot can determine whether the adjacent intersecting line segments in scanning time sequence belong to the same intersecting subset based on the first angle, so as to obtain the intersecting subsets formed by each intersecting line segment. Among them, the cleaning robot can compare each obtained first angle with a preset angle threshold. If the first angle is greater than the angle threshold, the adjacent intersecting line segments in scanning time sequence that obtain the first angle are divided into an intersecting subset; conversely, if the first angle is less than or equal to the angle threshold, the latter intersecting line segment among the adjacent intersecting line segments in scanning time sequence that obtain the first angle is divided into a new intersecting subset.
[0112] Exemplarily, continuing the above example, the first angles between the adjacent intersecting line segments in scanning time sequence among the intersecting line segments numbered from 1 to 38 are all less than the angle threshold, and the cleaning robot divides the intersecting line segments numbered from 1 to 38 into the same intersecting subset; the first angle between the adjacent intersecting line segments 38 and 52 in scanning time sequence is greater than the angle threshold, and the cleaning robot divides the intersecting line segment 52 into a new intersecting subset, and the first angles between the adjacent intersecting line segments in scanning time sequence among the intersecting line segments numbered from 52 to 67 are all less than the angle threshold, and the cleaning robot divides the intersecting line segments numbered from 52 to 67 into the same intersecting subset; the first angle between the adjacent intersecting line segments 67 and 83 in scanning time sequence is greater than the angle threshold, and the cleaning robot divides the intersecting line segment 83 into a new intersecting subset, and the first angles between the adjacent intersecting line segments in scanning time sequence among the intersecting line segments numbered from 83 to 100 are all less than the angle threshold, and the cleaning robot divides the intersecting line segments numbered from 83 to 100 into the same intersecting subset.
[0113] S820. Determine the set formed by all the obtained intersecting subsets as the intersecting line segment set.
[0114] Optionally, according to the division method of the first included angle described above, the cleaning robot can divide all intersecting line segments into corresponding intersecting subsets, and then determine the set formed by all the obtained intersecting subsets as the intersecting line segment set. Exemplarily, continuing the above example, for the intersecting line segments 1-38, 52-67, 83-100, according to the division method of the first included angle described above, the cleaning robot can obtain the intersecting subset 1 {intersecting line segments 1-38}, the intersecting subset 2 {intersecting line segments 52-67}, and the intersecting subset 3 {intersecting line segments 83-100}, and all the intersecting subsets form the intersecting line segment set { {intersecting line segments 1-38}, {intersecting line segments 52-67}, {intersecting line segments 83-100}}.
[0115] The non-intersecting line segment set includes at least one non-intersecting subset. In an optional embodiment, as Figure 9 shown, the above S620, determining non-intersecting line segments that do not intersect with the target grid among all reference line segments, and determining the non-intersecting line segment set according to all non-intersecting line segments, includes:
[0116] S910, dividing non-intersecting line segments that are adjacent in scanning time sequence and form an included angle smaller than the included angle threshold among all non-intersecting line segments into the same non-intersecting subset.
[0117] Optionally, after the cleaning robot classifies the non-intersecting line segments among all reference line segments, it can obtain the included angle between non-intersecting line segments that are adjacent in scanning time sequence as the second included angle. Exemplarily, continuing the above example, there are 100 reference line segments from reference line segment 1 to 100. After classification, it is determined that reference line segments 39-51 and 68-82 are non-intersecting line segments. The cleaning robot obtains the second included angle between non-intersecting line segments that are adjacent in scanning time sequence among non-intersecting line segments 39-51 and 68-82. Similarly, among non-intersecting line segments 39-51 and 68-82, non-intersecting line segments 51 and 68 are also non-intersecting line segments that are adjacent in scanning time sequence.
[0118] Optionally, after the cleaning robot obtains all the second included angles, it can determine whether non-intersecting line segments that are adjacent in scanning time sequence belong to the same non-intersecting subset based on the second included angle, so as to obtain the non-intersecting subsets formed by each non-intersecting line segment. Among them, the cleaning robot can compare the obtained second included angles with a preset included angle threshold. If the second included angle is greater than the included angle threshold, the non-intersecting line segments that are adjacent in scanning time sequence and obtain the second included angle are divided into an intersecting subset; otherwise, if the second included angle is less than or equal to the included angle threshold, the latter non-intersecting line segment among the non-intersecting line segments that are adjacent in scanning time sequence and obtain the second included angle is divided into a new non-intersecting subset.
[0119] Exemplarily, continuing with the above example, the second angle between non-intersecting line segments that are adjacent in the scanning time sequence among the non-intersecting line segments 39 to 51 is less than the angle threshold, and the cleaning robot divides the non-intersecting line segments 39 to 51 into the same non-intersecting subset; the second angle between the intersecting line segment 51 and the intersecting line segment 68 that are adjacent in the scanning time sequence is greater than the angle threshold, and the cleaning robot divides the non-intersecting line segment 68 into a new non-intersecting subset, while the second angle between non-intersecting line segments that are adjacent in the scanning time sequence among the non-intersecting line segments 68 to 82 is less than the angle threshold, and the cleaning robot divides the non-intersecting line segments 68 to 82 into the same non-intersecting subset.
[0120] S920. Determine the set formed by all the obtained non-intersecting subsets as the non-intersecting line segment set.
[0121] Optionally, according to the above-mentioned division method of the second angle, the cleaning robot can divide all non-intersecting line segments into corresponding non-intersecting subsets, and then determine the set formed by all the obtained non-intersecting subsets as the non-intersecting line segment set. Exemplarily, continuing with the above example, for the non-intersecting line segments 39 to 51 and 68 to 82, according to the above-mentioned division method of the second angle, the cleaning robot can obtain the non-intersecting subset 1 {non-intersecting line segments 39 to 51} and the non-intersecting subset 2 {non-intersecting line segments 68 to 82}, and all non-intersecting subsets form the non-intersecting line segment set { {non-intersecting line segments 39 to 51}, {non-intersecting line segments 68 to 82}}.
[0122] It should be noted that in the case where the cleaning robot performs multiple scans at the current positioning point, for the current scan, there are a historical intersecting line segment set and a historical non-intersecting line segment set determined based on the historical scan. The cleaning robot can update the historical intersecting line segment set and the non-intersecting line segment set based on the current reference line segment obtained from the current scan.
[0123] Among them, the process of updating the historical intersecting line segment set is as follows:
[0124] For each current intersecting line segment in the current reference line segment, the cleaning robot can obtain the angle between the current intersecting line segment and each historical intersecting line segment in the historical intersecting line segment set, determine the historical intersecting subset to which the historical intersecting line segment with an angle less than the preset angle belongs, and divide the current intersecting line segment into this historical intersecting subset. If the angle between the current intersecting line segment and each historical intersecting line segment is greater than the preset angle, a new intersecting subset is created, and the current line segment is divided into this new intersecting subset, thereby realizing the update of the historical intersecting line segment set and obtaining the intersecting line segment set corresponding to the current scan.
[0125] The process of updating the historical non-intersecting line segment set is similar to the process of updating the historical intersecting line segment set described above, and will not be elaborated here.
[0126] In the embodiments of the present application, the intersecting line segments that are adjacent in the scanning time sequence and form an included angle less than the included angle threshold among all the intersecting line segments are divided into the same intersecting subset, and the set formed by all the obtained intersecting subsets is determined as the intersecting line segment set. Similarly, the non-intersecting line segments that are adjacent in the scanning time sequence and form an included angle less than the included angle threshold among all the non-intersecting line segments are divided into the same non-intersecting subset, and the set formed by all the obtained non-intersecting subsets is determined as the non-intersecting line segment set. In the above method, a fine-grained division of the intersecting line segment set and the non-intersecting line segment set is realized, which helps to more accurately determine the positioning state of the cleaning robot at the current positioning point subsequently, thereby improving the detection effect and positioning accuracy of positioning anomalies.
[0127] In the case where it is determined that the cleaning robot has a positioning anomaly at the current positioning point, the cleaning robot needs to reposition to restore normal positioning. Therefore, in one of the embodiments, as Figure 10 shown, controlling the cleaning robot to perform repositioning in S230 above includes:
[0128] S1010. Determine a candidate area according to the current positioning point in the environmental grid map.
[0129] Optionally, in the case where it is determined that the cleaning robot has a positioning anomaly at the current positioning point, the cleaning robot takes the position point corresponding to the current positioning point in the environmental grid map as a reference to determine a candidate area of a preset size. Exemplarily, the cleaning robot can select an area of N*N size as the candidate area with the position point corresponding to the current positioning point in the environmental grid map as the center.
[0130] S1020. For each candidate position point in the candidate area, take the candidate position point as the position point of the cleaning robot in the environmental grid map, and convert the corresponding reference line segment to the environmental grid map.
[0131] Among them, the candidate area includes multiple candidate position points. The candidate area is the area surrounding the position point corresponding to the current positioning point in the environmental grid map. A positioning anomaly means that the positioning information of the current positioning point cannot represent the true positioning information of the cleaning robot, and the candidate position points in the candidate area are high-probability points representing the true positioning information of the cleaning robot. Optionally, after the cleaning robot determines the candidate area in the environmental grid map, for each candidate position point in the candidate area, the candidate position point can be taken as the position point of the cleaning robot in the environmental grid map, that is, the starting point of the reference line segment, and a straight line extension is performed along the extension direction and length of the reference line segment to convert the corresponding reference line segment to the environmental grid map.
[0132] S1030. Determine the target positioning information of the cleaning robot after repositioning according to the position distribution of the end points of the reference line segments corresponding to the candidate position points in the environmental grid map.
[0133] Optionally, after the cleaning robot converts each reference line segment to the environmental grid map, it can determine whether each candidate position point in the candidate area is the position point of the true positioning information of the corresponding cleaning robot based on the position distribution of the end points of each reference line segment in the environmental grid map, so as to obtain the target positioning information after the cleaning robot is repositioned.
[0134] In the embodiments of the present application, a candidate area is determined in the environmental grid map according to the current positioning point, and for each candidate position point in the candidate area, taking the candidate position point as the position of the cleaning robot in the environmental grid map, the corresponding reference line segment is converted to the environmental grid map. Then, based on the position distribution of the end points of each reference line segment corresponding to each candidate position point in the environmental grid map, the target positioning information after the cleaning robot is repositioned is determined. In the above method, when the positioning of the cleaning robot at the current positioning point is abnormal, the target positioning information after the cleaning robot is repositioned is further determined within the candidate area in the environmental grid map, so as to perform repositioning within a limited high-probability range, improving the efficiency and reliability of repositioning.
[0135] Each grid in the environmental grid map corresponds to a probability value, and the target positioning information after the cleaning robot is repositioned can be determined based on the probability values occupied by the end points of each reference line segment in the environmental grid. Based on this, in one embodiment, as Figure 11 shown, step S1030, determining the target positioning information after the cleaning robot is repositioned according to the position distribution of the end points of each reference line segment corresponding to each candidate position point in the environmental grid map, includes:
[0136] S1110: For each candidate position point, determine the grids occupied by the corresponding end points in the environmental grid map.
[0137] Among them, for different candidate position points in the candidate area, the position distribution of the reference line segment after conversion in the environmental grid map is different, that is, the grids occupied by the end points are different.
[0138] Optionally, for each candidate position point in the candidate area, when the cleaning robot takes this candidate position point as the position point of the cleaning robot in the environmental grid map, according to the position distribution of each reference line segment after conversion in the environmental grid map, determine the grids occupied by the end points of each reference line segment.
[0139] S1120: Determine the matching score of each candidate position point according to the probability value of the grid occupied by the end point.
[0140] Optionally, after the cleaning robot obtains the grids occupied by the end points of the reference line segments, it further obtains the probability values of the grids occupied by the end points, and determines the matching scores of the candidate position points according to the probability values of the grids occupied by the end points. Exemplarily, the cleaning robot may obtain the average value of the probability values of the grids occupied by the end points of the reference line segments as the matching scores of the candidate position points.
[0141] For example, taking the reference line segments including 3 reference line segments and the candidate area including 2 candidate position points A and B as an example, the 3 reference line segments correspond to 3 end points. For candidate position point A, the probability values of the grids occupied by the end points of the 3 reference line segments are 0.8, 0.8, and 0.7 respectively, and the corresponding matching score is (0.8 + 0.8 + 0.7) / 3 ≈ 0.77; for candidate position point B, the probability values of the grids occupied by the end points of the 3 reference line segments are 0.3, 0.5, and 0.4 respectively, and the corresponding matching score is (0.3 + 0.5 + 0.4) / 3 = 0.4.
[0142] S1130. Determine the target positioning information after the cleaning robot relocates according to the matching scores of the candidate position points.
[0143] Optionally, after the cleaning robot obtains the matching scores of all candidate position points in the candidate area, it may determine the position point after the cleaning robot relocates among all candidate position points according to the matching scores, and obtain the positioning information of this position point as the target positioning information after the cleaning robot relocates.
[0144] In an optional embodiment, as Figure 12 shown, the above S1130. Determine the target positioning information after the cleaning robot relocates according to the matching scores of the candidate position points, includes:
[0145] S1210. When the highest matching score among all matching scores is greater than or equal to the score threshold, use the positioning information of the candidate position point corresponding to the highest matching score as the target positioning information after the cleaning robot relocates.
[0146] Optionally, for the matching scores of all candidate position points in the candidate area, the cleaning robot may compare the sizes of all matching scores to obtain the highest matching score among all matching scores. Exemplarily, continuing the previous example, the cleaning robot compares the matching scores of all candidate position points in the candidate area, that is, compares the matching scores of candidate position point A and candidate position point B, and obtains the highest matching score of 0.77.
[0147] Optionally, after obtaining the highest matching score, the cleaning robot may compare the highest matching score with a preset score threshold to determine whether the candidate position point with the highest matching score can be used as the position point after the cleaning robot is repositioned according to the comparison result. Among them, when the highest matching score is greater than or equal to the score threshold, the cleaning robot takes the candidate position point corresponding to the highest matching score as the position point after the robot is repositioned, and obtains the positioning information of this position point as the target positioning information after the cleaning robot is repositioned. Exemplarily, continuing the above example, taking the score threshold of 0.7 as an example, the highest matching score of 0.77 is greater than the score threshold of 0.7, and the cleaning robot can take the candidate position point A with the highest matching score as the position point after the cleaning robot is repositioned, and the positioning information of the candidate position point A is the target positioning information after the cleaning robot is repositioned.
[0148] S1220. When the highest matching score is less than the score threshold, control the cleaning robot to move to update the reference line segment.
[0149] Among them, the highest matching score being less than the score threshold indicates that the cleaning robot has not determined the target positioning information after repositioning based on the reference line segment obtained from this scan. The cleaning robot can continue to move to update the reference line segment, and then continue to determine the target positioning information after the cleaning robot is repositioned based on the updated reference line segment.
[0150] Optionally, when the highest matching score is less than the score threshold, the cleaning robot can control itself to continue moving along the preset mapping path, or move in an exploratory manner different from the preset mapping path, and simultaneously emit a scanning signal to obtain a new reference line segment to achieve the update of the reference line segment. Exemplarily, when the cleaning robot has not determined the target positioning information after repositioning based on the reference line segment obtained from this scan, it controls itself to move and simultaneously emits a scanning signal to obtain a new reference line segment to continue the repositioning. For example, it can continue to move along the preset straight-line path, or move along other exploratory paths such as a triangle or a random small-range walk to scan and obtain a new reference line segment.
[0151] S1230. For each candidate position point in the candidate area, taking the candidate position point as the position point of the cleaning robot in the environmental grid map, convert the corresponding updated reference line segment to the environmental grid map, and determine the matching scores of each candidate position point until the target positioning information after the cleaning robot is repositioned is obtained, then stop updating the reference line segment.
[0152] Optionally, for the process of converting each updated reference line segment to the environmental grid map, reference may be made to the specific description of S1020 in the foregoing embodiment, and the reference line segment may be replaced with the updated reference line segment. For the process of determining the matching scores of each candidate position point to obtain the target positioning information after the repositioning of the cleaning robot, reference may be made to the specific description of S1110-S1130 in the foregoing embodiment.
[0153] Optionally, the cleaning robot may update the reference line segment multiple times until the target positioning information after the repositioning of the cleaning robot is obtained, and then stop updating the reference line segment. Among them, to save device resources such as computing power and power, when the number of updates reaches the upper limit, the cleaning robot stops moving to synchronously stop updating the reference line segment, and issues an alarm for repositioning failure to prompt the user to perform device maintenance or manual repositioning.
[0154] In the embodiment of the present application, for each candidate position point, the grids occupied by the corresponding end points are determined in the environmental grid map, and according to the probability values of the grids occupied by the end points, the matching scores of each candidate position point are determined. Based on this, according to the matching scores of each candidate position point, the target positioning information after the repositioning of the cleaning robot is determined. Specifically, when the highest matching score among all the matching scores is greater than or equal to the score threshold, the positioning information of the candidate position point corresponding to the highest matching score is used as the target positioning information after the repositioning of the cleaning robot; when the highest matching score is less than the score threshold, the cleaning robot is controlled to move to update the reference line segment, and for each candidate position point in the candidate area, with the candidate position point as the position point of the cleaning robot in the environmental grid map, the corresponding updated reference line segment is converted to the environmental grid map, and the matching scores of each candidate position point are determined until the target positioning information after the repositioning of the cleaning robot is obtained. In the above method, the matching scores corresponding to each candidate position point are used to determine the target positioning information after the repositioning of the cleaning robot, quantifying the repositioning process to obtain more accurate target positioning information after repositioning and improving the positioning accuracy of repositioning.
[0155] When the number of updates reaches the upper limit, the cleaning robot can also expand the candidate area for repositioning over a larger range. Based on this, in one embodiment, as Figure 13 shown, the above method further includes:
[0156] S1310. When the number of updates reaches the upper limit, expand the candidate area and determine the matching scores of each candidate position point in the expanded candidate area.
[0157] Optionally, for the current candidate area, when the number of updates to the reference line segment by the cleaning robot reaches the preset upper limit, the cleaning robot can expand the candidate area in the environmental grid area to obtain an expanded candidate area. Exemplarily, the cleaning robot can extend a preset range / distance outward on the basis of the current candidate area to form an expanded candidate area; alternatively, the entire environmental grid map can be used as the expanded candidate area.
[0158] Optionally, for the process of determining the matching scores of each candidate position point in the expanded candidate area, reference can be made to the specific descriptions of S1020, S1110 - S1120 in the above embodiments, and the candidate area can be replaced with the expanded candidate area.
[0159] S1320. According to the matching scores of each candidate position point in the expanded candidate area, stop expanding the candidate area until the target positioning information after the repositioning of the cleaning robot is obtained.
[0160] Optionally, for the process of obtaining the target positioning information after the repositioning of the cleaning robot according to the matching scores of each candidate position point in the expanded candidate area, reference can be made to the specific description of S1130 in the above embodiments.
[0161] Optionally, the cleaning robot can expand the candidate area multiple times until the target positioning information after the repositioning of the cleaning robot is obtained, and then stop expanding the candidate area. Among them, to save device resources such as computing power and power, when the repositioning duration reaches the upper limit duration, the cleaning robot can also stop expanding the candidate area and issue an alarm for repositioning failure to prompt the user to perform device maintenance or manual repositioning. Among them, the repositioning duration can be the time consumed for expanding the candidate area for repositioning, or the total time consumed for updating the reference line segment and expanding the candidate area for repositioning.
[0162] In the embodiments of the present application, when the number of updates reaches the upper limit, expand the candidate area, and determine the matching scores of each candidate position point in the expanded candidate area, so as to stop expanding the candidate area until the target positioning information after the repositioning of the cleaning robot is obtained according to the matching scores of each candidate position point in the expanded candidate area. In the above method, by expanding the candidate area for repositioning in a larger range, the success rate of repositioning is improved.
[0163] For the convenience of understanding by those skilled in the art, the following provides a detailed introduction to the positioning method of the cleaning robot provided in the present application, as Figure 14 shown, the method may include:
[0164] S1401. Determine a reference line segment according to the scanning signal emitted at the current positioning point;
[0165] S1402. Convert each reference line segment to the environmental grid map and obtain the intersection status between the reference line segment and the target grid in the environmental grid map; the target grid is the grid with a corresponding probability value greater than the probability threshold.
[0166] S1403. Determine the intersecting line segments that intersect with the target grid among all the reference line segments, divide the intersecting line segments that are adjacent in the scanning time sequence and form an angle less than the angle threshold into the same intersecting subset, and determine the set formed by all the obtained intersecting subsets as the intersecting line segment set.
[0167] S1404. Determine the non-intersecting line segments that do not intersect with the target grid among all the reference line segments, divide the non-intersecting line segments that are adjacent in the scanning time sequence and form an angle less than the angle threshold into the same non-intersecting subset, and determine the set formed by all the obtained non-intersecting subsets as the non-intersecting line segment set.
[0168] S1405. Obtain the number of intersecting subsets and the number of intersecting line segments in the intersecting line segment set, and obtain the number of non-intersecting subsets and the number of non-intersecting line segments in the non-intersecting line segment set.
[0169] S1406. When at least one of the number of intersecting subsets, the number of intersecting line segments, the number of non-intersecting subsets, and the number of non-intersecting line segments is greater than the preset quantity threshold, determine that the cleaning robot has abnormal positioning at the current positioning point.
[0170] S1407. When the cleaning robot has abnormal positioning at the current positioning point, determine the candidate area according to the current positioning point in the environmental grid map.
[0171] S1408. For each candidate position point in the candidate area, use the candidate position point as the position point of the cleaning robot in the environmental grid map, and convert the corresponding reference line segment to the environmental grid map.
[0172] S1409. For each candidate position point, determine the grids occupied by each end point in the environmental grid map.
[0173] S1410. Determine the matching score of each candidate position point according to the probability value of the grid occupied by the end point.
[0174] S1411. When the highest matching score among all the matching scores is greater than or equal to the score threshold, use the positioning information of the candidate position point corresponding to the highest matching score as the target positioning information after the cleaning robot is repositioned.
[0175] S1412. When the highest matching score is less than the score threshold, control the cleaning robot to move to update the reference line segment.
[0176] S1413. For each candidate position point in the candidate area, using the candidate position point as the position point of the cleaning robot in the environmental grid map, convert the corresponding updated reference line segment to the environmental grid map, and determine the matching scores of each candidate position point until the target positioning information after the repositioning of the cleaning robot is obtained, then stop updating the reference line segment;
[0177] S1414. When the number of updates reaches the upper limit, expand the candidate area, and determine the matching scores of each candidate position point in the expanded candidate area;
[0178] S1415. According to the matching scores of each candidate position point in the expanded candidate area, until the target positioning information after the repositioning of the cleaning robot is obtained, then stop expanding the candidate area.
[0179] It should be noted that for the descriptions in S1401 - S1415 above, reference can be made to the relevant descriptions in the above embodiments, and their effects are similar. Therefore, they will not be elaborated in this embodiment.
[0180] It should be understood that although the steps in the flowcharts involved in the above - mentioned embodiments are shown in sequence according to the arrows, these steps do not necessarily execute in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above - mentioned embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily execute at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential either, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0181] Based on the same inventive concept, the embodiments of the present application also provide a positioning device for a cleaning robot for implementing the positioning method of the cleaning robot involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the positioning device for the cleaning robot provided below can refer to the limitations on the positioning method of the cleaning robot in the above text, and will not be elaborated here.
[0182] In one embodiment, as Figure 15 shown, a positioning device for a cleaning robot is provided, including: a line segment determination module 1501, a state determination module 1502, and a repositioning module 1503, where:
[0183] The line segment determination module 1501 is configured to determine a reference line segment according to the scanning signal emitted at the current positioning point;
[0184] The status determination module 1502 is configured to determine the positioning status of the cleaning robot at the current positioning point according to the positional relationship between each reference line segment and the grid in the environmental grid map;
[0185] The relocalization module 1503 is configured to control the cleaning robot to perform relocalization when the positioning status of the cleaning robot is abnormal.
[0186] Each module in the positioning device of the above-mentioned cleaning robot can be implemented in whole or in part by software, hardware, and their combination to perform the steps of any one of the above-mentioned positioning methods of the cleaning robot. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.
[0187] In one embodiment, a cleaning robot is provided, including a memory, a processor, and a sensor for emitting a scanning signal. A computer program is stored in the memory, and when the processor executes the computer program, the steps of any one of the above methods are implemented.
[0188] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above methods are implemented.
[0189] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. 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 methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0190] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0191] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A positioning method for a cleaning robot, characterized in that, The method includes: Determining a reference line segment according to a scanning signal emitted at a current positioning point; Determining the positioning state of the cleaning robot at the current positioning point according to the positional relationship between each of the reference line segments and the grids in the environmental grid map; When the positioning state of the cleaning robot is positioning anomaly, controlling the cleaning robot to perform repositioning.
2. The method according to claim 1, wherein The determining the positioning state of the cleaning robot at the current positioning point according to the positional relationship between each of the reference line segments and the grids in the environmental grid map includes: Converting each of the reference line segments to the environmental grid map, and obtaining the intersection state between the reference line segment and a target grid in the environmental grid map; the target grid is a grid corresponding to a probability value greater than a probability threshold; Determining the positioning state of the cleaning robot at the current positioning point according to the intersection state.
3. The method according to claim 2, wherein The determining the positioning state of the cleaning robot at the current positioning point according to the intersection state includes: Determining, among all the reference line segments, the intersecting line segments that intersect with the target grid, and determining an intersecting line segment set according to all the intersecting line segments; Determining, among all the reference line segments, the non-intersecting line segments that do not intersect with the target grid, and determining a non-intersecting line segment set according to all the non-intersecting line segments; Determining the positioning state of the cleaning robot at the current positioning point according to the intersecting line segment set and the non-intersecting line segment set.
4. The method according to claim 3, wherein, The intersecting line segment set includes at least one intersecting subset, and the non-intersecting line segment set includes at least one non-intersecting subset; The determining the positioning state of the cleaning robot at the current positioning point according to the intersecting line segment set and the non-intersecting line segment set includes: Obtaining the number of the intersecting subsets and the number of the intersecting line segments in the intersecting line segment set; Obtaining the number of the non-intersecting subsets and the number of the non-intersecting line segments in the non-intersecting line segment set; When at least one of the number of the intersecting subsets, the number of the intersecting line segments, the number of the non-intersecting subsets, and the number of the non-intersecting line segments is greater than a preset number threshold, determining that the positioning of the cleaning robot at the current positioning point is abnormal.
5. The method according to claim 3, wherein The determining the intersecting line segment set according to all the intersecting line segments includes: Dividing the intersecting line segments that are adjacent in scanning time sequence and form an included angle less than an angle threshold among all the intersecting line segments into the same intersecting subset; Determining the set formed by all the obtained intersecting subsets as the intersecting line segment set.
6. The method according to claim 3, characterized in that The determining the non-intersecting line segment set according to all the non-intersecting line segments includes: Dividing the non-intersecting line segments that are adjacent in scanning time sequence and form an included angle less than an angle threshold among all the non-intersecting line segments into the same non-intersecting subset; Determining the set formed by all the obtained non-intersecting subsets as the non-intersecting line segment set.
7. The method according to any one of claims 1-6, characterized in that, The controlling the cleaning robot to perform repositioning includes: Determining a candidate area in the environmental grid map according to the current positioning point; For each candidate position point in the candidate area, taking the candidate position point as the position point of the cleaning robot in the environmental grid map, and converting the corresponding reference line segment to the environmental grid map; Determine the target positioning information after the repositioning of the cleaning robot according to the position distribution of the end points of the reference line segments corresponding to the candidate position points in the environmental grid map.
8. The method according to claim 7, characterized in that, The determining the target positioning information after the repositioning of the cleaning robot according to the position distribution of the end points of the reference line segments corresponding to the candidate position points in the environmental grid map includes: For each candidate position point, determine the grids occupied by the corresponding end points in the environmental grid map; Determine the matching scores of the candidate position points according to the probability values of the grids occupied by the end points; Determine the target positioning information after the repositioning of the cleaning robot according to the matching scores of the candidate position points.
9. The method according to claim 8, wherein The determining the target positioning information after the repositioning of the cleaning robot according to the matching scores of the candidate position points includes: When the highest matching score among all the matching scores is greater than or equal to the score threshold, use the positioning information of the candidate position point corresponding to the highest matching score as the target positioning information after the repositioning of the cleaning robot; When the highest matching score among all the matching scores is less than the score threshold, control the cleaning robot to move to update the reference line segment; For each candidate position point in the candidate area, use the candidate position point as the position point of the cleaning robot in the environmental grid map, convert the corresponding updated reference line segment to the environmental grid map, and determine the matching scores of the candidate position points until the target positioning information after the repositioning of the cleaning robot is obtained, and then stop updating the reference line segment.
10. The method according to claim 9, characterized in that, The method further includes: When the number of updates reaches the upper limit, expand the candidate area, and determine the matching scores of the candidate position points in the expanded candidate area; According to the matching scores of the candidate position points in the expanded candidate area, until the target positioning information after the repositioning of the cleaning robot is obtained, then stop expanding the candidate area.
11. A cleaning robot, comprising a memory, a processor, and a sensor that emits a scanning signal, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 10.