CN-117516528-B - Robot map conversion method
Abstract
The invention discloses a conversion method of a robot map, which comprises the steps of after a robot detects that the robot is recovered to a normal state from an abnormal state, establishing a conversion relation between a first current map and 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 by combining the conversion relation between the first current map and the historical map, calculating the pose information of the preset position in the second current map by combining the conversion relation between the second current map and the historical map, determining the conversion relation between the first current map and the second current map based on the conversion relation 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 into a coordinate system of the second current map according to the currently determined conversion relation.
Inventors
- LI MING
Assignees
- 珠海一微半导体股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20220729
Claims (15)
- 1. A method for converting a robot map, the method comprising: After the robot detects that the robot is recovered to a normal state from an abnormal state, a first current map and a conversion relation between the first current map and a historical map are established, pose information of a preset position in the first current map is acquired, the pose information of the preset position in the historical map is calculated by combining the conversion relation between the first current map and the historical map, the pose information of the preset position in the second current map is calculated based on the conversion relation between the second current map and the historical map and the pose information of the preset position in the historical map, the conversion relation between the first current map and the second current map is determined based on the conversion relation between the pose information of the same preset position in the first current map and the pose information of the second current map, and then the map information in the first current map is converted into a coordinate system of the second current map according to the conversion relation between the first current map and the second current map so as to combine a new second current map.
- 2. The conversion method according to claim 1, wherein the robot performs origin preprocessing on a map which is newly constructed before the robot enters an abnormal state to obtain a second current map and a conversion relation between the second current map and a history map; After converting the map information in the first current map into the coordinate system of the second current map, the robot obtains a new second current map, marks the new second current map as an effective map, and converts the map information in the new second current map into the coordinate system of the historical map by utilizing the conversion relation between the second current map and the historical map; the robot configures the historical map into a map which is stored before the second current map is constructed, and supports the second current map or the first current map to be updated into the historical map on the premise of not marking the second current map as an invalid map and is used for representing the same preset position and the environment area where the robot is located.
- 3. The method according to claim 1, wherein the robot establishes a first current map and determines a conversion relation between the first current map and a history map in case the robot detects that the robot enters an abnormal state first and then returns to a normal state, updates the first current map to a second current map if the robot detects that the robot enters the abnormal state again, updates the conversion relation between the second current map and the history map, or deletes the conversion relation between the second current map and the history map, and marks both the second current map and the history map as invalid maps, but marks the conversion relation between the second current map and the history map as valid information for subsequent call of the robot.
- 4. The conversion method according to claim 3, wherein when the robot detects that the robot enters the abnormal state first and then returns to the normal state, if the robot does not detect that the robot enters the abnormal state again, the robot marks the history map as an effective map in the traveling process and controls the conversion relationship between the first current map and the history map to be unchanged, and then calculates pose information of a preset position in the history map by combining the conversion relationship between the first current map and the history map on the basis of acquiring pose information of the preset position in the first current map, and calculates pose information of the current position of the robot in the history map on the basis of the relative position relationship between the current position of the robot and the preset position, wherein the relative position relationship between the current position of the robot and the preset position is obtained in advance.
- 5. The method of claim 3, wherein the robot does not update the second current map or the first current map to a history map until the robot enters the abnormal state each time, wherein the robot marks a map newly constructed before the robot enters the abnormal state each time as the second current map when the robot detects that the robot enters the abnormal state each time; when the robot detects that the robot enters the abnormal state for the first time, the conversion relation between the second current map and the historical map is marked as a first initial conversion relation; on the premise that the robot returns to the normal state from the abnormal state last time, the pose information of the preset position in the second current map is obtained, the conversion relation between the second current map and the historical map is updated, and the updated conversion relation is marked as a first reference conversion relation; When the robot detects that the abnormal state is recovered to the normal state, the conversion relation between the first current map and the historical map is re-established, the conversion relation established at present is marked as a second reference conversion relation, then the robot uses the second reference conversion relation to calculate the pose information of the preset position in the historical map, and uses the first reference conversion relation to calculate the pose information of the preset position in the second current map.
- 6. The method of converting according to claim 2, wherein the method of converting map information in the first current map into a coordinate system of the second current map according to a conversion relationship between the first current map and the second current map comprises: when the robot detects that the robot is restored to the normal state from the abnormal state, according to the conversion relation between the map coordinate system of the first current map and the map coordinate system of the second current map which is marked as the invalid map, the pose information of the current position of the robot in the first current map and the pose information of all the signposts in the first current map are converted into the coordinate system of the second current map which is marked as the invalid map, the first current map and the second current map are combined to form a new second current map, and the new second current map is marked as the valid map.
- 7. The conversion method according to claim 6, wherein after the robot converts map information in a first current map into a coordinate system of a second current map and determines that the first current map and the second current map are combined into a new second current map, pose information of a current position of the robot in the new second current map and pose information of all landmarks in the new second current map are converted into a coordinate system of a history map that is newly marked as an invalid map based on a conversion relationship between the second current map and the history map, the new second current map and the history map are determined to be combined into a new history map, and the combined new history map is displayed on the terminal interface.
- 8. The conversion method according to any one of claims 2 to 7, wherein the origin preprocessing includes marking a map newly constructed before the robot enters an abnormal state as an old current map, setting an origin and coordinate axes according to a position relationship between a map coordinate system of the old current map and a map coordinate system of the history map and/or a state of the history map, establishing a map coordinate system of a second current map and forming a conversion relationship between the second current map and the history map, and converting map information in the old current map into a coordinate system of the second current map according to the conversion relationship between the second current map and the old current map to form a second current map; the conversion relation between the first current map and the historical map and the conversion relation between the old current map and the historical map are obtained by the robot through executing a preset visual positioning algorithm, so that the robot uses the conversion relation between the map coordinate systems to represent the conversion relation between the two maps; Wherein the conversion relationship between the second current map and the old current map is a conversion relationship between a map coordinate system expressed as the second current map and a map coordinate system of the old current map.
- 9. The conversion method according to claim 8, wherein the robot sets the history map, the old current map, the first current map, and the second current map to have landmarks for marking the same preset position, so as to distinguish a map to which the landmarks belong from pose information of the landmarks in the map; the robot configures the conversion relation between pose information of the same preset position in two maps to be equal to the conversion relation between the two maps; The robot uses a rotation matrix and a translation vector to form a conversion relation between two map coordinate systems, so that one map coordinate system forms the other map coordinate system through rotation and translation.
- 10. The method according to claim 8, wherein the origin preprocessing includes that when the robot is in a normal state and one coordinate axis of the map coordinate system of the history map is configured to be parallel or perpendicular to a wall contour of an environment in which the robot is located, when the preset coordinate axis of the map coordinate system of the history map is not parallel or perpendicular to the preset coordinate axis of the map coordinate system of the old current map, the robot updates the coordinate of the current position in the history map to the coordinate of the origin of the map coordinate system of the old current map, rotates the preset coordinate axis of the map coordinate system of the old current map with the updated origin to be parallel or perpendicular to the wall contour of the environment in which the robot is located, and updates the map coordinate system of the old current map with the rotated preset coordinate axis to the map coordinate system of the second current map.
- 11. The method according to claim 8, wherein the origin preprocessing includes updating coordinates of a current position of the robot in the old current map to coordinates of an origin of the map coordinate system of the old current map when the preset coordinate axes of the map coordinate system of the history map are parallel or perpendicular to the preset coordinate axes of the map coordinate system of the old current map when the robot is in a normal state, then maintaining the preset coordinate axes of the map coordinate system of the old current map with the updated origin parallel or perpendicular to the preset coordinate axes of the map coordinate system of the history map, and then updating the map coordinate system of the old current map with the updated origin to the map coordinate system of the second current map.
- 12. The method of claim 8, wherein the origin preprocessing includes updating the coordinates of the current position of the robot in the old current map to the coordinates of the origin of the map coordinate system of the old current map and updating the map coordinate system of the old current map with the updated origin to the map coordinate system of the second current map when the robot updates the old current map to the history map.
- 13. The conversion method according to claim 8, wherein the origin preprocessing includes, when the robot does not update the old current map as a history map and the robot has marked the currently existing history map as an invalid map, adjusting an orientation of a corresponding coordinate axis of a map coordinate system of the second current map by searching for a target straight line within the old current map so that the orientation of the coordinate axis is parallel or perpendicular to the searched target straight line, and setting a conversion relationship between the adjusted map coordinate system of the second current map and the map coordinate system of the history map as a conversion relationship between the second current map and the history map.
- 14. The conversion method according to claim 13, wherein the robot sets the target straight line to a straight line fitted from a plurality of discrete points existing in the old current map, wherein the target straight line is used to represent a fitted straight line parallel or perpendicular to a previously recognized wall contour; And then, the robot rotates the direction of the corresponding coordinate axis of the map coordinate system of the old current map to be parallel or perpendicular to the target straight line, controls the origin of the rotated map coordinate system of the old current map to be unchanged, and updates the rotated map coordinate system of the old current map to the map coordinate system of the second current map.
- 15. The conversion method according to claim 8, wherein the abnormal state is entered when the driving wheel of the robot leaves the traveling plane; the bottom of the robot is provided with a detection sensor, and the robot controls the detection sensor to send out a detection signal to be emitted to a walking plane of the robot; After the detection sensor receives the signal reflected by the walking plane, if the robot detects that the relative height between the bottom of the robot and the walking plane fed back by the signal is higher than a preset height threshold value, the robot determines that the driving wheel of the robot leaves the walking plane and enters the abnormal state, and if the robot detects that the relative height region between the bottom of the robot and the walking plane fed back by the signal is lower than or equal to the preset height threshold value, the robot determines that the driving wheel of the robot contacts the ground and enters the normal state to start walking.
Description
Robot map conversion method Technical Field The invention belongs to the technical field of map operation, and particularly relates to a conversion method of a current map and a historical map based on a robot. Background As known to those skilled in the art, in the map constructed by the cleaning robot for indoor navigation and positioning, the history map can be most classified as a main map carrier for performing a map saving function, the cleaning robot saves the characteristics of the surrounding environment each time it traverses the room, marks the map in the form of a coordinate system, constructs the map, and can be saved as the history map, and the history map can be displayed on the display interface of the user terminal in advance for the next cleaning of the cleaning robot. Due to instability of map display or coordinate conversion, when the cleaning robot traverses the same environment area again, partial area contour lines and topography trend in a pre-built historical map are displayed irregularly, for example, long corridor, wall bodies or obstacles with longer flat contour surfaces in an actual environment are displayed to be formed by connecting a plurality of sections of bending lines, the map is displayed askew (inclined relative to coordinate axes) on the whole, the display effect is unstable, map offset errors are easy to occur, movable equipment displayed in the map is in a static state relative to the map where the movable equipment is located, and the visual sensor assembled on the robot cannot acquire the same pose in two adjacent times, so that the direction indicated by the read pre-built historical map does not correspond to the current advancing direction of the robot. Disclosure of Invention The invention discloses a conversion method of a robot map, which aims at solving the problems that the description environment characteristics of the robot map are unstable and easy to incline, and enables the current map to be kept to be matched with a historical map no matter whether the robot is held up or not, so that the current position of the robot is kept in a motion state in the map displayed in a corresponding stage, and the specific technical scheme is as follows: A conversion method of a robot map comprises the steps of after the robot detects that the robot is recovered to a normal state from an abnormal state, establishing a first current map and a conversion relation between the first current map and a historical map, obtaining pose information of a preset position in the first current map, then combining the conversion relation between the first current map and the historical map to calculate the pose information of the preset position in the historical map, then calculating the pose information of the preset position in the second current map based on the conversion relation between the second current map and the historical map and the pose information of the preset position in the historical map, then determining the conversion relation between the first current map and the second current map based on the conversion relation between the pose information of the same preset position in the first current map and the pose information of the second current map, and then converting the map information in the first current map into a coordinate system of the second current map according to the conversion relation between the first current map and the second current map to combine the new second current map. The method comprises the steps of obtaining a first current map, obtaining a second current map and a conversion relation between the first current map and a historical map by a robot, obtaining the first current map by the robot, obtaining the latest built map before the robot enters an abnormal state by origin preprocessing, obtaining the second current map and the conversion relation between the second current map and the historical map, marking the second current map and the historical map as invalid maps when the robot detects that the second current map is in the abnormal state, obtaining a new second current map by the robot after converting map information in the first current map into a coordinate system of the second current map, marking the new second current map as a valid map, and converting map information in the new second current map into the coordinate system of the historical map by utilizing the conversion relation between the second current map and the historical map, wherein the historical map is configured as a map which is already stored before the second current map is built by the robot, and supports that the second current map or the first current map is updated into the historical map on the premise of not marking the invalid map and is used for representing the same preset position and the environment area where the robot is located. Further, under the condition that the robot detects that the robot enters an abnormal state first and then returns