Disclosure of Invention
The inventor finds that: the high-precision map is mapped in advance and stored in an off-line mode, cannot be updated in real time according to the current environment, and the SLAM technology can create the current map in real time, but has huge calculation amount and cannot be realized on most mobile robots. In addition, according to the SLAM technology, when moving obstacles such as people and automobiles appear, the moving obstacles can be recorded in a map, so that ground obstacles such as short steps, curbs and pits on the ground can be temporarily shielded, the robot cannot record the ground condition, and when the moving obstacles move away, the robot cannot timely identify the road condition, so that the running safety problem is caused. In addition, due to the problems of the setting height of the sensor of the robot, the measurement range and the like, a measurement blind area may occur, for example, when the robot is close to a low obstacle on the ground, the robot cannot accurately detect the obstacle, and the operation safety problem is caused.
One technical problem to be solved by the present disclosure is: the scheme for simply, conveniently and real-timely creating the map is provided, short fixed obstacles on the ground can be accurately identified, and the running safety of the robot is improved.
According to some embodiments of the present disclosure, there is provided a map updating method, including: acquiring point cloud data of a robot measuring surrounding environment in real time; under the condition that the point cloud data are projected to the grid map to be updated, sequentially comparing the height value of each point cloud data with the height information of the corresponding grid in the grid map to be updated; and under the condition that the height value of the point cloud data is lower than the height information of the corresponding grid, updating the height information of the corresponding grid into the height value of the point cloud data.
In some embodiments, the map updating method further comprises: and under the condition that the height value of the point cloud data is not lower than the height information of the corresponding grid, keeping the height information of the corresponding grid unchanged.
In some embodiments, the map updating method further comprises: and setting the height information of the corresponding grid as the height value of the point cloud data under the condition that the height information of the corresponding grid is empty.
In some embodiments, before acquiring the point cloud data of the robot measurement surroundings, further comprises: determining the size of a grid map to be updated according to the speed of the robot; and determining the resolution of the grid map to be updated according to the walking environment of the robot.
In some embodiments, determining the size of the grid map to be updated based on the speed of the robot comprises: and taking the product of the speed of the robot and the preset proportion as the size of the grid map to be updated.
In some embodiments, determining the resolution of the grid map to be updated according to the environment in which the robot is walking comprises: searching a corresponding preset resolution according to the walking environment of the robot, and determining the resolution as the resolution of the grid map to be updated; the walking environment of the robot is divided into different types and respectively corresponds to different preset resolutions, and the more complex the walking environment of the robot is, the more obstacles are, the higher the corresponding preset resolution is.
In some embodiments, before acquiring the point cloud data of the surrounding environment measured by the robot in real time, the method further comprises: determining the distance between the current position of the robot and the position where the grid map is updated last time; and under the condition that the distance reaches a distance threshold value, taking the current position of the robot as the center of the grid map to be updated, and executing the step of acquiring point cloud data of the robot for measuring the surrounding environment in real time.
In some embodiments, the map updating method further comprises: and removing the interference points in the updated grid map according to the height information of the grids in the preset range around each grid.
In some embodiments, removing the interference points in the updated grid map according to the height information of the grid within the preset range around the grid includes: determining the median of the height information of all grids in a preset range around each grid; and updating the height information of the grid into a median value so as to remove the interference points in the updated grid map.
According to other embodiments of the present disclosure, there is provided a map updating apparatus including: and the point cloud data acquisition module is used for acquiring point cloud data of the surrounding environment measured by the robot in real time. The information comparison module is used for sequentially comparing the height value of each point cloud data with the height information of the corresponding grid in the grid map to be updated under the condition that the point cloud data are projected to the grid map to be updated; and the grid information updating module is used for updating the height information of the corresponding grid into the height value of the point cloud data under the condition that the height value of the point cloud data is lower than that of the corresponding grid.
In some embodiments, in the case where the height value of the point cloud data is not lower than the height information of the corresponding grid, the height information of the corresponding grid remains unchanged.
In some embodiments, the grid information updating module is further configured to set the height information of the corresponding grid to the height value of the point cloud data if the height information of the corresponding grid is empty.
In some embodiments, the map updating apparatus further comprises: and the map specification determining module is used for determining the size of the grid map to be updated according to the speed of the robot and determining the resolution of the grid map to be updated according to the walking environment of the robot.
In some embodiments, the map specification determining module is configured to use a product of the speed of the robot and a preset ratio as the size of the grid map to be updated, or search a corresponding preset resolution according to the walking environment of the robot, and determine the resolution as the resolution of the grid map to be updated; the walking environment of the robot is divided into different types and respectively corresponds to different preset resolutions, and the more complex the walking environment of the robot is, the more obstacles are, the higher the corresponding preset resolution is.
In some embodiments, the map updating apparatus further comprises: and the map updating triggering module is used for determining the distance between the current position of the robot and the position where the grid map is updated last time, taking the current position of the robot as the center of the grid map to be updated and triggering the working process of the point cloud data acquisition module when the distance reaches a distance threshold value.
In some embodiments, the map updating apparatus further comprises: and the interference elimination module is used for removing the interference points in the updated grid map according to the height information of the grids in the preset range around each grid.
In some embodiments, the interference elimination module is configured to determine, for each grid, a median of the height information of all grids within a preset range around the grid, and update the height information of the grid to the median, so as to remove the interference points in the updated grid map.
According to still other embodiments of the present disclosure, there is provided a map updating apparatus including: a memory; and a processor coupled to the memory, the processor configured to perform a map update method as in any of the preceding embodiments based on instructions stored in the memory device.
According to still further embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the map updating method of any of the preceding embodiments.
According to the method, the grid map is updated according to the point cloud data of the surrounding environment measured by the robot in real time, and under the condition that the height value of the point cloud data is lower than that of the corresponding grid, the height information of the corresponding grid is updated to be the height value of the point cloud data, namely the height information of the grid map keeps the lowest height information measured in each updating process, so that accurate recording can be carried out on low and short fixed obstacles such as ground steps and pits, and even if the situation that the ground fixed obstacles are temporarily shielded by moving obstacles or the situation that the ground obstacles enter a measuring blind area along with the movement of the robot is met, the problem that the robot cannot know the ground information is avoided. The scheme of the robot is simple and convenient, and the running safety of the robot can be improved.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
When the prior art is applied, the situation that a ground step or a pit is temporarily shielded by a moving barrier or the situation that a short ground barrier enters a measuring blind area along with the movement of a robot can be met, so that the robot can not accurately judge the short fixed barrier on the ground, and hidden dangers are brought to the safe operation of the robot. The scheme is proposed to solve the problems. Some embodiments of the map update method of the present disclosure are described below in conjunction with fig. 1.
Fig. 1 is a flow chart of some embodiments of a map updating method of the present disclosure. As shown in fig. 1, the method of this embodiment includes: steps S102 to S106.
And S102, acquiring point cloud data of the robot for measuring the surrounding environment in real time.
The robot includes a device that automatically performs work such as an unmanned automobile.
The robot can acquire the point cloud data of the surrounding environment in the modes of a laser radar, a depth camera and the like, and can also fuse the point cloud data acquired in various modes to obtain more accurate point cloud data with larger data volume. The point cloud data is three-dimensional data and comprises three-dimensional coordinate information.
And step S104, sequentially comparing the height value of each point cloud data with the height information of the corresponding grid in the grid map to be updated under the condition that the point cloud data are projected to the grid map to be updated.
The grid map is composed of a plurality of grids, different grids correspond to different coordinates and different height information, and different height information can be represented through different gray values. Projecting the point cloud data to the corresponding grid according to the coordinate correspondence includes assigning the height information of the corresponding grid according to the height value of the point cloud data.
The dynamic updating of the grid map according to the point cloud data measured by the robot in real time comprises the step of comparing the height value of each point cloud data with the height information of the corresponding grid in the grid map to be updated each time.
And step S106, under the condition that the height value of the point cloud data is lower than the height information of the corresponding grid, updating the height information of the corresponding grid into the height value of the point cloud data.
And under the condition that the height value of the point cloud data is not lower than the height information of the corresponding grid, keeping the height information of the corresponding grid unchanged. And setting the height information of the corresponding grid as the height value of the point cloud data under the condition that the height information of the corresponding grid is empty. That is, the height information of each grid in the grid map retains the height information with the lowest history. Therefore, as long as the robot measures short ground obstacles such as steps, kerbs and pits at a time, the short ground obstacles can be recorded in the grid map, and the judgment of the robot on the short ground obstacles cannot be influenced no matter whether the short ground obstacles are blocked by moving obstacles or whether the short ground obstacles enter a measuring blind area or not.
As shown in fig. 2A and 2B, in the case of a partial grid map, the grid map may use different gray values to represent different height information in actual use. In the present embodiment, for a clearer expression, different height information is represented by different oblique lines in the grid map. Assuming that a row of grids on the left side indicates that a step is formed at the position, and the grids are indicated by left oblique lines, by adopting the method of the scheme, as long as the robot measures point cloud data of the step in the process of updating or creating the map once, the height information of the row of grids on the left side is assigned as the height information of the step according to the point cloud data. No matter whether the step is sheltered by other moving obstacles or enters a measuring blind area, because the step can not move, a row of grids on the left side can be always in a state of being expressed as a left oblique line and can not be changed. That is, even if a moving obstacle occurs, it is not displayed in the grid map.
On the other hand, according to the other prior art, when a moving obstacle, for example, an automobile, blocks a step at an actual position corresponding to a grid in a left row, as shown in fig. 2B, the height of the moving obstacle is taken as grid height information by the robot, so that the grid height information in the left row is increased, and the grid height information is expressed by a double-oblique line. The grid map retains obstacles detected each time, actual ground environment cannot be detected, and short obstacles on the ground can be ignored when a robot detects that the obstacles are removed, so that the operation safety problem is caused.
According to the method of the embodiment, the robot can create a ground map, namely the map only contains information of ground information and fixed short obstacles, and the map does not contain moving obstacles in the actual environment. The ground map is used as a basic map to provide indication information for the operation of the robot. The ground map can be created by the implementation method, and then the detection technology of the moving barrier is further combined, so that the robot can more accurately identify the surrounding complex environment, and the operation safety is improved.
In the method of the embodiment, the grid map is updated according to the point cloud data of the surrounding environment measured by the robot in real time, and the height information of the corresponding grid is updated to the height value of the point cloud data under the condition that the height value of the point cloud data is lower than the height information of the corresponding grid, namely the height information of the grid map keeps the lowest height information measured in each updating process, so that accurate recording can be carried out on low and short fixed obstacles such as ground steps, pits and the like, and the problem that the robot cannot know the ground information can not be caused even when the ground fixed obstacles are temporarily shielded by moving obstacles or enter a measuring blind area along with the movement of the robot. The scheme of the embodiment is simple and convenient, and the running safety of the robot can be improved.
The robot can dynamically update the grid map in real time, and can update the local grid map in order to ensure the accuracy of information and save calculation amount. Further embodiments of the disclosed map update method are described below in conjunction with fig. 3.
FIG. 3 is a flow chart of yet other embodiments of a map updating method of the present disclosure. As shown in fig. 3, the method of this embodiment includes: steps S302 to S326.
In step S302, the robot determines the distance between the current position and the position where the grid map was last updated.
The robot can be positioned through a GPS system, and meanwhile, when the GPS system cannot receive signals or positioning information is inaccurate, a wheel speed meter and a gyroscope are adopted for auxiliary positioning. Whether the map is updated or not can be determined according to the moving distance of the robot, and the grid map can be updated once each frame of point cloud data is acquired.
Step S304, judging whether the distance between the current position and the position where the grid map is updated last time reaches a preset distance threshold value, and if so, executing step S306.
Step S306, optionally, the current position of the robot is used as the center of the grid map to be updated.
By rolling the grid map, the robot measures the point cloud data based on the robot coordinate system, and the current position of the robot is taken as the center of the grid map to be updated, so that the point cloud data and the grid can be conveniently projected.
Step S308, determining the size and the resolution of the grid map to be updated.
The grid map to be updated can be updated for the local map by determining the size of the grid map to be updated. The current position of the robot is set at the center of the grid map to be updated, and further through the size of the grid map to be updated, a local map within a certain range by taking the robot as the center can be defined as the grid map to be updated.
In some embodiments, the size of the grid map to be updated may be determined based on the speed of the robot.
Further, the product of the speed of the robot and the preset proportion can be used as the size of the grid map to be updated. For example, if the robot speed is 1m/s and the preset scale is 10, the size of the grid map to be updated is a circular area with a radius of 10 m. The preset proportion can be obtained by comprehensively considering the range of the point cloud data measured by the robot, the rate of updating the grid map and the like, so that the robot can perfect each grid information in the grid map, and the situation that part of the grid map cannot be determined due to movement or untimely point cloud data measurement is avoided.
In some embodiments, the resolution of the grid map to be updated may be determined according to the environment in which the robot is walking.
Furthermore, the corresponding preset resolution can be searched according to the walking environment of the robot, and the resolution is determined as the resolution of the grid map to be updated.
The higher the resolution of the grid map is, the more comprehensive the displayed information is, and the higher the accuracy is. Environments in which the robot can walk are classified into different types, for example. Open areas, congested areas, etc. And respectively correspond to different preset resolutions. Or, the walking environment of the robot is divided into different obstacle levels, the more obstacles are, the narrower the road is, the higher the obstacle level is, and the higher the corresponding preset resolution is. That is, the more complex the environment where the robot walks, the more obstacles are, the higher the corresponding preset resolution is. The robot can determine the walking environment according to the barrier information displayed in the map when the grid map is initially created, and further determine the corresponding resolution.
Step S308 may also be performed initially, i.e., when creating the map, to determine the size and resolution of each update of the map.
Step S310, point cloud data of the robot for measuring the surrounding environment in real time are obtained.
The following steps are then performed starting with the first point cloud data.
Step S312, projecting the current point cloud data to a corresponding grid in the grid map to be updated.
Step S314, determine whether there is height information in the grid corresponding to the current point cloud data. If so, step S316 is performed, otherwise, step S315 is performed.
And step S315, taking the height value of the current point cloud data as the height information of the corresponding grid.
Step S316 determines whether the height value of the current point cloud data is lower than the height information of the corresponding grid in the grid map to be updated. If so, step S318 is executed, otherwise, the height information of the corresponding grid is kept unchanged.
Step S318, updating the height information of the corresponding grid to the height value of the current point cloud data.
Step S320, determine whether there is any point cloud data that is not projected. If so, step S322 is performed, otherwise, step S324 is performed.
Step S322, selecting an un-projected point cloud data to update to the current point cloud data. The process returns to step S312 to start execution.
Step S324, filtering the updated grid map to remove the interference points.
In some embodiments, the updated grid map is removed from the interfering points according to the height information of the grids within the preset range around each grid.
Further, for each grid, determining a median of the height information of all grids in a preset range around the grid; and updating the height information of the grid into a median value so as to remove the interference points in the updated grid map.
Due to the fact that errors exist in measured point cloud data and the like, the height value of some grids in the grid map is possibly suddenly changed, and the height of the grids is obviously increased or reduced compared with other grids around, the interference points of the grid map can be removed by the method, and the accuracy of the grid map is improved.
In step S326, the updated local grid map is output. The execution is resumed returning to step S302.
According to the method, the robot collects point cloud data in the moving process, and updates the surrounding local grid map in real time, so that the influence of moving obstacles and measuring blind areas on the ground condition recognized by the robot can be reduced, meanwhile, the grid map is dynamically updated, the accuracy of the grid map is improved, the calculated amount is reduced, the updating efficiency is improved due to local map updating, and the running safety of the robot is further improved.
The present disclosure also provides a map updating apparatus, which is described below in conjunction with fig. 4.
Fig. 4 is a block diagram of some embodiments of a map updating apparatus of the present disclosure. As shown in fig. 4, the apparatus 40 of this embodiment includes: a point cloud data acquisition module 402, an information comparison module 404 and a raster information update module 406.
A point cloud data obtaining module 402, configured to obtain point cloud data of a surrounding environment measured by the robot in real time.
And an information comparison module 404, configured to, in a case that the point cloud data is projected onto the grid map to be updated, sequentially compare the height value of each point cloud data with the height information of a corresponding grid in the grid map to be updated.
And a grid information updating module 406, configured to update the height information of the corresponding grid to the height value of the point cloud data when the height value of the point cloud data is lower than the height information of the corresponding grid.
In some embodiments, in the case where the height value of the point cloud data is not lower than the height information of the corresponding grid, the height information of the corresponding grid remains unchanged.
In some embodiments, the grid information updating module 406 is further configured to set the height information of the corresponding grid to the height value of the point cloud data if the height information of the corresponding grid is empty.
In some embodiments, the map updating apparatus 40 may further include: and the map specification determining module 408 is configured to determine the size of the grid map to be updated according to the speed of the robot, and determine the resolution of the grid map to be updated according to the walking environment of the robot.
In some embodiments, the map specification determining module 408 is configured to use a product of the speed of the robot and a preset ratio as the size of the grid map to be updated, or find a corresponding preset resolution according to the environment where the robot travels, and determine the resolution as the resolution of the grid map to be updated.
The walking environment of the robot is divided into different types and respectively corresponds to different preset resolutions, and the more complex the walking environment of the robot is, the more obstacles are, the higher the corresponding preset resolution is.
In some embodiments, the map updating apparatus 40 may further include: and the map updating triggering module 410 is configured to determine a distance between the current position of the robot and a position where the grid map was updated last time, and when the distance reaches a distance threshold, use the current position of the robot as a center of the grid map to be updated and trigger a working process of the point cloud data obtaining module.
In some embodiments, the map updating apparatus 40 may further include: and the interference elimination module 412 is configured to remove the interference points in the updated grid map according to the height information of the grids within the preset range around each grid.
In some embodiments, the interference cancellation module 412 is configured to determine, for each grid, a median of the height information of all grids within a preset range around the grid, and update the height information of the grid to the median, so as to remove the interference points in the updated grid map.
The map updating apparatus in the embodiments of the present disclosure may each be implemented by various computing devices or computer systems, which are described below in conjunction with fig. 5 and 6.
Fig. 5 is a block diagram of some embodiments of a map updating apparatus of the present disclosure. As shown in fig. 5, the apparatus 50 of this embodiment includes: a memory 510 and a processor 520 coupled to the memory 510, the processor 520 configured to perform a map updating method in any of the embodiments of the present disclosure based on instructions stored in the memory 510.
Memory 510 may include, for example, system memory, fixed non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), a database, and other programs.
Fig. 6 is a block diagram of another embodiment of a map updating apparatus according to the present disclosure. As shown in fig. 2, the apparatus 60 of this embodiment includes: the memory 610 and the processor 620 may further include an input/output interface 630, a network interface 640, a storage interface 650, and the like, similar to the memory 510 and the processor 520, respectively. These interfaces 630, 640, 650 and the connections between the memory 610 and the processor 620 may be, for example, via a bus 660. The input/output interface 630 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 640 provides a connection interface for various networking devices, such as a database server or a cloud storage server. The storage interface 650 provides a connection interface for external storage devices such as an SD card and a usb disk.
According to some embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the map updating method of any of the preceding embodiments.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present disclosure and is not intended to limit the present disclosure, so that any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.