Map direction adjusting method, nonvolatile readable storage medium and electronic equipment
By first adjusting the direction of the local map and then expanding it to generate a global map during the cleaning robot map construction process, the problem of low map adjustment efficiency in the existing technology is solved, and more efficient map direction adjustment and visual effect improvement are achieved.
Patent Information
- Application Number
- CN202310359818.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-15
AI Technical Summary
The existing technology is inefficient when adjusting the map constructed by the cleaning robot, which results in a long map adjustment time and does not meet the horizontal and vertical visual effects.
By displaying the local map on the preset display interface, adjusting the local main direction of the local map to make it consistent with the target standard direction, and extending the adjusted local map to generate a global map, thereby improving the efficiency of map adjustment.
By adjusting the local main direction of the local map in advance, the computing power and time required for global map adjustment are reduced, the efficiency of map adjustment is improved, and the direction of the global map is closer to or completely consistent with the horizontal and vertical visual effects.
Smart Images

Figure CN118776571A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of map generation, and in particular to a map direction adjustment method, a non-volatile readable storage medium and an electronic device. Background Art
[0002] The orientation of the existing cleaning robot at the initial stage of map construction is not perpendicular or parallel to the wall, resulting in a tilted map constructed by the cleaning robot. Figure 1 shown, ground Fig.11 The orientation of such maps does not conform to people's conventional visual effects, that is, the orientation of such maps does not conform to the visual effect of "horizontal and vertical".
[0003] The existing technology can adjust the tilted map to a "horizontal and vertical" direction to improve the visual effect of the map. Among them, the existing technology is adjusted on the basis of obtaining a complete map. Since the adjustment object is a complete map, the existing technology needs to spend more computing power and time to adjust, and the map adjustment efficiency is low. Summary of the invention
[0004] An object of an embodiment of the present invention is to provide a map direction adjustment method, a non-volatile readable storage medium and an electronic device, aiming to solve the technical problem of low efficiency in adjusting maps in the prior art.
[0005] In a first aspect, an embodiment of the present invention provides a method for adjusting a map direction, comprising:
[0006] Displaying a local map on a preset display interface;
[0007] Adjusting the local placement main direction of the local map so that the adjusted local placement main direction is consistent with the target standard direction;
[0008] The global map is generated by expanding the adjusted local map.
[0009] Optionally, the method further comprises:
[0010] The global placement main direction of the global map is adjusted so that the adjusted global placement main direction is consistent with the target standard direction.
[0011] Optionally, adjusting the global placement main direction of the global map so that the adjusted global placement main direction is consistent with the target standard direction includes:
[0012] Determine the first angle between the local placement main direction before adjustment and the target standard direction;
[0013] Determine a second angle between the global placement main direction before adjustment and the target standard direction;
[0014] The global placement main direction of the global map is adjusted according to the second angle and the first angle so that the adjusted global placement main direction is consistent with the target standard direction.
[0015] Optionally, adjusting the global placement main direction of the global map according to the second angle and the first angle so that the adjusted global placement main direction is consistent with the target standard direction includes:
[0016] Calculate the angle difference between the second angle and the first angle;
[0017] If the angle difference is greater than or equal to a preset angle threshold, adjusting the global placement main direction of the global map so that the adjusted global placement main direction is consistent with the target standard direction;
[0018] If the angle difference is less than a preset angle threshold, the global placement main direction of the global map is maintained.
[0019] Optionally, adjusting the global placement main direction of the global map includes: controlling the local map to rotate on the preset display interface according to the angle difference.
[0020] Optionally, before adjusting the global placement main direction of the global map, the method further includes: obtaining a global adjustment command;
[0021] Then: the adjusting of the global placement main direction of the global map includes:
[0022] According to the global adjustment command, the global placement main direction of the global map is adjusted.
[0023] Optionally, obtaining the global adjustment command includes:
[0024] When the fast mapping operation is detected to be finished, a global adjustment command is generated; or,
[0025] Responding to the automatic adjustment command sent by the terminal, generating a global adjustment command; or,
[0026] Upon detecting the end of a map expansion operation, a global adjustment command is generated; or,
[0027] When a task end command is detected, a global adjustment command is generated.
[0028] Optionally, adjusting the local placement main direction of the local map so that the adjusted local placement main direction is consistent with the target standard direction includes:
[0029] Determine the first angle between the local placement main direction before adjustment and the target standard direction;
[0030] The local map is controlled to rotate on the preset display interface according to the first angle so that the adjusted local placement main direction is consistent with the target standard direction.
[0031] In a second aspect, an embodiment of the present invention provides a non-volatile readable storage medium storing computer executable instructions, wherein the computer executable instructions are used to enable an electronic device to execute the above-mentioned map direction adjustment method.
[0032] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0033] at least one processor; and,
[0034] a memory communicatively connected to the at least one processor; wherein,
[0035] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned map direction adjustment method.
[0036] In the map direction adjustment method provided in the embodiment of the present invention, a local map is displayed on a preset display interface, the local placement main direction of the local map is adjusted so that the adjusted local placement main direction is consistent with the target standard direction, and the global map is expanded and generated on the adjusted local map. In this embodiment, the local placement main direction of the local map is adjusted in advance to be consistent with the target standard direction. Since the subsequently expanded areas are all generated based on the adjusted local map, when the adjusted local placement main direction is consistent with the target standard direction, the placement main direction of the expanded area can automatically be consistent with the target standard direction, thereby making the global placement main direction of the global map closer to or consistent with the target standard direction. Since the data that needs to be adjusted for the local map is less than the data that needs to be adjusted for the global map, this embodiment can perform map adjustments with relatively less computing power and less time, which is conducive to improving map adjustment efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0038] Figure 1 A schematic diagram of the direction of a map provided by the prior art;
[0039] Figure 2 A schematic diagram of a flow chart of a method for adjusting a map direction provided by an embodiment of the present invention;
[0040] Figure 3A schematic diagram of the main placement direction of the first local map provided in an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of the main placement direction of the second local map provided in an embodiment of the present invention;
[0042] Figure 5 A schematic diagram of the main placement direction of the third local map provided in an embodiment of the present invention;
[0043] Figure 6 A schematic diagram of the main placement direction of the fourth local map provided in an embodiment of the present invention;
[0044] Figure 7 Based on Figure 3 A schematic diagram of the local map shown relative to the target standard direction;
[0045] Figure 8 A schematic diagram of a first direction of a local map after a local adjustment operation provided by an embodiment of the present invention, wherein the starting position of the robot is in a small area;
[0046] Fig. 9 A schematic diagram of a second direction of a local map after a local adjustment operation provided by an embodiment of the present invention, wherein a long inclined board is behind the starting position of the robot;
[0047] Fig.10 A third direction schematic diagram of a local map after a local adjustment operation provided by an embodiment of the present invention, wherein a long inclined board is behind the charging base;
[0048] Fig.11 For based on Fig.10 The schematic diagram of the direction of the global map generated by the expansion of the local map shown in the figure after the global adjustment operation, wherein the adjusted global map meets the visual effect of horizontal and vertical;
[0049] Fig.12 A schematic diagram of a robot provided in an embodiment of the present invention collecting radar data very close to a wall, wherein the surface materials of objects surrounding the wall easily absorb electromagnetic waves;
[0050] Fig.13 A schematic diagram of a first global map provided by an embodiment of the present invention, wherein the direction of the global map is slightly tilted relative to the target standard direction;
[0051] Fig.14 A schematic diagram of a second global map provided by an embodiment of the present invention, wherein the balcony area has not been explored by the robot;
[0052] Fig.15A schematic diagram of a third global map provided by an embodiment of the present invention, wherein a partial global map is obtained after manually interrupting the robot's mapping operation;
[0053] Fig.16 A schematic diagram of the structure of a map direction adjustment device provided by an embodiment of the present invention;
[0054] Fig.17 A schematic diagram of a circuit structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0056] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in the present invention do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.
[0057] The embodiment of the present invention provides a method for adjusting the map direction. Figure 2 , the map direction adjustment methods include:
[0058] S21: Displaying a local map on a preset display interface.
[0059] In this step, the preset display interface is an interface for displaying a map. Displaying a local map on the preset display interface includes: acquiring local map data, generating a local map according to the local map data, and controlling the local map to be displayed on the preset display interface.
[0060] Controlling the local map to be displayed on the preset display interface includes: updating the local map in real time according to the preset update cycle to obtain the updated map, and controlling the updated map to be displayed on the preset display interface. The preset update cycle is customized by the designer according to business needs, such as the preset update cycle is 10ms. For example, the first local map is obtained at time t1, and the first local map is displayed on the preset display interface. After the preset update cycle Δt, the second local map is obtained at time t1+Δt, and the second local map is displayed on the preset display interface, wherein the second local map is a local map generated by expanding the first local map.
[0061] Acquiring the local map data includes: acquiring sensor data of a specified interval, and using the sensor data of the specified interval as the local map data.
[0062] In some embodiments, acquiring the sensor data of the specified interval includes: selecting a preset number of frames of sensor data after the start of mapping as the sensor data of the specified interval.
[0063] In some embodiments, obtaining sensor data of a specified interval includes: selecting sensor data of a preset time period after starting to build a map as the sensor data of the specified interval.
[0064] Using the sensor data of the designated interval as local map data includes: determining whether the sensor data of the designated interval is valid data; if so, using the sensor data of the designated interval as local map data; if not, extending the designated interval according to a preset extension time to obtain the extended designated interval, and determining the local map data according to the extended designated interval.
[0065] Determining whether the sensor data in the specified interval is valid data includes: generating a candidate map based on the sensor data in the specified interval, calculating whether the area of the candidate map is greater than a preset area threshold, if so, determining that the sensor data in the specified interval is valid, if not, determining that the sensor data in the specified interval is invalid.
[0066] The preset display interface is configured with a coordinate system, wherein the origin of the coordinate system, the direction of the X-axis, and the direction of the Y-axis can be customized by the designer based on engineering experience. For example, the origin of the coordinate system is the upper left corner of the preset display interface, the positive X-axis of the coordinate system is the direction from the upper left corner of the preset display interface toward the upper right corner, and the positive Y-axis of the coordinate system is the direction from the upper left corner of the preset display interface toward the lower left corner. Each location point on the map is represented by corresponding coordinates in the coordinate system.
[0067] S22: adjusting the local placement main direction of the local map so that the adjusted local placement main direction is consistent with the target standard direction.
[0068] In this step, the main placement direction is used to characterize the main direction of the map placed on the preset display interface. Since the longest boundary line in the map contacts the largest area and occupies a larger visual proportion, the main direction is usually the direction corresponding to the longest boundary line in the map.
[0069] The local placement main direction is the main placement direction of the local map. Figure 3 , the longest boundary line of the local map 30 is the side length L BC , where the side length L BC The corresponding direction is horizontal. Figure 4 , side length L BC The corresponding direction is 60 degrees to the right. Figure 5 , side length L BC The corresponding direction is vertical. Figure 6 , side length L BC The corresponding direction is 60 degrees to the left. Figure 3 and Figure 5 The local map 30 shown satisfies the visual effect of being horizontal and vertical.
[0070] In some embodiments, the target standard direction may be customized in advance by a designer, for example, the target standard direction may be a horizontal direction or a vertical direction.
[0071] In some embodiments, the target standard direction is a direction that satisfies the minimum rotation angle condition in the horizontal direction and the vertical direction. For example, the angle required for adjusting the local placement main direction before adjustment to the horizontal direction is smaller than the angle required for adjusting the local placement main direction before adjustment to the vertical direction. Therefore, the horizontal direction is the target standard direction. For another example, the angle required for adjusting the local placement main direction before adjustment to the vertical direction is smaller than the angle required for adjusting the local placement main direction before adjustment to the horizontal direction. Therefore, the vertical direction is the target standard direction.
[0072] In some embodiments, adjusting the local placement main direction of the local map so that the adjusted local placement main direction is consistent with the target standard direction includes: determining a first angle between the local placement main direction before adjustment and the target standard direction, and controlling the local map to rotate on a preset display interface according to the first angle so that the adjusted local placement main direction is consistent with the target standard direction.
[0073] In some embodiments, determining a first angle between the local placement main direction before adjustment and the target standard direction includes: determining a local main boundary of the local map and a target line corresponding to the target standard direction, wherein the direction corresponding to the local main boundary is the local placement main direction, the local main boundary is the longest boundary in the local map, and calculating a first angle between the local main boundary and the target line.
[0074] For example, if the designer sets the horizontal direction as the target standard direction, the direction of the X-axis of the coordinate system is the horizontal direction, so the X-axis is the target line corresponding to the target standard direction. Figure 7 , side length L BC The angle with the X-axis is 60 degrees, that is, the first angle is 60 degrees.
[0075] In some embodiments, determining a first angle between the local placement main direction before adjustment and the target standard direction includes: determining a horizontal angle between a local main boundary of the local map and the X-axis, determining a vertical angle between a local main boundary of the local map and the Y-axis, if the horizontal angle is smaller than the vertical angle, then selecting the direction corresponding to the X-axis as the target standard direction, and the horizontal angle is the first angle, if the vertical angle is smaller than the horizontal angle, then selecting the direction corresponding to the Y-axis as the target standard direction, and the vertical angle is the first angle.
[0076] It is understandable that no matter whether the robot performs a quick map building operation, a map expansion operation, or a map saving operation, the robot will save the first angle locally so that it can flexibly respond to map direction adjustment operations later.
[0077] S23: Expand and generate a global map based on the adjusted local map.
[0078] In this step, the global map is a map obtained by expanding the adjusted local map. Expanding and generating the global map on the adjusted local map includes: continuing to obtain sensor data on the adjusted local map, and expanding and generating the global map based on the sensor data and the map construction algorithm. In this embodiment, the local placement main direction of the local map is adjusted in advance to be consistent with the target standard direction. Since the subsequent expanded areas are generated based on the adjusted local map, when the adjusted local placement main direction is consistent with the target standard direction, the placement main direction of the expanded area can automatically be consistent with the target standard direction, thereby making the global placement main direction of the global map closer to or consistent with the target standard direction. Since the data that needs to be adjusted for the local map is less than that for the global map, this embodiment can perform map adjustments with relatively less computing power and less time, which is conducive to improving map adjustment efficiency.
[0079] In some embodiments, the map direction adjustment method further includes: adjusting the global placement main direction of the global map so that the adjusted global placement main direction is consistent with the target standard direction.
[0080] Although the local placement main direction of the local map is adjusted in advance so that the adjusted local placement main direction is consistent with the target standard direction, and then the placement main direction of the subsequent expansion area generated based on the adjusted local map is easier and naturally consistent with the target standard direction, when the starting position of the robot is not suitable, the collected local data of the map does not accurately or reasonably or abnormally describe the shape of the local map, even if the adjusted local placement main direction is consistent with the target standard direction, it is easy for the local map to be tilted, causing the global map to be tilted.
[0081] See also Figure 8 , the robot's starting position is in the narrow area 81, resulting in the adjusted local placement main direction being the direction corresponding to the line segment 82. However, this embodiment adjusts the global placement main direction of the global map so that the global map can be straightened to meet the horizontal and vertical visual effects. It is understandable that when the robot is blocked by a dynamic obstacle at the starting position, it will easily appear as follows Figure 8 The situation shown.
[0082] See also Fig. 9 , there is a long inclined board 91 placed artificially in the room, and the robot scans the long inclined board at the starting position, resulting in the adjusted local placement main direction being the direction corresponding to the long inclined board 91. However, this embodiment can adjust the global placement main direction of the global map to straighten the global map to meet the horizontal and vertical visual effects.
[0083] See also Fig.10 , the charging base 101 is placed in front of the long inclined board 102, and the robot starts scanning the surrounding environment from the charging base 101, resulting in the main direction of the adjusted local placement being the direction corresponding to the long inclined board 102. However, please refer to Fig.11 In this embodiment, the global map is adjusted in its main global placement direction, so that the global map can be aligned to achieve a horizontal and vertical visual effect.
[0084] See also Fig.12 , the robot's starting position is very close to the wall 121, and the surface materials of the surrounding objects of the wall 121 easily absorb electromagnetic waves, which results in the robot being unable to effectively collect radar data of the wall 121. In addition, the surrounding objects absorb electromagnetic waves, resulting in the robot collecting relatively sparse radar data, and it is easy to regard the direction corresponding to the line segment 122 as the local placement main direction of the robot before adjustment. However, this embodiment can adjust the global placement main direction of the global map to straighten the global map to meet the horizontal and vertical visual effects.
[0085] In general, this embodiment adjusts the global placement main direction of the global map so that the global placement main direction of the global map generated based on the adjusted local map can be consistent with the target standard direction, thereby avoiding the situation where the global placement main direction of the global map generated based on the adjusted local map still does not meet the horizontal and vertical visual effects due to the adjusted local map not meeting the horizontal and vertical visual effects, thereby improving the adjustment effect of the map direction.
[0086] In some embodiments, adjusting the global placement main direction of the global map so that the adjusted global placement main direction is consistent with the target standard direction includes the following steps: determining a first angle between the local placement main direction before adjustment and the target standard direction, determining a second angle between the global placement main direction before adjustment and the target standard direction, and adjusting the global placement main direction of the global map according to the second angle and the first angle so that the adjusted global placement main direction is consistent with the target standard direction.
[0087] The process of determining the first angle between the local placement main direction before adjustment and the target standard direction can be referred to as described above and will not be repeated here.
[0088] Determining the second angle between the global placement main direction before adjustment and the target standard direction includes: determining the global main boundary of the global map and the target line corresponding to the target standard direction, wherein the direction corresponding to the global main boundary is the global placement main direction, the global main boundary is the longest boundary in the global map, and calculating the second angle between the global main boundary and the target line.
[0089] In some embodiments, adjusting the global placement main direction of the global map according to the second angle and the first angle so that the adjusted global placement main direction is consistent with the target standard direction includes: calculating the angle difference between the second angle and the first angle, and controlling the global placement main direction of the global map to rotate according to the angle difference on a preset display interface.
[0090] In some embodiments, adjusting the global placement main direction of the global map according to the second angle and the first angle so that the adjusted global placement main direction is consistent with the target standard direction includes: calculating the angle difference between the second angle and the first angle, multiplying the angle difference by a preset adjustment coefficient to obtain a rotation angle, and controlling the global placement main direction of the global map to rotate according to the rotation angle on a preset display interface.
[0091] In some embodiments, adjusting the global placement main direction of the global map according to the second angle and the first angle so that the adjusted global placement main direction is consistent with the target standard direction includes: calculating the angle difference between the second angle and the first angle, if the angle difference is greater than or equal to a preset angle threshold, adjusting the global placement main direction of the global map so that the adjusted global placement main direction is consistent with the target standard direction, if the angle difference is less than the preset angle threshold, maintaining the global placement main direction of the global map. Adjusting the global placement main direction of the global map includes: controlling the global placement main direction of the global map to rotate according to the angle difference on a preset display interface. The preset angle threshold is customized by the designer based on engineering experience, such as a preset angle threshold of 5 degrees or 6 degrees.
[0092] For example, the first angle of the local placement main direction before adjustment relative to the target standard direction is 6 degrees. This embodiment controls the local map to rotate by 6 degrees so that the adjusted local placement main direction is consistent with the target standard direction. Next, this embodiment determines that the second angle of the global placement main direction before adjustment relative to the target standard direction is 14 degrees, wherein the preset angle threshold is 5 degrees. This embodiment calculates the angle difference between the second angle and the first angle to be 7 degrees. Since the angle difference is greater than the preset angle threshold, it means that the direction of the global map cannot be close to the visual effect of "horizontal and vertical". Therefore, this embodiment controls the global placement main direction of the global map to rotate by 7 degrees on the preset display interface so that the adjusted global placement main direction is consistent with the target standard direction, thereby making the direction of the global map close to or consistent with the visual effect of "horizontal and vertical".
[0093] For another example, the first angle of the local placement main direction before adjustment relative to the target standard direction is 10 degrees. This embodiment controls the local map to rotate by 10 degrees so that the adjusted local placement main direction is consistent with the target standard direction. Next, this embodiment determines that the second angle of the global placement main direction before adjustment relative to the target standard direction is 14 degrees, wherein the preset angle threshold is 5 degrees. This embodiment calculates the angle difference between the second angle and the first angle to be 4 degrees. Since the angle difference is less than the preset angle threshold, it means that although the global map has a deviation relative to the local map, the deviation is not enough to affect the direction of the global map to be close to the visual effect of "horizontal and vertical", that is, the direction of the global map at this time can be close to the visual effect of "horizontal and vertical". Therefore, this embodiment maintains the global placement main direction of the global map.
[0094] In general, this embodiment determines whether it is necessary to perform the operation of adjusting the global placement main direction of the global map according to the angle difference. If it is necessary to perform, this embodiment can also quantify and accurately adjust the global placement main direction of the global map according to the angle difference, so as to improve the adjustment effect of the map direction. If it is not necessary to perform, it means that the deviation of the global placement main direction of the global map from the target standard direction is not large, and does not affect the visual effect that the global placement main direction of the global map is almost or nearly equivalent to "horizontally flat and vertically straight", and this approach is conducive to saving computing power.
[0095] When the global orientation of the global map is adjusted to be consistent with the target standard orientation, the robot updates its position and posture on the adjusted global map. Then, the robot performs positioning operations and plans navigation paths based on the updated position and posture.
[0096] In some embodiments, before adjusting the global placement main direction of the global map, the map direction adjustment method further includes: obtaining a global adjustment command. Then: adjusting the global placement main direction of the global map includes: adjusting the global placement main direction of the global map according to the global adjustment command. Compared with the prior art method of adjusting the global placement main direction of the global map after the rapid map construction operation, this embodiment is based on the global adjustment command, can flexibly respond to the map adjustment operation, and can adjust the global placement main direction of the global map at any time, which is conducive to controlling the map direction around the clock to meet the "horizontal and vertical" visual effect.
[0097] In some embodiments, obtaining a global adjustment command includes: generating a global adjustment command when detecting the end of a fast mapping operation. The fast mapping operation is an operation for controlling the robot to directly build a map, that is, before cleaning, the robot first comprehensively scans the map of the environment, builds a complete map, and then plans the cleaning path according to the complete map. This is a fast mapping operation. The opposite operation to the fast mapping operation is that the robot builds a map while cleaning. This embodiment can adjust the main direction of the global placement of the global map at the end of the fast mapping operation, which is conducive to the direction of the global map satisfying the "horizontal and vertical" visual effect, and is also conducive to the robot performing positioning operations and path planning operations.
[0098] In some embodiments, obtaining the global adjustment command includes: generating the global adjustment command in response to the automatic adjustment command.
[0099] In some embodiments, responding to the automatic adjustment command includes: responding to the automatic adjustment command sent by the terminal, wherein the terminal is a smart phone, a computer, or a smart watch, etc. When the electronic device is a robot, the terminal is installed with a robot APP, the user starts the robot APP on the terminal, and issues a global adjustment command by operating the robot APP, and the terminal sends the global adjustment command to the robot.
[0100] In some embodiments, responding to the automatic adjustment command includes: generating the automatic adjustment command in response to a map adjustment operation inputted in the terminal. When the electronic device is a terminal, the user starts the robot APP on the terminal, inputs the map adjustment operation on the robot APP, and the terminal generates the automatic adjustment command.
[0101] See also Fig.13 In some application scenarios, after the map is built or expanded, the direction of the upper part 132 of the global map 131 is still tilted relative to the target standard direction, but people do not want the robot to rebuild the map to adjust the direction of the global map 131 to be consistent with the target standard direction. In this embodiment, the user can send an automatic adjustment command through the terminal, so that the robot can respond to the automatic adjustment command, generate a global adjustment command, and adjust the global placement main direction of the global map according to the global adjustment command, so that the demand for adjusting the map direction can be flexibly met.
[0102] In some embodiments, obtaining the global adjustment command includes: generating the global adjustment command when detecting that the map expansion operation is finished. The map expansion operation is an operation of continuing to expand and generate a new map based on the original map.
[0103] See also Fig.14 , the robot 141 scans the room 142 and constructs a first global map of the room 142. Since the door 144 of the balcony area 143 is closed at this time, the robot 141 cannot walk to the balcony area 143. Therefore, the first global map generated by the robot 141 does not include the balcony area 143. At this time, it is easy to have a situation where the global placement main direction of the first global map is different from the global placement main direction of the global map with the balcony area 143 added later.
[0104] When the door 144 of the balcony area 143 is opened and the robot 141 can walk to the balcony area 143, the robot 141 performs a map expansion operation based on the first global map, that is, the balcony area 143 is added to the first global map. When the robot 141 detects the balcony area 143, that is, the map expansion operation is completed, at this time, the robot 141 generates a global adjustment command when it detects that the map expansion operation is completed, and adjusts the global placement main direction of the global map according to the global adjustment command. Therefore, this embodiment can continue to adjust the global placement main direction of the global map after expanding a new map area, so as to ensure that the direction of the expanded map still meets the visual effect of "horizontally flat and vertically straight".
[0105] See also Fig.15, the robot 141 scans the room 142 to construct a global map of the room 142. In the process of constructing the global map, the user manually interrupts the robot's composition operation and manually saves the currently constructed map, but in fact the robot 141 has not yet completed the construction of the entire map of the room 142. At this time, it is easy to have a situation where the global placement main direction of the currently saved incomplete global map is different from the global placement main direction of the complete global map.
[0106] When the subsequent robot 141 is restarted and is able to scan the entire room 142, that is, it can also explore the newly added area 145. When the robot 141 detects that the map expansion operation is completed, it generates a global adjustment command, and adjusts the global placement main direction of the global map according to the global adjustment command. Therefore, this embodiment can continue to adjust the global placement main direction of the global map after expanding a new map area, so as to ensure that the direction of the expanded map still meets the visual effect of "horizontally flat and vertically straight".
[0107] In some embodiments, obtaining the global adjustment command includes: generating the global adjustment command when a task end command is detected.
[0108] In some embodiments, detecting the task end command includes: generating the task end command when the robot ends the cleaning task operation.
[0109] In some embodiments, detecting the mission end command includes generating the mission end command when the robot ends the navigation operation.
[0110] This embodiment can generate a global adjustment command after the corresponding task is completed, and automatically adjust the main direction of the global placement of the global map according to the global adjustment command, so as to ensure that the direction of the global map each time can meet the visual effect of "horizontal and vertical".
[0111] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present invention, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.
[0112] As another aspect of the present invention, the present invention provides a map direction adjustment device, wherein the map direction adjustment device can be a software module, the software module includes a plurality of instructions, which are stored in a memory, and the processor can access the memory and call the instructions for execution to complete the map direction adjustment method described in each of the above embodiments.
[0113] In some embodiments, the map direction adjustment device can also be constructed by hardware devices, for example, the map direction adjustment device can be constructed by one or more chips, and each chip can work in coordination with each other to complete the map direction adjustment method described in each of the above embodiments. For another example, the map direction adjustment device can also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components.
[0114] See also Fig.16 The map direction adjustment device 160 includes a map display module 161, a local adjustment module 162 and a map generation module 163. The map display module 161 is used to display a local map on a preset display interface. The local adjustment module 162 is used to adjust the local placement main direction of the local map so that the adjusted local placement main direction is consistent with the target standard direction. The map generation module 163 is used to expand and generate a global map on the adjusted local map.
[0115] This embodiment adjusts the local placement main direction of the local map to be consistent with the target standard direction in advance. Since the subsequently expanded areas are generated based on the adjusted local map, when the adjusted local placement main direction is consistent with the target standard direction, the placement main direction of the expanded area can automatically be consistent with the target standard direction, thereby making the global placement main direction of the global map closer to or consistent with the target standard direction. Since the data that needs to be adjusted for the local map is less than that for the global map, this embodiment can adjust the map with relatively less computing power and less time, which is conducive to improving the efficiency of map adjustment.
[0116] In some embodiments, please refer to Fig.16 The map direction adjustment device 160 also includes a global adjustment module 164, which is used to adjust the global placement main direction of the global map so that the adjusted global placement main direction is consistent with the target standard direction.
[0117] In some embodiments, the global adjustment module 164 is specifically used to: determine a first angle between the local placement main direction before adjustment and the target standard direction, determine a second angle between the global placement main direction before adjustment and the target standard direction, and adjust the global placement main direction of the global map according to the second angle and the first angle, so that the adjusted global placement main direction is consistent with the target standard direction.
[0118] In some embodiments, the global adjustment module 164 is also specifically used to: calculate the angle difference between the second angle and the first angle; if the angle difference is greater than or equal to a preset angle threshold, adjust the global placement main direction of the global map so that the adjusted global placement main direction is consistent with the target standard direction; if the angle difference is less than the preset angle threshold, maintain the global placement main direction of the global map.
[0119] In some embodiments, the global adjustment module 164 is further specifically used to control the global placement main direction of the global map to rotate according to the angle difference on the preset display interface.
[0120] In some embodiments, before adjusting the global orientation of the global map, please continue to refer to Fig.16 The map direction adjustment device 160 also includes a command acquisition module 165, and the command acquisition module 165 is used to obtain a global adjustment command. Then: the global adjustment module 164 is also specifically used to: adjust the global placement main direction of the global map according to the global adjustment command.
[0121] In some embodiments, the command acquisition module 165 is specifically used to: generate a global adjustment command when detecting the end of a rapid mapping operation; or generate a global adjustment command in response to an automatic adjustment command; or generate a global adjustment command when detecting the end of a map expansion operation; or generate a global adjustment command when detecting a task end command.
[0122] In some embodiments, the local adjustment module 162 is specifically used to: determine a first angle between the local placement main direction before adjustment and the target standard direction, and control the local map to rotate on a preset display interface according to the first angle so that the adjusted local placement main direction is consistent with the target standard direction.
[0123] It should be noted that the above-mentioned map direction adjustment device can execute the map direction adjustment method provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiment of the map direction adjustment device, please refer to the map direction adjustment method provided in the embodiment of the present invention.
[0124] See also Fig.17 , Fig.17 The circuit structure diagram of an electronic device provided by an embodiment of the present invention, wherein the electronic device can be a robot, a computer, a mobile phone, or other device or electronic product with logic calculation and analysis functions, and the robot can be a sweeping robot, a mopping robot, a washing robot, a transport robot, etc. Fig.17 As shown, the electronic device 170 includes one or more processors 171 and a memory 172. Fig.17 A processor 171 is taken as an example.
[0125] The processor 171 and the memory 172 may be connected via a bus or other means. Fig.17 The example of connecting through bus is taken in the following.
[0126] The memory 172 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the map direction adjustment method in the embodiment of the present invention. The processor 171 executes various functional applications and data processing of the map direction adjustment device by running the non-volatile software programs, instructions and modules stored in the memory 172, that is, realizes the map direction adjustment method provided in the above method embodiment and the functions of each module or unit in the above device embodiment.
[0127] The memory 172 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 172 may optionally include a memory remotely arranged relative to the processor 171, and these remote memories may be connected to the processor 171 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0128] The program instructions / modules are stored in the memory 172 , and when executed by the one or more processors 171 , the map direction adjustment method in any of the above method embodiments is executed.
[0129] The embodiment of the present invention further provides a non-volatile computer storage medium, wherein the non-volatile computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, such as Fig.17 A processor 171 in the embodiment may enable the one or more processors to execute the map direction adjustment method in any of the above method embodiments.
[0130] An embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by an electronic device, the electronic device executes any one of the map direction adjustment methods.
[0131] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for adjusting the direction of a map, characterized in that: include: Displaying a local map on a preset display interface; Adjusting the local placement main direction of the local map so that the adjusted local placement main direction is consistent with the target standard direction; The global map is generated by expanding the adjusted local map.
2. The method according to claim 1, characterized in that: Also includes: The global placement main direction of the global map is adjusted so that the adjusted global placement main direction is consistent with the target standard direction.
3. The method according to claim 2, characterized in that The step of adjusting the global placement main direction of the global map so that the adjusted global placement main direction is consistent with the target standard direction includes: Determine the first angle between the local placement main direction before adjustment and the target standard direction; Determine a second angle between the global placement main direction before adjustment and the target standard direction; The global placement main direction of the global map is adjusted according to the second angle and the first angle so that the adjusted global placement main direction is consistent with the target standard direction.
4. The method according to claim 3, characterized in that The step of adjusting the global placement main direction of the global map according to the second angle and the first angle so that the adjusted global placement main direction is consistent with the target standard direction includes: Calculate the angle difference between the second angle and the first angle; If the angle difference is greater than or equal to a preset angle threshold, adjusting the global placement main direction of the global map so that the adjusted global placement main direction is consistent with the target standard direction; If the angle difference is less than a preset angle threshold, the global placement main direction of the global map is maintained.
5. The method according to claim 4, characterized in that The adjusting of the global placement main direction of the global map includes: controlling the global placement main direction of the global map to rotate according to the angle difference on the preset display interface.
6. The method according to claim 2, characterized in that Before adjusting the global placement main direction of the global map, the method further includes: obtaining a global adjustment command; Then: the adjusting of the global placement main direction of the global map includes: According to the global adjustment command, the global placement main direction of the global map is adjusted.
7. The method according to claim 6, characterized in that The obtaining of the global adjustment command comprises: When the fast mapping operation is detected to be finished, a global adjustment command is generated; or, In response to the automatic adjustment command, generating a global adjustment command; or, Upon detecting the end of a map expansion operation, a global adjustment command is generated; or, When a task end command is detected, a global adjustment command is generated.
8. The method according to any one of claims 1 to 7, characterized in that: The step of adjusting the local placement main direction of the local map so that the adjusted local placement main direction is consistent with the target standard direction includes: Determine the first angle between the local placement main direction before adjustment and the target standard direction; The local map is controlled to rotate on the preset display interface according to the first angle so that the adjusted local placement main direction is consistent with the target standard direction.
9. A non-volatile readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to enable the electronic device to execute the map direction adjustment method as described in any one of claims 1 to 8.
10. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the map direction adjustment method according to any one of claims 1 to 8.
