Map creating method of mobile robot and mobile robot

By detecting and updating straight segments at the edge of obstacles in real time, the problem of inaccurate creation of low-cost sensor mobile robot maps is solved, improving the accuracy of map creation and the positioning navigation and cleaning efficiency of mobile robots.

CN120252684APending Publication Date: 2025-07-04SHEN ZHEN HAO CHENG ZHI NENG KE JI YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510393546.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

There is a cumulative error in the map creation process of existing low-cost sensors, resulting in inaccurate maps, affecting positioning navigation and cleaning efficiency.

Method used

Real-time update of straight line segments in the map by obtaining the current target line at the edge of the obstacle in the work area and adding, replacing, or retaining it as the obstacle boundary in the map according to preset conditions.

Benefits of technology

Improve the accuracy of map creation and improve the positioning navigation and cleaning efficiency of mobile robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120252684A_ABST
    Figure CN120252684A_ABST
Patent Text Reader

Abstract

The invention relates to a map creating method for a mobile robot and the mobile robot, and the method comprises the steps: obtaining a current target straight line at the edge of an obstacle in a working area, and taking the current target straight line as an obstacle boundary to be added to a map; obtaining a current target straight line at the edge of the obstacle in the working area again, and when the current target straight line and any obstacle boundary in the map meet a first preset condition, replacing the current target straight line with the corresponding any obstacle boundary and adding the current target straight line to the map; and if not, adding the current target straight line as another obstacle boundary to the map so as to update the map, thereby realizing map creation of the working area where the mobile robot body is located, improving the accuracy of map creation, and improving the subsequent positioning navigation and cleaning efficiency of the mobile robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of mobile robots, and particularly to a method for creating a map of a mobile robot and a mobile robot. Background Art

[0002] With the development of robot technology, the functions of existing mobile robots (such as floor cleaning robots) are becoming more and more powerful. For example, using a rotating lidar to create a map can effectively avoid repeated cleaning and improve the cleaning efficiency and accuracy. However, the cost of lidar is relatively high, resulting in a relatively high cost of mobile robots.

[0003] For mobile robots with low-cost sensors (such as using infrared sensors or laser scanners), maps are usually created based on the principle of inertial navigation. However, after a mobile robot works for a period of time, due to cumulative errors, the obtained environmental information is inaccurate, which in turn causes inaccurate map creation of the mobile robot, affecting the subsequent positioning and navigation and cleaning efficiency of the mobile robot. Summary of the Invention

[0004] Based on this, in view of the problem of inaccurate map creation in the above-mentioned existing mobile robots with low-cost sensors, it is necessary to provide a method for creating a map of a mobile robot and a mobile robot that can detect and update straight lines in the map in real time to improve the accuracy of map creation.

[0005] To achieve the above object, an embodiment of the present invention provides a method for creating a map of a mobile robot, including the following steps:

[0006] Obtain the current target straight line of the edge of an obstacle in the working area, and add the current target straight line as an obstacle boundary to the map;

[0007] Obtain the current target straight line of the edge of an obstacle in the working area again. When the current target straight line and any obstacle boundary in the map meet a first preset condition, replace the corresponding obstacle boundary with the current target straight line and add it to the map; if not, add the current target straight line as another obstacle boundary to the map.

[0008] In one embodiment, before the step of obtaining the current target straight line of the edge of an obstacle in the working area, it includes:

[0009] Detect the edge of an obstacle in the working area where the mobile robot body is located, and control the mobile robot body to move along the edge of the obstacle;

[0010] The step of obtaining the current target straight line of the edge of an obstacle in the working area includes:

[0011] Obtain the trajectory distance and at least two angle values of the mobile robot body moving along the edge of the obstacle;

[0012] When each angle value satisfies the first threshold condition and the trajectory distance satisfies the second threshold condition, confirm that the trajectory distance is the current target straight line.

[0013] In one embodiment, at least two angle values include an initial angle value and a termination angle value; the trajectory distance includes initial coordinate data corresponding to the initial angle value and termination coordinate data corresponding to the termination angle value;

[0014] The steps of confirming that the trajectory distance is the current target straight line when each angle value satisfies the first threshold condition and the trajectory distance satisfies the second threshold condition include:

[0015] Obtain an average angle value according to each angle value;

[0016] Perform difference processing on each angle value and the average angle value respectively to obtain each angle difference;

[0017] When each angle difference falls within the angle threshold range and the distance between the initial coordinate data and the termination coordinate data is greater than the first distance threshold, confirm that the distance between the initial coordinate data and the termination coordinate data is the current target straight line.

[0018] In one embodiment, the steps of replacing a corresponding obstacle boundary with the current target straight line and adding it to the map when the current target straight line and any obstacle boundary in the map satisfy the first preset condition include:

[0019] When the difference between the initial coordinate data corresponding to the current target straight line and the initial coordinate data of any obstacle boundary in the map falls within the first coordinate threshold range, the difference between the termination coordinate data corresponding to the current target straight line and the termination coordinate data of any obstacle boundary in the map falls within the second coordinate threshold range, and the difference between the length of the current target straight line and the length of any obstacle boundary in the map falls within the length threshold range, replace the corresponding obstacle boundary with the current target straight line and add it to the map.

[0020] In one embodiment, the steps of replacing a corresponding obstacle boundary with the current target straight line and adding it to the map when the current target straight line and any obstacle boundary in the map satisfy the first preset condition further include:

[0021] Obtain the first slope of the current target straight line and the second slope of any obstacle boundary in the map;

[0022] When the difference between the first slope and the second slope falls within the slope threshold range, replace the corresponding obstacle boundary with the current target straight line and add it to the map.

[0023] In one embodiment, the steps of obtaining the current target straight line of the obstacle edge in the working area include:

[0024] When the distance between the mobile robot body and the corresponding obstacle edge falls within the first distance threshold range, control the mobile robot body to rotate in place, and perform distance measurement on the obstacle edge based on a preset angle to obtain the coordinate data of each edge point;

[0025] Perform linear fitting processing on the coordinate data of each edge point to obtain an extracted straight line;

[0026] When the length of the extracted straight line is greater than the second distance threshold, confirm the extracted straight line as the current target straight line.

[0027] In one embodiment, when the current target straight line and any obstacle boundary in the map satisfy the first preset condition, the step of replacing the current target straight line with the corresponding any obstacle boundary and adding it to the map includes:

[0028] Obtain the first pose data of the current target straight line and the second pose data of any obstacle boundary in the map;

[0029] When the difference between the first pose data and the second pose data falls within the pose threshold range, replace the second pose data of the corresponding any obstacle boundary with the first pose data of the current target straight line.

[0030] In one embodiment, it further includes the steps of:

[0031] Obtain the initial target straight line of the mobile robot body in the working area, and establish a rectangular coordinate system according to the initial target straight line;

[0032] When obtaining the next target straight line, obtain the angle difference between the mobile robot body and the corresponding coordinate axis direction;

[0033] When the angle difference is less than the preset angle threshold, correct the angle of the mobile robot body to the corresponding coordinate axis direction.

[0034] On the other hand, an embodiment of the present invention further provides a mobile robot, including a mobile robot body, a sensing module and a controller, the controller and the sensing module are arranged on the mobile robot body, and the controller is connected to the sensing module;

[0035] The controller is used to execute the steps of the map creation method of the mobile robot in any one of the above.

[0036] In one embodiment, the sensing module includes a first distance sensor, an angle sensor and an edge sensor, and the first distance sensor, the angle sensor and the edge sensor are respectively connected to the controller;

[0037] Or, the sensing module includes a second distance sensor, and the second distance sensor is connected to the controller.

[0038] One of the technical solutions in the above technical solutions has the following advantages and beneficial effects:

[0039] In each embodiment of the above method for creating a map of a mobile robot, by obtaining the current target straight line of the edge of an obstacle in the working area and adding the current target straight line as an obstacle boundary to the map; obtaining again the current target straight line of the edge of the obstacle in the working area, when the current target straight line and any obstacle boundary in the map meet the first preset condition, replacing the corresponding obstacle boundary with the current target straight line and adding it to the map; if not, adding the current target straight line as another obstacle boundary to the map, so as to realize real-time detection and accurate update of the straight line segments in the map. In this application, by real-time detecting the straight line segments of the edges of obstacles in the working area, the current target straight line of the corresponding obstacle edge is obtained, and the current target straight line is updated in the map; based on the preset conditions, the current target straight line and any obstacle boundary in the map are compared and processed. When the current target straight line and any obstacle boundary in the map meet the first preset condition, it is determined that the current target straight line and any obstacle boundary in the map are the same straight line segment, and then the corresponding obstacle boundary is replaced with the current target straight line, that is, the corresponding obstacle boundary is deleted from the map; if not, the obtained current target straight line is added to the map to update the map, so as to realize the creation of a map of the working area where the mobile robot body is located, improve the accuracy of map creation, and enhance the subsequent positioning, navigation and cleaning efficiency of the mobile robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a schematic diagram of the application environment of the method for creating a map of a mobile robot in one embodiment;

[0041] Figure 2 It is a first flowchart of the method for creating a map of a mobile robot in one embodiment;

[0042] Figure 3 It is a first flowchart of the step of obtaining the current target straight line in one embodiment;

[0043] Figure 4 It is a flowchart of the step of processing the current target straight line in one embodiment;

[0044] Figure 5 It is a second flowchart of the step of obtaining the current target straight line in one embodiment;

[0045] Figure 6 It is a schematic diagram of the structure of a mobile robot in one embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] To enable those skilled in the art to better understand the solution of this application, the following will clearly and completely describe the technical solution in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

[0047] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so as to implement the embodiments of this application described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0048] In addition, the meaning of the term "plurality" should be two or more.

[0049] The method for creating a map of a mobile robot provided by this application can be applied to an application environment as Figure 1 shown. Among them, the processing device includes a processor 102 and a memory 104; the memory 104 is used to store the current target line and the map, etc. The memory 104 is also used to store rectangular coordinate system information, various preset values, and a preset working program. The memory 104 can be an independent memory or can be integrated into the memory of the processor. The processor can be used to obtain the current target line of the obstacle edge in the working area and add the current target line as an obstacle boundary to the map; obtain the current target line of the obstacle edge in the working area again, and when the current target line and any obstacle boundary in the map meet the first preset condition, replace the corresponding any obstacle boundary with the current target line and add it to the map; if not, add the current target line as another obstacle boundary to the map. Among them, the processing device also includes a display, and the display can be used to display data such as the map, working status, and remaining battery power. The mobile robot can be a cleaning robot. For example, the mobile robot can be a floor cleaning robot or a window cleaning robot, etc. The mobile robot includes a mobile robot body, the processing device is arranged on the mobile robot body, the mobile robot also includes a sensing module, the sensing module is arranged on the mobile robot body, and the processing device is connected to the sensing module. The sensing module is used to detect the obstacle edge in the working area where the mobile robot is located; the sensing module is also used to detect the straight line segment of the obstacle edge, the traveling angle and the walking distance of the mobile robot body, etc.

[0050] In one embodiment, as Figure 2 shown, a method for creating a map of a mobile robot is provided, including the following steps:

[0051] Step S210, obtain the current target line of the obstacle edge in the working area, and add the current target line as an obstacle boundary to the map.

[0052] Among them, an obstacle refers to an object that hinders the movement of the mobile robot body. For example, when the working area of the mobile robot is indoors, the obstacles can be walls, tables, chairs, etc. The current target line refers to the straight line segment obtained by the current detection, and the straight line segment with a length greater than a preset value or an approximate straight line segment. For example, the preset value can be set between 0.5 meters and 2 meters. The map can be a map established based on a two-dimensional coordinate system. When the mobile robot starts the map creation mode, the mobile robot can establish an initial map, and then the obtained current target line can be updated in the map in real time.

[0053] For example, when the mobile robot starts the map creation mode, the mobile robot body moves in the working area where it is located. By detecting the obstacle edge in the working area in real time and identifying the straight line segment of the obstacle edge, when the length of the identified straight line segment is greater than the preset value, it is determined that the straight line segment is the corresponding current target line, and then the current target line of the obstacle edge in the working area is obtained, and the current target line is updated in the map as an obstacle boundary. It should be noted that according to the obtained current target line, the coordinates of the current target line are recorded, and the current target line is recorded as the corresponding obstacle edge.

[0054] Step S220, obtain the current target line of the obstacle edge in the working area again. When the current target line and any obstacle boundary in the map meet the first preset condition, replace the corresponding any obstacle boundary with the current target line and add it to the map; if not, add the current target line as another obstacle boundary to the map.

[0055] Among them, the mobile robot can establish a map based on a two-dimensional coordinate system, and then update the current target line in the map.

[0056] By comparing the currently obtained target straight line with any obstacle boundary in the map, when the currently obtained target straight line and any obstacle boundary in the map meet the first preset condition, it is determined that the currently obtained target straight line and any obstacle boundary in the map are the same straight line segment. Then, the currently obtained target straight line replaces any obstacle boundary and is added to the map, and the corresponding obstacle boundary is deleted to achieve the correction of the map. When the currently obtained target straight line and any obstacle boundary in the map do not meet the first preset condition, it is determined that the currently obtained target straight line and any obstacle boundary in the map are not the same straight line segment. Then, the currently obtained target straight line is updated to the map to achieve the update of the map, improving the accuracy of map creation.

[0057] In the above embodiment, by obtaining the currently obtained target straight line of the obstacle edge in the working area and adding the currently obtained target straight line as the obstacle boundary to the map; obtaining the currently obtained target straight line of the obstacle edge in the working area again, when the currently obtained target straight line and any obstacle boundary in the map meet the first preset condition, the currently obtained target straight line replaces the corresponding any obstacle boundary and is added to the map; if not, the currently obtained target straight line is added to the map as another obstacle boundary to achieve real-time detection and accurate update of the straight line segments in the map. This application obtains the currently obtained target straight line of the corresponding obstacle edge by detecting the straight line segments of the obstacle edges in the working area in real time, and updates the currently obtained target straight line in the map; based on the preset conditions, the currently obtained target straight line and any obstacle boundary in the map are compared. When the currently obtained target straight line and any obstacle boundary in the map meet the first preset condition, it is determined that the currently obtained target straight line and any obstacle boundary in the map are the same straight line segment, and then the corresponding any obstacle boundary is replaced with the currently obtained target straight line, that is, the corresponding obstacle boundary is deleted from the map; if not, the currently obtained target straight line is added to the map to update the map, achieving the creation of the map of the working area where the mobile robot body is located, improving the accuracy of map creation, and enhancing the subsequent positioning, navigation and cleaning efficiency of the mobile robot.

[0058] In one embodiment, before the step of obtaining the currently obtained target straight line of the obstacle edge in the working area, it includes:

[0059] Detect the obstacle edge in the working area where the mobile robot body is located, and control the mobile robot body to move along the obstacle edge.

[0060] For example, an edge sensor is provided on the mobile robot body. Based on the edge sensor connected to the processor, the edge sensor is used to detect the obstacle edge in the working area where the mobile robot body is located, and transmit the detected obstacle edge information to the processor. The processor controls the mobile robot body to move along the obstacle edge according to the obstacle edge information, so as to detect the straight line segment of the obstacle edge.

[0061] In one example, the steps of obtaining the current target line of the obstacle edge in the working area include:

[0062] Obtaining the trajectory distance and at least two angle values of the mobile robot body moving along the obstacle edge; when each angle value meets the first threshold condition and the trajectory distance meets the second threshold condition, confirming the trajectory distance as the current target line.

[0063] For example, an angle sensor is provided on the mobile robot body, and the angle sensor is used to detect the angle of the mobile robot body in real time; the angle sensor can be a gyroscope. A distance sensor is also provided on the mobile robot body, and the distance sensor can be used to detect the trajectory distance in real time; the distance sensor can be an odometer.

[0064] After the mobile robot encounters an obstacle, it enters the obstacle-edge movement mode and moves along the obstacle edge. The angle sensor is used to detect the angle of the mobile robot body in real time, and the distance sensor is used to detect the trajectory distance of the mobile robot body moving along the obstacle edge in real time. For example, the angle sensor detects n (n is a positive integer greater than or equal to 2) angles in real time, and then processes the obtained angle values. If each angle value meets the first threshold condition, it is determined that the current movement trajectory of the mobile robot is a straight line segment. Further, the obtained trajectory distance is processed. When the trajectory distance meets the second threshold condition, it is confirmed that the trajectory distance is the current target line. Then, the current target line is updated in the map. When the current target line and any obstacle boundary in the map meet the first preset condition, it is determined that the current target line and the corresponding obstacle boundary are the same straight line segment, and then the corresponding obstacle boundary is deleted in the map to update the map, realizing the map creation of the working area where the mobile robot body is located, improving the accuracy of map creation, and enhancing the subsequent positioning, navigation, and cleaning efficiency of the mobile robot.

[0065] In one embodiment, the at least two angle values include an initial angle value and a termination angle value; the trajectory distance includes initial coordinate data corresponding to the initial angle value and termination coordinate data corresponding to the termination angle value.

[0066] Among them, the initial angle value refers to the angle detected at the initial position when the mobile robot moves along the corresponding obstacle edge; the termination angle value refers to the angle detected at the termination position when the mobile robot moves along the corresponding obstacle edge. Exemplarily, if the mobile robot detects 5 angles in real time while moving along the corresponding obstacle edge, the initial angle value is the first detected angle value, and the termination angle value is the fifth detected angle value. The initial coordinate data refers to the coordinate position where the mobile robot is located when it detects the initial angle value; the termination coordinate data refers to the coordinate position where the mobile robot is located when it detects the termination angle value.

[0067] As Figure 3 shown, when each angle value satisfies the first threshold condition and the trajectory distance satisfies the second threshold condition, the steps for confirming the trajectory distance as the current target line include:

[0068] Step S310: Obtain the average angle value according to each angle value.

[0069] By performing an averaging process on each angle value, the average angle value is obtained. For example, if the n angle values are from Aj to Aj+n and the average angle value is A0, then A0 = (1 / n) * (Aj + Aj+1 +... + Aj+n).

[0070] Step S320: Perform a difference process on each angle value and the average angle value respectively to obtain each angle difference.

[0071] For example, perform a difference process on the angle value Aj and the average angle value A0 to obtain the corresponding angle difference; perform a difference process on Aj+n and the average angle value A0 to obtain the corresponding angle difference.

[0072] Step S330: When each angle difference falls within the angle threshold range and the distance between the initial coordinate data and the termination coordinate data is greater than the first distance threshold, confirm the distance between the initial coordinate data and the termination coordinate data as the current target line.

[0073] For example, the angle threshold range can be set between -5 degrees and 5 degrees. The first distance threshold can be set to any value between 0.5 meters and 2 meters.

[0074] By comparing each angle difference with the angle threshold range, when each angle difference falls within the angle threshold range, it is determined that the current movement trajectory of the mobile robot is a straight line segment. Then, the distance between the initial coordinate data and the termination coordinate data is obtained, and the distance between the initial coordinate data and the termination coordinate data is compared with the first distance threshold. If the distance between the initial coordinate data and the termination coordinate data is greater than the first distance threshold, the distance is confirmed as the current target line. Then, the current target line is updated in the map. When the current target line and any obstacle boundary in the map satisfy the first preset condition, it is determined that the current target line and the corresponding obstacle boundary are on the same straight line segment. Then, the corresponding obstacle boundary is deleted in the map to update the map, realizing the map creation of the working area where the mobile robot body is located, improving the accuracy of map creation, and enhancing the subsequent positioning, navigation, and cleaning efficiency of the mobile robot.

[0075] In one embodiment, when the current target straight line and any obstacle boundary in the map satisfy the first preset condition, the step of replacing the current target straight line with any corresponding obstacle boundary and adding it to the map includes:

[0076] When the difference between the initial coordinate data corresponding to the current target straight line and the initial coordinate data of any obstacle boundary in the map falls within the first coordinate threshold range, the difference between the termination coordinate data corresponding to the current target straight line and the termination coordinate data of any obstacle boundary in the map falls within the second coordinate threshold range, and the difference between the length of the current target straight line and the length of any obstacle boundary in the map falls within the length threshold range, the current target straight line is used to replace the corresponding obstacle boundary and added to the map.

[0077] By comparing the initial coordinate data corresponding to the current target straight line with the initial coordinate data of any obstacle boundary in the map, when the difference between the initial coordinate data corresponding to the current target straight line and the initial coordinate data of any obstacle boundary in the map falls within the first coordinate threshold range, it is determined that the initial coordinate data of the current target straight line coincides or is close to coinciding with the initial coordinate data of the corresponding obstacle boundary. By comparing the termination coordinate data corresponding to the current target straight line with the termination coordinate data of any obstacle boundary in the map, when the difference between the termination coordinate data corresponding to the current target straight line and the termination coordinate data of any obstacle boundary in the map falls within the second coordinate threshold range, it is determined that the termination coordinate data of the current target straight line coincides or is close to coinciding with the termination coordinate data of the corresponding obstacle boundary. By comparing the length of the current target straight line with the length of any obstacle boundary in the map, when the difference between the length of the current target straight line and the length of any obstacle boundary in the map falls within the length threshold range, it is determined that the length of the current target straight line is equal to or approximately equal to the length of the corresponding obstacle boundary, and then it is determined that the current target straight line and the corresponding obstacle boundary line are the same straight line segment. Thus, the corresponding obstacle boundary is deleted from the map to replace the corresponding obstacle boundary with the current target straight line, realizing the update of the map, and replacing the position of the current target straight line with the pose of the corresponding obstacle boundary stored in the map, reducing the cumulative error and improving the accuracy of map creation.

[0078] In one example, when the difference between the initial coordinate data corresponding to the current target line and the initial coordinate data of any obstacle boundary in the map does not fall within the first coordinate threshold range, the difference between the termination coordinate data corresponding to the current target line and the termination coordinate data of any obstacle boundary in the map does not fall within the second coordinate threshold range, or the difference between the length of the current target line and the length of any obstacle boundary in the map does not fall within the length threshold range, it is determined that the current target line and the corresponding any obstacle boundary are not the same straight line segment, so as to retain the corresponding obstacle boundary and the current target line in the map.

[0079] In one embodiment, as Figure 4 shown, when the current target line and any obstacle boundary in the map meet the first preset condition, the steps of replacing the current target line with the corresponding any obstacle boundary and adding it to the map further include:

[0080] Step S410, obtain the first slope of the current target line and the second slope of any obstacle boundary in the map.

[0081] According to the initial coordinate data and the termination coordinate data of the current target line, the first slope corresponding to the current target line is obtained; according to the initial coordinate data and the termination coordinate data of any obstacle boundary in the map, the second slope corresponding to any obstacle boundary in the map is obtained.

[0082] Step S420, when the difference between the first slope and the second slope falls within the slope threshold range, replace the current target line with the corresponding any obstacle boundary and add it to the map.

[0083] By performing a difference process on the first slope and the second slope, according to the result of the process, when the difference between the first slope and the second slope falls within the slope threshold range, it is determined that the current target line and the corresponding any obstacle boundary are the same straight line segment, so as to delete the corresponding any obstacle boundary from the map, replace the corresponding any obstacle boundary with the current target line, and realize the update of the map, improving the accuracy of map creation.

[0084] In one embodiment, as Figure 5 shown, the steps of obtaining the current target line of the obstacle edge in the working area include:

[0085] Step S510, when the distance between the mobile robot body and the corresponding obstacle edge falls within the first distance threshold range, control the mobile robot body to rotate in place, and perform distance measurement on the obstacle edge based on a preset angle to obtain the coordinate data of each edge point.

[0086] Among them, the preset angle can be less than 90 degrees. Exemplarily, a distance sensor is provided on the side of the mobile robot body, and the measurement distance of the distance sensor can be greater than or equal to 4 meters. The edge point coordinate data refers to the edge point coordinates corresponding to the measured distance of the obstacle edge at the corresponding preset angle.

[0087] After the mobile robot detects an obstacle, it moves closer to the obstacle and detects the distance between the mobile robot body and the corresponding obstacle edge. When the distance between the mobile robot body and the corresponding obstacle edge falls within the first distance threshold range, the mobile robot body is controlled to rotate in place, and based on the preset angle, a distance measurement is performed each time the mobile robot body rotates by the preset angle, thereby obtaining the corresponding edge point coordinate data. Exemplarily, if the preset angle is A, after the mobile robot rotates 360 degrees, the mobile robot body can obtain 360 / n edge point coordinate data to form a complete frame of point cloud data.

[0088] Step S520: Perform a straight line fitting process on each edge point coordinate data to obtain an extracted straight line.

[0089] By performing a straight line fitting process on each edge point coordinate in the point cloud data, an extracted straight line is obtained.

[0090] In one example, a feature signal can be extracted from the point cloud data as a reference signal for the mobile robot to recharge, facilitating the recharge of the mobile robot.

[0091] Step S530: When the length of the extracted straight line is greater than the second distance threshold, confirm that the extracted straight line is the current target straight line.

[0092] Among them, the second distance threshold can be set to be greater than or equal to 0.5 meters.

[0093] Obtain the length of the extracted straight line and perform a comparison process on the length of the extracted straight line. When the length of the extracted straight line is greater than the second distance threshold, confirm that the extracted straight line is the current target straight line, and then update the current target straight line in the map. When the current target straight line and any obstacle boundary in the map meet the first preset condition, determine that the current target straight line and the corresponding any obstacle boundary are the same straight line segment, and then delete the corresponding any obstacle boundary in the map to update the map, realizing the creation of the map of the working area where the mobile robot body is located, improving the accuracy of map creation, and enhancing the subsequent positioning, navigation, and cleaning efficiency of the mobile robot.

[0094] In one embodiment, when the current target straight line and any obstacle boundary in the map meet the first preset condition, the steps of replacing the current target straight line with the corresponding any obstacle boundary and adding it to the map include:

[0095] Obtain the first pose data of the current target line and the second pose data of any obstacle boundary in the map; when the difference between the first pose data and the second pose data falls within the pose threshold range, replace the second pose data of any corresponding obstacle boundary with the first pose data of the current target line.

[0096] Among them, the first pose data includes the position and angle data corresponding to the current target line in the map. The second pose data includes the position and angle data corresponding to any obstacle boundary in the map.

[0097] Exemplarily, update the current target line on the map, perform position and slope matching on the current target line, and then obtain the first pose data. By performing difference processing on the first pose data and the second pose data, and comparing the difference between the first pose data and the second pose data with the pose threshold range, when the difference between the first pose data and the second pose data falls within the pose threshold range, it is determined that the current target line and any corresponding obstacle boundary are the same straight line segment, so as to delete any corresponding obstacle boundary from the map, and replace the second pose data of any corresponding obstacle boundary with the first pose data of the current target line, realizing the update of the map and improving the accuracy of map creation.

[0098] For example, the first pose data includes the angle data Pθ1, the first coordinate axis coordinate data Px1, and the second coordinate axis coordinate data Py1; the second pose data includes the angle data Pθ2, the first coordinate axis coordinate data Px2, and the second coordinate axis coordinate data Py2. The pose offset difference Δθ = Pθ2 - Pθ1, the first coordinate axis coordinate difference ΔX = Px2 - Px1, and the second coordinate axis coordinate ΔY = Py2 - Py1. When Δθ, ΔX, and ΔY fall within the corresponding threshold ranges, it is determined that the current target line and any corresponding obstacle boundary are the same straight line segment, so as to replace the second pose data of any corresponding obstacle boundary with the first pose data of the current target line, realizing the update of the map.

[0099] In one embodiment, the map creation method of the mobile robot further includes the steps of:

[0100] Obtain the initial target line of the mobile robot body in the working area, and establish a rectangular coordinate system according to the initial target line; when the next target line is obtained, obtain the angle difference between the mobile robot body and the corresponding coordinate axis direction; when the angle difference is less than the preset angle threshold, correct the angle of the mobile robot body to the corresponding coordinate axis direction.

[0101] Among them, the initial target line refers to the straight line segment first obtained when the mobile robot body creates a map in the working area.

[0102] Exemplarily, the edge sensor is used to detect the edge of the obstacle. According to the received obstacle edge information, it is detected whether there is a straight line segment on the obstacle edge. The first detected straight line segment is used as the initial target straight line, and a rectangular coordinate system is established based on the initial target straight line as a reference. When a straight line segment is detected again, the angle of the mobile robot body is obtained. When the angle difference between the angle of the mobile robot body and the direction of a certain coordinate axis of the rectangular coordinate system is less than the preset angle threshold, the angle of the mobile robot body is corrected to the corresponding coordinate axis direction, thereby improving the accuracy of straight line segment detection and thus improving the accuracy of map creation. It should be noted that the value of the preset angle threshold can be set to any value between 5 degrees and 10 degrees.

[0103] It should be understood that although Figures 2 to 5 the steps in the flowchart of Figures 2 to 5 are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover,

[0104] In one embodiment, the embodiment of the present invention further provides a map creation device for a mobile robot, including:

[0105] A straight line update unit, configured to obtain the current target straight line of the obstacle edge in the working area and add the current target straight line as an obstacle boundary to the map.

[0106] A straight line correction unit, configured to obtain the current target straight line of the obstacle edge in the working area again. When the current target straight line and any obstacle boundary in the map meet the first preset condition, the current target straight line replaces the corresponding obstacle boundary and is added to the map; if not, the current target straight line is added to the map as another obstacle boundary.

[0107] For the specific limitations on the map creation device of the mobile robot, reference can be made to the limitations on the map creation method of the mobile robot in the above text, which will not be elaborated here. Each module in the above map creation device of the mobile robot can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in the controller of the mobile robot in hardware form or independent of it, or stored in the memory of the mobile robot in software form, so that the controller can call and execute the operations corresponding to the above modules.

[0108] In one embodiment, as Figure 6 shown, a mobile robot is further provided, including a mobile robot body 610, a sensing module 620, and a controller 630. The controller 630 and the sensing module 620 are disposed on the mobile robot body 610, and the controller 630 is connected to the sensing module 620; the controller 630 is configured to execute the steps of the map creation method of the mobile robot in any one of the above.

[0109] Among them, the sensing module 620 is disposed on one side of the mobile robot body 610. The sensing module 620 is used to detect the edge of an obstacle in the working area where the mobile robot is located; the sensing module 620 is also used to detect a straight line segment of the obstacle edge, the traveling angle and the traveling distance of the mobile robot body 610, etc.

[0110] Based on the controller 630 being connected to the sensing module 620, the sensing module 620 detects the edge of an obstacle in the working area in real time and performs straight line segment detection on the obstacle edge; the controller 630 obtains the current target straight line of the corresponding obstacle edge and adds the current target straight line to the map; when the current target straight line and any obstacle boundary in the map satisfy a first preset condition, the corresponding any obstacle boundary is replaced with the current target straight line, so as to realize real-time detection and accurate update of the straight line segment in the map.

[0111] In the above embodiment, the straight line segment of the obstacle edge is detected in real time by the sensing module 620, and then the controller 630 obtains the current target straight line of the corresponding obstacle edge and updates the current target straight line in the map; based on a preset condition, the current target straight line is compared with any obstacle boundary in the map. When the current target straight line and any obstacle boundary in the map satisfy the first preset condition, it is determined that the current target straight line and the corresponding any obstacle boundary are the same straight line segment, and then the corresponding any obstacle boundary is replaced with the current target straight line, that is, the corresponding any obstacle boundary is deleted in the map to update the map, so as to create a map of the working area where the mobile robot body 610 is located, improve the accuracy of map creation, and improve the subsequent positioning navigation and cleaning efficiency of the mobile robot.

[0112] In one embodiment, the sensing module includes a first distance sensor, an angle sensor, and an edge sensor, and the first distance sensor, the angle sensor, and the edge sensor are respectively connected to the controller.

[0113] Among them, the first distance sensor may be an odometer, the angle sensor may be a gyroscope or an electronic compass, and the edge sensor may be an infrared sensor. The first distance sensor, the angle sensor, and the edge sensor may be disposed on the corresponding sides of the mobile robot.

[0114] The edge sensor is used to detect the edges of obstacles within the working area where the mobile robot body is located. Subsequently, based on the obstacle edge information, the controller controls the mobile robot body to move along the obstacle edges. The edge sensor is also used to detect the straight line segments of the obstacle edges within the working area. The angle sensor is used to obtain the traveling angle of the mobile robot body in real time. The distance sensor is used to obtain the traveling distance of the mobile robot.

[0115] After the mobile robot encounters an obstacle, it enters the obstacle-following motion mode and moves along the obstacle edge. The angle sensor is used to detect the angle of the mobile robot body in real time, and the distance sensor is used to detect the trajectory distance of the mobile robot body moving along the obstacle edge in real time. The controller processes the obtained angle values. If the angle values meet the first threshold condition, it is determined that the current motion trajectory of the mobile robot is a straight line segment. Further, the obtained trajectory distance is processed. When the trajectory distance meets the second threshold condition, the trajectory distance is confirmed as the current target straight line. Then, the current target straight line is updated in the map. When the current target straight line and any obstacle boundary in the map meet the first preset condition, it is determined that the current target straight line and the corresponding obstacle boundary are the same straight line segment. Subsequently, the corresponding obstacle boundary is deleted from the map to update the map, realizing the map creation of the working area where the mobile robot body is located, improving the accuracy of map creation, and enhancing the subsequent positioning, navigation, and cleaning efficiency of the mobile robot.

[0116] In one embodiment, the sensing module includes a second distance sensor, and the second distance sensor is connected to the controller.

[0117] Among them, the second distance sensor can be a laser scanner, and the second distance sensor is used to detect the distance to the obstacle edge point when the mobile robot body rotates in place to a corresponding preset angle.

[0118] When the distance between the mobile robot body and the corresponding obstacle edge falls within the first distance threshold range, the controller controls the mobile robot body to rotate in place. Based on the preset angle, a distance measurement is performed by the second distance sensor every time it rotates by the preset angle, and thus the corresponding edge point coordinate data is obtained. The controller obtains the length of the extracted straight line and performs a comparison process on the length of the extracted straight line. When the length of the extracted straight line is greater than the second distance threshold, the extracted straight line is confirmed as the current target straight line. Then, the current target straight line is updated in the map. When the current target straight line and any corresponding obstacle boundary meet the first preset condition, it is determined that the current target straight line and any obstacle boundary in the map are the same straight line segment. Subsequently, the corresponding obstacle boundary is deleted from the map to update the map, improving the accuracy of map creation.

[0119] It should be noted that the mobile robot may further include a drive system for driving the movement of the mobile robot body.

[0120] In the above embodiments, by detecting and updating the straight line segments in the map in real time and implementing the update, the problem of inaccurate positioning caused by cumulative errors in the inertial navigation system is reduced, and the accuracy of map creation is improved.

[0121] In one embodiment, there is also provided a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the map creation method of the mobile robot in any one of the above are implemented.

[0122] In one example, when the computer program is executed by a processor, the following steps are implemented:

[0123] Obtain the current target straight line of the obstacle edge in the working area, and add the current target straight line as an obstacle boundary to the map; obtain the current target straight line of the obstacle edge in the working area again. When the current target straight line and any obstacle boundary in the map meet the first preset condition, replace the corresponding obstacle boundary with the current target straight line and add it to the map; if not, add the current target straight line as another obstacle boundary to the map.

[0124] 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, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR 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), etc.

[0125] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above-described 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 recorded in this specification.

[0126] The above-described embodiments only express several implementation manners of the present application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several deformations and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A method for creating a map of a mobile robot, characterized in that, It includes the following steps: Obtain the current target line of the obstacle edge in the working area, and add the current target line as an obstacle boundary to the map; Obtain the current target line of the obstacle edge in the working area again. When the current target line and any obstacle boundary in the map meet the first preset condition, replace the corresponding any obstacle boundary with the current target line and add it to the map; If not, add the current target line as another obstacle boundary to the map.

2. The method for creating a map of a mobile robot according to claim 1, characterized in that, Before the step of obtaining the current target line of the obstacle edge in the working area, it includes: Detect the obstacle edge in the working area where the mobile robot body is located, and control the mobile robot body to move along the obstacle edge; The step of obtaining the current target line of the obstacle edge in the working area includes: Obtain the trajectory distance and at least two angle values of the mobile robot body moving along the obstacle edge; When each of the angle values meets the first threshold condition and the trajectory distance meets the second threshold condition, confirm that the trajectory distance is the current target line.

3. The method for creating a map of a mobile robot according to claim 2, wherein The at least two angle values include an initial angle value and a termination angle value; the trajectory distance includes initial coordinate data corresponding to the initial angle value and termination coordinate data corresponding to the termination angle value; The step of, when each of the angle values meets the first threshold condition and the trajectory distance meets the second threshold condition, confirming that the trajectory distance is the current target line includes: Obtain an average angle value according to each of the angle values; Perform difference processing on each of the angle values and the average angle value respectively to obtain each angle difference; When each of the angle differences falls within the angle threshold range and the distance between the initial coordinate data and the termination coordinate data is greater than the first distance threshold, confirm that the distance between the initial coordinate data and the termination coordinate data is the current target line.

4. The method for creating a map of a mobile robot according to claim 3, wherein The step of, when the current target line and any obstacle boundary in the map meet the first preset condition, replacing the corresponding any obstacle boundary with the current target line and adding it to the map includes: When the difference between the initial coordinate data corresponding to the current target line and the initial coordinate data of any obstacle boundary in the map falls within the first coordinate threshold range, the difference between the termination coordinate data corresponding to the current target line and the termination coordinate data of any obstacle boundary in the map falls within the second coordinate threshold range, and the difference between the length of the current target line and the length of any obstacle boundary in the map falls within the length threshold range, replace the corresponding any obstacle boundary with the current target line and add it to the map.

5. The method for creating a map of a mobile robot according to any one of claims 1 to 3, characterized in that, The step of, when the current target line and any obstacle boundary in the map meet the first preset condition, replacing the corresponding any obstacle boundary with the current target line and adding it to the map further includes: Obtain the first slope of the current target line and the second slope of any obstacle boundary in the map; When the difference between the first slope and the second slope falls within the slope threshold range, replace the corresponding any obstacle boundary with the current target line and add it to the map.

6. The method for creating a map of a mobile robot according to claim 1, characterized in that, The step of obtaining the current target straight line of the obstacle edge in the working area includes: When the distance between the mobile robot body and the corresponding obstacle edge falls within the first distance threshold range, control the mobile robot body to rotate in place, and perform distance measurement on the obstacle edge based on a preset angle to obtain the coordinate data of each edge point; Perform linear fitting processing on the coordinate data of each edge point to obtain an extracted straight line; When the length of the extracted straight line is greater than the second distance threshold, confirm the extracted straight line as the current target straight line.

7. The method for creating a map of a mobile robot according to claim 6, characterized in that, The step of replacing the corresponding any obstacle boundary with the current target straight line and adding it to the map when the current target straight line and any obstacle boundary in the map satisfy the first preset condition includes: Obtain the first pose data of the current target straight line and the second pose data of any obstacle boundary in the map; When the difference between the first pose data and the second pose data falls within the pose threshold range, replace the second pose data of the corresponding any obstacle boundary with the first pose data of the current target straight line.

8. The method for creating a map of a mobile robot according to claim 1, characterized in that, It further includes the step: Obtain the initial target straight line of the mobile robot body in the working area, and establish a rectangular coordinate system according to the initial target straight line; When obtaining the next target straight line, obtain the angle difference between the mobile robot body and the corresponding coordinate axis direction; When the angle difference is less than the preset angle threshold, correct the angle of the mobile robot body to the corresponding coordinate axis direction.

9. A mobile robot, characterized in that, It includes a mobile robot body, a sensing module and a controller. The controller and the sensing module are arranged on the mobile robot body, and the controller is connected to the sensing module; The controller is used to execute the steps of the map creation method of the mobile robot according to any one of claims 1 to 8.

10. The mobile robot according to claim 9, characterized in that, The sensing module includes a first distance sensor, an angle sensor and an edge sensor. The first distance sensor, the angle sensor and the edge sensor are respectively connected to the controller; Or, the sensing module includes a second distance sensor, and the second distance sensor is connected to the controller.