Map rectification method
By acquiring the map boundary information of the cleaning robot, distinguishing orthogonal line groups and calculating the reference ratio, a Cartesian coordinate system is established, solving the map tilt problem and achieving accurate map alignment and user-friendly display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG SUNSEEKER IND CO LTD
- Filing Date
- 2023-04-18
- Publication Date
- 2026-06-12
AI Technical Summary
The initial map constructed by the cleaning robot is tilted, resulting in low efficiency in localization and motion decision-making. The map displayed on the user terminal has different orientations, which increases the difficulty of understanding.
By acquiring the boundary information of the map, it is divided into orthogonal line groups, the relationship between the benchmark ratio and the judgment threshold is calculated, a plane rectangular coordinate system is established, the map adjustment method is standardized, and it is adapted to the user's observation habits.
It achieves accurate map alignment, reduces the difficulty for users to understand the map, and improves the working efficiency of cleaning robots and the completeness of map display.
Smart Images

Figure CN118394052B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and more particularly to a method for map alignment. Background Technology
[0002] In existing technologies, cleaning robots can create maps of their surroundings using lidar ranging technology to facilitate positioning and navigation during subsequent cleaning processes. However, the initial orientation of the map constructed by the cleaning robot is usually based on its own first-person perspective. Due to different initial poses, the orientation of the map corresponding to the same area is not consistent after initial formation or after alignment based on the initial pose. This results in inconsistent map orientations received by the user terminal, posing a significant challenge to the display unit of the user terminal.
[0003] In existing technologies, cleaning robots typically employ SLAM (simultaneous localization and mapping) technology to construct a map of their surrounding environment. However, when building this map, the robot usually starts from its initial position upon startup. This method may result in a tilted map, which hinders subsequent localization and motion decisions, thus impacting the robot's efficiency.
[0004] Therefore, there is an urgent need for a method to straighten maps, which can reduce the difficulty of displaying complete units while ensuring the consistency of the straightening results, so that users can obtain straightened maps and reduce the difficulty of understanding the maps. Summary of the Invention
[0005] The purpose of this invention is to provide a map alignment method to realize map alignment operations, standardize the map adjustment method, enable the map to adapt to the user's observation habits, and help reduce the difficulty of displaying the map completely.
[0006] To achieve this objective, the present invention adopts the following technical solution:
[0007] The method for straightening a map includes the following steps:
[0008] S10: Obtain the boundary information of the map, the boundary information including the status information of the boundary lines and the total length of the boundary, the total length of the boundary being configured as the sum of the lengths of all the boundary lines;
[0009] S20: Summarize all the boundary lines that meet the preset conditions into an orthogonal line group;
[0010] S30: Determine the relationship between the benchmark ratio and the judgment threshold. If the first relationship is satisfied, proceed to S40; if the second relationship is satisfied, proceed to S50. The benchmark ratio is the ratio of the longest boundary line length to the total length of the boundary. The length of the boundary line is defined as the sum of the lengths of all the boundary lines in the orthogonal line group.
[0011] S40: Establish a Cartesian coordinate system based on the first datum, and then proceed to S60;
[0012] S50: Establish a plane rectangular coordinate system based on the second datum, and then proceed to S60;
[0013] S60: Align the map according to the Cartesian coordinate system and output the boundary information of the aligned map to the user terminal.
[0014] As a preferred technical solution for map alignment, the preset condition is that the boundary lines are parallel, collinear or perpendicular to each other.
[0015] As a preferred technical solution for the map alignment method, the first relationship is that the reference ratio is not less than the judgment threshold, and the second relationship is that the reference ratio is less than the judgment threshold; the first reference is the boundary line corresponding to the reference ratio, and the second reference is the reference bounding rectangle.
[0016] As a preferred technical solution for map alignment, S20 includes the following detailed steps:
[0017] S21: Select any of the aforementioned boundary lines as the positioning line;
[0018] S22: Take all the boundary lines that are parallel, collinear or perpendicular to the positioning line as orthogonal lines, take the sum of the positioning line and all the orthogonal lines as the length of the boundary line, and calculate and record the length of the boundary line.
[0019] S23: Repeatedly select the positioning line and calculate the length of the corresponding boundary line until the positioning line can no longer be selected, so as to calculate and record all the lengths of the boundary lines.
[0020] S24: Compare and select the longest of all the boundary line lengths, and calculate the ratio of the longest boundary line length to the total length of the boundary, as the benchmark ratio.
[0021] As a preferred technical solution for map alignment, S23 includes the following detailed steps:
[0022] S231: Determine whether there exists a boundary line that has neither been used as the positioning line nor as the orthogonal line. If yes, proceed to S232; otherwise, proceed to S24.
[0023] S232: Select any boundary line that has neither been a positioning line nor an orthogonal line, replace it with the positioning line, and then perform S22 again.
[0024] As a preferred technical solution for map alignment, S50 includes the following detailed steps:
[0025] S51: Establish an external Cartesian coordinate system. Using the two long sides of the X-axis parallel to the external Cartesian coordinate system and the two short sides of the Y-axis parallel to the external Cartesian coordinate system, generate the circumscribed rectangle of the figure enclosed by the boundary lines. Use the area of the circumscribed rectangle as the test area, calculate and record the test area.
[0026] S52: Rotate the circumscribed Cartesian coordinate system by a predetermined angle multiple times, select different circumscribed Cartesian coordinate systems and calculate the corresponding test areas, until the circumscribed Cartesian coordinate system is rotated 90°, so as to calculate and record all the test areas;
[0027] S53: Compare all the test areas and take the smallest bounding rectangle among all the test areas as the reference bounding rectangle.
[0028] As a preferred technical solution for map alignment, the following steps are included after S10:
[0029] S11: Find the specified baseline;
[0030] S12: Determine whether the specified benchmark exists. If yes, straighten the map according to the specified benchmark and output the boundary information of the straightened map to the user terminal. If no, proceed to S20.
[0031] As a preferred technical solution for map alignment, the following steps are included before S20:
[0032] S18: Determine whether the ratio of the length of the longest boundary line to the total length of the boundary is not less than the determination threshold. If yes, proceed to S19; otherwise, proceed to S20.
[0033] S19: Using the longest boundary line as a reference, establish a Cartesian coordinate system, and then proceed to S60.
[0034] As a preferred technical solution for map alignment, the following steps are included before S30:
[0035] S28: Determine whether there exists an orthogonal line group with at least two boundary lines. If yes, proceed to S30; otherwise, proceed to S50.
[0036] As a preferred technical solution for map alignment, the following steps are included before S30:
[0037] S29: Determine whether there are at least two parallel and largest boundary line lengths. If yes, proceed to S50; otherwise, proceed to S30.
[0038] The beneficial effects of this invention are:
[0039] This map alignment method extracts and categorizes boundary lines on the map into different orthogonal line groups, obtaining the length of the boundary line in each group. The ratio of the longest boundary line length to the total boundary length is calculated and compared with a threshold to determine the basis for map alignment. This design establishes a Cartesian coordinate system, enabling map alignment. The map is then aligned according to this coordinate system and presented to the user via a terminal. By determining the magnitude of the reference ratio, this method establishes the Cartesian coordinate system, standardizes map adjustment, adapts the map to user viewing habits, and reduces the difficulty of displaying the map completely. Attached Figure Description
[0040] Figure 1 This is a simplified flowchart of the map alignment method provided in this embodiment of the invention;
[0041] Figure 2 This is a detailed flowchart of the map alignment method provided in the embodiments of the present invention;
[0042] Figure 3 This is a schematic diagram of an application scenario of the map alignment method provided in this embodiment of the invention. Figure 1 ;
[0043] Figure 4 This is a schematic diagram of an application scenario of the map alignment method provided in this embodiment of the invention. Figure 2 ;
[0044] Figure 5 This is a schematic diagram of an application scenario of the map alignment method provided in this embodiment of the invention. Figure 3 .
[0045] In the picture:
[0046] 110, First positioning line; 120, Second positioning line; 200, Reference plane rectangular coordinate system; 310, Third positioning line; 320, Fourth positioning line; 330, Fifth positioning line; 400, Circumscribed plane rectangular coordinate system; 500, First circumscribed rectangle; 600, Second circumscribed rectangle; 700, Third circumscribed rectangle; 800, Fourth circumscribed rectangle; 900, Fifth circumscribed rectangle. Detailed Implementation
[0047] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The terms "first position" and "second position" refer to two different positions. Furthermore, "above," "on top of," and "over" the first feature in relation to the second feature includes the first feature directly above and diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "under," and "below" the first feature in relation to the second feature includes the first feature directly below and diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0049] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0050] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0051] When initially creating a map, the map uses the default coordinate system. However, during the map alignment process, a reference coordinate system needs to be established. This is done by mapping points from the default coordinate system to the reference coordinate system, thus achieving map alignment.
[0052] The map's boundary lines include the map's outer boundary and inner boundary. In the initial state, referring to the default coordinate system, the state information of the boundary lines, including their lengths and the angles between adjacent boundary lines, can be obtained.
[0053] The map's boundary information includes the status information of the boundary lines and the total boundary length. The status information of the boundary lines includes the length and direction of each boundary line. The total boundary length is calculated from the boundary line information and is configured as the sum of the lengths of all boundary lines.
[0054] Map boundaries are formed by connecting straight line segments end to end. In some embodiments, the boundary lines are simply straight line segments; in others, they are straight line segments with a length greater than a certain threshold, obtained through Hough transform.
[0055] like Figures 1-5 As shown, this embodiment provides a map alignment method, including the following steps:
[0056] Step 1: Obtain the boundary information of the map.
[0057] Step 2: Group all boundary lines that meet the preset conditions into an orthogonal line group.
[0058] Step 3: Determine the relationship between the benchmark ratio and the judgment threshold. If the first relationship is satisfied, proceed to Step 4; if the second relationship is satisfied, proceed to Step 5.
[0059] Step 4: Establish a Cartesian coordinate system based on the first datum, and then proceed to Step 6.
[0060] Step 5: Establish a Cartesian coordinate system based on the second datum, and then proceed to Step 6.
[0061] Step 6: Align the map according to the Cartesian coordinate system and output the boundary information of the aligned map to the user terminal.
[0062] In this embodiment, the reference ratio is defined as the ratio of the longest boundary line length to the total length of the boundary, and the boundary line length is defined as the sum of the lengths of all boundary lines in an orthogonal line group.
[0063] This map alignment method extracts and categorizes boundary lines on the map into different orthogonal line groups, obtaining the length of the boundary line in each group. The ratio of the longest boundary line length to the total boundary length is calculated and compared with a threshold to determine the basis for map alignment. This design establishes a Cartesian coordinate system, enabling map alignment. The map is then aligned according to this coordinate system and presented to the user via a terminal. By determining the magnitude of the reference ratio, this method establishes the Cartesian coordinate system, standardizes map adjustment, adapts the map to user viewing habits, and reduces the difficulty of displaying the map completely.
[0064] In this embodiment, the preset condition is that the boundary lines are parallel, collinear or perpendicular to each other.
[0065] In this embodiment, step two involves the following detailed process: integrating all boundary lines on the map, grouping all mutually parallel, collinear, or perpendicular boundary lines into an orthogonal line group. Step three involves the following detailed process: after all boundary lines are grouped, calculating and comparing the sum of the lengths of the boundary lines in each orthogonal line group, selecting the largest as the longest boundary line; then calculating the ratio of the longest boundary line to the total boundary length, and obtaining this ratio as a baseline.
[0066] Furthermore, the first relationship is that the baseline ratio is not less than the judgment threshold, and the second relationship is that the baseline ratio is less than the judgment threshold; the first baseline is the boundary line corresponding to the baseline ratio, and the second baseline is the bounding rectangle of the baseline. This step determines whether the baseline ratio exceeds the judgment threshold. If yes, proceed to step four; otherwise, proceed to step five.
[0067] Step four involves the following detailed process: extracting the boundary lines corresponding to the baseline ratio, establishing a Cartesian coordinate system that corresponds to the boundary lines; then proceeding to step six, aligning the map according to the Cartesian coordinate system, and outputting the boundary information of the aligned map to the user terminal.
[0068] Step five involves the following detailed process: obtaining the baseline bounding rectangle of the map and establishing a Cartesian coordinate system corresponding to the baseline bounding rectangle; then proceeding to step six, aligning the map according to the Cartesian coordinate system and outputting the boundary information of the aligned map to the user terminal.
[0069] The above process determines whether the linear datum method is suitable for map alignment. If suitable, the linear datum method can be used to locate the Cartesian coordinate system; otherwise, the rectangular datum method is used instead. This design combines the linear and rectangular datum methods for determining the Cartesian coordinate system, thus establishing the Cartesian coordinate system and enabling map alignment.
[0070] The judgment threshold is 40%-80%. This threshold is a preset value, which the user can adjust according to actual needs. Specifically, in this embodiment, the judgment threshold is 60%.
[0071] In this embodiment, step four further includes the following: the X-axis of the Cartesian coordinate system is parallel to one of the boundary lines corresponding to the reference ratio. The above limitations provide a standard for determining the direction of the Cartesian coordinate system, avoiding discrepancies in map alignment results and ensuring the reliability of the alignment results.
[0072] In this embodiment, step two includes the following detailed steps: selecting any boundary line as the positioning line; taking all boundary lines parallel, collinear, or perpendicular to the positioning line as orthogonal lines, and using the sum of the positioning line and all orthogonal lines as the boundary line length; calculating and recording the boundary line length; repeatedly selecting positioning lines and calculating the corresponding boundary line lengths until no more positioning lines can be selected, thus calculating and recording all boundary line lengths; comparing and selecting the largest of all boundary line lengths, and calculating the ratio of the largest boundary line length to the total boundary length, as the benchmark ratio. With these steps, the boundary line lengths of each orthogonal line group can be effectively calculated, and the largest can be selected to calculate the benchmark ratio. This achieves the technical objective of obtaining the benchmark ratio, which helps the map alignment method operate smoothly and ensures the accuracy of the map alignment results.
[0073] Furthermore, the process of repeatedly selecting positioning lines and calculating the corresponding boundary line lengths involves the following detailed steps: First, determine if there exists a boundary line that has neither been used as a positioning line nor as an orthogonal line. If so, select any boundary line that has neither been used as a positioning line nor as an orthogonal line, replace it with a positioning line, and then return to the step of selecting orthogonal lines. If not, compare the lengths of all boundary lines and calculate the ratio of the longest boundary line length to the total boundary length, using this ratio as the baseline ratio. This process effectively avoids omissions and errors in recording, ensuring the accuracy and completeness of boundary line lengths, and guaranteeing that the baseline ratio can be accurately calculated and selected, further ensuring the accuracy of the map alignment results.
[0074] In another embodiment, step two includes the following detailed steps: selecting any boundary line as the positioning line; treating all boundary lines parallel, collinear, or perpendicular to the positioning line as orthogonal lines; calculating and recording the ratio of the sum of the positioning line and all orthogonal lines to the total boundary length as a test ratio; repeatedly selecting positioning lines and calculating the corresponding test ratios until no more positioning lines can be selected, thus calculating and recording all test ratios; comparing all test ratios and selecting the largest as the benchmark ratio. With these steps, the ratio of the sum of the lengths of each group of boundary lines to the total boundary length can be effectively calculated, and the largest can be selected as the benchmark ratio. This achieves the technical objective of obtaining the benchmark ratio, facilitates the smooth operation of the map alignment method, and ensures the accuracy of the map alignment results.
[0075] Furthermore, the process of repeatedly selecting positioning lines and calculating the corresponding test ratios includes the following detailed steps: First, determine if there exists a boundary line that has neither been used as a positioning line nor as an orthogonal line. If so, select any boundary line that has neither been used as a positioning line nor as an orthogonal line, replace it with a positioning line, and then return to the step of selecting orthogonal lines. If not, compare all test ratios and select the largest one as the baseline ratio. This process effectively avoids omissions and errors in recording, ensuring the accuracy and completeness of test ratio records, and guaranteeing that the baseline ratio can be accurately calculated and selected, further ensuring the accuracy of the map alignment results.
[0076] For example, step six also includes the following: the X-axis of the Cartesian coordinate system is parallel to the long side of the reference circumscribed rectangle, and the Y-axis of the Cartesian coordinate system is parallel to the short side of the reference circumscribed rectangle. These specifications provide a standard for determining the orientation of the Cartesian coordinate system, avoiding discrepancies in map alignment results and ensuring the reliability of the alignment. Simultaneously, the design of the X-axis being parallel to the long side and the Y-axis parallel to the short side easily adapts to the sizes of commonly used display units, further reducing the difficulty of displaying the map completely on the display unit, thereby further improving the user's map viewing experience.
[0077] Further, step five includes the following detailed steps: Establish a circumscribed Cartesian coordinate system 400. Using the two long sides parallel to the X-axis and the two short sides parallel to the Y-axis of the circumscribed Cartesian coordinate system 400, generate the circumscribed rectangle of the shape enclosed by the boundary lines. Use the area of the circumscribed rectangle as the test area, calculate and record the test area. Rotate the circumscribed Cartesian coordinate system 400 multiple times by a predetermined angle, selecting different circumscribed Cartesian coordinate systems 400 and calculating the corresponding test areas, until the circumscribed Cartesian coordinate system 400 is rotated 90° to calculate and record all test areas. Compare all test areas, and use the circumscribed rectangle with the smallest test area as the reference circumscribed rectangle. With the above steps, the reference circumscribed rectangle can be successfully obtained. This achieves the technical objective of obtaining the reference circumscribed rectangle, which helps in determining the position of the subsequent circumscribed Cartesian coordinate system 400, further ensuring the accuracy of the map alignment results.
[0078] Furthermore, the process involves repeatedly rotating the circumscribed Cartesian coordinate system 400 by a predetermined angle, including the following detailed steps: rotating the circumscribed Cartesian coordinate system 400 (N-1) times, each rotation being (90 / N)°; calculating and recording the test area corresponding to each circumscribed Cartesian coordinate system 400; then comparing all the test areas and selecting the smallest circumscribed rectangle as the reference circumscribed rectangle. This operation, by acquiring and calculating the circumscribed rectangle, increases the number of samples, thereby bringing the position of the reference circumscribed rectangle closer to the smallest circumscribed rectangle. This design ensures the accuracy of the reference circumscribed rectangle selection, thus improving the map alignment effect and further guaranteeing the accuracy of the map alignment results.
[0079] The value of N is selected as an integer greater than or equal to 2. In this embodiment, N = 90. In other embodiments of this embodiment, N is selected as other integers greater than or equal to 2. The larger the selected value, the more bounding rectangles are generated, and the closer the area of the obtained baseline bounding rectangle is to the minimum bounding rectangle. The above settings make the map's alignment more regular, which helps to further reduce the display difficulty of the display unit. However, increasing N also increases the number of bounding rectangles, increases the workload of analysis, and slows down the speed of obtaining the baseline bounding rectangle. The specific value of N is determined by those skilled in the art based on their work situation, and the determination method is a conventional technical means in the art, which will not be elaborated here.
[0080] When generating the bounding rectangle, it is necessary to ensure that each side of the bounding rectangle is in contact with the shape enclosed by the boundary lines. The above design ensures that the bounding rectangle is accurately bounded by the shape enclosed by the boundary lines.
[0081] In this embodiment, after step one, the following steps are also included: finding a specified benchmark; determining whether a specified benchmark exists; if so, aligning the map according to the specified benchmark and outputting the boundary information of the aligned map to the user terminal; if not, proceeding to step two. This design allows the benchmark for map alignment to be determined manually by the user, significantly improving the flexibility of the map alignment operation and achieving a user-friendly design. It enables the position of the Cartesian coordinate system to be both manually set and automatically selected. The specified benchmark is usually specified by the user. After obtaining the map's boundary information, directly searching for the specified benchmark not only ensures the user's search priority but also simplifies the map alignment process, omitting unnecessary calculations and records, thereby effectively improving the efficiency of the alignment operation.
[0082] In this embodiment, the priority of the planar rectangular coordinate system determination method is, in order, user-defined, linear reference determination, and rectangular reference determination. If the user is not satisfied with the map alignment result, they can change the map alignment result again through the user-defined method. The specific modification method is common knowledge in the art and is well understood by those skilled in the art, so it will not be elaborated here.
[0083] In this embodiment, before step two, the following steps are included: determining whether the ratio of the length of the longest boundary line to the total length of the boundary is not less than a judgment threshold. If so, a Cartesian coordinate system is established based on the longest boundary line, and then step six is performed. If not, step two is performed. Through the above steps, it is possible to determine whether there exists a boundary line that satisfies the relationship with the judgment threshold. If so, it proves that the length of the boundary line in the orthogonal line group to which this boundary line belongs is the longest, and its reference ratio naturally satisfies the relationship requirement of the judgment threshold. By performing the above steps before step two, it is possible to determine whether the map can be aligned using the straight-line reference method. Thus, before judging the relationship between the reference ratio and the judgment threshold, a batch of maps that meet the first relationship can be identified as using the straight-line reference method in advance. The above design helps to reduce the workload of the map alignment method, optimize the process of the map alignment method, and speed up the execution speed. The above steps are simple and effective, improve the efficiency of map alignment, reduce the judgment error caused by users, and improve the quality of map alignment.
[0084] For example, before step three, the following steps are included: determining whether there is an orthogonal line group with at least two boundary lines; if yes, proceed to step three; otherwise, proceed to step five. These steps enable the determination of whether all boundary lines form individual orthogonal line groups. In this case, no two boundary lines are parallel, collinear, or perpendicular to the map, and the ratio of any single boundary line to the total boundary length is relatively small. After alignment using a straight-line reference method, having only one boundary line horizontally or vertically may affect the user's perception in some situations and pose a significant challenge to the display unit's display capabilities. Considering these factors, aligning the map using a rectangular reference method is preferable. These steps allow maps meeting the above conditions to be aligned using a rectangular reference method, thereby improving the alignment quality and reducing the display unit's display difficulty. Furthermore, these steps are performed before step three, optimizing the map alignment process, reducing workload, and improving efficiency.
[0085] In other embodiments of this example, if there are two or more maximum boundary line lengths, the display unit displays multiple rotation schemes, and the user selects one by interacting with the display unit.
[0086] In this embodiment, before step three, the following steps are included: determining whether there are at least two parallel and largest boundary line lengths. If so, proceed to step five; otherwise, proceed to step three. These steps allow for the analysis of the boundary line status information before determining the relationship between the baseline ratio and the judgment threshold. When parallel lengths exist, it is clear that the baseline ratio will not exceed 50%, and the resulting map alignment is prone to visual judgment errors for users, affecting normal observation and failing to achieve the alignment advantages of the straight-line baseline determination method. Therefore, it is easy to determine that the straight-line baseline determination method is no longer the optimal map alignment method, and the rectangular baseline determination method should be switched for map alignment. Furthermore, performing these steps before step three helps reduce the workload of the map alignment method. These steps are simple and effective, optimizing the map alignment process, improving map alignment efficiency, reducing user-induced judgment errors, and enhancing the quality of map alignment.
[0087] The following is based on Figure 3 and Figure 4 The following are the steps for straightening the map, using the two maps shown as examples:
[0088] exist Figure 3In the map shown (length is in meters, not shown), after obtaining all boundary information and integrating the boundary lines on the map, all boundary lines are divided into two groups: the first group using the first positioning line 110 as the positioning line, and the second group using the second positioning line 120 as the positioning line. Specifically, the angle between the first positioning line 110 and the second positioning line 120 is 45°.
[0089] After integration, it can be seen that the total length of the boundary is 32.728 meters. The sum of the positioning lines in the first group and all the orthogonal lines is 20.000 meters, and the sum of the positioning lines in the second group and all the orthogonal lines is 12.728 meters.
[0090] In this embodiment, it can be seen from the comparison that the length of the maximum boundary line is 20.000 meters. It can be calculated that the benchmark ratio is 61.110%, which exceeds the judgment threshold of 60%.
[0091] In another embodiment, calculations show that the test ratio corresponding to the first positioning line 110 is 61.110%, and the test ratio corresponding to the second positioning line 120 is 38.890%. Comparison shows that the baseline ratio of 61.110% exceeds the judgment threshold of 60%.
[0092] Therefore, a reference plane rectangular coordinate system 200 needs to be established. The X-axis of the reference plane rectangular coordinate system 200 is parallel to the straight line where the first positioning line 110 is located, and the Y-axis of the reference plane rectangular coordinate system 200 is perpendicular to the straight line where the first positioning line 110 is located. After the map is aligned according to the reference plane rectangular coordinate system 200, the boundary information of the aligned map is output to the user terminal.
[0093] exist Figure 4 and Figure 5 In the map shown (length is in meters, not shown), after acquiring all boundary information and integrating the boundary lines on the map, all boundary lines are divided into three groups: the third group using the third positioning line 310 as the positioning line, the fourth group using the fourth positioning line 320 as the positioning line, and the fifth group using the fifth positioning line 330 as the positioning line. Specifically, the angle between the third positioning line 310 and the fourth positioning line 320 is 45°, and the angle between the third positioning line 310 and the fifth positioning line 330 is 65°.
[0094] After integration, it can be seen that the total length of the boundary is 39.939 meters. The sum of the positioning lines in the third group and all the orthogonal lines is 20.000 meters. The sum of the positioning lines in the fourth group and all the orthogonal lines is 12.728 meters. The sum of the positioning lines in the fifth group and all the orthogonal lines is 7.211 meters.
[0095] In this embodiment, it can be seen from the comparison that the maximum boundary line length is 20.000 meters. It can be calculated that the benchmark ratio is 50.076%, which does not exceed the judgment threshold of 60%.
[0096] In another embodiment, calculations show that the test ratio corresponding to the third positioning line 310 is 50.076%, the test ratio corresponding to the fourth positioning line 320 is 31.869%, and the test ratio corresponding to the fifth positioning line 330 is 18.055%. Comparison shows that the baseline ratio is 50.076%, which does not exceed the judgment threshold of 60%.
[0097] The above results indicate that the map is not suitable for determining the Cartesian coordinate system using a straight-line datum. Therefore, the rectangular datum method is switched to, and the smallest bounding rectangle of the map is selected as the datum for alignment. The datum bounding rectangle is obtained to determine the corresponding Cartesian coordinate system, thereby completing the map alignment operation.
[0098] To achieve the above technical effects, a circumscribed Cartesian coordinate system 400 needs to be established. Using the two long sides parallel to the X-axis and the two short sides parallel to the Y-axis of the circumscribed Cartesian coordinate system 400, a circumscribed rectangle is generated, bounded by the boundary lines. The first circumscribed rectangle generated by the circumscribed Cartesian coordinate system 400 is called the first circumscribed rectangle 500. The area of the first circumscribed rectangle 500 is used as a test area for calculation and recording. Then, the circumscribed Cartesian coordinate system 400 is rotated to obtain a new circumscribed rectangle, and the area of the newly generated circumscribed rectangle is calculated and recorded.
[0099] In this embodiment, there are a total of 90 circumscribed Cartesian coordinate systems 400, and therefore a total of 90 test areas. The coordinate axes rotate by 1° each time. Each rotation of the circumscribed Cartesian coordinate system 400 generates a new circumscribed rectangle, and the area of the newly generated circumscribed rectangle is calculated and recorded. This process continues until the areas of all circumscribed rectangles have been calculated, and then compared to obtain the circumscribed rectangle with the smallest area, which is the reference circumscribed rectangle.
[0100] Figure 5 The image shows the position information of the second, third, fourth, and fifth circumscribed rectangles 600, 700, 800, and 900 when the first circumscribed Cartesian coordinate system 400 is rotated by 1°, 2°, 8°, and 9°.
[0101] The circumscribed Cartesian coordinate system 400 corresponding to the reference circumscribed rectangle is used as the Cartesian coordinate system. The map is then aligned using the Cartesian coordinate system, and the boundary information of the aligned map is output to the user terminal.
[0102] The above embodiments can be applied to the field of intelligent robots and are commonly found in various autonomous operating devices. The autonomous operating device is equipped with a control module and an interaction module. The control module, by using the above method, can perform map alignment operations relative to the work area, and the aligned map is then visually displayed on the interaction module.
[0103] In this embodiment, the autonomous operating device is particularly a robot capable of autonomously moving within a preset area and performing specific tasks, typically such as a smart sweeper / vacuum cleaner for cleaning or a smart lawnmower for mowing. The specific task specifically refers to tasks that process the work surface and change its state. This invention uses a smart lawnmower as an example for detailed explanation. The autonomous operating device can autonomously move on the surface of the work area, and in particular, a smart lawnmower can autonomously perform mowing operations on the ground. In addition to the control module and the interaction module, the autonomous operating device also includes at least a main body mechanism, a moving mechanism, a working mechanism, an energy module, and a detection module.
[0104] The main structure typically includes a chassis and a housing. The chassis is used to mount and house at least one of the functional mechanisms and modules, such as a moving mechanism, a working mechanism, an energy module, a detection module, an interaction module, and a control module. The housing is typically constructed to at least partially cover the chassis, primarily serving to enhance the aesthetics and recognizability of the autonomous operating equipment. In some embodiments, at least one of the aforementioned functional mechanisms and modules is mounted on the housing. In some prior art, the housing is constructed to be able to translate and / or rotate relative to the chassis under external force, and with the assistance of appropriate detection modules, such as Hall effect sensors, it can further detect events such as collisions and lifting.
[0105] A control module typically includes at least one processor and at least one non-volatile memory. The memory stores pre-written computer programs or instruction sets, and the processor controls the execution of actions such as movement and operation of the autonomous operating equipment according to the computer programs or instruction sets. Furthermore, the control module can also control and adjust the corresponding behavior of the autonomous operating equipment and modify parameters in the memory based on signals from the detection module and / or user control commands.
[0106] The interaction module is configured to at least receive user-input control commands, issue information that the user needs to perceive, and communicate with other systems or devices to send and receive information. In this embodiment, the interaction module includes an input device installed on the autonomous operating device for receiving user-input control commands, typically such as a control panel or emergency stop button; the interaction module also includes a display screen, indicator lights, and / or a buzzer installed on the autonomous operating device to make the information perceptible to the user through light or sound. In other embodiments, the interaction module includes a communication module installed on the autonomous operating device and a terminal device independent of the autonomous operating device, such as a mobile phone, computer, or network server; user control commands or other information can be input on the terminal device and reach the autonomous operating device via wired or wireless communication modules.
[0107] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A map alignment method, characterized in that, Includes the following steps: S10: Obtain the boundary information of the map, the boundary information including the status information of the boundary lines and the total length of the boundary, the total length of the boundary being configured as the sum of the lengths of all the boundary lines; S20: All the boundary lines that meet the preset conditions are grouped into an orthogonal line group, where the preset conditions are that the boundary lines are parallel, collinear or perpendicular to each other. S30: Determine the relationship between the reference ratio and the judgment threshold. If the first relationship is satisfied, proceed to S40; if the second relationship is satisfied, proceed to S50. The reference ratio is the ratio of the longest boundary line length to the total length of the boundary. The length of the boundary line is defined as the sum of the lengths of all boundary lines in the orthogonal line group. The first relationship is that the reference ratio is not less than the judgment threshold, and the second relationship is that the reference ratio is less than the judgment threshold. S40: Establish a plane rectangular coordinate system based on the first reference, and then proceed to S60, where the first reference is the boundary line corresponding to the reference ratio; S50: Establish a Cartesian coordinate system based on the second datum, and then proceed to S60, where the second datum is the circumscribed rectangle of the datum; S60: Align the map according to the Cartesian coordinate system and output the boundary information of the aligned map to the user terminal; S40 includes the following detailed steps: Extract the boundary line corresponding to the reference ratio, and establish the Cartesian coordinate system, which corresponds to the boundary line mentioned above. S50 includes the following detailed steps: S51: Establish an external plane rectangular coordinate system (400). Using the two long sides of the X-axis parallel to the external plane rectangular coordinate system (400) and the two short sides of the Y-axis parallel to the external plane rectangular coordinate system (400), generate the circumscribed rectangle of the figure enclosed by the boundary lines. Use the area of the circumscribed rectangle as the test area, calculate and record the test area. S52: Rotate the circumscribed rectangular coordinate system (400) by a predetermined angle multiple times, select different circumscribed rectangular coordinate systems (400) and calculate the corresponding test areas, until the circumscribed rectangular coordinate system (400) is rotated 90°, so as to calculate and record all the test areas; S53: Compare all the test areas and take the smallest bounding rectangle among all the test areas as the reference bounding rectangle.
2. The map alignment method according to claim 1, characterized in that, S20 includes the following detailed steps: S21: Select any of the aforementioned boundary lines as the positioning line; S22: Take all the boundary lines that are parallel, collinear or perpendicular to the positioning line as orthogonal lines, take the sum of the positioning line and all the orthogonal lines as the length of the boundary line, and calculate and record the length of the boundary line. S23: Repeatedly select the positioning line and calculate the length of the corresponding boundary line until the positioning line can no longer be selected, so as to calculate and record all the lengths of the boundary lines. S24: Compare and select the longest of all the boundary line lengths, and calculate the ratio of the longest boundary line length to the total length of the boundary, as the benchmark ratio.
3. The map alignment method according to claim 2, characterized in that, S23 includes the following detailed steps: S231: Determine whether there exists a boundary line that has neither been used as the positioning line nor as the orthogonal line. If yes, proceed to S232; otherwise, proceed to S24. S232: Select any boundary line that has neither been a positioning line nor an orthogonal line, replace it with the positioning line, and then perform S22 again.
4. The map alignment method according to claim 1, characterized in that, The following steps are included after S10: S11: Find the specified baseline; S12: Determine whether the specified benchmark exists. If yes, straighten the map according to the specified benchmark and output the boundary information of the straightened map to the user terminal. If no, proceed to S20.
5. The map alignment method according to claim 1, characterized in that, The following steps are included before S20: S18: Determine whether the ratio of the length of the longest boundary line to the total length of the boundary is not less than the determination threshold. If yes, proceed to S19; otherwise, proceed to S20. S19: Using the longest boundary line as a reference, establish a Cartesian coordinate system, and then proceed to S60.
6. The map alignment method according to claim 1, characterized in that, The steps preceding S30 also include: S28: Determine whether there exists an orthogonal line group with at least two boundary lines. If yes, proceed to S30; otherwise, proceed to S50.
7. The map alignment method according to any one of claims 1-6, characterized in that, The steps preceding S30 also include: S29: Determine whether there are at least two parallel and largest boundary line lengths. If yes, proceed to S50; otherwise, proceed to S30.