Map updating method, device and computer readable storage medium
Technical field
This disclosure relates to field of computer technology, in particular to a kind of map updating method, device and computer-readable
Storage medium.
Background technique
In recent years, mobile robot technology is quickly grown, and application scenarios are also more and more.Such as pilotless automobile road
Traveling, crusing robot inspection, express delivery robot send express delivery, the artificial family of service-delivery machine or restaurant service etc..Mobile robot
Safe operation become industry technical staff one of focus on research direction.
System map is a kind of important tool that robot perceives ambient enviroment, in the process of running robot
Ambient condition information, such as road, barrier etc. can be known according to system map.Therefore, system instill it is real-time accurately at
In order to which mobile robot is safely operated essential condition.
The method of the map of mobile robot creation at present mainly has: high-precision ground mapping, SLAM (Simultaneous
Localization And Mapping, instant positioning and map structuring).
Summary of the invention
Inventor's discovery: high-precision map is to survey and draw in advance, the mode of offline storage, cannot be according to current environment in real time more
Newly, SLAM technology can create current map in real time, but calculation amount is huge, cannot achieve in most of mobile robot.
And SLAM technology can be recorded in map when mobile barrier such as people, automobile etc. occurs, and may result in ground
The ground obstacles such as upper short step, kerbstone, hole are temporarily blocked, and robot can not record surface state, are hindered when mobile
After hindering object to be left, robot can not identify that surface conditions will lead to operational safety problem in time.In addition, due to the sensing of robot
The problems such as device setting height and measurement range, it is possible that measurement blind area, such as when closer apart from ground low obstructions
When, it can not accurately detect, lead to operational safety problem.
A disclosure technical problem to be solved is: a kind of scheme of simple and convenient real-time creation map is provided, and
And the short fixed obstacle in ground can be accurately identified, improve the safety of robot operation.
According to some embodiments of the present disclosure, a kind of map updating method for providing, comprising: obtain robot real-time measurement
The point cloud data of ambient enviroment;In the case where point cloud data is projected to grating map to be updated, successively by each cloud number
According to height value and grating map to be updated in correspond to the elevation information of grid and be compared;It is lower than in the height value of point cloud data
In the case of the elevation information of corresponding grid, the elevation information of corresponding grid is updated to the height value of point cloud data.
In some embodiments, map updating method further include: be not less than corresponding grid in the height value of point cloud data
In the case of elevation information, keep the elevation information of corresponding grid constant.
In some embodiments, map updating method further include:, will in the case where the elevation information of corresponding grid is empty
The elevation information of corresponding grid is set as the height value of point cloud data.
In some embodiments, before the point cloud data for obtaining robot measurement ambient enviroment further include: according to machine
The speed of people determines the size of grating map to be updated;The resolution of grating map to be updated is determined according to the environment of robot ambulation
Rate.
In some embodiments, determine that the size of grating map to be updated includes: by robot according to the speed of robot
Speed and preset ratio size of the product as grating map to be updated.
In some embodiments, determine that the resolution ratio of grating map to be updated includes: root according to the environment of robot ambulation
Corresponding default resolution ratio is searched according to the environment of robot ambulation, is determined as the resolution ratio of grating map to be updated;Wherein, machine
The environment of people's walking is divided into different types, and respectively corresponds different default resolution ratio, and the environment of robot ambulation is got over
Complexity, barrier is more, then corresponding default resolution ratio is higher.
In some embodiments, before the point cloud data for obtaining robot real-time measurement ambient enviroment further include: determine
At a distance from position where when robot current location is with last update grating map;The case where distance reaches distance threshold
Under, using robot current location as the center of grating map to be updated, and executes and obtain robot real-time measurement ambient enviroment
Point cloud data step.
In some embodiments, map updating method further include: according to the height of grid in preset range around each grid
Information is spent, the noise spot in updated grating map is removed.
In some embodiments, in each surrounding's preset range according to grid grid elevation information, removal update after
Grating map in noise spot include: to determine the height of all grids in preset range around the grid for each grid
Spend the intermediate value of information;The elevation information of the grid is updated to intermediate value, to remove the noise spot in updated grating map.
According to other embodiments of the disclosure, a kind of map rejuvenation device for providing, comprising: point cloud data obtains mould
Block, for obtaining the point cloud data of robot real-time measurement ambient enviroment.Information comparison module, for being projected by point cloud data
In the case where grating map to be updated, successively grid will be corresponded in the height value of each point cloud data and grating map to be updated
Elevation information be compared;Grid information update module is lower than the height of corresponding grid for the height value in point cloud data
Under information state, the elevation information of corresponding grid is updated to the height value of point cloud data.
In some embodiments, corresponding when the height value of point cloud data is not less than the elevation information of corresponding grid
The elevation information of grid remains unchanged.
In some embodiments, grid information update module is also used in the elevation information of corresponding grid be empty situation
Under, set the elevation information of corresponding grid to the height value of point cloud data.
In some embodiments, map rejuvenation device further include: map specification determining module, for the speed according to robot
Degree determines the size of grating map to be updated, and the resolution ratio of grating map to be updated is determined according to the environment of robot ambulation.
In some embodiments, map specification determining module be used for using the product of the speed of robot and preset ratio as
The size of grating map to be updated is determined as alternatively, searching corresponding default resolution ratio according to the environment of robot ambulation to more
The resolution ratio of new grating map;Wherein, the environment of robot ambulation is divided into different types, and respectively corresponds different pre-
If resolution ratio, the environment of robot ambulation is more complicated, and barrier is more, then corresponding default resolution ratio is higher.
In some embodiments, map rejuvenation device further include: map rejuvenation trigger module, for determining that robot is current
At a distance from position where when position is with last update grating map, in the case where distance reaches distance threshold, by machine
Center of the people current location as grating map to be updated, and the course of work of trigger point cloud data acquisition module.
In some embodiments, map rejuvenation device further include: interference cancellation module, for according to pre- around each grid
If the elevation information of grid in range, removes the noise spot in updated grating map.
In some embodiments, interference cancellation module is used to be directed to each grid, determines preset range around the grid
The elevation information of the grid is updated to intermediate value, to remove updated grid by the intermediate value of the elevation information of interior all grids
Noise spot in map.
According to the other embodiment of the disclosure, a kind of map rejuvenation device for providing, comprising: memory;And coupling
To the processor of memory, processor is configured as based on the instruction being stored in memory devices, execute as it is aforementioned any one
The map updating method of embodiment.
According to the still other embodiments of the disclosure, a kind of computer readable storage medium provided is stored thereon with calculating
The step of machine program, which realizes the map updating method of any one aforementioned embodiment when being executed by processor.
Grating map is updated according to the point cloud data of the ambient enviroment of robot real-time measurement in the disclosure, and in a cloud
The height value of data is lower than in the case of the elevation information of corresponding grid, and the elevation information of corresponding grid is updated to point cloud data
Height value, the i.e. elevation information of grating map retain the minimum altitude information measured in each secondary renewal process, are directed to ground in this way
The short fixed obstacle such as step, hole can carry out accurate recording, even if it is temporary by moving obstacle to encounter ground fixed obstacle
When the case where blocking or the case where enter measurement blind area with robot mobile ground barrier, will not cause robot without
Method knows the problem of terrestrial information.The scheme of the disclosure is simple and convenient, and can be improved the safety of robot operation.
By the detailed description referring to the drawings to the exemplary embodiment of the disclosure, the other feature of the disclosure and its
Advantage will become apparent.
Detailed description of the invention
In order to illustrate more clearly of the embodiment of the present disclosure or technical solution in the prior art, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Disclosed some embodiments for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 shows the flow diagram of the map updating method of some embodiments of the present disclosure.
Fig. 2A shows the schematic diagram of the grating map of some embodiments of the present disclosure.
Fig. 2 B shows the schematic diagram of the grating map of other embodiments of the disclosure.
Fig. 3 shows the flow diagram of the map updating method of other embodiments of the disclosure.
Fig. 4 shows the structural schematic diagram of the map rejuvenation device of some embodiments of the present disclosure.
Fig. 5 shows the structural schematic diagram of the map rejuvenation device of other embodiments of the disclosure.
Fig. 6 shows the structural schematic diagram of the map rejuvenation device of the other embodiment of the disclosure.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present disclosure, the technical solution in the embodiment of the present disclosure is carried out clear, complete
Site preparation description, it is clear that described embodiment is only disclosure a part of the embodiment, instead of all the embodiments.Below
Description only actually at least one exemplary embodiment be it is illustrative, never as to the disclosure and its application or making
Any restrictions.Based on the embodiment in the disclosure, those of ordinary skill in the art are not making creative work premise
Under every other embodiment obtained, belong to the disclosure protection range.
The prior art apply when can encounter the case where ground step or hole etc. are temporarily blocked by moving obstacle or with
It the case where mobile short ground obstacle of robot enters measurement blind area, is likely to result in robot and is unable to judge accurately ground
The barrier of short fixation brings hidden danger for the safe operation of robot.This programme is proposed regarding to the issue above.Below with reference to figure
1 describes some embodiments of the map updating method of the disclosure.
Fig. 1 is the flow chart of some embodiments of disclosure map updating method.As shown in Figure 1, the method packet of the embodiment
It includes: step S102~S106.
Step S102 obtains the point cloud data of robot real-time measurement ambient enviroment.
Robot includes the device that pilotless automobile etc. executes work automatically.
Robot can obtain the point cloud data of ambient enviroment by modes such as laser radar, depth cameras, can also incite somebody to action
The point cloud data that various ways obtain is merged to obtain the more accurate and bigger point cloud data of data volume.Point cloud data is three
Dimension data includes three-dimensional coordinate information.
Step S104, in the case where point cloud data is projected to grating map to be updated, successively by each point cloud data
Height value and grating map to be updated in correspond to the elevation information of grid and be compared.
Grating map is made of multiple grids, and different grids corresponds to different coordinates, and corresponding different height letter
Breath, can indicate different elevation informations by different gray values.Point cloud data is projected to pair according to coordinate correspondence relationship
It include that the elevation information of corresponding grid is carried out by assignment according to the height value of point cloud data in the grid answered.
It can carry out dynamic to grating map to update including every time by each point according to the point cloud data of robot real-time measurement
The elevation information that grid is corresponded in the height value of cloud data and grating map to be updated is compared.
Step S106, when the height value of point cloud data is lower than the elevation information of corresponding grid, by corresponding grid
Elevation information is updated to the height value of point cloud data.
When the height value of point cloud data is not less than the elevation information of corresponding grid, the height letter of corresponding grid is kept
It ceases constant.In the case where the elevation information of corresponding grid is empty, point cloud data is set by the elevation information of corresponding grid
Height value.The elevation information of each grid retains the elevation information of historical low namely in grating map.As long as machine in this way
Device people one-shot measurement can be then recorded in grating map to ground low obstructions such as step, kerbstone, holes, regardless of whether
The case where appearance moving obstacle blocks or low obstructions enter measurement blind area, all will not influence robot to these obstacles
The judgement of object.
It as shown in Figure 2 A and 2B, is part grating map, grating map can use different gray values in actual use
Indicate different elevation informations.In order to more clearly express in the present embodiment, indicated in grating map using different oblique lines
Different height information.Assuming that as shown in Figure 2 A, one column grid of left side indicates there is step at this, is indicated with left oblique line, using we
The method of case, as long as robot measures the point cloud data of step at this, then can root during primary update or creation map
The elevation information of one column grid of left side is assigned a value of to the elevation information of step according to point cloud data.No matter whether step is moved by other
Barrier blocks or enters measurement blind area, and since step can not move, then one column grid of left side can be left oblique in being expressed as always
The state of line will not change.It will not be namely shown in grating map there is moving obstacle.
And other prior arts are based on, when moving obstacle such as automobile occurs in the corresponding physical location of one column grid of left side
When step is blocked, then will appear such as the case where Fig. 2 B, i.e. robot using the height of moving obstacle as grid height information,
Cause one column grid height information of left side to increase, is indicated using oblique stroke.The barrier measured every time can be protected in grating map
It stays, actual ground environment cannot be measured, the low obstructions on ground can be ignored when robot detects that barrier is removed, are led
Cause operational safety problem.
According to the method for above-described embodiment, robot can create earth's surface map, i.e., in map only comprising terrestrial information and
The information of fixed low obstructions, and do not include the moving obstacle in actual environment in map.This earth's surface map conduct
It is more accurate that basic map provides instruction information to the operation of robot.After can use above-mentioned implementation method creation earth's surface map
The complex environment for more accurately identifying surrounding is allowed the robot to further combined with the detection technique of moving obstacle, improves fortune
Capable safety.
Grating map is updated according to the point cloud data of the ambient enviroment of robot real-time measurement in the method for above-described embodiment,
And when the height value of point cloud data is lower than the elevation information of corresponding grid, the elevation information of corresponding grid is updated to
The height value of point cloud data, the i.e. elevation information of grating map retain the minimum altitude information measured in each secondary renewal process, this
Sample can carry out accurate recording for short fixed obstacles such as ground step, holes, be moved even if encountering ground fixed obstacle
The case where dynamic barrier temporarily blocks or the case where enter measurement blind area with robot mobile ground barrier, will not make
The problem of can not knowing terrestrial information at robot.The scheme of above-described embodiment is simple and convenient, and can be improved robot fortune
Capable safety.
Robot can carry out dynamic realtime update for grating map in the disclosure, to ensure information accuracy and saving
Calculation amount can also be updated local grid map.Other of disclosure map updating method are described below with reference to Fig. 3
Embodiment.
Fig. 3 is the flow chart of other embodiments of disclosure map updating method.As shown in figure 3, the method for the embodiment
It include: step S302~S326.
When step S302, robot determine current location and the last time update grating map at a distance from position.
Robot can be positioned by GPS system, while can not receive signal or location information in GPS system
When inaccurate, auxiliary positioning is carried out using wheel speed meter and gyroscope.It can determine whether to update according to the mobile distance of robot
Map can also then update a grating map with one frame point cloud data of every acquisition.
Whether step S304 reaches default at a distance from position when judging current location and the last time updating grating map
Distance threshold, then follow the steps S306 if reached.
Step S306, optionally, using robot current location as the center of grating map to be updated.
By rolling grating map, since robot measurement pointcloud data are to be worked as based on robot coordinate system with robot
Center of the preceding position as grating map to be updated, convenient for the projection of point cloud data and grid.
Step S308 determines the size and resolution ratio of grating map to be updated.
It can be updated for local map by the size of determination grating map to be updated.By grating map to be updated
Center setting robot current location can then be delimited artificial with machine further by the size of grating map to be updated
The a certain range of local map in center is as grating map to be updated.
In some embodiments, the size of grating map to be updated can be determined according to the speed of robot.
Further, it is possible to using the product of the speed of robot and preset ratio as the size of grating map to be updated.Example
Such as, robot speed 1m/s, preset ratio 10, then the size of grating map to be updated is the border circular areas that radius is 10m.
The preset ratio can be the range according to robot measurement pointcloud data, the rate for updating grating map etc. and comprehensively consider to obtain
, allow the robot to carry out each of grating map grid information it is perfect, without because of mobile or point cloud number
Occur according to the situation that measurement causes part grating map that can not determine not in time.
In some embodiments, the resolution ratio of grating map to be updated can be determined according to the environment of robot ambulation.
Further, it is possible to search corresponding default resolution ratio according to the environment of robot ambulation, it is determined as grid to be updated
The resolution ratio of map.
The information of the higher display of rate respectively of grating map is more comprehensive, and accuracy is higher.It can be with the environment of robot ambulation
It is divided into different types, such as.Open location, crowded location etc..And respectively correspond different default resolution ratio.Alternatively,
The environment of robot ambulation is divided into different obstacle grades, barrier is more, and road is narrower, and obstacle higher grade, right
The default resolution ratio answered is also higher.The environment of namely robot ambulation is more complicated, and barrier is more, then corresponding default resolution
Rate is higher.Robot can determine the environment of walking according to the obstacle information shown in map when initial creation grating map,
Further determine that corresponding resolution ratio.
Step S308 most can also start to execute, that is, the size and resolution for updating map every time are then determined when creating map
Rate.
Step S310 obtains the point cloud data of robot real-time measurement ambient enviroment.
Following steps are executed since first point cloud data later.
Current point cloud data projection is corresponded to grid into grating map to be updated by step S312.
Step S314 judges in the corresponding grid of current point cloud data with the presence or absence of elevation information.If it is present executing
Otherwise step S316 executes step S315.
Step S315, using the height value of current point cloud data as the elevation information of corresponding grid.
Step S316 judges whether the height value of current point cloud data is lower than the height that grid is corresponded in grating map to be updated
Spend information.If be lower than, S318 is thened follow the steps, otherwise, keeps the elevation information of corresponding grid constant.
The elevation information of corresponding grid is updated to the height value of current point cloud data by step S318.
Step S320 judges whether that there is also the point cloud datas not projected.If it is present step S322 is executed, otherwise,
Execute step S324.
Step S322 chooses a point cloud data not projected and is updated to current point cloud data.Come back to step S312
Start to execute.
Step S324 is filtered updated grating map, removes noise spot.
In some embodiments, it according to the elevation information of grid in preset range around each grid, removes updated
Noise spot in grating map.
Further, it for each grid, determines around the grid in preset range in the elevation information of all grids
Value;The elevation information of the grid is updated to intermediate value, to remove the noise spot in updated grating map.
Since the point cloud data of measurement is there are error, it may result in certain grids in grating map and height occur
Value mutation relative to the apparent increase of other grid heights of surrounding or is reduced, these can be done grating map using the above method
It disturbs and is a little removed, improve the accuracy of grating map.
Step S326 exports updated local grid map.Return step S302 restarts to execute.
The method of above-described embodiment, robot acquire point cloud data in moving process, and the part around real-time update
Grating map can reduce the influence of moving obstacle and measurement blind area to robot identification surface state, meanwhile, dynamic is more
The accuracy of grating map is newly improved, local map update reduces calculation amount and improves update efficiency, further increases
The safety of robot operation.
The disclosure also provides a kind of map rejuvenation device, is described below with reference to Fig. 4.
Fig. 4 is the structure chart of some embodiments of disclosure map rejuvenation device.As shown in figure 4, the device of the embodiment
40 include: that point cloud data obtains module 402, information comparison module 404, grid information update module 406.
Point cloud data obtains module 402, for obtaining the point cloud data of robot real-time measurement ambient enviroment.
Information comparison module 404 successively will be each in the case where point cloud data is projected to grating map to be updated
The elevation information that grid is corresponded in the height value of a point cloud data and grating map to be updated is compared.
Grid information update module 406 is lower than the elevation information situation of corresponding grid for the height value in point cloud data
Under, the elevation information of corresponding grid is updated to the height value of point cloud data.
In some embodiments, corresponding when the height value of point cloud data is not less than the elevation information of corresponding grid
The elevation information of grid remains unchanged.
In some embodiments, grid information update module 406 is also used in the elevation information of corresponding grid be empty feelings
Under condition, it sets the elevation information of corresponding grid to the height value of point cloud data.
In some embodiments, map rejuvenation device 40 can also include: map specification determining module 408, be used for basis
The speed of robot determines the size of grating map to be updated, determines grating map to be updated according to the environment of robot ambulation
Resolution ratio.
In some embodiments, map specification determining module 408 is used for the product of the speed of robot and preset ratio
As the size of grating map to be updated, alternatively, searching corresponding default resolution ratio according to the environment of robot ambulation, it is determined as
The resolution ratio of grating map to be updated.
The environment of robot ambulation is divided into different types, and respectively corresponds different default resolution ratio, robot
The environment of walking is more complicated, and barrier is more, then corresponding default resolution ratio is higher.
In some embodiments, map rejuvenation device 40 can also include: map rejuvenation trigger module 410, for determining
At a distance from position where when robot current location is with last update grating map, the case where distance reaches distance threshold
Under, using robot current location as the center of grating map to be updated, and the course of work of trigger point cloud data acquisition module.
In some embodiments, map rejuvenation device 40 can also include: interference cancellation module 412, for according to each
Around grid in preset range grid elevation information, remove the noise spot in updated grating map.
In some embodiments, interference cancellation module 412 is used to be directed to each grid, determines and presets model around the grid
The elevation information of the grid is updated to intermediate value, to remove updated grid by the intermediate value for enclosing the elevation information of interior all grids
Noise spot in lattice map.
Map rejuvenation device in embodiment of the disclosure can realize respectively by various calculating equipment or computer system, under
Face combines Fig. 5 and Fig. 6 to be described.
Fig. 5 is the structure chart of some embodiments of disclosure map rejuvenation device.As shown in figure 5, the device of the embodiment
50 include: memory 510 and the processor 520 for being coupled to the memory 510, and processor 520 is configured as being based on being stored in
Instruction in memory 510 executes the map updating method in the disclosure in any some embodiments.
Wherein, memory 510 is such as may include system storage, fixed non-volatile memory medium.System storage
Device is for example stored with operating system, application program, Boot loader (Boot Loader), database and other programs etc..
Fig. 6 is the structure chart of other embodiments of disclosure map rejuvenation device.As shown in Fig. 2, the dress of the embodiment
Setting 60 includes: memory 610 and processor 620, similar with memory 510 and processor 520 respectively, can also include defeated
Enter output interface 630, network interface 640, memory interface 650 etc..These interfaces 630,640,650 and memory 610 and place
It can for example be connected by bus 660 between reason device 620.Wherein, input/output interface 630 is display, mouse, keyboard, touching
It touches the input-output equipment such as screen and connecting interface is provided.Network interface 640 provides connecting interface for various networked devices, such as can be with
It is connected to database server or cloud storage server etc..Memory interface 650 is that the external storages such as SD card, USB flash disk mention
For connecting interface.
According to some embodiments of the present disclosure, a kind of computer readable storage medium is provided, is stored thereon with computer journey
The step of sequence, which realizes the map updating method of any one aforementioned embodiment when being executed by processor.
Those skilled in the art should be understood that embodiment of the disclosure can provide as method, system or computer journey
Sequence product.Therefore, complete hardware embodiment, complete software embodiment or combining software and hardware aspects can be used in the disclosure
The form of embodiment.Moreover, it wherein includes the calculating of computer usable program code that the disclosure, which can be used in one or more,
Machine can use the meter implemented in non-transient storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of calculation machine program product.
The disclosure is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present disclosure
Figure and/or block diagram describe.It is interpreted as to be realized by computer program instructions each in flowchart and/or the block diagram
The combination of process and/or box in process and/or box and flowchart and/or the block diagram.It can provide these computer journeys
Sequence instruct to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices processor with
A machine is generated, so that the instruction generation executed by computer or the processor of other programmable data processing devices is used for
Realize the dress for the function of specifying in one or more flows of the flowchart and/or one or more blocks of the block diagram
It sets.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
The foregoing is merely the preferred embodiments of the disclosure, not to limit the disclosure, all spirit in the disclosure and
Within principle, any modification, equivalent replacement, improvement and so on be should be included within the protection scope of the disclosure.