Map creation method, device, electronic device and storage medium
Ultrasonic sensor assists in lidar mapping construction, the high cost and incomplete detection caused by robot installation of multiple lidars is solved, and low-cost and efficient environmental detection and navigation are achieved.
Patent Information
- Application Number
- CN202010183055.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-16
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2040-03-16
AI Technical Summary
In the prior art, the installation of multiple lidar equipment by a robot leads to high costs and bloated systems, making it difficult to effectively detect the all-around environment around the robot.
Ultrasonic sensor assisted lidar for construction. By obtaining ultrasonic and lidar data, we can determine whether the grid is occupied and generate an obstacle grid map.
It reduces the requirements for the number of lidars, reduces the cost of map construction, provides a foundation for robot obstacle avoidance and navigation, and improves the comprehensiveness of environmental detection.
Smart Images

Figure CN111272183B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data processing, and in particular to a map creation method, device, electronic device, and storage medium. Background Art
[0002] The era of robots has arrived. If robots want to safely pass through and navigate and avoid obstacles in complex environments, it is necessary to install a large number of sensors on the robots, just as humans need to combine multiple senses such as vision, hearing, touch, and smell to accurately perceive the surrounding environment.
[0003] However, the inventors found that there are at least the following problems in the existing technology: due to the installation position of the laser radar and its own angle limitations, a single laser radar can only detect depth information within a limited direction angle of the robot, mainly within a 180-degree range in the robot's forward direction, but there is a lack of detection equipment on both sides and behind the robot. If laser radar equipment is installed in all four directions, it will lead to increased costs and a bloated system.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention
[0005] The purpose of the embodiments of the present invention is to provide a map creation method, device, electronic device and storage medium, which enable the use of ultrasonic sensors for auxiliary mapping, reduce the requirements for the number of lidars installed in electronic devices, reduce mapping costs, and provide a basis for robots to achieve obstacle avoidance and navigation.
[0006] To solve the above technical problems, an embodiment of the present invention provides a map creation method, comprising the following steps: obtaining ultrasonic data transmitted by at least one ultrasonic sensor of a robot, and lidar data transmitted by at least one lidar of the robot; performing the following operations for each grid of a blank obstacle map: judging whether there is an obstacle at the position indicated by the grid based on the lidar data; if so, determining whether the grid is occupied; if not, determining whether the grid is occupied based on at least the ultrasonic data; and obtaining an obstacle grid map based on the occupancy status of each grid.
[0007] An embodiment of the present invention also provides a map creation device, including: an acquisition module, a determination module and a generation module; the acquisition module is used to: acquire ultrasonic data transmitted by at least one ultrasonic sensor of the robot, and lidar data transmitted by at least one lidar of the robot; the determination module is used to: for each grid of the blank obstacle map, perform the following operations respectively: based on the lidar data, determine whether there is an obstacle at the position indicated by the grid; if it is determined to be so, determine whether the grid is occupied; if it is determined not to be, determine whether the grid is occupied based on at least the ultrasonic data; the generation module is used to: obtain an obstacle grid map based on the occupancy status of each grid of the blank obstacle map.
[0008] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the map creation method mentioned in the above embodiment.
[0009] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the map creation method mentioned in the above embodiment when executed by a processor.
[0010] Compared to existing technologies, the present invention incorporates an ultrasonic sensor in the robot to assist its lidar sensor in mapping. Due to their low cost and compact size, using ultrasonic sensors to assist in mapping can reduce the number of lidar sensors required for electronic equipment, lowering the cost of robot mapping and providing a foundation for obstacle avoidance and navigation.
[0011] In addition, determining whether the grid is occupied is performed at least based on the ultrasonic data, including: determining whether the ultrasonic data indicates that the grid is occupied; if it is determined to be so, determining whether the overlap between the ultrasonic data corresponding to the grid and the lidar data corresponding to the grid is greater than a threshold; if it is determined to be greater than the threshold, determining that the grid is not occupied; if it is determined to be not greater than the threshold, determining that the grid is occupied; if it is determined not to be so, determining that the grid is occupied.
[0012] In addition, before determining whether the ultrasonic data indicates that the grid is occupied, it also includes: determining the effective ultrasonic sensor that detects the effective distance based on the ultrasonic data transmitted by each ultrasonic sensor; generating ultrasonic point cloud data based on the detection angle of the effective ultrasonic sensor and the distance value detected by the effective ultrasonic sensor; determining whether the ultrasonic data indicates that the grid is occupied, including: determining whether the ultrasonic data indicates that the grid is occupied based on the ultrasonic point cloud data.
[0013] In addition, ultrasonic point cloud data is generated based on the detection angle of the effective ultrasonic sensor and the distance value detected by the effective ultrasonic sensor, including: for an effective ultrasonic sensor in which there is an effective ultrasonic sensor among adjacent ultrasonic sensors, first point cloud data is generated based on the detection angle and distance value of the adjacent effective ultrasonic sensor and the detection angle and distance value of the effective ultrasonic sensor; for an effective ultrasonic sensor in which there is no effective ultrasonic sensor among adjacent ultrasonic sensors, second point cloud data is generated based on the detection angle and distance value of the effective ultrasonic sensor; and ultrasonic point cloud data is obtained based on the first point cloud data and the second point cloud data.
[0014] In addition, first point cloud data is generated based on the detection angle and distance value of the adjacent effective ultrasonic sensor, and the detection angle and distance value of the effective ultrasonic sensor, including: determining the first fan-shaped detection area of the effective ultrasonic sensor based on the detection angle and distance value of the effective ultrasonic sensor; determining the second fan-shaped detection area of the adjacent effective ultrasonic sensor based on the detection angle and distance value of the adjacent effective ultrasonic sensor; generating the first point cloud data based on the line connecting the arc center points of the first fan-shaped detection area and the second fan-shaped detection area, and the half-chord length line of the second fan-shaped detection area; or generating the first point cloud data based on the line connecting the arc center points of the first fan-shaped detection area and the second fan-shaped detection area, the half-chord length line of the second fan-shaped detection area and the half-chord length line of the first fan-shaped detection area; generating the second point cloud data based on the detection angle and distance value of the effective ultrasonic sensor, including: determining the third fan-shaped detection area of the effective ultrasonic sensor based on the detection angle and distance value of the effective ultrasonic sensor; generating the second point cloud data based on the chord length line of the third fan-shaped detection area.
[0015] In addition, after the obstacle grid map is drawn according to the occupancy of each grid, the method further includes: performing erosion operations and dilation operations on the obstacle grid map.
[0016] In addition, after drawing the obstacle grid map according to the occupancy of each grid, the method further includes: executing an obstacle avoidance algorithm according to the obstacle grid map to control the movement of the robot.
[0017] In addition, a blank obstacle map is generated based on the obstacle avoidance area and map resolution. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0019] Figure 1is a flowchart of a map creation method according to a first embodiment of the present invention;
[0020] Figure 2 is a schematic diagram of a scanning area of a laser radar sensor according to a first embodiment of the present invention;
[0021] Figure 3 is a schematic diagram of point cloud data of a robot according to a first embodiment of the present invention;
[0022] Figure 4 is a schematic diagram of another point cloud data of the robot according to the first embodiment of the present invention;
[0023] Figure 5 is a schematic diagram of a process for determining the occupancy status of each grid according to a first embodiment of the present invention;
[0024] Figure 6 is a flowchart of a map creation method according to a second embodiment of the present invention;
[0025] Figure 7 is a schematic structural diagram of a map creation device according to a third embodiment of the present invention;
[0026] Figure 8 FIG. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. DETAILED DESCRIPTION
[0027] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, each embodiment of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will appreciate that in each embodiment of the present invention, many technical details are provided to help readers better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can still be implemented.
[0028] The first embodiment of the present invention relates to a map creation method, which is applied to an electronic device, such as a robot itself, or a server connected to the robot. Figure 1 As shown, the map creation method includes:
[0029] Step 101: Acquire ultrasonic data transmitted by at least one ultrasonic sensor of the robot and lidar data transmitted by at least one lidar of the robot.
[0030] Specifically, the laser radar data can be the depth continuous point cloud data scanned by the laser radar. The laser radar can be a single-line radar or a multi-line radar, which generally has a range of 180 degrees and a long detection depth. Its scanning area covers Figure 2The left semicircle dotted area T is shown.
[0031] In one embodiment, a laser radar is mounted in front of the robot. The laser radar data describes a set of depth values scanned in a clockwise direction at preset angles in one or more planes in front of the robot's field of view, with the laser radar as the coordinate origin. This data records detailed depth information about the environment in front of the robot.
[0032] In one embodiment, the ultrasonic data is data generated by discrete obstacle distances detected by an ultrasonic sensor.
[0033] It should be noted that those skilled in the art will understand that in actual applications, the number and installation positions of ultrasonic sensors installed on the robot can be determined as needed. For example, at least one ultrasonic sensor can be installed on each side of the robot. This embodiment does not limit the number and installation positions of ultrasonic sensors.
[0034] Step 102: For each grid of the blank obstacle map, perform the following operations: determine whether there is an obstacle at the position indicated by the grid based on the lidar data; if yes, determine that the grid is occupied; if not, determine whether the grid is occupied based on at least the ultrasonic data.
[0035] Specifically, a blank obstacle map can be generated based on an obstacle area and a map resolution. The obstacle area refers to the area currently scanned by the robot, and the map resolution can be set as needed.
[0036] In one embodiment, the electronic device generates a lidar data layer based on the lidar data and an ultrasonic data layer based on the ultrasonic data. For each grid cell, the electronic device calculates the coordinates of the grid cell in the lidar data layer and the ultrasonic data layer, respectively, to determine the lidar data and ultrasonic data corresponding to each grid cell.
[0037] In one embodiment, the electronic device, in determining whether a grid is occupied based at least on ultrasonic data, includes the following sub-steps:
[0038] Step 1021: Determine whether the ultrasonic data indicates that the grid is occupied.
[0039] Specifically, if it is determined that the ultrasonic data indicates that the grid is occupied, step 1022 is executed; if it is determined that the ultrasonic data indicates that the grid is not occupied, step 1023 is executed.
[0040] In one embodiment, the electronic device performs a characterization simulation based on the ultrasonic data to obtain ultrasonic point cloud data. When determining whether the ultrasonic data indicates that a grid is occupied, the electronic device determines whether the ultrasonic data indicates that the grid is occupied based on the ultrasonic point cloud data. Specifically, based on the ultrasonic data transmitted by each ultrasonic sensor, the electronic device determines an effective ultrasonic sensor that has detected an effective distance; and generates the ultrasonic point cloud data based on the detection angle of the effective ultrasonic sensor and the distance value detected by the effective ultrasonic sensor.
[0041] In one embodiment, the process of an electronic device generating ultrasonic point cloud data based on the detection angle of an effective ultrasonic sensor and the distance value detected by the effective ultrasonic sensor includes: generating first point cloud data for an effective ultrasonic sensor that has an effective ultrasonic sensor among adjacent ultrasonic sensors based on the detection angle and distance value of the adjacent effective ultrasonic sensor and the detection angle and distance value of the effective ultrasonic sensor; generating second point cloud data for an effective ultrasonic sensor that does not have an effective ultrasonic sensor among adjacent ultrasonic sensors based on the detection angle and distance value of the effective ultrasonic sensor; and obtaining ultrasonic point cloud data based on the first point cloud data and the second point cloud data.
[0042] In one embodiment, the electronic device generates first point cloud data based on the detection angle and distance value of the adjacent effective ultrasonic sensor, and the detection angle and distance value of the effective ultrasonic sensor, including: determining the first fan-shaped detection area of the effective ultrasonic sensor according to the detection angle and distance value of the effective ultrasonic sensor; determining the second fan-shaped detection area of the adjacent effective ultrasonic sensor according to the detection angle and distance value of the adjacent effective ultrasonic sensor; generating the first point cloud data according to the line connecting the arc center points of the first fan-shaped detection area and the second fan-shaped detection area, and the half-chord length line of the second fan-shaped detection area; or generating the first point cloud data according to the line connecting the arc center points of the first fan-shaped detection area and the second fan-shaped detection area, the half-chord length line of the second fan-shaped detection area, and the half-chord length line of the first fan-shaped detection area.
[0043] In one embodiment, the electronic device generates second point cloud data based on the detection angle and distance value of the effective ultrasonic sensor, including: determining a third fan-shaped detection area of the effective ultrasonic sensor based on the detection angle and distance value of the effective ultrasonic sensor; and generating the second point cloud data based on the chord length line of the third fan-shaped detection area.
[0044] For example, the robot is a rectangular robot, and one or more ultrasonic sensors are installed on each of the four sides of the robot. The ultrasonic sensors can be evenly installed around the robot. The electronic device determines the effective ultrasonic sensor that detects the effective distance based on the ultrasonic data transmitted by each ultrasonic sensor, and starts from any effective ultrasonic sensor to determine whether the ultrasonic sensor adjacent to the effective ultrasonic sensor is a valid ultrasonic sensor. If none of the adjacent ultrasonic sensors are effective ultrasonic sensors, the fan-shaped detection area is determined based on the distance value detected by the effective ultrasonic sensor and the detection angle of the effective ultrasonic sensor, and the chord length line (line segment a and line segment b) of the fan-shaped detection area is used to simulate and generate point cloud data of the side. The schematic diagram of the point cloud data is shown as follows. Figure 3 If it is determined that one of the ultrasonic sensors adjacent to the effective ultrasonic sensor is an effective ultrasonic sensor or both are effective ultrasonic sensors, such as Figure 4 As shown, the robot's ultrasonic sensors O, P, and Q detect an effective distance, so ultrasonic sensors O, P, and Q are valid ultrasonic sensors. Point A is the arc center point of ultrasonic sensor O's fan-shaped detection area, point B is the arc center point of ultrasonic sensor P's fan-shaped detection area, and point C is the arc center point of ultrasonic sensor Q's fan-shaped detection area. AD is the half-chord length of the effective fan-shaped detection area of ultrasonic sensor O, and CE is the half-chord length of the effective fan-shaped detection area of ultrasonic sensor Q. Therefore, the point cloud data for this side is determined by the line connecting points E, C, B, A, and D in sequence. If ultrasonic sensors O and P are valid ultrasonic sensors, but ultrasonic sensor Q is not, the point cloud data is determined based on the half-chord length DA of ultrasonic sensor O, the line AB connecting A and B, and the half-chord length BF of ultrasonic sensor P (line segments not shown).
[0045] It should be noted that, in this embodiment, for the sake of clarity, the fan-shaped detection area of the effective sensor is determined before the number of effective ultrasonic sensors is determined. In actual applications, the fan-shaped detection area of each effective ultrasonic sensor can also be determined after the number of effective ultrasonic sensors is determined. This embodiment does not limit the time for executing the step of determining the fan-shaped detection area.
[0046] It should be noted that those skilled in the art will appreciate that in actual applications, ultrasonic point cloud data may be generated in other ways, and this embodiment is merely an example.
[0047] It is worth mentioning that converting ultrasonic data into ultrasonic point cloud data that is compatible with lidar data makes it easier for electronic equipment to obtain obstacle grid maps by referring to ultrasonic data and lidar data.
[0048] Step 1022: Determine whether the overlap between the ultrasonic data corresponding to the grid and the lidar data corresponding to the grid is greater than a threshold; if it is determined to be greater than the threshold, determine that the grid is not occupied; if it is determined not to be greater than the threshold, determine that the grid is occupied.
[0049] Specifically, the threshold can be set as needed. When the grid occupancy information obtained based on the lidar data differs from the grid occupancy information obtained based on the ultrasonic data, if the local lidar data near the grid is similar to the local ultrasonic data near the grid, the lidar data is used as the reference, and the ultrasonic data is corrected accordingly. If the difference between the two is large, the ultrasonic data is used as the reference.
[0050] Step 1023: Determine whether the grid is unoccupied.
[0051] Specifically, if both the ultrasonic data and the lidar data indicate that the grid is not occupied, it can be determined that the grid is not occupied.
[0052] In one embodiment, the electronic device generates a laser radar data layer based on the laser radar data and generates an ultrasonic data layer based on the ultrasonic data. After combining steps 1021 to 1023, the flow chart for determining the occupancy of each grid is as follows: Figure 5 As shown, the following steps are included:
[0053] Step 201: Calculate the coordinates of the grid in the lidar data layer and the ultrasonic data layer respectively. By calculating the coordinates of the grid in the lidar data layer and the ultrasonic data layer, the lidar data and ultrasonic data corresponding to each grid are determined.
[0054] Step 202: Based on the laser radar data, determine whether there is an obstacle at the position indicated by the grid.
[0055] Specifically, it is determined whether there is an obstacle at the position indicated by the coordinates of the laser radar data layer corresponding to the grid. If yes, step 203 is executed; otherwise, step 204 is executed.
[0056] Step 203: Determine whether the grid is occupied, and then end the determination process for the grid.
[0057] Step 204: Determine whether there is an obstacle at the location indicated by the grid based on the ultrasonic data.
[0058] Specifically, it is determined whether there is an obstacle at the position indicated by the coordinates of the ultrasonic data layer corresponding to the grid. If yes, step 206 is executed; otherwise, step 205 is executed.
[0059] Step 205: Determine that the grid is not occupied, and then end the determination process for the grid.
[0060] Step 206: Perform local window clipping on the ultrasonic data layer corresponding to the grid and the lidar data layer corresponding to the grid.
[0061] Step 207: Determine whether the degree of overlap between the cutout image obtained based on the ultrasonic data layer and the cutout image obtained based on the lidar data layer is greater than a threshold.
[0062] Specifically, if the overlap degree is greater than the threshold, execute step 205 ; otherwise, execute step 203 .
[0063] Step 208: Determine that the grid is not occupied, and then end the determination process for the grid.
[0064] Step 209: Determine whether the grid is occupied, and then end the determination process for the grid.
[0065] It should be noted that in actual applications, the grid occupancy status can also be determined by other means. For example, when the grid is determined to be occupied based on ultrasonic data, the grid can be determined to be occupied without executing the step of determining the grid occupancy status based on the degree of overlap. The above content is only for illustration.
[0066] Step 103: Obtain an obstacle grid map based on the occupancy status of each grid.
[0067] Specifically, the electronic device can generate an obstacle grid map based on the occupancy of each grid to indicate the obstacle situation around the robot.
[0068] It should be noted that the above is only an example and does not limit the technical solution of the present invention.
[0069] Compared to existing technologies, the map creation method provided in this embodiment uses ultrasonic sensors installed on the robot to assist the robot's lidar sensor in mapping. Due to their low cost and compact size, using ultrasonic sensors to assist in mapping can reduce the number of lidar sensors required for electronic equipment, lowering the cost of robot mapping and providing a foundation for robot obstacle avoidance and navigation.
[0070] The second embodiment of the present invention relates to a map creation method. This embodiment further improves upon the first embodiment by adding other related steps, such as erosion and dilation operations, to the obstacle grid map after obtaining it based on the occupancy of each grid.
[0071] Specifically, if Figure 6As shown, in this embodiment, steps 301 to 304 are included, wherein steps 301 to 303 are substantially the same as steps 101 to 103 in the first embodiment, and are not described in detail here. The following mainly introduces the differences:
[0072] Execute steps 301 to 303.
[0073] Step 304: Perform erosion and dilation operations on the obstacle grid map.
[0074] Specifically, the electronic device performs erosion and dilation operations on the obstacle grid map to filter out small noise on the obstacle grid map.
[0075] It should be noted that those skilled in the art will appreciate that in practical applications, the obstacle degridding map may be optimized through other operations, which are not listed here one by one.
[0076] Step 305: Execute an obstacle avoidance algorithm according to the obstacle grid map to control the movement of the robot.
[0077] Specifically, after obtaining the obstacle grid map, the electronic device can execute an obstacle avoidance algorithm such as DWA (dynamics window approach) to calculate the robot control execution output to control the robot movement.
[0078] It should be noted that those skilled in the art will appreciate that in actual applications, step 304 or step 305 may be selectively performed, and this embodiment does not limit the optimization method and usage scenario of the obstacle grid map.
[0079] It should be noted that the above is only an example and does not limit the technical solution of the present invention.
[0080] Compared to existing technologies, the map creation method provided in this embodiment uses ultrasonic sensors installed on the robot to assist the robot's lidar sensor in mapping. Due to their low cost and compact size, using ultrasonic sensors to assist in mapping can reduce the number of lidar sensors required for electronic equipment, lowering the cost of robot mapping and providing a foundation for robot obstacle avoidance and navigation. Furthermore, through erosion and dilation operations, fine noise on the obstacle grid map is filtered out, improving the quality of the obstacle grid map.
[0081] The steps of the various methods above are divided only for the purpose of clear description. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0082] The third embodiment of the present invention relates to a map Huangjian device, such as Figure 7 As shown, the system includes an acquisition module 401, a determination module 402, and a generation module 403. Acquisition module 401 is used to acquire ultrasonic data transmitted by at least one ultrasonic sensor of the robot and lidar data transmitted by at least one lidar of the robot. Determination module 402 is used to perform the following operations for each grid in the blank obstacle map: determine whether an obstacle exists at the location indicated by the grid based on the lidar data; if so, determine that the grid is occupied; if not, determine whether the grid is occupied based on at least the ultrasonic data. Generation module 403 is used to obtain an obstacle grid map based on the occupancy status of each grid in the blank obstacle map.
[0083] It is not difficult to find that this embodiment is a system embodiment corresponding to the first embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the first embodiment.
[0084] It is worth noting that all modules involved in this embodiment are logical modules. In actual applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, to highlight the innovations of the present invention, this embodiment does not include units that are not closely related to solving the technical problems proposed by the present invention. However, this does not mean that other units do not exist in this embodiment.
[0085] A fourth embodiment of the present invention relates to an electronic device, such as Figure 8 As shown, it includes: at least one processor 501; and a memory 502 communicatively connected to the at least one processor 501; wherein the memory 502 stores instructions that can be executed by the at least one processor 501, and the instructions are executed by the at least one processor 501 to enable the at least one processor 501 to execute the map creation method mentioned in the above embodiment.
[0086] The electronic device includes: one or more processors 501 and a memory 502, Figure 8A processor 501 is taken as an example. The processor 501 and the memory 502 may be connected via a bus or other means. Figure 8 In the example, a bus connection is used. Memory 502, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs, and modules. Processor 501 executes the non-volatile software programs, instructions, and modules stored in memory 502 to perform various functional applications and data processing of the device, thereby implementing the aforementioned map creation method.
[0087] The memory 502 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store a list of options, etc. In addition, the memory 502 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 502 may optionally include a memory remotely located relative to the processor 501, and these remote memories may be connected to an external device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0088] One or more modules are stored in the memory 502 , and when executed by one or more processors 501 , perform the map creation method in any of the above method implementations.
[0089] The above-mentioned product can execute the method provided in the embodiment of this application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of this application.
[0090] A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0091] That is, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.
[0092] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and that in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A map creation method, characterized in that: include: Acquire ultrasonic data transmitted by at least one ultrasonic sensor of the robot and lidar data transmitted by at least one lidar of the robot; Generate an ultrasonic data layer and a lidar data layer based on the ultrasonic data and the lidar data respectively; For each grid in the blank obstacle map, perform the following operations: Calculating the coordinates of each grid in the ultrasonic data layer and the lidar data layer respectively, and determining that each grid corresponds to ultrasonic data and lidar data; Determining, based on the laser radar data, whether there is an obstacle at the position indicated by the grid; If the determination is yes, the grid is determined to be occupied, and then the grid determination process ends; If it is determined that there is no obstacle, determining whether there is an obstacle at the position indicated by the grid based on the ultrasonic data; If it is determined that it is not, then determining that the grid is not occupied; If the determination is yes, perform local window clipping on the ultrasonic data layer corresponding to the grid and the lidar data layer corresponding to the grid, and determine whether the overlap between the clipping obtained based on the ultrasonic data layer and the clipping obtained based on the lidar data layer is greater than a threshold; if it is determined that the overlap is greater than the threshold, determine that the grid is not occupied; if it is determined that the overlap is not greater than the threshold, determine that the grid is occupied; According to the occupancy of each grid, the obstacle grid map is obtained.
2. The map creation method according to claim 1, characterized in that: Before determining whether there is an obstacle at the position indicated by the grid according to the ultrasonic data, the method further includes: determining, based on the ultrasonic data transmitted by each of the ultrasonic sensors, an effective ultrasonic sensor that has detected an effective distance; Generate ultrasonic point cloud data according to the detection angle of the effective ultrasonic sensor and the distance value detected by the effective ultrasonic sensor; The determining whether the ultrasonic data indicates that the grid is occupied includes: According to the ultrasonic point cloud data, it is determined whether the ultrasonic data indicates that the grid is occupied.
3. The map creation method according to claim 2, characterized in that: Generating ultrasonic point cloud data according to the detection angle of the effective ultrasonic sensor and the distance value detected by the effective ultrasonic sensor includes: For an effective ultrasonic sensor among the adjacent ultrasonic sensors, if there is an effective ultrasonic sensor, generating first point cloud data according to the detection angle and distance value of the adjacent effective ultrasonic sensor and the detection angle and distance value of the effective ultrasonic sensor; For an effective ultrasonic sensor for which no effective ultrasonic sensor exists among the adjacent ultrasonic sensors, generating second point cloud data according to a detection angle and a distance value of the effective ultrasonic sensor; The ultrasonic point cloud data is obtained according to the first point cloud data and the second point cloud data.
4. The map creation method according to claim 3, characterized in that: Generating first point cloud data according to the detection angle and distance value of the adjacent effective ultrasonic sensor and the detection angle and distance value of the effective ultrasonic sensor includes: Determining a first sector-shaped detection area of the effective ultrasonic sensor according to the detection angle and distance value of the effective ultrasonic sensor; determining a second sector-shaped detection area of the adjacent effective ultrasonic sensor according to the detection angle and distance value of the adjacent effective ultrasonic sensor; generating the first point cloud data according to a line connecting the arc center points of the first sector-shaped detection area and the second sector-shaped detection area, and a half-chord length line of the second sector-shaped detection area; or, generating the first point cloud data based on a line connecting arc centers of the first sector-shaped detection area and the second sector-shaped detection area, a half-chord length line of the second sector-shaped detection area, and a half-chord length line of the first sector-shaped detection area; The step of generating second point cloud data according to the detection angle and distance value of the effective ultrasonic sensor includes: determining a third sector-shaped detection area of the effective ultrasonic sensor according to the detection angle and distance value of the effective ultrasonic sensor; The second point cloud data is generated according to the chord length of the third fan-shaped detection area.
5. The map creation method according to any one of claims 1 to 4, characterized in that: After drawing the obstacle grid map according to the occupancy of each grid, the method further includes: Performing erosion and dilation operations on the obstacle grid map.
6. The map creation method according to any one of claims 1 to 4, characterized in that: After drawing the obstacle grid map according to the occupancy of each grid, the method further includes: An obstacle avoidance algorithm is executed according to the obstacle grid map to control the movement of the robot.
7. A map creation device, characterized in that: include: Get module, determine module and generate module; The acquisition module is used to: acquire ultrasonic data transmitted by at least one ultrasonic sensor of the robot and laser radar data transmitted by at least one laser radar of the robot; and generate an ultrasonic data layer and a laser radar data layer based on the ultrasonic data and the laser radar data respectively; The determination module is configured to perform the following operations for each grid of the blank obstacle map: respectively calculate the coordinates of each grid in the ultrasonic data layer and the lidar data layer, determine that each grid corresponds to ultrasonic data and lidar data; and determine whether there is an obstacle at the location indicated by the grid based on the lidar data; If the determination is yes, the grid is determined to be occupied, and then the grid determination process ends; If it is determined that there is no obstacle, determining whether there is an obstacle at the position indicated by the grid based on the ultrasonic data; If it is determined that it is not, it is determined that the grid is not occupied; if it is determined that it is, a local window cutout is performed on the ultrasonic data layer corresponding to the grid and the lidar data layer corresponding to the grid, and it is determined whether the overlap between the cutout obtained based on the ultrasonic data layer and the cutout obtained based on the lidar data layer is greater than a threshold; if it is determined that it is greater than the threshold, it is determined that the grid is not occupied; if it is determined that it is not greater than the threshold, it is determined that the grid is occupied; The generating module is used to obtain an obstacle grid map according to the occupancy status of each grid of the blank obstacle map.
8. An electronic device, characterized in that: include: at least one processor; as well as, A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so as to enable the at least one processor to execute the map creation method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the map creation method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Distributed ultrasonic underground space structure deformation monitoring system and area location method
CN102645187A
Lidar systems, and method and medium for detecting object by using the same
CN110286388A
Optical radar-based driving assisting method
CN110515089A
device and method for merging two obstacle maps for environment detection
DE102015213558A1
Method and system for indoor map self-establishment of mobile robot
CN105043396A