A method of converting a robot map

By establishing a transformation relationship between the current map and the historical map after the cleaning robot detects an abnormal state and returns to normal, and using rotation matrices and translation vectors to perform coordinate system transformation, the problem of unstable historical map display for the cleaning robot is solved, achieving stable map display and accurate navigation.

CN117516528BActive Publication Date: 2026-05-05AMICRO SEMICONDUCTOR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AMICRO SEMICONDUCTOR CO LTD
Filing Date
2022-07-29
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

When a cleaning robot repeatedly traverses the same environment, the historical map display becomes unstable, leading to map offset errors. This causes the robot's current position to not correspond to the displayed direction, affecting navigation performance.

Method used

After the robot detects an abnormal state and returns to normal, a conversion relationship between the current map and the historical map is established. The pose information of the preset position in different maps is calculated, and coordinate system transformation is performed using rotation matrix and translation vector. Map information is then merged to maintain map stability.

Benefits of technology

Stable display of robot maps was achieved, map rotation and translation were reduced, historical maps were matched with the actual environment, and navigation accuracy and stability were improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117516528B_ABST
    Figure CN117516528B_ABST
Patent Text Reader

Abstract

This invention discloses a method for converting robot maps. The method includes: after the robot detects that it has recovered from an abnormal state to a normal state, establishing a first current map and its conversion relationship with a historical map; acquiring pose information of a preset position in the first current map; calculating the pose information of the preset position in the historical map based on the conversion relationship between the first current map and the historical map; calculating the pose information of the preset position in the second current map based on the conversion relationship between the second current map and the historical map; determining the conversion relationship between the first current map and the second current map based on the conversion relationship between the pose information of the same preset position in the first current map and the pose information in the second current map; and converting the map information in the first current map to the coordinate system of the second current map according to the currently determined conversion relationship.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of map manipulation, specifically relating to a method for converting current and historical maps based on a robot. Background Technology

[0002] As those skilled in the art know, for cleaning robots used for indoor navigation and positioning, historical maps are the primary map carriers for map saving. Each time the cleaning robot traverses a room, it saves the features of the surrounding environment, marks them in a coordinate system, constructs a map, and saves it as a historical map. The cleaning robot can then display this historical map on the user's terminal screen for the next cleaning session. However, due to the instability of map display or coordinate transformation, when the cleaning robot traverses the same area again, it may display irregular outlines and terrain features in parts of the pre-built historical map. For example, it may display long corridors, walls, or obstacles with long, flat contours as multiple connected curved lines, making the overall map appear skewed (tilted relative to the coordinate axes). This unstable display can easily lead to map offset errors, causing movable devices displayed on the map to appear stationary relative to their location. It's also possible that the robot's vision sensors may not capture the same pose in consecutive scans, resulting in a mismatch between the direction indicated by the pre-built historical map and the robot's current direction of travel. Summary of the Invention

[0003] To address the problem of unstable and easily tilted environmental features described by robot maps, this invention discloses a robot map conversion method. Regardless of whether the robot is being held, this conversion method ensures that the current map remains adapted to the historical map, thus maintaining the robot's current position within the map displayed at the corresponding stage. The specific technical solution is as follows:

[0004] A method for converting robot maps includes: after the robot detects that it has recovered from an abnormal state to a normal state, establishing a first current map and its conversion relationship with a historical map; acquiring pose information of a preset position in the first current map; calculating the pose information of the preset position in the historical map based on the conversion relationship between the first current map and the historical map; calculating the pose information of the preset position in the second current map based on the conversion relationship between the second current map and the historical map, and the pose information of the preset position in the historical map; determining the conversion relationship between the first current map and the second current map based on the conversion relationship between the pose information of the same preset position in the first current map and the pose information in the second current map; and converting the map information in the first current map to the coordinate system of the second current map according to the conversion relationship between the first current map and the second current map to merge a new second current map.

[0005] Furthermore, the robot performs origin preprocessing on the most recently constructed map before entering the abnormal state to obtain a second current map and the conversion relationship between the second current map and the historical map. When the robot detects that it is in an abnormal state, both the second current map and the historical map are marked as invalid maps. After the robot converts the map information in the first current map to the coordinate system of the second current map, it obtains a new second current map, marks the new second current map as a valid map, and then uses the conversion relationship between the second current map and the historical map to convert the map information in the new second current map to the coordinate system of the historical map. The robot configures the historical map to be a map that was saved before the second current map was constructed, and supports updating the second current map or the first current map to the historical map without marking it as an invalid map. The historical map is used to represent the same preset location and the environmental area where the robot is located.

[0006] Furthermore, if the robot detects that it has entered an abnormal state and then returned to a normal state, the robot establishes a first current map and determines the conversion relationship between the first current map and the historical map. If the robot detects that it has entered an abnormal state again, it updates the first current map to a second current map, and then updates or deletes the conversion relationship between the second current map and the historical map. The robot also marks both the second current map and the historical map as invalid maps, but marks the conversion relationship between the second current map and the historical map as valid information for the robot to call later.

[0007] Furthermore, if the robot detects that it has entered an abnormal state and then returned to a normal state, and if the robot does not detect that it has entered an abnormal state again, then the robot marks the historical map as a valid map during its movement and keeps the conversion relationship between the first current map and the historical map unchanged. Then, based on the pose information of a preset position in the first current map, and combined with the conversion relationship between the first current map and the historical map, the pose information of the preset position in the historical map is calculated. Then, based on the relative positional relationship between the robot's current position and the preset position, the pose information of the robot's current position in the historical map is calculated. The relative positional relationship between the robot's current position and the preset position is obtained in advance.

[0008] Furthermore, before each abnormal state is entered, the robot does not update the second current map or the first current map to a historical map; wherein, when the robot detects entering an abnormal state, it marks the most recently constructed map before entering the abnormal state as the second current map; when the robot detects its first entry into an abnormal state, it marks the conversion relationship between the second current map and the historical map as the first initial conversion relationship; when the robot detects its re-entry into an abnormal state, it deletes the conversion relationship between the first current map and the historical map; and, based on the pose information of the preset position within the second current map obtained after the robot recovered from the abnormal state last time, it updates the second current map and the historical map... The conversion relationship between the two maps is updated, and the updated conversion relationship is marked as the first reference conversion relationship. If the robot cannot obtain the pose information of the preset position in the second current map after recovering from an abnormal state, the first initial conversion relationship is directly marked as the first reference conversion relationship. When the robot detects that it has recovered from the current abnormal state to a normal state, the conversion relationship between the first current map and the historical map is re-established, and the newly established conversion relationship is marked as the second reference conversion relationship. Then, the robot uses the second reference conversion relationship to calculate the pose information of the preset position in the historical map, and then uses the first reference conversion relationship to calculate the pose information of the preset position in the second current map.

[0009] Furthermore, the method for converting map information in the first current map to the coordinate system of the second current map based on the conversion relationship between the first current map and the second current map includes: when the robot detects that it has recovered from an abnormal state to a normal state, based on the conversion relationship between the map coordinate system of the first current map and the map coordinate system of the second current map that was recently marked as invalid, converting the pose information of the robot's current position in the first current map and the pose information of all road signs in the first current map to the coordinate system of the second current map that was recently marked as invalid, then determining that the first current map and the second current map are merged into a new second current map, and marking the new second current map as a valid map.

[0010] Furthermore, after the robot converts the map information in the first current map to the coordinate system of the second current map and determines that the first current map and the second current map are merged into a new second current map, based on the conversion relationship between the second current map and the historical map, the robot's current position pose information in the new second current map and the pose information of all road signs in the new second current map are converted to the coordinate system of the historical map that was recently marked as invalid. Then, the new second current map and the historical map are merged into a new historical map, and the merged new historical map is displayed on the terminal interface.

[0011] Further, the origin preprocessing includes: the robot marking the most recently constructed map before entering the abnormal state as the old current map; then, based on the positional relationship between the map coordinate system of the old current map and the map coordinate system of the historical map and / or the state of the historical map, setting the origin and coordinate axes, establishing the map coordinate system of the second current map and forming a transformation relationship between the second current map and the historical map; then, according to the transformation relationship between the second current map and the old current map, converting the map information in the old current map to the coordinate system of the second current map to form the second current map; wherein, the transformation relationship between the first current map and the historical map, and the transformation relationship between the old current map and the historical map, are obtained by the robot through executing a pre-set visual positioning algorithm, so that the robot uses the transformation relationship between map coordinate systems to represent the transformation relationship between the two maps; wherein, the transformation relationship between the second current map and the old current map is represented as the transformation relationship between the map coordinate system of the second current map and the map coordinate system of the old current map.

[0012] Furthermore, the robot sets the historical map, the old current map, the first current map, and the second current map to all contain road signs for marking the same preset location, so as to distinguish the map to which the road sign belongs and the pose information of the road sign in the map to which it belongs; the robot configures the conversion relationship between the pose information of the same preset location in the two maps to be equivalent to the conversion relationship between the two maps; the robot uses rotation matrices and translation vectors to form a conversion relationship between the two map coordinate systems, so that one map coordinate system can be transformed into another map coordinate system through rotation and translation.

[0013] Furthermore, the origin preprocessing includes: when the robot is in a normal state and one coordinate axis of the historical map's coordinate system is configured to be parallel or perpendicular to the wall outline of the robot's environment, when the preset coordinate axis of the historical map's coordinate system is neither parallel nor perpendicular to the preset coordinate axis of the old current map's coordinate system, the robot updates the coordinates of its current position in the historical map to the coordinates of the origin of the old current map's coordinate system, then rotates the preset coordinate axis of the old current map's coordinate system with the updated origin to be parallel or perpendicular to the wall outline of the robot's environment, and then updates the old current map's coordinate system after the preset coordinate axis rotation to the map coordinate system of the second current map.

[0014] Furthermore, the origin preprocessing includes: when the robot is in a normal state, when the preset coordinate axis of the historical map's coordinate system is parallel or perpendicular to the preset coordinate axis of the old current map's coordinate system, the robot updates the coordinates of its current position in the old current map to the coordinates of the origin of the old current map's coordinate system, then keeps the preset coordinate axis of the old current map's coordinate system with the updated origin parallel or perpendicular to the preset coordinate axis of the historical map's coordinate system, and then updates the old current map's coordinate system with the updated origin to the map coordinate system of the second current map.

[0015] Furthermore, the origin preprocessing includes: when the robot updates the old current map to the historical map, the robot updates the coordinates of its current position within the old current map to the coordinates of the origin of the old current map's coordinate system, and then updates the map coordinate system of the old current map with the updated origin to the map coordinate system of the second current map.

[0016] Furthermore, the origin preprocessing includes: when the robot has not updated the old current map to a historical map, and the robot has marked the currently existing historical map as an invalid map, adjusting the orientation of the corresponding coordinate axis of the map coordinate system of the second current map by searching for a target straight line in the old current map, so that the orientation of the coordinate axis is parallel or perpendicular to the searched target straight line; and then setting the conversion relationship between the adjusted map coordinate system of the second current map and the map coordinate system of the historical map as the conversion relationship between the second current map and the historical map.

[0017] Furthermore, the robot sets the target line as a line fitted from multiple discrete points existing in the old current map; wherein, the target line is used to represent a fitted line that is parallel or perpendicular to the pre-identified wall outline; then, the robot rotates the orientation of the corresponding coordinate axis of the old current map's coordinate system to be parallel or perpendicular to the target line, then keeps the origin of the old current map's coordinate system unchanged, and then updates the old current map's coordinate system to the second current map's coordinate system.

[0018] Furthermore, when the robot's drive wheels leave the walking surface, it enters the abnormal state; when the robot's drive wheels contact the walking surface to start walking, it enters the normal state. A detection sensor is mounted on the bottom of the robot, and the robot controls this sensor to emit a detection signal towards the robot's walking surface. After the detection sensor receives the signal reflected back from the walking surface, if the robot detects that the relative height between the robot's bottom and the walking surface is higher than a preset height threshold, the robot determines that its drive wheels have left the walking surface and enters the abnormal state; if the robot detects that the relative height between the robot's bottom and the walking surface is lower than or equal to the preset height threshold, the robot determines that its drive wheels are in contact with the ground and enters the normal state to start walking.

[0019] The beneficial technical effects of this invention are as follows: This invention can be specifically applied to situations where the current map is prone to being abnormal and invalid, such as before the robot is picked up, before the robot is picked up, after being picked up and put back on the ground, and after being picked up again. It designs a second current map constructed before the robot is picked up and a first current map constructed after being picked up and put back on the ground. Then, it can process the conversion relationship between the second current map and the historical map according to various picking situations, so that the conversion relationship between the second current map and the historical map can directly restore the historical map that was marked as invalid due to the robot being picked up, provided that the current map that was marked as invalid is located back. In this process, after the robot is picked up and placed back on the ground, it resumes movement. However, the second current map (both the current map and the historical map established before the robot was picked up are marked as invalid) needs to be created. At this point, a new current map needs to be built. Simultaneously, using vision or laser, the robot is repositioned back to the historical map and its physical location's coordinates on the historical map are obtained. Then, based on a pre-obtained preset standard map transformation relationship, the coordinates of that physical location in the second current map are calculated. Finally, using the coordinates of the same physical location on the two different maps before and after being picked up, the transformation relationship between the first and second current maps is obtained to locate the robot back to the invalid map. The second current map is used to convert the newly located second current map back to the historical map, which is also marked as invalid, based on the pre-obtained preset standard map conversion relationship. This historical map is then displayed on the user terminal interface, keeping it stationary. At least when the robot works or retraces the same area, the historical map should not undergo significant rotation or translation. This ensures that the user sees the robot moving on the historical map, i.e., ensuring the historical map is stable (cannot be tilted). If any tilt occurs, it should be reduced or skewed, so that the historical map matches the actual physical environment, and the current map also adapts to the historical map.

[0020] Regarding the transformation relationship between maps, in the initial stage when the robot starts walking and begins mapping, based on the positional relationship between the historical map and the current map, as well as the validity of the historical map, the origin of the current map is set, and the transformation relationship between the coordinate systems of the current map and the historical map is updated and adjusted. This completes the origin preprocessing, obtaining the second transformation relationship between the current map and the historical map. This allows the transformation relationship between the current map and the historical map to be adaptively adjusted according to the robot's current position, ensuring that the current map comprehensively covers the robot's current environment, and representing terrain outlines (such as walls and corridors) as perpendicular or parallel to the coordinate axes. Then, the transformation relationship between the current map and the historical map is saved as the transformation relationship information for repositioning back to the current map established before the robot was picked up. At the same time, the transformation relationship between the current map and the historical map is also applicable in cases where the robot is picked up and then put down, forming the transformation relationship information for restoring the robot's historical map. The robot, when being picked up and put down, ensures that the map does not rotate or translate significantly when the robot restarts its movement. At least based on the way the origin of the map coordinate system is set, the changes to the map are converted back to the map coordinate system of the saved historical map, which is within a controllable range.

[0021] In summary, the robot remembers the layout of the map's coordinate system within the area and learns how to adjust and transform the historical map displayed on the user's device. This maintains the effectiveness of the robot's historical map. Specifically, by controlling the robot to rely on the transformation relationship between the current map before and after being picked up, and the transformation relationship between the historical map and the current map before and after being picked up, the robot can acquire the environmental features and map representation of the work area in various scenarios. This gives the visual robot the ability to autonomously adjust the map, that is, it has the ability to learn the map representation of the surrounding environment and the transformation between maps generated at different times. This allows it to construct a more flat navigation map and increase the stability of the map. Attached Figure Description

[0022] Figure 1 This is a flowchart of a robot map conversion method disclosed in one embodiment of the present invention. Detailed Implementation

[0023] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention. The technical solutions of the present invention will be further described in detail below through embodiments and with reference to the accompanying drawings.

[0024] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0025] Note that, in practice, "further," "preferably," "even further," and "more preferably" are simply starting points for describing another embodiment based on the foregoing embodiments. The combination of the content following "further," "preferably," "even further," or "more preferably" with the foregoing embodiments constitutes the complete configuration of another embodiment. Any combination of several "further," "preferably," "even further," or "more preferably" settings following the same embodiment can form yet another embodiment.

[0026] Figure 1This is a flowchart of an embodiment of a robot map conversion method provided by the present invention. The main body executing this conversion method is a robot, specifically a robot that internally stores historical maps. The robot walks on the ground using drive wheels mounted on its bottom. After starting to walk, the robot collects environmental information within various angle ranges of its surroundings through visual sensors and converts it into coordinates in a global coordinate system to represent the coordinate information of each location point. The terrain contour within the map describes the contour of the robot's current environment. The map previously built by the robot or a map built earlier is a historical map of the robot's current environment relative to the map currently built by the robot. The aforementioned historical map and current map include the robot's environment, abstracted into a map composed of a series of landmarks, where the landmarks represent scene points in the indoor environment. The robot map conversion includes the conversion of the coordinate system between the current map and the historical map, or the conversion of the raster coordinates between the current map and the historical map, specifically involving rotation transformation (rotation matrix takes effect) and translation transformation (displacement change vector takes effect). The current map is an environmental map built by the robot in real time within a preset working area. In this embodiment, the current map can be divided according to the robot's physical state into: a first current map constructed after the robot recovers from an abnormal state to a normal state, and a second current map constructed before the robot enters an abnormal state, wherein the construction time of the second current map is earlier than that of the first current map; specifically, it can be the first current map constructed after the robot is picked up and then placed on the ground, and the second current map constructed before the robot was picked up; or it can be the first current map constructed after the robot falls and is returned to the ground, and the second current map constructed before the robot fell. The robot has a pre-set landmark database, which includes a set of landmark images obtained by exploring and visiting the same physical location multiple times under different ground media, lighting conditions, etc. The landmarks are generally represented by objects on the walking surface that are not easily deformed, such as furniture legs, door frames, walls, pillars, and steps in the robot's environment.

[0027] like Figure 1As shown, the conversion method includes: after the robot detects that it has recovered from an abnormal state to a normal state, establishing a first current map and its conversion relationship with the historical map. For example, after the robot detects that its drive wheels have left the ground, if it detects that its drive wheels have re-contacted the ground, it starts walking on the ground and establishes a first current map, and establishes a conversion relationship between the first current map and the historical map. In this embodiment, the first current map can be understood as the map built immediately after the robot recovers from an abnormal state to a normal state, that is, the map built immediately in the normal state until it becomes a second current map before it becomes an abnormal state. Preferably, regardless of whether the robot enters an abnormal state, the map building method is based on the location points collected by the sensors and the feedback of the environment (obstacle occupancy), marking each cell (grid) to form a local map area that the robot has traversed, and then gradually forming a relatively complete grid map, and accepting the overlay of the newly created map. Then the robot can obtain the pose information of a preset position in the first current map, and then, combined with the conversion relationship between the first current map and the historical map, calculate the pose information of the preset position in the historical map to achieve a relocalization of the historical map. The pose information of the preset position in the first current map is calculated by the robot during the scanning of the surrounding environment by the ranging sensor. Specifically, it relies on the point cloud data scanned by the laser sensor or the two frames of images collected by the vision sensor to establish a triangulation model. Then, using the principle of trigonometric functions, the feature points on the same polar line extracted from the point cloud data reflected back by the obstacle or the two frames of images are converted into the coordinate information of the preset position in the first current map. Thus, the coordinate information of the robot in the first current map can be calculated.

[0028] It should be noted that the transformation relationship can be represented by a rotation matrix and a translation vector as a vector relationship between the pose information of the same preset position in one map and the pose information in another map. It can also be represented in other forms. It is understood that the vector relationship can be represented in any reasonable form, and this embodiment does not limit the specific representation of the transformation relationship. The robot can determine the detection results of leaving the ground and re-touching the ground based on the distance information fed back by the detection sensors on the bottom of the robot. In some embodiments, when the robot detects that its drive wheels have left the ground, it can be understood as entering an abnormal state. Even if a map can still be built, it cannot be used for localization and cannot represent the environmental information it actually traversed.

[0029] Then, based on the transformation relationship between the second current map and the historical map, and the pose information of the preset position within the historical map, the pose information of the preset position within the second current map is calculated. Preferably, the transformation relationship between the second current map and the historical map allows the origin of the map coordinate system of the second current map to coincide with the origin of the map coordinate system of the historical map, so that the origin of the map coordinate system of the current map is set with reference to the map coordinate system of the historical map, thus ensuring that the second current map and the historical map... Figure 1 The historical map is an environmental map corresponding to a preset working area, pre-built and stored in a map storage medium. In this embodiment, the robot performs origin preprocessing on the map it most recently built before entering the abnormal state to obtain the second current map. Preferably, the robot can directly configure the map after origin preprocessing as the map it most recently built before entering the abnormal state, that is, origin preprocessing is equivalent to not performing any transformation operation on the map, thus obtaining the second current map. Preferably, within a preset delay period after the robot detects that it has started to enter the abnormal state (the robot body is picked up), the robot is triggered to reset the origin of the map coordinate system of the most recently built map so that the map is consistent with the historical map, thus obtaining the second current map and reducing the offset of the final displayed map. However, after the robot detects that it has entered the abnormal state, it marks both the second current map and the historical map as invalid maps. While in the abnormal state, it keeps marking both the second current map and the historical map as invalid maps, but marks the conversion relationship between the second current map and the historical map as valid information so that the robot can call it to perform coordinate conversion between maps. Moreover, since the first current map is always the most recently created map, the first current map is kept as a valid map. The robot can directly obtain the pose information of its current position and the pose information of the preset position (the coordinate information and angle information of the corresponding landmark in the first current map, or understood as the coordinate information and angle information of the landmark corresponding to the preset position in the first current map) from it.

[0030] It should be noted that the robot configures the historical map to be the map before the second current map is constructed, and supports updating the second current map or the first current map to the historical map without marking it as an invalid map, and uses it to represent the same preset location and the environmental area where the robot is located. It should be further noted that the first current map, the second current map, and the previously established historical map can all be grid maps representing a two-dimensional planar area of ​​the current environment, including the preset location; the environmental information marked at each grid in the grid map includes the location occupied by obstacles, the location not occupied by obstacles, or the unknown location, and each coordinate location has a corresponding grid to represent the specific physical location in the current environment; at the same time, the local area composed of multiple grids in the grid map also stores work records, enabling the robot to more intelligently formulate different tasks for different locations. For example, when used in a robotic vacuum cleaner, it can effectively record historical cleaning records and records of abnormal cleaning interruptions. Even if cleaning is not completed, it can still return to finish the unfinished cleaning task regardless of the situation (such as power outage, being picked up, temporary tasks, returning after changing environments, etc.). Therefore, the historical map recorded by traversing the current environment in advance can be used for subsequent navigation, positioning, and path planning. This embodiment can also obtain the conversion relationship between the first current map and the historical map, and the conversion relationship between the second current map and the historical map, by executing a pre-set visual positioning algorithm. Preferably, any conversion relationship can be obtained by a visual sensor... The transformation relationship between the coordinate systems of two consecutively acquired map images determines the transformation relationship between the first current map and the historical map. The specific geometric relationship between two corner points of the same test location in the physical environment and the geometric figure formed by the projection points (feature points) of the test location in the map image corresponding to the current map (first current map and second current map) and the projection points (feature points) in the map image corresponding to the historical map forms the transformation relationship between the first current map and the historical map, or the transformation relationship between the second current map and the historical map. This is equivalent to the result of rotation transformation and translation transformation between the map coordinate system of the current map and the map coordinate system of the historical map.Preferably, the first current map, the second current map, and the historical map all include map identifiers for marking map data on the map storage medium, the number of landmarks, landmark information for visual positioning, pose information output from the converted landmark information, and verification values ​​of the aforementioned data. In this embodiment, the number of landmarks, the landmark information for visual positioning, and the pose information output from the converted landmark information are collectively referred to as landmark attribute information. The pose information includes position coordinates and azimuth angle. When the attribute information of a landmark in its map is matched with the attribute information of a reference landmark, if the difference in number is within a preset number error range, and / or the difference in position is within a preset position error range, then the relatively correct pose information of the landmark in its map is configured to be equal to the pose information of the reference landmark. Therefore, it is determined that the attribute information of the landmark in its map matches the attribute information of the reference landmark successfully. Based on this, if the map identifiers are the same and the verification values ​​are the same, then the two maps being compared are determined to be identical.

[0031] Then, based on the transformation relationship between the pose information of the same preset location in the first current map and the pose information of the same preset location in the second current map, the transformation relationship between the first current map and the second current map is determined. In this embodiment, the robot sets the historical map, the first current map, and the second current map to all contain road signs for marking the same preset location, so as to distinguish the map to which the road sign belongs and the location of the road sign within its respective map. Therefore, the robot configures the transformation relationship between the pose information of the same preset location in the two maps as: equivalent to the transformation relationship between the two maps, and equivalent to the transformation relationship between the pose information of the two road signs used to mark the preset location within their respective maps. Thus, the transformation relationship between the pose information of the same preset location in the first current map and the pose information of the same preset location in the second current map represents the result of the combined effect of rotational and translational transformations between the map coordinate systems of the first and second current maps.

[0032] Then, based on the conversion relationship between the first current map and the second current map, the map information in the first current map is converted to the coordinate system of the second current map to merge them into the second current map. In this embodiment, after the robot converts the map information in the first current map to the coordinate system of the second current map, it obtains a new second current map. However, the coordinate systems of the old and new second current maps are not converted. The new second current map is marked as a valid map. That is, when the robot returns to normal and restarts walking by returning to the walking plane, the second current map marked as invalid in an abnormal state can be marked as a valid map after merging with the map information of the first current map. Preferably, the robot can use the conversion relationship between the second current map and the historical map to convert the map information in the new second current map to the coordinate system of the historical map to restore the historical map, further realize the relocation of the historical map, and re-mark the historical map that was originally marked as invalid in an abnormal state as a valid map after merging with the new map information. The map information includes the attribute information of the landmarks. This allows for updating the conversion relationship between the second current map and the historical map, enabling the new second current map and the new historical map to adapt to the first current map.

[0033] In summary, the robot remembers the layout of the old and new map coordinate systems within the corresponding work area and learns how to adjust and transform the historical map displayed on the user terminal after an abnormal state occurs. This maintains the effectiveness of the robot's historical map. Specifically, the robot is controlled to rely on the transformation relationship between the current map before and after the abnormal state (e.g., before and after being picked up), and the transformation relationship between the historical map and the current map before and after the abnormal state (e.g., before and after being picked up). Under various physical state scenarios, the robot obtains the environmental features and map representation of the work area, enabling it to autonomously adjust the map. In other words, it has the ability to learn the map representation of the surrounding environment and the transformation between maps generated at different times, thereby constructing a more flat navigation map and increasing map stability.

[0034] As one embodiment, when the robot detects that it has entered an abnormal state and then returned to a normal state, for example, when the robot detects that it has been picked up from the walking plane and then its drive wheels have been brought into contact with the walking plane and started walking, the robot establishes a first current map and determines the conversion relationship between the first current map and the historical map. If the robot detects that it has entered an abnormal state again, such as if the robot detects that it has been picked up again, the first current map (effective map) is updated to a second current map, and the conversion relationship between the second current map and the historical map is updated or deleted. Thus, the conversion relationship between the second current map and the historical map established later can be retained relative to the first determined conversion relationship between the second current map and the historical map; or, since it has entered the same abnormal state again (such as being picked up by the same external force and being put back in the same position), only the conversion relationship between the second current map and the historical map determined in the first instance needs to be used, and no update is required.

[0035] It is worth noting that since the robot is currently in an abnormal state, it marks both the second current map and the historical map as invalid maps, but marks the conversion relationship between the second current map and the historical map as valid information for subsequent use by the robot. In this embodiment, the first current map is considered the new current map, such as the newly created map after being picked up and put down, while the second current map is considered the old current map, such as the current map before being picked up. After being picked up, the old current map becomes invalid and cannot be directly used by the robot. Therefore, it is necessary to combine the conversion relationship between the first current map and the historical map to calculate the pose information of the preset position in the historical map, rather than directly obtaining the pose information of the preset position in the historical map. Furthermore, based on the conversion relationship between the second current map and the historical map and the pose information of the preset position in the historical map, it is necessary to calculate the pose information of the preset position in the second current map, rather than directly obtaining the pose information of the preset position in the second current map from the second current map.

[0036] It should be noted that after the robot completes a traversal of a preset work area, the historical map is saved for direct retrieval next time. However, because the physical location and direction of the robot's startup are likely to change frequently, the direction indicated by the marked position on the retrieved historical map may not correspond to the direction of the robot's current position. Therefore, visual matching must be used to re-locate the robot's position and direction on the historical map, so that the historical map matches the actual physical environment. Comparison with the pre-saved map is necessary, the key being to determine whether the current position is within a pre-saved location (relative to the origin of the coordinate system). Based on the determination result, it is decided whether the historical map needs to be updated or the basis for transforming the current map needs to be determined.

[0037] As one embodiment, if the robot detects that it has entered an abnormal state and then returned to a normal state, and if the robot does not detect that it has entered an abnormal state again, then the robot marks the historical map as a valid map during its walking process. Specifically, by utilizing the conversion relationship between the second current map and the historical map, the map information in the new second current map is converted into the coordinate system of the historical map, and then the historical map is marked as a valid map, while keeping the conversion relationship between the first current map and the historical map unchanged. For example, if the robot detects that it has been picked up from the ground and then its drive wheels have touched the ground and started walking, and if the robot does not detect that it has been picked up again, then the robot marks the historical map as a valid map during its walking process, while keeping the conversion relationship between the first current map and the historical map unchanged. Alternatively, if the robot has never entered an abnormal state, then the robot marks the historical map as a valid map during its walking process, while keeping the conversion relationship between the first current map and the historical map unchanged. Then, based on the pose information of a preset position in the first current map, and combined with the transformation relationship between the first current map and the historical map, the pose information of the preset position in the historical map is calculated. Then, based on the relative positional relationship between the robot's current position and the preset position, the pose information of the robot's current position in the historical map is calculated. It should be noted that the relative positional relationship between the robot's current position and the preset position is obtained in advance so that the robot can search and calculate the coordinate information of the preset position and the robot's current position in the first current map and the historical map.

[0038] As one embodiment, before the robot enters an abnormal state (e.g., before being picked up), the robot does not update the second current map and / or the first current map to historical maps. At the same time, the robot marks all historical maps as valid maps. Specifically, when the robot detects that it has entered an abnormal state, it marks the most recently constructed map before entering the abnormal state (before being picked up) as the second current map.Therefore: when the robot detects that it has entered an abnormal state for the first time (when it is picked up), the conversion relationship between the second current map and the historical map is marked as the first initial conversion relationship; except for the first time it is detected to enter and be in an abnormal state (when it is picked up), each time the robot detects that it has subsequently entered an abnormal state, the conversion relationship between the first current map and the historical map is deleted. The conversion relationship between the first current map and the historical map that needs to be deleted is the one established after the robot recovers from the abnormal state to the normal state, to adapt to the new environment where the robot lands. It should be noted that the robot may still create a new map while in an abnormal state. These newly created maps belong to the current map. When the robot pauses walking, it generates positioning information, but there's no need to call the conversion relationship between the first current map and the historical map for coordinate transformation, since the robot isn't continuing to walk on the walking plane. To prevent the phenomenon of multiple map frames being superimposed during the robot's abnormal state (being picked up), and since these superimposed maps are not the maps needed for the robot's positioning on the walking plane, it's necessary to delete these continuously superimposed current maps and their conversion relationships with the historical map. Specifically, both the historical map and the second current map are marked as invalid maps. Furthermore, after the robot recovers from an abnormal state, it cannot locate its pose information back to the preset position within the second current map. Under the premise that the robot could not obtain the pose information of the preset position in the second current map after the robot last recovered from an abnormal state, so that the robot could not merge a new second current map, if it is determined that the conversion relationship between the second current map and the historical map could not be obtained before the current entry into an abnormal state, then the first initial conversion relationship is directly marked as the first reference conversion relationship; under the premise that the robot located the pose information of the preset position in the second current map after the robot last recovered from an abnormal state, that is, under the premise that the robot calculated and obtained the pose information of the preset position in the second current map after the robot last recovered from an abnormal state so that the robot could merge a new second current map, it is determined that when If a preset standard map conversion relationship can be obtained before the previous abnormal state is entered, the preset standard map conversion relationship is the conversion relationship between the second current map and the historical map obtained before the current abnormal state is entered. Then, the conversion relationship between the second current map and the historical map is updated. Specifically, the conversion relationship between the latest obtained second current map and the latest obtained historical map is calculated first, and then the conversion relationship is preprocessed at the origin to obtain the preset standard map conversion relationship. Then, the preset standard map conversion relationship is used to update the conversion relationship between the second current map and the historical map. Then, the updated conversion relationship is marked as the first reference conversion relationship. In this case, the second current map and the historical map are both marked as invalid maps.In some embodiments, regardless of how many times the robot enters an abnormal state (how many times it is picked up), the conversion relationship between the second current map and the historical map remains unchanged, and the origin preprocessing method also remains unchanged. Therefore, the preset standard map conversion relationship obtained through the origin preprocessing method remains unchanged. In this case, it is not necessary to update the preset standard map conversion relationship, but rather to directly mark the preset standard map conversion relationship as the first reference conversion relationship.

[0039] Then, whenever the robot detects a return to normal from its current abnormal state (e.g., after being placed back on the ground and resuming movement), it re-establishes the conversion relationship between the first current map and the historical map and marks the newly established conversion relationship as the second reference conversion relationship. The previously established conversion relationship between the first current map and the historical map is deleted. The historical map at this time was established before entering the current abnormal state. During this phase of returning to normal from the abnormal state, the historical map is not updated and remains invalid with the second current map. The robot can establish a new first current map and obtain the pose information of a preset position within the first current map. Naturally, it can also establish the conversion relationship between the first current map and the historical map. The robot then saves the newly established conversion relationship between the first current map and the historical map and marks it as the second reference conversion relationship. Then, combined with the pose information of the currently obtained preset position within the first current map, the robot uses the second reference conversion relationship to calculate the pose information of the preset position within the historical map. This overcomes the problem that the historical map is still marked as invalid and the time has not yet been reached to convert map information to the historical map. Then, in order to locate back to the second current map to which the landmark used to mark the preset position belongs, the robot uses the first reference transformation relationship to calculate the pose information of the preset position in the second current map. In particular, based on obtaining the pose information of the preset position in the historical map, the robot uses the first reference transformation relationship to calculate the pose information of the preset position in the second current map, and then locates back to the second current map established before the current abnormal state in the current normal state.

[0040] Therefore, this embodiment specifically addresses situations where the current map is prone to becoming invalid, such as before the robot is picked up, before the robot is picked up and then put back on the ground, and after the robot is picked up again. It designs a second current map before the robot is picked up and a first current map after the robot is picked up and put back on the ground. Then, it can handle the conversion relationship between the second current map and the historical map according to various picking situations, so that the conversion relationship between the second current map and the historical map can directly restore the historical map that was marked as invalid due to the robot being picked up, provided that the current map that was marked as invalid is located back. This overcomes the problem that the cleaning record of the last incomplete cleaning in the cleaning robot will also become invalid, and it is impossible to resume cleaning from a breakpoint.

[0041] In the above embodiments, whenever the robot determines that the relevant attribute information of the robot and the landmark used to mark the preset position is different from the attribute information of the same type of reference landmark in the template library, it determines that the attribute information of the landmark does not match the attribute information of the same type of reference landmark, and determines that the robot cannot locate the pose information of the preset position in the second current map, and further determines that the robot cannot locate the map to which the landmark belongs. The attribute information of the landmark includes the pose information of the landmark in the second current map to which it belongs, calculated by the robot using the second reference transformation relationship and the first reference transformation relationship.

[0042] Whenever the robot determines that the attribute information related to the robot and the landmark used to mark the preset location is the same as the attribute information of the reference landmark in the template library, it determines the robot's pose information to locate the preset location in the second current map. The robot obtains the pose information of the landmark in its map and determines that the pose information of the landmark in its map is the same as that of the reference landmark in its map. Then, based on the pre-obtained relative positional relationship between the robot and the reference landmark, it determines the pose information of the robot's current position in the map to which the landmark belongs, so as to realize the robot's localization using the map to which the landmark belongs. The relative positional relationship between the robot and the reference landmark can be included in the relevant attribute information of the reference landmark.

[0043] It should be noted that, in this embodiment, the robot sets the historical map, the first current map, and the second current map to all contain road signs for marking the preset location, in order to distinguish the map to which the road sign belongs and the location of the road sign within its respective map. When the map to which the road sign for marking the preset location belongs is the historical map, the reference road sign participating in the matching is the second reference road sign. Based on obtaining the pose information of the road sign for marking the preset location within its respective first current map, the pose information of the road sign for marking the preset location within its respective historical map is calculated by the second reference transformation relationship. Specifically, the pose information of the road sign for marking the preset location within its respective first current map is multiplied by the second reference transformation relationship to obtain the pose information of the road sign for marking the preset location within its respective historical map. Among these, when the robot establishes the first current map, the robot directly obtains the pose information of the road sign for marking the preset location within its respective first current map. Based on this, when the map to which the road sign used to mark the same preset location belongs is the second current map, the reference road sign participating in the matching is the first reference road sign. Based on obtaining the pose information of the road sign used to mark the same preset location in the historical map to which it belongs, the pose information of the road sign in the second current map to which it belongs is calculated by the first reference transformation relationship. Specifically, the pose information of the road sign used to mark the preset location in the historical map to which it belongs is multiplied by the first reference transformation relationship to obtain the pose information of the road sign used to mark the preset location in the second current map to which it belongs.

[0044] As one embodiment, the method for converting map information in the first current map to the coordinate system of the second current map based on the conversion relationship between the first current map and the second current map includes: when the robot detects that it has recovered from an abnormal state to a normal state, for example, when the robot detects that it has been picked up so that its drive wheels leave the ground, and if it detects that its drive wheels have re-contacted the ground, then the robot, based on the conversion relationship between the map coordinate system of the first current map and the map coordinate system of the second current map that has been most recently marked as invalid, converts the robot's current position pose information in the first current map and the pose information of all road signs in the first current map to the second current map that has been most recently marked as invalid. In the coordinate system, if the map information in the first current map is updated to the same area of ​​the second current map, or if the map information in the first current map does not correspond to the map information of all areas of the second current map, then the map information in the first current map is considered to be added to the second current map. Then, the first current map and the second current map are merged into a new second current map. At this time, the map coordinate system of the first current map is rotated and translated according to the transformation relationship between the map coordinate system of the first current map and the map coordinate system of the second current map, and then coincides with the map coordinate system of the second current map. The new second current map is marked as an effective map so that the robot can call it during localization. If the transformation relationship between the coordinate system of the first current map and the coordinate system of the second current map (which was recently marked as invalid) is obtained by first calculating the rotation matrix between the coordinate systems and then calculating the translation vector, then the way to transform the relevant pose information in the first current map to the coordinate system of the second current map is to first control the relevant coordinate points to translate the corresponding coordinate offset in the translation vector, and then control the translated coordinate points to rotate around the origin by the rotation angle corresponding to the trigonometric function in the rotation matrix, thereby merging the coordinate information in the first current map into the second current map, thus realizing the positioning back to the current map established before the hug.

[0045] Based on the above embodiments, after the robot converts the map information in the first current map to the coordinate system of the second current map and determines that the first current map and the second current map are merged into a new second current map, based on the newly determined preset standard map conversion relationship, the robot's current position pose information in the new second current map and the pose information of all road signs in the new second current map are converted to the coordinate system of the historical map that has been recently marked as invalid. This is to update the same area of ​​the historical map with the map information in the new second current map, or to add newly generated map information relative to the historical map to enrich the historical map. Then, the new second current map is determined. The current map and the historical map are merged into a new historical map to adapt to the robot's current environment. At this time, the coordinate system of the second current map is rotated and translated according to the transformation relationship between the coordinate system of the second current map and the coordinate system of the historical map, and then coincides with the coordinate system of the historical map. The merged new historical map is displayed on the terminal interface, realizing the restoration of the historical map marked as invalid in abnormal state. Even if the robot is in a new environment, the restored historical map is still restored. The current position of the robot is displayed on the terminal interface, and it continues to move on the restored historical map, while the offset of the historical map (the historical map merged after the transformation operation) is not obvious.

[0046] In summary, the robot's transition from an abnormal state to a normal state corresponds to being picked up and placed back on the ground, after which it resumes movement. However, the second current map (both the current map and the historical map established before the robot was picked up are marked as invalid) needs to be created. At this point, a new current map needs to be built. Simultaneously, relying on vision or laser, the robot is repositioned back to the historical map and its physical location's coordinates on the historical map are obtained. Then, based on a pre-obtained preset standard map transformation relationship, the coordinates of this physical location in the second current map are calculated. Next, using the coordinates of the same physical location on two different maps before and after being picked up, the transformation relationship between the first and second current maps is obtained to locate back to the second current map marked as invalid. Finally, using the pre-obtained preset standard map transformation relationship, the historical map, which was also marked as invalid, is pulled back and displayed on the user terminal interface. This ensures that the user sees the robot moving on the historical map, making the historical map match the actual physical environment, and the current map also adapts to the historical map. Compared to existing technologies, this eliminates the need for transformation operations on the historical map or the earlier established second current map to convert to the newly established first current map.

[0047] Based on the above embodiments, in order to ensure the stability of the historical map, once the transformation method is used, the degree of deviation or distortion of the displayed terrain contour (relative to the coordinate axis) is reduced. The origin preprocessing involved includes: the robot marking the most recently constructed map before entering the abnormal state as the old current map, and then setting the origin and coordinate axes according to the positional relationship between the map coordinate system of the old current map and the map coordinate system of the historical map and / or the state of the historical map (including whether the historical map is marked as an invalid map and whether it can be called by the robot for positioning), establishing the map coordinate system of the second current map and forming the transformation relationship between the second current map and the historical map. Then the robot can control the positioning of the current map to be adapted to the positioning of the historical map in software, which is convenient for the first current map and the second current map to be returned to the historical map.

[0048] In this embodiment, the coordinate offset of the origin of the second current map's coordinate system relative to the origin of the historical map or the old current map's coordinate system can be represented by a translation vector, and the angle of offset of the coordinate axes of the second current map's coordinate system relative to the coordinate axes of the historical map or the old current map can be represented by a rotation matrix. Thus, the second current map can be obtained by rotating and translating the historical map or the old current map. Therefore, this embodiment can convert the map information in the old current map to the coordinate system of the second current map according to the conversion relationship between the second current map and the old current map, forming the second current map. Specifically, based on the conversion relationship between the map coordinate system of the second current map and the map coordinate system of the old current map, the pose information of the robot's current position in the old current map and the pose information of all landmarks in the old current map are converted to the map coordinate system of the second current map. Then, it is determined that the old current map is completely converted into the second current map, and the second current map is used to update the map to the latest map constructed before the robot enters an abnormal state.

[0049] It should be noted that the conversion relationship between the first current map and the historical map, as well as the conversion relationship between the old current map and the historical map, are obtained by the robot through executing a pre-set visual positioning algorithm, so that the robot uses the conversion relationship between map coordinate systems to represent the conversion relationship between the two maps; of course, the conversion relationship between the second current map and the old current map is represented as the conversion relationship between the map coordinate system of the second current map and the map coordinate system of the old current map. In the foregoing embodiments, the robot configures the historical map, the old current map, the first current map, and the second current map to all contain road signs marking the same preset location, thus distinguishing the map to which the road sign belongs and the pose information of the road sign within its respective map. The robot then configures the transformation relationship between the pose information of the same preset location in the two maps to be equivalent to the transformation relationship between the two maps, and also equivalent to the transformation relationship between the pose information of the two road signs marking the preset location within their respective maps. The robot uses the transformation relationship between the two map coordinate systems to represent the transformation relationship between the two maps. Specifically, it uses rotation matrices and translation vectors to form the transformation formula between the two map coordinate systems, controlling the rotation and translation of one of the map coordinate systems, thereby causing the map to which that map coordinate system belongs to to rotate and translate. Both the first current map and the second current map are adapted to the historical map, and the robot's built-in visual positioning algorithm drives the processing of road signs within the maps, establishing the transformation relationship between the two maps.

[0050] Preferably, the transformation formula includes a rotation matrix and a translation vector, so as to achieve the alignment of the coordinate system of the second current map with the coordinate system of the historical map by controlling the rotation and translation of the first current map or the second current map. Alternatively, the historical map can be controlled to match the robot's current direction of travel after rotation and translation. The first current map, the second current map, and the old current map all belong to the current map category.

[0051] To calculate the translation distance in the translation vector and the rotation angle in the rotation matrix, the robot typically uses associative containers in C++ to store the pose information of the landmark. Therefore, the robot sets the first pose information, `pose_new`, to the pose information of the preset position within the current map, as an object element of the current map class, including the first coordinates (`pose_new.x`, `pose_new.y`) and the first orientation angle (`pose_new.angle`). The robot also sets the second pose information, `pose_old`, to the pose information of the preset position within a historical map or an earlier created current map, as an object element of the historical map class or an earlier created current map, including the second coordinates (`pose_old.x`, `pose_old.y ... The transformation relationships between the first current map and the second current map, the first current map and the historical map, the second current map and the historical map, the old current map and the historical map, and the second current map and the historical map are all represented by the transformation relationship between the pose information of the same preset position in the two maps. Among them, the pose information of the same preset position in the map that was established later is the first pose information pose_new, and the pose information of the same preset position in the map that was established earlier is the second pose information pose_old. The transformation relationship between the first pose information pose_new and the second pose information pose_old includes the following (the rotation angle is calculated first, and the translation is calculated later):

[0052] angle = pose_old.angle - pose_new.angle;

[0053] x = pose_new.x - ( (pose_old.x * cos(angle)) + (pose_old.y * sin(angle));

[0054] y = pose_new.y - ( (pose_old.y * cos(angle)) - (pose_old.x * sin(angle));

[0055] Where angle represents the angle by which the map to which the second pose information pose_old belongs needs to be rotated, x represents the offset of the map to which the second pose information pose_old belongs on the x-axis, and y represents the offset of the map to which the second pose information pose_old belongs on the y-axis. Based on the aforementioned angle and offset, the map to which the first pose information pose_new belongs is first translated -x along the x-axis, then translated -y along the y-axis, and then rotated by an angle in the opposite direction to the rotation direction of the map to which the second pose information pose_old belongs. This transforms the map to which the first pose information pose_new belongs into the coordinate system of the map to which the second pose information pose_new belongs, so that the map to which the first pose information pose_new belongs is updated and displayed on the user interface.

[0056] Preferably, both the current map and the historical map mentioned above are raster maps, with the coordinates of their center point (w / 2, h / 2) set as the coordinates of the origin point from which the robot starts, where w is the width of the raster map and h is the height of the raster map. The map storage medium inside the robot system is a storage unit specifically used to store map data generated by the robot during synchronous walking and real-time mapping, especially the map information, including the attribute information of landmarks.

[0057] Based on the above embodiments, during the origin preprocessing, before setting the origin and coordinate axes according to the positional relationship between the current map coordinate system and the historical map coordinate system and / or the state of the historical map, the robot will first power on and start or restart traversing the same area. The map needs to be initialized first, and the coordinate system also needs to be initialized first. The origin needs to be set. Under normal circumstances, the origin (x,y,angle) is set to (0,0,0.0). Then (0,0,0.0) is set as the pose information of the robot's current position (including coordinates (x,y)), which is equivalent to the robot's starting point. At the same time, the positive direction of the x-axis or the positive direction of the y-axis is configured as the robot's initial walking direction.

[0058] As one embodiment, in the origin preprocessing, the method of setting the origin and coordinate axes and establishing the second current map coordinate system based on the positional relationship between the map coordinate system of the old current map and the map coordinate system of the historical map and / or the state of the historical map includes: when the robot is in a normal state (e.g., not being picked up) and one coordinate axis of the historical map coordinate system is configured to be parallel or perpendicular to the wall outline of the robot's environment (which can be a pre-identified wall outline, specifically a straight line whose position can be represented by an angle and distance from the origin), when the preset coordinate axis of the historical map coordinate system is not parallel and not perpendicular to the preset coordinate axis of the old current map coordinate system (causing the displayed map to be tilted relative to the original historical map), the robot sets its current coordinate system to a different position. The robot's current position coordinates within the historical map are updated to the coordinates of the origin of the old current map's coordinate system. These coordinates can be calculated using the successfully matched landmarks mentioned in the previous embodiment, or obtained through real-time displacement measurements from inertial sensors. Next, the preset coordinate axis of the old current map's coordinate system, now with its updated origin, is rotated until it is parallel or perpendicular to the wall outline of the robot's environment. Then, the old current map's coordinate system after this rotation is updated to the coordinate system of the second current map. At this point, the old current map after the rotation is also updated to the second current map. The transformation relationship between the updated second current map's coordinate system and the historical map's coordinate system is then set as the transformation relationship between the second current map and the historical map. Thus, the second current map's coordinate system and the historical map's coordinate system remain consistent, at least parallel or perpendicular on the coordinate axes. When the time it takes for the robot to build two map frames (the current map and the historical map) or the robot's walking time is short enough, their origins can coincide, allowing the map information from the second current map to be superimposed onto the historical map.

[0059] As one embodiment, in the origin preprocessing, the method of setting the origin and coordinate axes and establishing the second current map coordinate system based on the positional relationship between the map coordinate system of the old current map and the map coordinate system of the historical map and / or the state of the historical map includes: when the robot is in a normal state (e.g., the robot is not being picked up and is walking on the walking plane), when the preset coordinate axis of the map coordinate system of the historical map is parallel or perpendicular to the preset coordinate axis (x-axis or y-axis) of the map coordinate system of the old current map, the robot updates the coordinates of its current position in the old current map to the coordinates of the origin of the map coordinate system of the old current map, then keeps the preset coordinate axis of the map coordinate system of the old current map with the updated origin parallel or perpendicular to the preset coordinate axis of the map coordinate system of the historical map, then updates the map coordinate system of the old current map with the updated origin to the map coordinate system of the second current map, and then sets the transformation relationship between the updated map coordinate system of the second current map and the map coordinate system of the historical map as the transformation relationship between the second current map and the historical map. This ensures that the preset coordinate axes of the second current map's coordinate system are perpendicular or parallel to the preset coordinate axes of the historical map. When the time required to build two map frames (the current map and the historical map) or the robot's walking time is short enough, the coordinate offsets of the origin of the second current map's coordinate system relative to the origin of the historical map's coordinate system on each coordinate axis directly constitute the transformation relationship between the second current map and the historical map, simplifying the complexity of coordinate system conversion. This also maintains consistency with the transformation relationship between the second current map and the old current map.

[0060] As one embodiment, the origin preprocessing includes: when the robot updates the old current map to a historical map, and the robot is in a normal state (e.g., the robot is walking on a walking plane and has not been picked up, or may be about to be picked up), the robot updates the coordinates of its current position in the old current map to the coordinates of the origin of the old current map's coordinate system, thus setting the robot's current position coordinates in the old current map to the coordinates of the origin of the second current map's coordinate system. At this time, the second current map is updated to become the current map relative to the old current map; then, the map coordinate system of the old current map with the updated origin is updated to the map coordinate system of the second current map. Preferably, the coordinate axes of the second current map's coordinate system are aligned with the coordinates of the old current map. The corresponding coordinate axes of the map coordinate system of the previous map are parallel; then the transformation relationship between the updated second current map coordinate system and the original historical map coordinate system is set as the transformation relationship between the second current map and the historical map, or the transformation relationship between the updated second current map coordinate system and the updated historical map coordinate system is set as the transformation relationship between the second current map and the historical map. Then, when the time to build two map frames (current map and historical map) or the robot walking time is short enough, the map coordinate system of the second current map and the map coordinate system of the historical map can coincide, or the transformation relationship between the second current map and the historical map is simply limited to a simple coordinate offset between the origins.

[0061] As one embodiment, the origin preprocessing includes: when the robot has not updated the old current map to a historical map, and the robot has marked the currently existing historical map as invalid, the robot may be in an abnormal state (e.g., the robot has been picked up), and the second current map is also marked as invalid; then the robot adjusts the orientation of the corresponding coordinate axis of the map coordinate system of the second current map by searching for a target straight line in the old current map, so that the orientation of the coordinate axis is parallel or perpendicular to the searched target straight line, thus establishing the map coordinate system of the second current map and forming the second current map; then the conversion relationship between the adjusted map coordinate system of the second current map and the map coordinate system of the historical map is set as the conversion relationship between the second current map and the historical map. Then, the robot rotates the orientation of the corresponding coordinate axes of the old current map's coordinate system to be parallel or perpendicular to the target line, and selects to construct a rotation matrix using the trigonometric function values ​​of the rotation angle. It then keeps the origin of the rotated old current map's coordinate system unchanged and updates it to the coordinate system of the second current map. In the updated second current map, the robot sets the origin of its coordinate system to (0, 0, 0.0). Since the old current map is not updated to a historical map, the robot sets the transformation relationship between the updated second current map's coordinate system and the historical map's coordinate system as the transformation relationship between the second current map and the historical map.

[0062] Preferably, the robot sets the target straight line as a straight line fitted from multiple discrete points existing in the current old map. Generally, these discrete points (distributed locations marked as obstacle contour points) are fitted into one or more fitted straight lines using the least squares method. If the robot is not in an abnormal state under the premise that the current historical map is marked as an effective map, in order to improve the accuracy of map positioning, the target straight line will be selected within a range where the angle between the orientations of the two straight lines is less than 5 degrees to prevent inaccurate map angles. The target straight line is used to represent a fitted straight line that is parallel or perpendicular to the pre-identified wall contour, so that the robot can start walking along the wall. Preferably, the pre-identified wall contour is located near the robot's current position. In the grid map, there may be contour points in the pre-identified wall contour that are located in the neighborhood of the robot's current position.

[0063] In summary, during the initial stages of robot walking and mapping, based on the positional relationship between the historical map and the current map, as well as the validity of the historical map, the origin of the current map is set, and the transformation relationship between the current map coordinate system and the historical map coordinate system is updated and adjusted. This completes the origin preprocessing, obtaining the transformation relationship between the second current map and the historical map. This allows the transformation relationship between the current map and the historical map to be adaptively adjusted according to the robot's current position. By simplifying the transformation relationship between map coordinate systems and even allowing the origins of the two map coordinate systems to coincide, the current map can comprehensively cover the environment in which the robot is currently located. Furthermore, terrain contours (such as walls and corridors) are represented as perpendicular or parallel to the coordinate axes, without causing a large offset between the historical map and the second current map, or requiring the historical map to rotate and translate every time the robot restarts for each scenario. Then the robot saves the conversion relationship between the second current map and the historical map as the conversion relationship information for repositioning back to the current map established before the robot was picked up; at the same time, the conversion relationship between the second current map and the historical map can also form the conversion relationship information for restoring the robot's historical map when the robot is picked up and then put down. After determining the first current map, the robot can be switched back to the original current map position and carried from the original current map to that location after being picked up.

[0064] As one embodiment, the robot enters the abnormal state when its drive wheels leave the walking surface; it enters the normal state when its drive wheels contact the walking surface to initiate walking; the process from when the robot's drive wheels leave the walking surface to when they re-contact the walking surface to initiate walking is marked as the robot returning to the normal state from entering the abnormal state, including the process of the robot being in the abnormal state. The robot's walking surface is generally a horizontal surface; when the robot crosses a protruding object (such as a step or slope), its drive wheels are easily lifted off the ground, and the robot enters the abnormal state.

[0065] The robot is equipped with a detection sensor on its bottom. The robot controls this sensor to emit a detection signal towards the robot's walking plane. After receiving the signal reflected back from the walking plane, if the robot detects that the relative height between the robot's bottom and the walking plane is higher than a preset height threshold, the robot determines that its drive wheels have left the walking plane and enters the abnormal state. If the robot detects that the relative height between the robot's bottom and the walking plane is lower than or equal to the preset height threshold, the robot determines that its drive wheels are in contact with the ground and enters the normal state to start walking. The preset height threshold is related to the driving capability of the robot's motor and is at least greater than the radius of the robot's drive wheels. The stronger the driving capability of the robot's motor, the easier it is for the robot's drive wheels to cross protruding objects, so that the protruding objects do not constitute a condition for the drive wheels to leave the ground. In this case, the preset height threshold can be set larger, and the robot can be regarded as walking on the walking plane when crossing protruding objects.

[0066] In this embodiment, a detection sensor, such as a cliff sensor or a fall sensor, is used to detect abnormal states. One drive wheel is installed on each of the robot's left and right sides, and a cliff sensor is installed on the front bottom of the robot. The controller is electrically connected to the drive wheels, fall sensor, and cliff sensor. The robot can detect the road surface ahead using the cliff sensor installed on its front bottom and provide precise feedback. Based on the relative height between the walking plane and the bottom of the robot given by the feedback signal, it can detect whether the robot's drive wheels have been lifted off the ground, which can also be considered as detecting whether the robot has been picked up. Preferably, a fall sensor is installed in the wheel mounting slot between the robot's bottom edge and each drive wheel. This fall sensor rises and falls synchronously with the corresponding drive wheel. When the robot's body is lifted by an external force and tilted at an angle, the drive wheel is not contacted by the external ground (the current walking plane), thus triggering the fall sensor to generate a sensing signal, which is transmitted to the controller inside the robot, determining that the corresponding side of the robot has been picked up, causing the drive wheel to be suspended in the air. Therefore, the cliff sensor on the front bottom of the robot and the fall sensor in the mounting slot near the drive wheel constitute a pick-up detection device.

[0067] Preferably, the drop sensor is a limit switch, which is triggered when the drive wheel is physically impacted by external forces (this can be triggered by pressing the limit switch under the action of a spring component on the drive wheel). The limit switch does not output a floating signal when there is no physical impact on the drive wheel, and the limit switch outputs a floating signal when there is no physical impact on the drive wheel (this can be triggered by the elastic action of the spring component on the drive wheel not contacting the limit switch). The external physical impact comes from the physical contact between the ramp and the drive wheel, or the physical contact between the inclined tube structure used to support the bottom of the furniture and the inclined tube structure used to support the bottom of the furniture.

[0068] Preferably, the detection signal emitted by the cliff sensor is an infrared signal. In this embodiment, the cliff sensor has an infrared signal source and an infrared signal receiver. The infrared signal source emits a cone-shaped infrared detection light at a preset emission angle. This cone-shaped infrared detection light has good reflectivity and light source directionality on the walking surface, and the infrared signal receiver receives a large energy reflected signal. The cliff sensor is used to determine the depth of the walking surface based on the intensity of the reflected signal, and then to determine whether the walking surface is a flat surface (corresponding to the aforementioned walking surface), a slope (which may cause the robot to enter an abnormal state during walking), or a cliff surface. The cliff sensor provided in this embodiment of the invention uses an infrared photocell scheme. The basic working process is as follows: the infrared signal source is installed near the front edge of the bottom of the robot body, and the infrared signal is irradiated onto the robot's walking surface at a certain angle. The infrared signal receiver calculates the height above the ground based on the energy of the infrared light reflected back from the walking surface after filtering, so as to trigger the corresponding detection signal when the robot body is picked up.

[0069] The scope of protection of this invention is not limited to the embodiments described above. Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its scope and spirit. If these modifications and variations fall within the scope of the claims of this invention and their equivalents, then the intent of this invention also includes these modifications and variations.

Claims

1. A method for converting robot maps, characterized in that, The conversion method includes: After the robot detects that it has recovered from an abnormal state to a normal state, a first current map is established and its transformation relationship with the historical map is established. Then, the pose information of a preset position in the first current map is obtained. Then, combined with the transformation relationship between the first current map and the historical map, the pose information of the preset position in the historical map is calculated. Then, based on the transformation relationship between the second current map and the historical map, and the pose information of the preset position in the historical map, the pose information of the preset position in the second current map is calculated. Then, based on the transformation relationship between the pose information of the same preset position in the first current map and the pose information in the second current map, the transformation relationship between the first current map and the second current map is determined. Then, according to the transformation relationship between the first current map and the second current map, the map information in the first current map is transformed into the coordinate system of the second current map to merge a new second current map.

2. The conversion method according to claim 1, characterized in that, The robot performs origin preprocessing on the most recently constructed map before entering the abnormal state to obtain the second current map and the conversion relationship between the second current map and the historical map; when the robot detects that it is in an abnormal state, both the second current map and the historical map are marked as invalid maps. After the robot converts the map information in the first current map to the coordinate system of the second current map, it obtains a new second current map. Then, it marks the new second current map as a valid map. Finally, it uses the conversion relationship between the second current map and the historical map to convert the map information in the new second current map to the coordinate system of the historical map. The robot configures the historical map to be a map that has been saved before the second current map is constructed, and supports updating the second current map or the first current map to the historical map without marking it as an invalid map, and uses it to represent the same preset location and the environmental area where the robot is located.

3. The conversion method according to claim 1, characterized in that, If the robot detects that it has entered an abnormal state and then returned to a normal state, the robot establishes a first current map and determines the conversion relationship between the first current map and the historical map. If the robot detects that it has entered an abnormal state again, it updates the first current map to a second current map, and then updates or deletes the conversion relationship between the second current map and the historical map. The robot also marks the second current map and the historical map as invalid maps, but marks the conversion relationship between the second current map and the historical map as valid information for the robot to call later.

4. The conversion method according to claim 3, characterized in that, If the robot detects that it has entered an abnormal state and then returned to a normal state, and if the robot does not detect that it has entered an abnormal state again, the robot will mark the historical map as a valid map during the walking process and keep the conversion relationship between the first current map and the historical map unchanged. Then, based on the pose information of a preset position in the first current map, the pose information of the preset position in the historical map is calculated by combining the conversion relationship between the first current map and the historical map. Then, the pose information of the robot's current position in the historical map is calculated based on the relative position relationship between the robot's current position and the preset position. The relative position relationship between the robot's current position and the preset position is obtained in advance.

5. The conversion method according to claim 3, characterized in that, Before each time the robot enters an abnormal state, the robot does not update the second current map or the first current map to a historical map; wherein, when the robot detects that it has entered an abnormal state, it marks the most recently constructed map before entering the abnormal state as the second current map; When the robot detects that it has entered an abnormal state for the first time, the conversion relationship between the second current map and the historical map is marked as the first initial conversion relationship; when the robot detects that it has entered an abnormal state again, the conversion relationship between the first current map and the historical map is deleted. If the robot obtains the pose information of the preset position in the second current map after recovering from an abnormal state, the conversion relationship between the second current map and the historical map is updated, and the updated conversion relationship is marked as the first reference conversion relationship; if the robot cannot obtain the pose information of the preset position in the second current map after recovering from an abnormal state, the first initial conversion relationship is directly marked as the first reference conversion relationship. When the robot detects that it has recovered from the abnormal state to the normal state, it re-establishes the conversion relationship between the first current map and the historical map and marks the currently established conversion relationship as the second reference conversion relationship. Then, the robot uses the second reference conversion relationship to calculate the pose information of the preset position in the historical map, and then uses the first reference conversion relationship to calculate the pose information of the preset position in the second current map.

6. The conversion method according to claim 2, characterized in that, The method for converting map information in the first current map to the coordinate system of the second current map based on the conversion relationship between the first current map and the second current map includes: When the robot detects that it has recovered from an abnormal state to a normal state, according to the transformation relationship between the map coordinate system of the first current map and the map coordinate system of the second current map that was recently marked as invalid, the robot's current position pose information in the first current map and the pose information of all road signs in the first current map are transformed into the coordinate system of the second current map that was recently marked as invalid. Then, the first current map and the second current map are merged into a new second current map, and the new second current map is marked as a valid map.

7. The conversion method according to claim 6, characterized in that, After the robot converts the map information in the first current map to the coordinate system of the second current map and determines that the first current map and the second current map are merged into a new second current map, based on the conversion relationship between the second current map and the historical map, the robot's current position pose information in the new second current map and the pose information of all road signs in the new second current map are converted to the coordinate system of the historical map that was recently marked as invalid. Then, the new second current map and the historical map are merged into a new historical map, and the merged new historical map is displayed on the terminal interface.

8. The conversion method according to any one of claims 2 to 7, characterized in that, Origin preprocessing includes: marking the most recently constructed map before the robot enters an abnormal state as the old current map; then, based on the positional relationship between the map coordinate system of the old current map and the map coordinate system of the historical map and / or the state of the historical map, setting the origin and coordinate axes, establishing the map coordinate system of the second current map and forming a transformation relationship between the second current map and the historical map; and then, according to the transformation relationship between the second current map and the old current map, converting the map information in the old current map to the coordinate system of the second current map to form the second current map. The conversion relationship between the first current map and the historical map, as well as the conversion relationship between the old current map and the historical map, are obtained by the robot through executing a pre-set visual positioning algorithm, so that the robot uses the conversion relationship between map coordinate systems to represent the conversion relationship between the two maps. The conversion relationship between the second current map and the old current map is expressed as the conversion relationship between the map coordinate system of the second current map and the map coordinate system of the old current map.

9. The conversion method according to claim 8, characterized in that, The robot sets the historical map, the old current map, the first current map, and the second current map to all contain road signs for marking the same preset location, so as to distinguish the map to which the road sign belongs and the pose information of the road sign within the map to which it belongs; The robot configures the pose information of the same preset position in two maps to be equivalent to the conversion relationship between the two maps. The robot uses rotation matrices and translation vectors to form a transformation relationship between two map coordinate systems, so that one map coordinate system can be transformed into another map coordinate system through rotation and translation.

10. The conversion method according to claim 8, characterized in that, The origin preprocessing includes: when the robot is in a normal state and one axis of the historical map's coordinate system is configured to be parallel or perpendicular to the wall outline of the robot's environment, when the preset coordinate axis of the historical map's coordinate system is not parallel or perpendicular to the preset coordinate axis of the old current map's coordinate system, the robot updates the coordinates of its current position in the historical map to the coordinates of the origin of the old current map's coordinate system, then rotates the preset coordinate axis of the old current map's coordinate system with the updated origin to be parallel or perpendicular to the wall outline of the robot's environment, and then updates the old current map's coordinate system after the preset coordinate axis rotation to the map coordinate system of the second current map.

11. The conversion method according to claim 8, characterized in that, The origin preprocessing includes: when the robot is in normal state, when the preset coordinate axis of the historical map's coordinate system is parallel or perpendicular to the preset coordinate axis of the old current map's coordinate system, the robot updates the coordinates of its current position in the old current map to the coordinates of the origin of the old current map's coordinate system, then keeps the preset coordinate axis of the old current map's coordinate system with the updated origin parallel or perpendicular to the preset coordinate axis of the historical map's coordinate system, and then updates the old current map's coordinate system with the updated origin to the map coordinate system of the second current map.

12. The conversion method according to claim 8, characterized in that, The origin preprocessing includes: when the robot updates the old current map to the historical map, the robot updates the coordinates of its current position in the old current map to the coordinates of the origin of the old current map's coordinate system, and then updates the map coordinate system of the old current map with the updated origin to the map coordinate system of the second current map.

13. The conversion method according to claim 8, characterized in that, The origin preprocessing includes: when the robot has not updated the old current map to a historical map, and the robot has marked the existing historical map as invalid, adjusting the orientation of the corresponding coordinate axis of the map coordinate system of the second current map by searching for a target straight line in the old current map, so that the orientation of the coordinate axis is parallel or perpendicular to the searched target straight line; and then setting the conversion relationship between the adjusted map coordinate system of the second current map and the map coordinate system of the historical map as the conversion relationship between the second current map and the historical map.

14. The conversion method according to claim 13, characterized in that, The robot sets the target line as a line fitted from multiple discrete points existing in the old current map; wherein, the target line is used to represent a fitted line that is parallel or perpendicular to the pre-identified wall outline; Then, the robot rotates the orientation of the corresponding coordinate axis of the old current map coordinate system to be parallel or perpendicular to the target line, and then keeps the origin of the old current map coordinate system unchanged. Finally, the old current map coordinate system is updated to the second current map coordinate system.

15. The conversion method according to claim 8, characterized in that, When the robot's drive wheels leave the walking surface, it enters the abnormal state; when the robot's drive wheels contact the walking surface to start walking, it enters the normal state. The robot is equipped with a detection sensor on its bottom, and the robot controls the detection sensor to emit a detection signal toward the robot's walking plane; After the detection sensor receives the signal reflected back from the walking plane, if the robot detects that the relative height between the robot's bottom and the walking plane is higher than a preset height threshold, the robot determines that its drive wheels have left the walking plane and enters the abnormal state; if the robot detects that the relative height between the robot's bottom and the walking plane is lower than or equal to the preset height threshold, the robot determines that its drive wheels have contacted the ground and enters the normal state to start walking.

Citation Information

Patent Citations

  • Unmanned aerial vehicle monocular SLAM extensible framework with depth recovery capability

    CN111578947A

  • Robot repositioning method and device and robot

    CN114519817A