CN117453837A - Robot map updating method - Google Patents

Robot map updating method Download PDF

Info

Publication number
CN117453837A
CN117453837A CN202210839101.2A CN202210839101A CN117453837A CN 117453837 A CN117453837 A CN 117453837A CN 202210839101 A CN202210839101 A CN 202210839101A CN 117453837 A CN117453837 A CN 117453837A
Authority
CN
China
Prior art keywords
map
current
robot
historical
library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210839101.2A
Other languages
Chinese (zh)
Inventor
廖伟健
孙永强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Amicro Semiconductor Co Ltd
Original Assignee
Zhuhai Amicro Semiconductor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Amicro Semiconductor Co Ltd filed Critical Zhuhai Amicro Semiconductor Co Ltd
Priority to CN202210839101.2A priority Critical patent/CN117453837A/en
Publication of CN117453837A publication Critical patent/CN117453837A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47LDOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
    • A47L11/00Machines for cleaning floors, carpets, furniture, walls, or wall coverings
    • A47L11/24Floor-sweeping machines, motor-driven
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47LDOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
    • A47L11/00Machines for cleaning floors, carpets, furniture, walls, or wall coverings
    • A47L11/40Parts or details of machines not provided for in groups A47L11/02 - A47L11/38, or not restricted to one of these groups, e.g. handles, arrangements of switches, skirts, buffers, levers
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47LDOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
    • A47L11/00Machines for cleaning floors, carpets, furniture, walls, or wall coverings
    • A47L11/40Parts or details of machines not provided for in groups A47L11/02 - A47L11/38, or not restricted to one of these groups, e.g. handles, arrangements of switches, skirts, buffers, levers
    • A47L11/4011Regulation of the cleaning machine by electric means; Control systems and remote control systems therefor

Abstract

The invention discloses a robot map updating method, which comprises the following steps: step 1, a robot establishes a current map in a current environment; step 2, updating the current map according to the angle relation between the current map and the map stored in the historical map library last time, storing the updated current map in the historical map library, and updating the updated current map into the map stored in the historical map library last time so as to maintain updating of the current map established in the step 1; wherein each frame of map stored in the same historical map library represents the current environment.

Description

Robot map updating method
Technical Field
The invention relates to the technical field of robot navigation map construction, in particular to a method for updating a robot map.
Background
At present, the map construction and positioning algorithm of the sweeping robot often results in insufficient robustness, so that in the process of collecting environmental data by the sweeping robot, a new map is newly built or an incremental map construction mode is updated, but the updated map becomes a new map, a historical map (an original map) is removed, and the operation corresponding to the historical map is also invalid along with the change of the map, for example, if the map is changed, the sweeping robot also can be invalid in the record of the environmental information of the last sweeping. And the commonly used positioning sensors of the sweeping robot comprise an inertial measurement unit (Inertial Measurement Unit, IMU for short), a wheel type odometer (ODO for short), a laser radar, a visual odometer and the like. Wherein, the IMU and ODO accumulate with time, and the error is larger and larger; the laser radar and the visual odometer have larger errors along with the accumulation of the moving positions, so that the problem that a historical map is deleted in the cleaning process of the sweeping robot each time is solved, and the map constructed along with the cleaning time gradually drifts, so that the map construction precision is reduced.
In summary, how to update the latest map information by using the previously stored historical map information is a technical problem that needs to be solved in the navigation and positioning process of the robot.
Disclosure of Invention
In order to solve the problems, the invention provides a robot map updating method. The specific technical scheme of the invention is as follows:
a method of updating a robot map, the method comprising: step 1, a robot establishes a current map in a current environment; step 2, updating the current map according to the angle relation between the current map and the map stored in the historical map library last time, storing the updated current map in the historical map library, and updating the updated current map into the map stored in the historical map library last time so as to maintain updating of the current map established in the step 1; wherein each frame of map stored in the same historical map library represents the current environment.
Further, in the step 2, the method for updating the current map includes: the robot updates the occupancy probability of the corresponding grid of the current map in a probability value weighting mode to obtain an updated current map; after the robot stores the updated current map into the historical map library, updating the updated current map into the map stored into the historical map library last time, and then executing the step 1; the occupancy probability of the corresponding grid of each frame of map stored in the historical map library is updated in a probability value weighted manner through the step 2 except the first frame of map stored in the historical map library.
Further, each time before the robot stores the updated current map in the historical map library in the step 2, the robot performs weighted average processing on the occupancy probabilities of grids with the same position relationship in each frame of map stored in the current map and the historical map library in advance to obtain a positioning evaluation value, and then updates the positioning evaluation value into the occupancy probabilities of grids corresponding to the current map, then determines that the robot updates the occupancy probabilities of the grids corresponding to the current map in a probability value weighted manner; when the occupation probability of each grid in the current map is updated, acquiring the updated current map; before the updated current map is stored in the historical map library, if the fact that the historical map library is full of the stored historical map is detected, the robot removes a frame of map with the earliest storing time in the historical map library to vacate a storing space, and then the updated current map is stored in the historical map library.
Further, in each frame of map, the grids with the same position relation have equal coordinate values in the same coordinate axis direction relative to the origin of the coordinate system of the map; in each frame of map, each grid has a corresponding coordinate position; the environmental information of the markers at the grids having the same positional relationship includes grid positions occupied by the obstacle, grid positions not occupied by the obstacle, or unknown grid positions; when the environmental information marked at the same grid is different, the occupancy probabilities applied at the grid are different; establishing a new current map and updating the occupancy probability of each grid in the new current map when the robot traverses the current environment once; when the positioning evaluation value is larger than a preset evaluation threshold value, the robot marks the corresponding grid position in the current map as the grid position occupied by the obstacle so as to update the current map.
Further, the maps stored in the history map library comprise an initial history map, a reference history map and other maps; the robot configures a first frame map stored in a historical map library as an initial historical map; the robot configures the map stored in the history map library last time as a reference history map; the weight of the robot to the reference historical map configuration and the weight of the robot to the initial historical map configuration are larger than the weight of the robot to the corresponding configuration of any other frame map stored in the historical map library, and the weight of the robot to the reference historical map configuration and the weight of the robot to the initial historical map configuration are also larger than the weight of the current map configuration.
Further, the method for updating the current map and storing the updated current map into the historical map library according to the angle relation between the current map and the map stored into the historical map library last time comprises the following steps: the robot configures the map stored in the historical map library last time as a reference historical map; if the absolute value of the deflection angle between the coordinate system of the current map and the coordinate system of the reference historical map is smaller than a preset angle threshold value, updating the current map, and storing the updated current map into a historical map library; if the absolute value of the deflection angle between the coordinate system of the current map and the coordinate system of the reference historical map is larger than or equal to a preset angle threshold value, controlling the current map to rotate according to a preset clockwise direction; every time the current map is controlled to rotate by a preset judging angle according to a preset clockwise direction, judging whether the absolute value of the deflection angle between the coordinate system of the rotated current map and the coordinate system of the reference historical map is smaller than a preset angle threshold value, if so, updating the rotated current map into the current map, controlling the current map to stop rotating, updating the current map, and storing the updated current map into the historical map library; otherwise, the rotated current map is controlled to be updated into the current map, and then the current map is controlled to continuously rotate by a preset judging angle according to a preset clockwise direction; and in the process that the current map rotates a first preset number of times according to the preset clockwise direction, if the absolute value of the deflection angle between the coordinate system of the current map after rotation and the coordinate system of the reference historical map is judged to be greater than or equal to a preset angle threshold value each time, the current map after the last rotation is not updated, the storing of the map into the historical map stock is stopped, and the current map after the last rotation is controlled to stop rotating.
Further, the robot configures the preset judging angle to be 90 degrees, and configures the first preset number to be a numerical value of 3, so that the robot controls the current map to rotate for at most 3 times in a preset clockwise direction within an angle range of 360 degrees, wherein the current map after the current rotation is rotated more than the current map after the last rotation by the preset judging angle in the preset clockwise direction; the deflection angle between the coordinate system of the current map and the coordinate system of the reference historical map is the angle formed by one coordinate axis of the coordinate system of the current map and the coordinate axis of the same type of coordinate system of the reference historical map; the preset angle threshold is smaller than 90 degrees; the current map is rotated by a preset judgment angle according to a preset clockwise direction, and is configured to rotate by 90 degrees around the origin of the coordinate system of the current map according to the preset clockwise direction.
Further, under the condition that a second preset number of frame maps are stored in the historical map library, if the absolute value of the deflection angle between the coordinate system of the rotated current map and the coordinate system of the reference historical map is smaller than a preset angle threshold value, removing the frame map with the earliest storage time in the historical map library to vacate a storage space, updating the rotated current map to obtain a first current map, and storing the first current map in the historical map library.
Further, under the condition that the robot detects that no map exists in the historical map library, selecting a current map where the included angle meeting the preset angle condition is located according to the included angle formed by the outline of the obstacle in the current map and the walking track of the robot, and storing the current map in the historical map library to form a frame of map with earliest storage time in the historical map library; step 1 is then performed.
Further, the specific method for selecting the current map in which the included angle meeting the preset angle condition is stored in the historical map library according to the included angle formed by the outline of the obstacle in the current map and the walking track of the robot comprises the following steps: a1, after the robot walks the current environment for the first time and synchronously establishes a current map, the robot searches an obstacle outline and a walking track of the robot from the current map, calculates an angle of an included angle formed by the obstacle outline and the walking track, and marks the angle as a preset offset angle; then the robot judges the magnitude relation between the preset offset angle and the preset error angle threshold; a2, when the robot judges that the preset offset angle is smaller than the preset error angle threshold, storing the current map into a historical map library, configuring the current map into a first frame map stored into the historical map library, and determining that the current map is the current map in which the included angle meeting the preset angle condition is located; step A3, when the robot judges that the preset offset angle is larger than or equal to the preset error angle threshold value, executing the step A1 until the execution times of the step A1 reach the preset traversal times, and then executing the step A4; and A4, selecting a current map corresponding to the preset offset angle with the smallest angle from all preset offset angles obtained in the step A3 by the robot, storing the current map into a historical map library, configuring the current map into a first frame map stored into the historical map library, and determining that the current map is the current map with the included angle meeting the preset angle condition.
Further, the robot searches an obstacle contour line from the current map and the walking track of the robot is the obstacle contour line and the track of the robot walking along the obstacle contour line respectively; wherein the initial direction of the robot's travel track is one coordinate axis parallel to the coordinate system of the current map.
Compared with the prior art, the invention has the beneficial effects that: the robot starts from the first frame of map, and each time a new map is built, the maps except the first frame of map are updated and stored as the maps in the historical map library, wherein the updating start is determined by the angular relationship between the current map and the map stored last time; for each frame of map to be updated and stored, before the map is stored in the historical map storage, the occupancy probability of the corresponding grid of the current map is updated in a probability value weighted mode, the updated current map is obtained, the probability information of the relevant position of the map is updated in real time by taking the grid (corresponding to a cell) as a unit, the map building precision can be continuously improved, and the current map built by the robot can be updated more accurately every time the robot traverses the same environment. The phenomenon that the map drifts along with the movement time of the robot is avoided, and the map building precision of the robot can be continuously improved.
The method comprises the steps of utilizing an occupied grid map construction algorithm principle to endow grids of various environment types with corresponding occupied probabilities, configuring relatively larger weights for the map stored in a historical map library last time and the first frame map stored in the historical map library when updating the occupied probabilities of the corresponding grids of the current map in a probability value weighting mode, realizing larger weight applied to the map with smaller errors, further realizing that probability information at each coordinate position of the map is updated in real time by taking the grids as units, finally generating a more accurate map as an autonomous learning result map after the robot traverses the current environment, and effectively improving the robustness of the mobile robot map construction and positioning algorithm.
Secondly, the invention also supports the angle comparison and matching of the contour lines of the maps correspondingly generated in the same environment area after running for many times so as to obtain a first frame map stored in the historical map library, wherein the first frame map has smaller offset error; on the basis, the map to be saved (namely the current map) in the same frame is supported to rotate for a plurality of times along the same direction, and the map to be saved (the map updated last time) is subjected to angle comparison matching of a coordinate system after each rotation so as to screen out the current map which can be saved; and the map which can be stored in the historical map library is obtained by combining the historical map (the map updated last time) to finish periodical angle matching judgment on the current map, and management (including storage and rejection (direct non-storage or rejection from a memory)) of the map is finished, so that the effectiveness of the map pre-established by the robot can be exerted.
Drawings
Fig. 1 is a flow chart of a robot map updating method according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden on the person of ordinary skill in the art based on the embodiments provided herein, are intended to be within the scope of the present application.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application, and that the appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be understood that the embodiments described herein may be combined with other embodiments, either explicitly or implicitly, by one of ordinary skill in the art, without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. Reference to "a," "an," "the," and similar terms herein do not denote a limitation of quantity, but rather denote the singular or plural. The terms "comprising," "including," "having," and any variations thereof, as used herein, are intended to cover a non-exclusive inclusion, such as: a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the particular steps or elements shown, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "first," "second," and "third" as used herein merely distinguish similar objects and do not represent a particular ordering of objects.
Fig. 1 is a flowchart of an embodiment of a robot map updating method provided by the present invention, and as shown in fig. 1, the updating method includes: step 1, a robot establishes a current map in a current environment; the current map may be a grid map representing a two-dimensional planar area of the current environment, the environmental information marked at each grid within the grid map including an obstacle occupying position, a position not occupied by the obstacle, or an unknown position, each coordinate position having a grid corresponding thereto to represent a specific physical position in the current environment; meanwhile, the local area formed by a plurality of grids in the grid map is also provided with a work record, so that the robot can more intelligently formulate different tasks for different places. For example, if the device is used for a sweeping robot, the device can effectively record a historical sweeping record, and when the sweeping is not completed, the device can still continue to return no matter what conditions are met (such as power failure, temporary tasks, returning after changing the environment, and the like), so that the incomplete sweeping task is completed, and therefore, a historical map recorded by traversing the current environment in advance can be used for subsequent navigation positioning and path planning.
It should be noted that the update method is executed by a robot, and the robot stores a history map therein, the map topography profile is a profile describing the current environment in the map, and the map constructed last time by the robot or a map constructed earlier is a history map in the current environment with respect to the current map constructed currently by the robot. Further, after the current map is obtained, the occupancy probability information of the relevant grid on the map can be adjusted according to the obstacle distribution condition of the current environment so as to overcome positioning errors.
Step 2, updating the current map according to the angle relation between the current map and the map stored in the historical map library last time, storing the updated current map in the historical map library, and updating the updated current map into the map stored in the historical map library last time so as to maintain updating of the current map established in the step 1, wherein the updating of the occupancy probability information of the relevant grid comprises updating of the occupancy probability information of the current map by combining the map stored in the historical map library; wherein each frame of map stored in the same historical map library represents the current environment; in some embodiments, since the current map established in step 1 needs to be maintained to be updated, the map stored in the history map repository last time is set as the map updated last time, and the robot needs to return to step 1 to walk again for one round after each execution of step 2, and then step 2 is executed to continue updating the newly established map, while the original current map is already stored in the history map repository to participate in the comparison of the angular relationship between the maps. In some embodiments, although the current map established in the step 1 needs to be updated, the map stored in the history map library for the first time is set to be a map which is not updated, but a grid map marked by using the collected position information and the detected obstacle condition at the position when the robot walks in the current environment for the first time is a map which roughly reflects the topographic profile or the obstacle distribution characteristic of the current environment, which belongs to the reference quantity for iteratively executing the steps 1 and 2. On the basis, the updated map is called when the robot uses the map stored in the historical map library to position each time, so that the map building accuracy and the navigation positioning success rate are improved.
As an embodiment, in the step 2, the method for updating the current map includes: the robot updates the occupancy probability of the corresponding grid of the current map in a probability value weighting mode to obtain an updated current map; the position relation of the corresponding grid of the current map relative to the origin of the coordinate system of the current map is equivalent to the position relation of the grid participating in the update relative to the origin of the coordinate system of the map in which the grid is positioned in the historical map library; further, the probability value of each grid of the current map needs to be updated according to the probability value weighting mode, namely, the space probability is updated, the current map is updated, and accordingly the updated current map is obtained.
When the robot stores the updated current map into the historical map library, the robot configures the updated current map as the map which is stored into the historical map library recently, then updates the map which is stored into the historical map library last time, and then executes the step 1. It can be understood that when the environment where the robot is located is changed in a small extent, whether the robot is still located in the current environment can be identified by comparing the latest built current map with the map stored in the historical map library last time, the position of the robot can still be calculated, the map can be updated in a manner that the space probability of the environment where the robot is located is updated at the moment, when the environment where the robot is located is changed in a large extent, the robot changes the environment or the arrangement of the environment where the robot is located is moved in a large extent, and the map is reconstructed by executing the step 1.
Except for the first frame of map stored in the historical map library, the occupancy probability of the corresponding grid of each frame of map stored in the historical map library in the step 2 is updated in a probability value weighted manner, after the robot traverses the current environment once and synchronously establishes the current map, the latest established current map is updated and calculated in a probability value weighted manner by combining each frame of map stored in the historical map library, specifically, the occupancy probability of each grid is updated, and then the updated current map is stored in the historical map library; when the map is not stored in the historical map library, the latest established current map cannot be combined with the map in the historical map library in a probability value weighting mode to update and calculate the occupancy probability of the grids, so that the first frame of map stored in the historical map library is the current map which is not updated; thus, except for the first frame of map stored in the historical map library (considered as the original current map), the probability of occupation at the corresponding grid of each frame of map stored in the historical map library is updated before the probability of occupation at the corresponding grid of the map stored in the historical map library is not updated.
In summary, the robot starts from the first frame of map, and needs to update the map except the first frame of map and store the map as the map in the historical map library every time a new map is built, wherein the update is started by the angular relationship between the current map and the map stored last time; for each frame of map to be updated and stored, before the map is stored in the historical map storage, the occupancy probability of the corresponding grid of the current map is updated in a probability value weighted mode, the updated current map is obtained, the probability information of the relevant position of the map is updated in real time by taking the grid (corresponding to a cell) as a unit, the map building precision can be continuously improved, and the current map built by the robot can be updated more accurately every time the robot traverses the same environment. The phenomenon that the map drifts along with the movement time of the robot is avoided, and the map building precision of the robot can be continuously improved.
It should be noted that, whether the two-dimensional grid map or the three-dimensional grid map includes information indicating a probability that an obstacle exists at a specific position or area, the visual sensor or the ranging sensor of the robot may scan the object to be measured to obtain position information corresponding to the object to be measured, and on this basis, the probability information that the object to be measured falls into the corresponding grid position of the map is calculated, that is, how likely the corresponding grid is occupied is represented in a probability manner. In order to mark the positions of 5m and 5.1m as the fixed obstacle at different moments under the same pose, the probability information that the fixed obstacle falls into (hits) the corresponding grid position of the map needs to be calculated by using a grid occupied map construction algorithm, and then the accurate position of the fixed obstacle in the map is determined based on the size of the probability value.
In the grid map scanned under the condition of the visual ranging sensor, the marks of the environmental information at each grid are mainly marked by collision of light rays (particles transmitted in electromagnetic media such as photons) and the like, each collision can assign a value to the occupancy probability at the corresponding grid, then the occupancy probability is reserved, and each grid has an occupancy probability value after a robot walks for a period of time; in some embodiments, a probability value is assigned to each grid through a bayesian theorem, specifically, based on a derivation formula of the bayesian theorem, from the confidence coefficient (which is known and is an iterative process quantity) of the grid at the last moment, the observation information at the current moment (whether the coordinate position corresponding to the grid has the information that the light rays emitted by the ranging sensor collide with) and the initial parameter (which is generally a constant), the occupied confidence coefficient of the grid at the current moment, namely, the probability value of the grid occupied by the obstacle at the current moment, namely, the occupied probability of the grid at the current moment can be obtained.
In some embodiments, the space occupied by the size of the robot is generally not considered, and therefore, in this embodiment, the robot is reduced to a point regardless of whether the map is changed. Specifically, the grid map with a certain resolution is composed of a certain number of point cloud points, and is specifically constructed by a probability grid [ Pmin, pmax ] with the size of 5cm x 5cm, when the map is built, no matter the two-dimensional grid map or the three-dimensional grid map is built, the occupation probability of the grid is smaller than Pmin, which means that the position of the grid is not occupied by an obstacle, the occupation probability of the grid is unknown between Pmin and Pmax, and the occupation probability of the grid is larger than Pmax, which means that the position of the grid is occupied by the obstacle. The point cloud of each frame generates a set of grids in which each grid is assigned an occupancy probability that needs to be updated if it has been previously.
Corresponding to each frame of map stored in the historical map library disclosed by the embodiment and the latest built current map, grids with the same position relation have equal coordinate values in the same coordinate axis direction relative to the origin of the coordinate system of the map; each grid has a corresponding coordinate position, and grid coordinates in the coordinate system of the map are taken as the corresponding coordinate positions, so that grids with the same position relationship can be represented by the coordinate positions with the same position relationship in each frame of map and are built and/or stored in the map of the historical map library in the same current environment. In addition, the environmental information of the markers at the grids having the same positional relationship includes grid positions occupied by the obstacle, grid positions not occupied by the obstacle, or unknown grid positions representing physical positions within the current environment in which the robot is located; specifically, when a grid is marked as a grid position occupied by an obstacle, the occupancy probability applied at the grid is a first occupancy probability; when the grid is marked as a grid position not occupied by an obstacle, the occupancy probability applied at the grid is a second occupancy probability; when a grid mark is an unknown grid position, the applied occupancy probability at the grid is a third occupancy probability; when the environmental information marked at the same grid is different, the occupancy probabilities applied at the grid are different, the robot configures the first occupancy probability, the second occupancy probability and the third occupancy probability to be different probability values so as to evaluate the collision situation or the trafficability situation of the robot with the obstacle in the current environment, preferably, the first occupancy probability is larger than the third occupancy probability based on the Bayesian theorem, and the third occupancy probability is larger than the second occupancy probability.
Further, a new current map is built after the robot traverses the current environment once, generally, each time the plane area corresponding to the current environment is completely walked, a new map is built synchronously, and the occupation probability of each grid in the new map is updated.
As an embodiment, in the case that the history map library is not stored with a full history map, each time before the robot stores the updated current map in the history map library in the step 2, the robot performs weighted average processing on the occupancy probability of the grid with the same position relationship between the current map and each frame of map stored in the history map library, to obtain a positioning evaluation value; updating the positioning evaluation value into the occupancy probability of the grid corresponding to the current map, and determining that the occupancy probability of the grid corresponding to the current map is updated by the robot according to the probability value weighting mode; and when the occupancy probability of each grid in the current map is updated, acquiring the updated current map. Under the condition that the history map library is full of history maps, each time before the robot stores the updated current map into the history map library in the step 2, the robot carries out weighted average processing on the occupancy probabilities of grids with the same position relation in each frame of map stored in the current map and the history map library in advance to obtain a positioning evaluation value, updates the positioning evaluation value into the occupancy probabilities of grids corresponding to the current map, and determines that the occupancy probabilities of the grids corresponding to the current map are updated by the robot according to a probability value weighting mode; when the occupation probability of each grid in the current map is updated, acquiring the updated current map; before the updated current map is stored in the historical map library, the robot removes a frame of map with the earliest storing time in the historical map library to free a storing space, and then stores the updated current map in the historical map library.
In the above embodiment, when the robot detects that the positioning evaluation value is greater than the preset evaluation threshold, the robot marks the corresponding grid position in the current map as the grid position occupied by the obstacle, so as to update the current map. Wherein the positioning evaluation value is used for updating the occupancy probability of one grid in the current map so as to promote the updating of the current map. Preferably, the preset evaluation threshold is greater than or equal to the first occupancy probability.
In the updating of the occupancy probabilities at the corresponding grids of the current map according to the probability value weighting manner mentioned in the foregoing embodiment, it is necessary to implement weighted average calculation on the occupancy probabilities at the grids having the same position relationship among the current map and each frame of map stored in the history map library, and then it is necessary to configure weights for each frame of map (including the newly established current map) respectively. Specifically, the maps stored in the history map library comprise an initial history map, a reference history map and other maps, wherein the robot configures the map stored in the history map library last time as the reference history map, and it can be understood that the map stored in the history map library last time is the map updated last time; the robot configures a first frame map stored in a historical map library as an initial historical map; the maps stored in the historical map library belong to historical maps, namely the maps stored in the historical map library are generally configured as the historical maps for current map matching.
The weight of the robot to the reference historical map configuration and the weight of the robot to the initial historical map configuration are larger than the weight of the robot to the corresponding configuration of any other frame map stored in the historical map library, and the weight of the robot to the reference historical map configuration and the weight of the robot to the initial historical map configuration are also larger than the weight of the current map configuration. Specifically, the robot of the present embodiment performs weighted average calculation on the occupancy probability at the grid having the same positional relationship among each frame of map stored in the current map and the history map library, that is, calculates the sum of the products of the occupancy probability at the grids each having the same positional relationship (the relative position of the coordinate position with respect to the origin of the coordinate system of the present map) and the weight of the present map, respectively, using the weight of the current map configuration, the weight of the map stored in the history map library (including the weight of the reference history map configuration, the weight of the initial history map configuration, and the weights of the remaining history map configurations). And before the occupancy probability of the corresponding grid of the current map is updated in a probability value weighting mode, the current map is not stored in the historical map library. Because the initial historical map is obtained under the condition that the walking time of the robot is relatively short, the reference historical map is stored in the historical map library for the latest time after being updated for a plurality of times (at the moment, the current map is not stored in the historical map library yet), the occupation probability of the initial historical map, the reference historical map and the grids corresponding to the reference historical map are all low-error maps, and the rest of the maps updated according to the probability value weighting mode are all high-error maps (particularly the current map), so that the weight of the high-error information is reduced by increasing the weight of the low-error information, and the precision of the updated current map can be improved after the occupation probability of the corresponding grids of the current map is updated according to the probability value weighting mode.
According to the embodiment, the corresponding occupancy probabilities are given to grids of various environment types by utilizing the occupancy grid map construction algorithm principle, when the occupancy probabilities of the corresponding grids of the current map are updated in a probability value weighting mode, relatively large weights are configured for the map stored in the historical map library last time and the first frame map stored in the historical map library, so that the large weights are applied to the map with small errors, the probability information of each coordinate position of the map is updated in real time by taking the grids as units, a more accurate map is finally generated and is used as an autonomous learning result map after the robot traverses the current environment, and the robustness of the mobile robot map construction and positioning algorithm is effectively improved.
As an embodiment, the method for updating the current map according to the angle relation between the current map and the map stored in the historical map library last time, and storing the updated current map in the historical map library comprises the following steps: the robot configures the map last stored in the history map library as a reference history map, which is a map updated in a probability value weighted manner. If the absolute value of the deflection angle between the coordinate system of the current map and the coordinate system of the reference historical map is smaller than a preset angle threshold, the similarity of the current map and the reference historical map in the coordinate axis direction is higher, and the degree of matching is achieved, the current map is updated, particularly the occupancy probability of the corresponding grid of the current map is updated in a probability value weighting mode, when the occupancy probability of each grid in the current map is updated, the updated current map is obtained, then the updated current map is stored in the historical map library, and preferably the updated current map is updated into the map stored in the historical map library last time. Therefore, the map stored in the historical map library reflects the actual distribution condition of the current environment, and the positioning efficiency is improved.
It should be noted that the deflection angle between the coordinate system of the current map and the coordinate system of the reference history map is an angle formed by the Y axis of the coordinate system of the current map and the Y axis of the coordinate system of the reference history map, or an angle formed by the X axis of the coordinate system of the current map and the X axis of the coordinate system of the reference history map. The preset angle threshold is preferably 5 degrees. The angle formed by one coordinate axis of the coordinate system of the current map and the coordinate axis of the same type of coordinate system of the reference history map can be a deflection angle in a clockwise direction or a deflection angle in a counterclockwise direction.
If the absolute value of the deflection angle between the coordinate system of the current map and the coordinate system of the reference historical map is larger than or equal to a preset angle threshold, the similarity of the current map and the reference historical map in the coordinate axis direction is lower, and the degree of matching cannot be achieved, the current map is controlled to rotate according to a preset clockwise direction, wherein the rotation of the current map according to the preset clockwise direction is that each grid in the current map can rotate clockwise or anticlockwise around an origin of the coordinate system, and the relevant coordinate position in the current map is driven to rotate according to the preset clockwise direction so as to correct the angle deflection error in the map. And each time the robot controls the current map to rotate by the preset judging angle according to the preset clockwise direction, judging whether the absolute value of the deflection angle between the coordinate system of the rotated current map and the coordinate system of the reference historical map is smaller than the preset angle threshold value, if so, storing the rotated current map into the historical map library and controlling the current map to stop rotating, otherwise, controlling the rotated current map to continuously rotate by the preset judging angle according to the preset clockwise direction so as to continuously correct the angle deflection error in the map.
On the basis of the embodiment, in the process that the current map rotates by a first preset number of times according to the preset clockwise direction by a preset judging angle, if the absolute value of the deflection angle between the coordinate system of the current map after rotation and the coordinate system of the reference historical map is judged to be greater than or equal to the preset angle threshold value each time, the current map after the last rotation is not updated, map storage into the historical map stock is stopped, and the current map after the last rotation is controlled to stop rotating. If the absolute value of the deflection angle between the coordinate system of the current map after rotation and the coordinate system of the reference historical map is judged to be smaller than the preset angle threshold value at one time, the current map after rotation is updated at the moment only because part of furniture is moved in the current environment, the updated map is stored in the historical map storage map, and the current map is controlled to stop rotating. In this embodiment, each time the current map rotates by a preset judgment angle according to a preset clockwise direction, an operation of judging a deflection angle between a coordinate system of the rotated current map and a coordinate system of a reference historical map, a serial operation of updating the rotated current map and saving the updated map form a rotation period or a task executed by the robot under the update period, and a maximum of a first preset number of rotation periods or a maximum of a first preset number of update periods may be executed within an angle range of 360 degrees.
Preferably, the robot sets the preset judging angle to 90 degrees and sets the first preset number to a value of 3, so that the robot controls the current map to rotate at most 3 times in a preset clockwise direction within an angle range of 360 degrees, so as to avoid changing the current map after the last rotation into an original current map; the current map after the current rotation rotates more than the current map after the previous rotation by a preset judgment angle in the preset clockwise direction; the angle by which the current map rotated at the previous time rotates in the preset clockwise direction with respect to the original map is larger than the angle by which the current map rotated at the previous time rotates in the preset clockwise direction with respect to the original map by 90 degrees. In the process that the current map rotates for 3 times according to the preset judging angle in the preset clockwise direction, the robot can judge that the absolute value of the deflection angle between the coordinate system of the rotated current map and the coordinate system of the reference historical map is larger than or equal to the preset angle threshold value, and the corresponding map matching requirement (the requirement of similarity matching between the rotated current map and the map stored in the historical map library in the coordinate axis direction last time) cannot be met, the current map and the original current map after each rotation are not stored in the historical map library, and the current map is controlled to stop rotating.
The current map rotates by a preset judging angle according to a preset clockwise direction, wherein the current map rotates by 90 degrees around the origin of the coordinate system of the current map according to the preset clockwise direction, so that the same coordinate position in the current map is converted into map areas corresponding to different quadrants of the coordinate system of the current map after the current map rotates each time; if an original current map rotates for 3 times by 90 degrees according to the preset clockwise direction, rotating for 90 degrees for the first time according to the preset clockwise direction, and rotating for 90 degrees in the preset clockwise direction relative to the original current map after rotating for the first time; after the current map after the first rotation continues to rotate for 90 degrees once according to the preset clockwise direction, recording that an original current map rotates for 90 degrees for the second time according to the preset clockwise direction, and rotating the current map after the second rotation for 180 degrees relative to the original current map in the preset clockwise direction; and after the current map after the third rotation continues to rotate for 90 degrees once according to the preset clockwise direction, recording that one frame of original current map rotates for 90 degrees for the third time according to the preset clockwise direction, and rotating the current map after the third rotation for 270 degrees relative to the original current map in the preset clockwise direction. Therefore, the current map is rotated by the preset judgment angle according to the preset clockwise direction, and the current map is rotated by 90 degrees around the origin of the coordinate system according to the preset clockwise direction, so that after the same coordinate position in the current map rotates each time, the current map is converted into map areas corresponding to different quadrants of the coordinate system of the original current map, namely, the current map is sequentially converted into different quadrant areas of the coordinate system of the same current map.
It should be noted that, the deflection angle between the coordinate system of the current map before rotation and the coordinate system of the reference history map is the angle formed by one coordinate axis of the coordinate system of the current map before rotation and the coordinate axis of the same type of coordinate axis of the coordinate system of the reference history map; the deflection angle between the coordinate system of the rotated current map and the coordinate system of the reference historical map is the angle formed by one coordinate axis of the coordinate system of the rotated current map and the coordinate axis of the same type of coordinate system of the reference historical map; the predetermined angle threshold is less than 90 degrees, preferably 5 degrees.
Preferably, under the condition that a second preset number of frame maps are stored in the historical map library, if the absolute value of the deflection angle between the coordinate system of the current map and the coordinate system of the reference historical map is smaller than a preset angle threshold, removing a frame map with the earliest storage time in the historical map library to vacate a storage space, updating the rotated current map to obtain a first current map, and storing the first current map in the historical map library; the second preset number is preferably 10, and the historical map library is a linear storage space opened up inside the robot.
It can be understood that once the usage frequency in the historical map gallery is low and the time of storing is early, it can be determined as an invalid map, and it can be preferentially deleted from the historical map gallery, where in this embodiment, whether to update the current map is determined according to the angular relationship between the current map and the map stored in the historical map gallery last time, and in particular, the current map is updated by using the historical map gallery last time (the storing time is the latest), and then the map stored in the historical map gallery last time is higher than the usage frequency of a map stored in the historical map gallery last time.
As an embodiment, the updating method further includes: under the condition that the robot cannot call the historical map to locate the environment, if the historical map is not stored in the historical map library, the step 1 can be selectively executed to start to build a map in a new environment, the built map is configured as a first current map until the first current map meets the condition of storing one historical map library (the condition of storing the first frame map in the historical map library without storing the map is corresponding to), and then the first current map is added to the historical map library to become the first frame map stored in the historical map library, so that the locating requirement of the robot in the environment is met, and in particular, the locating requirement of the current position of the robot is met.
In this embodiment, the robot configures the maps stored in the history map library as history maps, and different environments correspond to different history maps, and the map stored in the history map library last time belongs to the history map.
Under the condition that the robot cannot call the historical map to locate the environment or the current position, if the historical map is stored in the historical map library, the step 1 is executed to obtain the current map, which can be obtained continuously in the walking process of the robot and is walked in a new environment; judging whether the difference between the current map and the map stored in the historical map library last time is larger than a preset map threshold value, if yes, determining that the map matched with the current map is not stored in the historical map library, determining that the robot enters a new environment, continuing to execute the step 1 to enlarge the map coverage area or reestablish a new map, configuring the established new map or the enlarged map as a first current map until the first current map meets the condition of being stored in one historical map library (comprising the angle relation between the current map disclosed in the previous embodiment and the map stored in the historical map library last time), and storing the updated first current map (updating the occupancy probability of the corresponding grid of the current map according to the probability value weighting mode disclosed in the previous embodiment) in the historical map library; otherwise, determining that the current environment where the robot is located has small change, and updating the occupancy probability of the corresponding grid of the current map according to the probability value weighting mode disclosed in the previous embodiment, and storing the first current map into the historical map library.
It can be appreciated that the robot needs to have a map, both for navigational positioning and path planning; the sensor can be used as an input data source for realizing a mapping and positioning algorithm by installing a laser radar, a depth camera, an infrared ranging sensor, an ultrasonic sensor, a gyroscope, an odometer and the like on a robot body or a plurality of sensors. The map is recorded with the position information of the obstacle in the environment, the area where the robot can move to the obstacle-free area and the unexplored area of the unknown robot. It should be noted that, the current map and the map stored in advance in the historical map library may be partially incomplete maps or complete maps, and have a certain coordinate system, and enough obstacle features are needed on the map, so that the map in the later use process can still be consistent with the coordinate system of the original map after updating.
The robot may store a plurality of history maps, such as map 1, map 2, and map 3, in the history map library, and when the robot is replaced to a new environment, the current map and the history map are matched to determine which history environment the robot is in or in. Wherein, all the historical maps stored in the same historical map library represent the same environmental condition.
In some embodiments, similar to the repositioning method, it is determined which environment the robot is in after multiple confirmations, corresponding historical work and interaction data are called out, in the multiple confirmations process, a current map is established and relevant data are recorded, when it is determined which historical map in the historical map library the current environment belongs to, the area-size relationship between the current map and the historical map is judged again, so as to determine whether the environment where the robot is located is a new environment. Specifically, the method for judging whether the difference between the current map and the map stored in the historical map library last time is larger than a preset map threshold value comprises the following steps: judging whether the difference value between the area of the current map and the area of the reference historical map is larger than a preset area threshold value, if so, determining that the robot leaves the current environment and enters a new environment, specifically that the environment where the robot is located is changed greatly, if the environment is replaced or the environment where the robot is located is arranged to move greatly, and continuing to execute the step 1 to establish a map in the new environment; otherwise, determining that the current environment where the robot is located changes in a small extent, and then the robot does not store the current map or the updated current map into a historical map library; wherein the area of the current map is larger than the area of the reference history map so that the current map covers the coordinate position which is not marked in the history map; the ratio of the preset area threshold to the area of the reference history map is a preset matching ratio, which is preferably 0.5.
Based on the foregoing embodiment, each time the robot starts walking, it first reads whether there is a history map library in the special storage space, and if not, it establishes. Specifically, according to the environment where the robot is located and the use situation of the history map, a history map library of three floors is set, one history map library corresponds to one floor, one history map library stores multi-frame maps, and attribute information of each frame of map stored in each history map library comprises one or more of interface map type information (data for monitoring and interaction of a visual interface of the mobile terminal), grid map type information (update of occupancy probability at a grid and calculation of grid position coordinates), road sign type information (obstacle distribution setting (such as furniture, wall surfaces and isolated and careful objects on the ground) for the actual environment), and division information of a room area, which are not particularly limited herein. The robot or the external mobile terminal can modify, search and/or delete the historical map in the historical map library and/or store a new map into the historical map library through the unified read-write-delete interface module. It should be added that each historical map library is configured with a floor number, each frame of map stored in the historical map library is configured with a map number, and when the robot imports a map corresponding to the map number, attribute information of the map corresponding to the map number can be imported to assist in controlling the working mode of the robot. Specifically, when the robot determines that the difference between the area of the current map and the area of the reference historical map is greater than the preset area threshold, it is determined that the robot leaves the current floor and enters a new floor, the map needs to be built in the new floor by executing the step 1, the floor number can be selected through a unified interface module, and then the newly built map or the map with updated occupancy probability is stored in the corresponding historical map library.
As an embodiment, when the robot detects that no map exists in the historical map library, the robot selects a current map in which the included angle meeting the preset angle condition is located according to the included angle formed by the outline of an obstacle in the current map and the walking track of the robot when the robot walks in the current environment or after the robot completes one-time traversal of the current environment, and stores the current map in the historical map library to form a frame of map with earliest storage time in the historical map library, namely, a first frame of map stored in the historical map library; the walking track of the robot can be a planning path, and comprises an arcuate track, a zigzag track and a crossed advancing track; in some embodiments, the path of the robot is a path formed by the robot walking along the positive direction of the Y axis of the coordinate system of the currently established map, and the path is a path formed by the robot walking in a period of time when the robot starts to build the map, so that the robot can perform the bow-shaped walking according to the direction of the positive direction of the X axis or the positive direction of the Y axis of the new coordinate system; in some embodiments, the path of travel of the robot may be a path taken along the contour of the obstacle. In this embodiment, the angle between the outline of the obstacle and the travel track of the robot is sufficiently small to form an angle satisfying the preset angle condition. After the current map in which the included angle meeting the preset angle condition is selected to be stored in the historical map library, the robot executes the step 1 to continuously establish the current map in the current environment, and the current map can be compared with the angle relation of the coordinate axis with the first frame map stored in the historical map library or the area size relation with the first frame map stored in the historical map library in the step 2.
As an embodiment, the specific method for selecting the current map in which the included angle meeting the preset angle condition is located and storing the current map in the historical map library according to the included angle formed by the outline of the obstacle in the current map and the walking track of the robot includes:
a1, after the robot walks the current environment for the first time and synchronously establishes a current map, the robot searches an obstacle outline and a walking track of the robot from the current map, calculates an angle of an included angle formed by the obstacle outline and the walking track, marks the angle as a preset offset angle, wherein the method for searching the obstacle outline and the walking track of the robot from the map image can be Hough transformation (straight line finding) or generalized Hough transformation (arc finding), calculates the angle of the included angle formed by the obstacle outline and the track line, and marks the angle as the preset offset angle; then the robot judges the magnitude relation between the preset offset angles and the preset error angle threshold values, namely judging the magnitude relation between all the preset offset angles and the preset error angle threshold values; the robot then performs step A2.
It should be noted that the robot need not be entirely walked along the obstacle contour or contours within the current environment. The outline formed by connecting corresponding grids or pixel points in a map (historical map) stored in advance by the robot furthest approximates the outline of an obstacle or a wall surface.
A2, when the robot judges that the preset offset angle is smaller than the preset error angle threshold, storing the current map into a historical map library, and configuring the current map into a first frame map stored into the historical map library, wherein the first frame map corresponds to the initial historical map so as to facilitate map matching with the current map which is established subsequently, wherein the comparison of angles of included angles between coordinate axis directions and the comparison of map area sizes are included; the robot then performs step A3.
Step A3, when the robot judges that the preset offset angle is greater than or equal to the preset error angle threshold, saving the current map established in the step A1 which is executed at the latest as a temporary map, then buffering the temporary map and the preset offset angle mentioned in the step A3 in a memory space different from the historical map library, adding one to the execution times of the step A1 if the initial value of the execution times of the step A1 is equal to a value 0, representing adding one to the number of times of traversal of the robot in the current environment, then executing the step A1, repeating the steps until the execution times of the step A1 reach the preset traversal times, and then executing the step A4; preferably, the preset number of passes is equal to the value 3.
Step A4, selecting a current map corresponding to the preset offset angle with the smallest angle from all preset offset angles obtained in the step A3 by the robot, storing the current map into a historical map library, configuring the current map into a first frame map stored into the historical map library, and determining that the current map is the current map with an included angle meeting the preset angle condition; when the preset traversal times are equal to the value 3, the robot obtains three frames of temporary maps and a preset offset angle corresponding to each frame of temporary map. It should be noted that each frame of map stored in the history map library represents the same environment.
In the foregoing step, the robot sets the first frame map stored in the history map library as an initial history map; and then, when the robot detects that the initial historical map exists in the historical map library, starting to execute the step 1 or the step 2, so that the iterative execution of the step 1 and the step 2 is driven by taking the initial historical map as an initial quantity, the current map is continuously updated, the map information which is more in line with the actual environment of the robot is obtained, the path planning and the navigation positioning are facilitated, and the working efficiency of the robot is improved.
It can be appreciated that before pose information and walking time of the current position of the robot are acquired, a grid map of the environment or the current environment in which the robot is located needs to be acquired. A grid map of the current environment may be read from the historical gallery. And if the robot is cleaned for the first time in the current environment, or the robot is reset or cleaned for the first time after the reset processing, the corresponding robot can generate a grid map of the current environment through the sensor data of the robot and store the grid map into a historical map library of the robot as a historical map of the next cleaning or as an updating basis of the current map constructed in the next cleaning process. The history map in this embodiment may be a two-dimensional grid map, that is, includes orientation information (which may be used to represent the walking track trend of the robot) and two-dimensional position information of the coordinate axes, so as to reduce the size of the map file in the history map gallery and save the storage space.
In summary, the foregoing embodiment supports performing angle comparison matching of contour lines on a map generated corresponding to the same environment area after running for multiple times, so as to obtain a first frame map stored in a historical map library with smaller offset error; on the basis, the map to be saved (namely the current map) in the same frame is supported to rotate for a plurality of times along the same direction, and the map to be saved (namely the map updated last time) is subjected to angle comparison matching of a coordinate system after each rotation so as to screen out the current map which can be saved; and the map which can be stored in the historical map library is obtained by combining the historical map (i.e. the map updated last time) to finish periodical angle matching judgment on the current map, so that the updated map is saved, and the effectiveness of the map pre-established by the robot can be exerted.
It should be added that the robot acquires a straight line from the map and calculates the angle between the straight line and the direction of movement of the robot (which may be represented by the direction of the coordinate axis). The robot detects a straight line in the map through a Hough transform algorithm. Each pixel coordinate point is transformed into a unified measure of the unique contribution of the line, for example: a straight line is a set of a series of discrete points in an image, and the discrete point geometric equation of the straight line can be expressed by a discrete polar coordinate formula of the straight line as follows: x+ y sin (theta) =r, where the angle theta refers to the angle between r and the X axis, and r is the origin to straight line geometric perpendicular distance. Any point on the line, x, y can be expressed, where r, theta is a constant. In the field of map image processing, the pixel coordinates P (x, y) of an image are known, r and theta are variables to be found, two parameters of Hough transformation forming a straight line are formed, each time a robot finds the two parameters corresponding to a straight line in a current map, the robot determines to find the straight line, obtains an included angle between the robot and a coordinate axis, calculates the geometric vertical distance from the straight line to the origin of the coordinate system of the current map, and further obtains the included angle formed by the obstacle contour line and the walking track through the angle difference when the obstacle contour line to be found and the walking track are straight lines.
Preferably, in order to reduce the amount of searching and the amount of calculation, the robot searches for an obstacle contour line from the current map and the walking track of the robot is the obstacle contour line and the track along which the robot walks, respectively; the robot sets the included angle formed by the barrier contour line and the walking track in the step A1 as the included angle formed by the barrier contour line and the track line along which the robot walks; when the r value (the geometric vertical distance from the origin to the straight line) is converted by hough respectively from the obstacle contour line and the track where the robot walks along the obstacle contour line, the absolute value of the difference between the r value corresponding to the obstacle contour line and the r value corresponding to the track where the robot walks along the obstacle contour line is smaller than a preset distance threshold, the preset distance threshold is smaller than the radius of the robot body, and the r value corresponding to the obstacle contour line and the r value corresponding to the track where the robot walks along the obstacle contour line are acquired at the same time. The initial direction of the walking track of the robot is parallel to one coordinate axis of the coordinate system of the current map, for example, the initial direction of the walking track of the robot points to the positive direction of the Y axis; the obstacle along which the robot is arranged is generally furniture with a relatively flat wall surface or profile surface, so that the change of the preset offset angle can be continuously monitored by means of the coordinate axis direction, and the relatively accurate preset offset angle can be obtained.
If each (r, theta) value is plotted against the pixel point coordinate P (x, y) value, then a transition from the image Cartesian coordinate system to a polar Hough space system is made, this point-to-curve transformation being referred to as a straight line Hough transformation. The transform is equally divided or accumulated into a grid by quantizing the hough parameter space to a finite number of value intervals. When the Hough transform algorithm starts, each pixel coordinate point P (x, y) is converted to the upper surface of a curve point (r, theta), and the converted pixel coordinate points P (x, y) are accumulated to corresponding grid data points, and when a peak appears, the existence of a straight line is indicated. The angle of the straight line can be obtained by converting the pixel coordinates of the straight line into the coordinates of the robot, and the angle of the straight line is an included angle between the straight line and the axis or the walking direction of the robot wheel. It should be noted that, the core idea of the hough transform is to map a point set (two-dimensional) belonging to a certain pattern in the map onto a point (which may be a high-dimensional) that records the number of points in the point set, where the point is a parameter of the pattern that is intended to be searched, and the range of the parameter is called a parameter space, i.e. the reference coordinate mapping space. The hough transform can not only identify the presence or absence of a graphic to be detected in the map constructed by the scan, but also locate the graphic (including position, angle, etc.). When this feature that is attempted to be extracted is located within the set of points and can be described mathematically, a look-up can be made by a hough transform. The hough transform is a method for detecting straight lines and various geometric figures in a binary image, and since many linear features exist on walls inside a building, the present embodiment focuses on the detection of straight lines in a grid map, so that each straight line of the contour of the wall and furniture represented by the map can be associated with a pair of parameters (r, theta), and the two-dimensional plane where the parameters (r, theta) are located is defined as a hough space for the set of two-dimensional straight lines.
The value is noted that according to the diversity of the shape and the distribution position of the obstacle of the environment where the robot is, one-point generalized popularization is carried out, namely generalized Hough transformation. The generalized Hough transform can process any shape of graph, instead of finding an equation representing any graph, a graph is described by using a table form, and the coordinates of edge points of the graph are stored in a table, so that the graph is determined, and therefore, the graph can be processed by using the same method whether the graph is a straight line (actually a line segment), a circle, an ellipse or a geometric graph of other shapes, except that the graph is custom at the moment, the graph is real, the mode represented by an algebraic equation is continuous and abstract, the equation of the circle is only one, but the custom circle is endless, and only if you think that the custom circle is enough.
The application of generalized Hough transformation provides a basis for extended edge exploration, the prior art can only simply carry out repeated traversal on unknown points, a large number of repeated routes exist at the moment, and the efficiency is low. Meanwhile, the generalized Hough transformation is not limited to a straight line structure, and the detection process of the device can be completely changed according to actual conditions (such as curves with specific radians or geometric structure information such as ellipses) for different environments so as to achieve the purpose of adaptation. Since many linear features are considered to exist on the walls inside the building, the present embodiment focuses on the detection of straight lines in the grid map.
In the description of the present invention, a description of the terms "one embodiment," "preferred," "example," "specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention, and a schematic representation of the terms described above in the present specification does not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The connection modes in the description of the specification have obvious effects and practical effectiveness. From the above description of the structure and principles, it should be understood by those skilled in the art that the present invention is not limited to the above-described embodiments, but rather that modifications and substitutions using known techniques in the art on the basis of the present invention fall within the scope of the present invention, which is defined by the appended claims.

Claims (11)

1. A method for updating a robot map, the method comprising:
step 1, a robot establishes a current map in a current environment;
Step 2, updating the current map according to the angle relation between the current map and the map stored in the historical map library last time, storing the updated current map in the historical map library, and updating the updated current map into the map stored in the historical map library last time so as to maintain updating of the current map established in the step 1;
wherein each frame of map stored in the same historical map library represents the current environment.
2. The updating method according to claim 1, wherein in the step 2, the way of updating the current map includes: the robot updates the occupancy probability of the corresponding grid of the current map in a probability value weighting mode to obtain an updated current map;
after the robot stores the updated current map into the historical map library, updating the updated current map into the map stored into the historical map library last time, and then executing the step 1;
the occupancy probability of the corresponding grid of each frame of map stored in the historical map library is updated in a probability value weighted manner through the step 2 except the first frame of map stored in the historical map library.
3. The updating method according to claim 2, wherein each time before the robot stores the updated current map in the historical map library in the step 2, the robot performs weighted average processing on the occupancy probabilities of grids with the same position relationship in each frame of map stored in the current map and the historical map library, obtains a positioning evaluation value, updates the positioning evaluation value to the occupancy probability of the grid corresponding to the current map, and determines that the robot updates the occupancy probability of the grid corresponding to the current map in a probability value weighted manner; when the occupation probability of each grid in the current map is updated, acquiring the updated current map; before the updated current map is stored in the historical map library, if the fact that the historical map library is full of the stored historical map is detected, the robot removes a frame of map with the earliest storing time in the historical map library to vacate a storing space, and then the updated current map is stored in the historical map library.
4. The updating method according to claim 3, wherein the grids having the same positional relationship in each frame of the map have equal coordinate values in the same coordinate axis direction with respect to the origin of the coordinate system of the map to which the grids belong; in each frame of map, each grid has a corresponding coordinate position; the environmental information of the markers at the grids having the same positional relationship includes grid positions occupied by the obstacle, grid positions not occupied by the obstacle, or unknown grid positions;
When the environmental information marked at the same grid is different, the occupancy probabilities applied at the grid are different;
establishing a new current map and updating the occupancy probability of each grid in the new current map when the robot traverses the current environment once;
when the positioning evaluation value is larger than a preset evaluation threshold value, the robot marks the corresponding grid position in the current map as the grid position occupied by the obstacle so as to update the current map.
5. The updating method according to claim 3, wherein the map stored in the history map library includes an initial history map, a reference history map, and remaining maps;
the robot configures a first frame map stored in a historical map library as an initial historical map; the robot configures the map stored in the history map library last time as a reference history map;
the weight of the robot to the reference historical map configuration and the weight of the robot to the initial historical map configuration are larger than the weight of the robot to the corresponding configuration of any other frame map stored in the historical map library, and the weight of the robot to the reference historical map configuration and the weight of the robot to the initial historical map configuration are also larger than the weight of the current map configuration.
6. The updating method according to claim 1 or 2, wherein the method for updating the current map and storing the updated current map in the history map library according to the angular relationship between the current map and the map stored in the history map library last time comprises:
the robot configures the map stored in the historical map library last time as a reference historical map;
if the absolute value of the deflection angle between the coordinate system of the current map and the coordinate system of the reference historical map is smaller than a preset angle threshold value, updating the current map, and storing the updated current map into a historical map library;
if the absolute value of the deflection angle between the coordinate system of the current map and the coordinate system of the reference historical map is larger than or equal to a preset angle threshold value, controlling the current map to rotate according to a preset clockwise direction; every time the current map is controlled to rotate by a preset judging angle according to a preset clockwise direction, judging whether the absolute value of the deflection angle between the coordinate system of the rotated current map and the coordinate system of the reference historical map is smaller than a preset angle threshold value, if so, updating the rotated current map into the current map, controlling the current map to stop rotating, updating the current map, and storing the updated current map into the historical map library; otherwise, the rotated current map is controlled to be updated into the current map, and then the current map is controlled to continuously rotate by a preset judging angle according to a preset clockwise direction;
And in the process that the current map rotates a first preset number of times according to the preset clockwise direction, if the absolute value of the deflection angle between the coordinate system of the current map after rotation and the coordinate system of the reference historical map is judged to be greater than or equal to a preset angle threshold value each time, the current map after the last rotation is not updated, the storing of the map into the historical map stock is stopped, and the current map after the last rotation is controlled to stop rotating.
7. The updating method according to claim 6, wherein the robot configures the preset determination angle to 90 degrees and configures the first preset number to a value of 3, and the robot controls the current map to rotate at most 3 times in a preset clockwise direction within an angle range of 360 degrees, wherein the current map after the current rotation is rotated more than the current map after the previous rotation by the preset determination angle in the preset clockwise direction;
the deflection angle between the coordinate system of the current map and the coordinate system of the reference historical map is the angle formed by one coordinate axis of the coordinate system of the current map and the coordinate axis of the same type of coordinate system of the reference historical map; the preset angle threshold is smaller than 90 degrees;
The current map is rotated by a preset judgment angle according to a preset clockwise direction, and is configured to rotate by 90 degrees around the origin of the coordinate system of the current map according to the preset clockwise direction.
8. The updating method according to claim 7, wherein if the absolute value of the deflection angle between the coordinate system of the rotated current map and the coordinate system of the reference history map is smaller than the preset angle threshold value in the case where the second preset number of frame maps are stored in the history map library, a frame map with the earliest storing time in the history map library is removed to make a storage space free, the rotated current map is updated to obtain the first current map, and the first current map is stored in the history map library.
9. The updating method according to claim 1, wherein when the robot detects that no map exists in the historical map library, the current map in which the included angle meeting the preset angle condition is located is selected to be stored in the historical map library according to the included angle formed by the outline of the obstacle in the current map and the walking track of the robot, so as to form a frame of map stored in the historical map library for earliest time; step 1 is then performed.
10. The updating method according to claim 9, wherein the specific method for selecting the current map in which the included angle satisfying the preset angle condition is included according to the included angle formed by the outline of the obstacle in the current map and the walking track of the robot includes:
a1, after the robot walks the current environment for the first time and synchronously establishes a current map, the robot searches an obstacle outline and a walking track of the robot from the current map, calculates an angle of an included angle formed by the obstacle outline and the walking track, and marks the angle as a preset offset angle; then the robot judges the magnitude relation between the preset offset angle and the preset error angle threshold;
a2, when the robot judges that the preset offset angle is smaller than the preset error angle threshold, storing the current map into a historical map library, configuring the current map into a first frame map stored into the historical map library, and determining that the current map is the current map in which the included angle meeting the preset angle condition is located;
step A3, when the robot judges that the preset offset angle is larger than or equal to the preset error angle threshold value, executing the step A1 until the execution times of the step A1 reach the preset traversal times, and then executing the step A4;
And A4, selecting a current map corresponding to the preset offset angle with the smallest angle from all preset offset angles obtained in the step A3 by the robot, storing the current map into a historical map library, configuring the current map into a first frame map stored into the historical map library, and determining that the current map is the current map with the included angle meeting the preset angle condition.
11. The updating method according to claim 10, wherein the robot searches for an obstacle contour line from the current map and a travel track of the robot is a track along which the obstacle contour line and the robot travel, respectively;
wherein the initial direction of the robot's travel track is one coordinate axis parallel to the coordinate system of the current map.
CN202210839101.2A 2022-07-18 2022-07-18 Robot map updating method Pending CN117453837A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210839101.2A CN117453837A (en) 2022-07-18 2022-07-18 Robot map updating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210839101.2A CN117453837A (en) 2022-07-18 2022-07-18 Robot map updating method

Publications (1)

Publication Number Publication Date
CN117453837A true CN117453837A (en) 2024-01-26

Family

ID=89595312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210839101.2A Pending CN117453837A (en) 2022-07-18 2022-07-18 Robot map updating method

Country Status (1)

Country Link
CN (1) CN117453837A (en)

Similar Documents

Publication Publication Date Title
CN111536964B (en) Robot positioning method and device, and storage medium
CN108931983B (en) Map construction method and robot thereof
CN110531759B (en) Robot exploration path generation method and device, computer equipment and storage medium
US6728608B2 (en) System and method for the creation of a terrain density model
CN104898660B (en) A kind of indoor map construction method for improving robot path planning's efficiency
WO2017028653A1 (en) Method and system for automatically establishing map indoors by mobile robot
CN113110457B (en) Autonomous coverage inspection method for intelligent robot in indoor complex dynamic environment
Hähnel et al. Mobile robot mapping in populated environments
CN109443351A (en) A kind of robot three-dimensional laser positioning method under sparse environment
Hu et al. Landmark‐based navigation of industrial mobile robots
CN108290294A (en) Mobile robot and its control method
CN112000754A (en) Map construction method and device, storage medium and computer equipment
CN103268729A (en) Mobile robot cascading type map creating method based on mixed characteristics
CN113467456A (en) Path planning method for specific target search in unknown environment
CN110736456B (en) Two-dimensional laser real-time positioning method based on feature extraction in sparse environment
JPWO2020041817A5 (en)
CN112904358B (en) Laser positioning method based on geometric information
CN114581619A (en) Coal bunker modeling method based on three-dimensional positioning and two-dimensional mapping
CN113475977A (en) Robot path planning method and device and robot
CN114442625B (en) Environment map construction method and device based on multi-strategy combined control agent
CN111142116B (en) Road detection and modeling method based on three-dimensional laser
CN117453837A (en) Robot map updating method
KR101242253B1 (en) Method for building an elevation map with elevation information baded on terrain classification and matching strategy
CN117472037A (en) Robot map management method
CN113503877A (en) Robot partition map establishing method and device and robot

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination