Method, apparatus, electronic device, and storage medium for constructing an electronic grid map

By building an electronic grid map, the problem that smart devices find it difficult to obtain map data in unstructured environments is solved, and more efficient path planning is achieved, which is suitable for smart devices in unstructured environments.

CN115540852BActive Publication Date: 2025-07-01CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211216758.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-07-01
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

In an unstructured environment, it is difficult for smart devices to directly obtain constructed map data, resulting in inefficient path planning.

Method used

By obtaining the boundary data of the environment map, the layer structure of the electronic raster map is determined, and filtering, difference processing and linear fitting are performed to determine the rotation angle and coordinate translation amount, and the electronic raster map is constructed.

Benefits of technology

It solves the problem of difficulty in obtaining map data in unstructured environments, and is suitable for intelligent devices in unstructured environments, reducing the burden on algorithms and improving the efficiency of path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115540852B_ABST
    Figure CN115540852B_ABST
Patent Text Reader

Abstract

The present application relates to a method, apparatus, electronic device and storage medium for constructing an electronic grid map. The method includes: obtaining boundary data of an environmental map, determining the layer structure of the electronic grid map according to the boundary data, performing filtering and interpolation processing on the boundary data, segmenting the processed coordinate data of the external boundary points of the map, performing linear fitting on the data points of each segment to obtain multiple fitted lines, determining the rotation angle and coordinate translation amount of the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map, rotating and translating the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map, and constructing an electronic grid map. Thereby, the problem that it is difficult to directly obtain the constructed map data due to the unstructured environment for path planning is solved, and it can be applied to intelligent devices in an unstructured environment, reducing the algorithm burden.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of path planning, and particularly relates to a method and apparatus for constructing an electronic grid map, an electronic device, and a storage medium. Background Art

[0002] In recent years, mobile intelligent devices represented by intelligent vehicles and intelligent robots have made great progress. Such mobile intelligent devices are manufacturing equipment, device tools, and service consumer goods with perception, decision-making, and execution capabilities.

[0003] For intelligent devices in an unstructured environment, in order to know their own positions and working environments, it is generally necessary to first build a map, and then combine information such as the map, positioning, and perception to further perform subsequent complex tasks. Specifically, for path planning, due to the unstructured environment, it is difficult to directly obtain the constructed map data. Usually, developers need to process the map data or build the map data from scratch.

[0004] Related technologies use simultaneous localization technology, apply the slam algorithm, and require certain additional-cost sensing devices to obtain the basic data for building a map, which can be used in unknown environments.

[0005] However, the constructed map usually cannot cover the entire working environment. Especially for some intelligent devices that need to traverse the entire working environment, they need to know the information of the entire working environment to work more intelligently and efficiently. For example, a household floor cleaning robot needs to cover the entire room area according to a certain path plan. Summary of the Invention

[0006] The present application provides a method and apparatus for constructing an electronic grid map, an electronic device, and a storage medium, so as to solve the problem that it is difficult to directly obtain the constructed map data due to the unstructured environment for path planning, and it can be applicable to intelligent devices in an unstructured environment and reduce the algorithm burden.

[0007] The first aspect embodiment of the present application provides an electronic grid map construction method, including the following steps: obtaining boundary data of an environmental map, and determining the layer structure of the electronic grid map according to the boundary data, where the boundary data includes map external boundary point coordinate data and map internal obstacle boundary point coordinate data; based on the layer structure of the electronic grid map, performing filtering and interpolation processing on the boundary data, segmenting the processed map external boundary point coordinate data, and performing linear fitting according to the data points of each segment to obtain multiple fitting lines; determining the rotation angle and coordinate translation amount of the map external boundary point coordinate data and the map internal obstacle boundary point coordinate data according to the multiple fitting lines, and respectively rotating and translating the map external boundary point coordinate data and the map internal obstacle boundary point coordinate data according to the rotation angle and the coordinate translation amount to obtain the rotated and translated coordinate data of the map external boundary points and the rotated and translated coordinate data of the map internal obstacle boundary points; and constructing the electronic grid map according to the boundary data, the rotated and translated coordinate data of the map external boundary points, and the rotated and translated coordinate data of the map internal obstacle boundary points.

[0008] Optionally, in some embodiments, the determining the layer structure of the electronic grid map according to the boundary data includes: determining the number of layers of the electronic grid map according to the map internal obstacle boundary point coordinate data; and determining the layer structure of the electronic grid map according to the map external boundary point coordinate data, the map internal obstacle boundary point coordinate data, and the number of layers.

[0009] Optionally, in some embodiments, the determining the rotation angle and coordinate translation amount of the map external boundary point coordinate data and the map internal obstacle boundary point coordinate data according to the multiple fitting lines includes: determining the rotation angle according to the multiple fitting lines, and rotating the map external boundary point coordinate data according to the rotation angle to obtain new coordinate data of the map external boundary points; obtaining the minimum value of the abscissa and the minimum value of the ordinate in the new coordinate data of the map external boundary points, and obtaining the coordinate translation amount according to the minimum value of the abscissa and the minimum value of the ordinate.

[0010] Optionally, in some embodiments, the determining the rotation angle according to the multiple fitting lines includes: using each fitting line as a new x-axis, calculating the area of the minimum circumscribed rectangle of the map external boundary figure; and determining the rotation angle according to the area of the minimum circumscribed rectangle.

[0011] Optionally, in some embodiments, constructing the electronic grid map according to the boundary data, the coordinate data of the rotated and translated map external boundary points, and the coordinate data of the rotated and translated map internal obstacle boundary points includes: for each layer, processing the coordinate data of the rotated and translated map external boundary points and the coordinate data of the rotated and translated map internal obstacle boundary points based on a preset scale and a preset rounding strategy to obtain the grid coordinates of the map external boundary and the grid coordinates of the map internal obstacle boundary; obtaining the grid map of each layer according to the grid coordinates of the map external boundary, the grid attributes corresponding to the grids of the map external boundary, the grid coordinates of the map internal obstacle boundary, and the grid attributes corresponding to the grids of the map internal obstacle boundary; and merging the grid maps of all layers to obtain the electronic grid map.

[0012] An embodiment of the second aspect of the present application provides an electronic grid map construction device, including: an acquisition module, configured to acquire boundary data of an environmental map and determine a layer structure of an electronic grid map according to the boundary data, where the boundary data includes map external boundary point coordinate data and map internal obstacle boundary point coordinate data; a fitting module, configured to perform filtering and interpolation processing on the boundary data based on the layer structure of the electronic grid map, segment the processed map external boundary point coordinate data, and perform linear fitting according to the data points of each segment to obtain a plurality of fitting lines; a determination module, configured to determine a rotation angle and a coordinate translation amount of the map external boundary point coordinate data and the map internal obstacle boundary point coordinate data according to the plurality of fitting lines, and respectively rotate and translate the map external boundary point coordinate data and the map internal obstacle boundary point coordinate data according to the rotation angle and the coordinate translation amount to obtain the coordinate data of the rotated and translated map external boundary points and the coordinate data of the rotated and translated map internal obstacle boundary points; and a construction module, configured to construct the electronic grid map according to the boundary data, the coordinate data of the rotated and translated map external boundary points, and the coordinate data of the rotated and translated map internal obstacle boundary points.

[0013] Optionally, in some embodiments, the fitting module is further configured to: determine the number of layers of the electronic grid map according to the map internal obstacle boundary point coordinate data; and determine the layer structure of the electronic grid map according to the map external boundary point coordinate data, the map internal obstacle boundary point coordinate data, and the number of layers.

[0014] Optionally, in some embodiments, the determining module is further configured to: determine a rotation angle according to the multiple fitting straight lines, and rotate the coordinate data of the map outer boundary points according to the rotation angle to obtain new coordinate data of the map outer boundary points; obtain the minimum value of the abscissa and the minimum value of the ordinate in the new coordinate data of the map outer boundary points, and obtain the coordinate translation amount according to the minimum value of the abscissa and the minimum value of the ordinate.

[0015] Optionally, in some embodiments, the determining module is further configured to: use each fitting straight line as a new x-axis, and calculate the area of the minimum circumscribed rectangle of the map outer boundary graph; determine the rotation angle according to the area of the minimum circumscribed rectangle.

[0016] Optionally, in some embodiments, the constructing module is further configured to: for each layer, process the rotated and translated coordinate data of the map outer boundary points and the rotated and translated coordinate data of the map inner obstacle boundary points based on a preset scale and a preset rounding strategy to obtain the grid coordinates of the map outer boundary and the grid coordinates of the map inner obstacle boundary; obtain the grid map of each layer according to the grid coordinates of the map outer boundary, the grid attributes corresponding to the grids of the map outer boundary, the grid coordinates of the map inner obstacle boundary, and the grid attributes corresponding to the grids of the map inner obstacle boundary; merge the grid maps of all layers to obtain the electronic grid map.

[0017] An embodiment of the third aspect of the present application provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the electronic grid map construction method as described in the above embodiments.

[0018] An embodiment of the fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, and the program is executed by a processor to be used to implement the electronic grid map construction method as described in the above embodiments.

[0019] Thus, the boundary data of the environmental map is obtained, the layer structure of the electronic grid map is determined according to the boundary data, and based on the layer structure of the electronic grid map, the boundary data is filtered and interpolated, and the coordinate data of the external boundary points of the processed map is segmented, and linear fitting is performed according to the data points of each segment to obtain multiple fitting lines, and the rotation angle and coordinate translation amount of the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map are determined according to the multiple fitting lines, and the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map are rotated and translated respectively according to the rotation angle and the coordinate translation amount to obtain the rotated and translated coordinate data of the external boundary points of the map and the rotated and translated coordinate data of the internal obstacle boundary points of the map, and the electronic grid map is constructed according to the boundary data, the rotated and translated coordinate data of the external boundary points of the map, and the rotated and translated coordinate data of the internal obstacle boundary points of the map. Thus, the problem that it is difficult to directly obtain the constructed map data due to the unstructured environment for path planning is solved, and it can be applied to intelligent devices in unstructured environments, reducing the algorithm burden.

[0020] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where:

[0022] Figure 1 is a flowchart of a method for constructing an electronic grid map according to an embodiment of the present application;

[0023] Figure 2 is a flowchart of a method for constructing an electronic grid map according to a specific embodiment of the present application;

[0024] Figure 3 is a schematic block diagram of an electronic grid map construction device according to an embodiment of the present application;

[0025] Figure 4 is a schematic diagram of an electronic device according to an embodiment of the present application.

[0026] Description of the reference numerals: 10 - electronic grid map construction device, 100 - acquisition module, 200 - fitting module, 300 - determination module, and 400 - construction module. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0027] Embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application, and should not be construed as a limitation to the present application.

[0028] The method, device, electronic device and storage medium for constructing an electronic grid map according to an embodiment of the present application will be described below with reference to the accompanying drawings. In view of the problem in the above-mentioned background art that it is difficult to directly obtain the constructed map data for path planning due to the unstructured environment, the present application provides an electronic grid map construction method. In this method, by obtaining the boundary data of the environmental map, determining the layer structure of the electronic grid map according to the boundary data, filtering and interpolating the boundary data based on the layer structure of the electronic grid map, segmenting the coordinate data of the external boundary points of the processed map, fitting a straight line according to the data points of each segment, determining the rotation angle and coordinate translation amount of the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map according to the obtained multiple fitting straight lines, respectively rotating and translating the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map according to the rotation angle and coordinate translation amount to obtain the rotated and translated coordinate data of the external boundary points of the map and the rotated and translated coordinate data of the internal obstacle boundary points of the map, and constructing an electronic grid map according to the boundary data, the rotated and translated coordinate data of the external boundary points of the map, and the rotated and translated coordinate data of the internal obstacle boundary points of the map. Thus, the problem that it is difficult to directly obtain the constructed map data for path planning due to the unstructured environment is solved, and it can be applied to intelligent devices in an unstructured environment, reducing the algorithm burden.

[0029] Before introducing the method for constructing an electronic grid map according to an embodiment of the present application, the methods for path planning, planning traversal and constructing an environmental map in the related art will be introduced first, such as: the grid method, the artificial potential field method, the template model method, the artificial intelligence method, etc.

[0030] Path planning includes two types: random traversal and planned traversal. Random traversal means that the robot attempts to cover the working area according to a certain movement algorithm, such as triangular or pentagonal trajectories. If an obstacle is encountered, the corresponding steering function is executed. It is a low-cost strategy that exchanges time for space. If time is not considered, 100% coverage can be achieved. The random coverage method does not require positioning, does not have an environmental map, and cannot plan a path. Most sweeping robots use this method.

[0031] Planned traversal means that the robot generates a path plan that covers the entire room based on the environmental map. This method is highly efficient and can complete cleaning at the fastest speed while ensuring the coverage rate.

[0032] Artificial potential field method designs the movement of a robot in the surrounding environment as a movement in a potential field. There are two types of potential energy sources: repulsive poles and attractive poles. Areas that are not desired to enter and obstacles belong to repulsive poles, and areas recommended to pass through are attractive poles. The resultant force of attraction and repulsion serves as the acceleration force of the robot to control the movement direction of the robot and calculate the position of the robot. However, this method usually has problems of local minima and excessive computational complexity.

[0033] Template model method is based on prior knowledge and environmental information obtained by traversing the environment map of a robot previously to match a predefined template. It requires prior definition of the environmental model and memory of the template. Therefore, it is not good at dealing with a changing environment, such as a sudden appearance of an obstacle during the working process of the traversing robot.

[0034] Artificial intelligence methods include fuzzy control algorithms, neural network path planning, genetic algorithms, etc. These algorithms have large computational complexity and most of them are still in the laboratory research stage and are less used in actual applications.

[0035] Grid method uses grids of the same size to divide the working space of a robot and represents the environment with a grid array. Each grid is one of a finite number of states, either in free space or in obstacle space. The characteristics of this method are simplicity and easy implementation, which brings a lot of convenience to the implementation of path planning and has the ability to represent irregular obstacles; its disadvantage is low representation efficiency, and there is a contradiction between space-time overhead and accuracy. If the grid division is too large, the environmental information storage capacity is too small, the planning time is short, the resolution drops, and the ability to find paths in a dense environment weakens; if the grid division is too small, the environmental resolution is high, the ability to find paths in a dense environment is strong, but the environmental storage capacity is large. Therefore, the size of the grid directly affects the performance of the control algorithm.

[0036] Specifically, Figure 1 FIG. is a schematic flow chart of an electronic grid map construction method provided by an embodiment of the present application.

[0037] As Figure 1 shown, the electronic grid map construction method includes the following steps:

[0038] In step S101, boundary data of the environmental map is obtained, and the layer structure of the electronic grid map is determined according to the boundary data, where the boundary data includes map outer boundary point coordinate data and map inner obstacle boundary point coordinate data.

[0039] Optionally, in some embodiments, determining the layer structure of the electronic grid map according to the boundary data includes: determining the number of layers of the electronic grid map according to the coordinate data of the obstacle boundary points inside the map; determining the layer structure of the electronic grid map according to the coordinate data of the external boundary points of the map, the coordinate data of the obstacle boundary points inside the map, and the number of layers.

[0040] Among them, the layer structure includes the number of layers and layer attributes. The number of layers can be determined according to the obstacle boundary data inside the map. The layers include the external boundary layer of the map and the obstacle boundary layer inside the map. Each piece of internal obstacle boundary data corresponds to 1 obstacle boundary layer inside the map, and the layer attribute is the boundary represented by each layer.

[0041] Specifically, in the embodiments of the present application, the map boundary data collected by the positioning device can be used, including the coordinate data of the external boundary points of the map and the coordinate data of the obstacle boundary points inside the map. The number of layers is determined according to the obstacle boundary data inside the map, and the layer attributes are determined according to the boundaries represented by each external boundary layer and obstacle boundary layer inside the map.

[0042] In step S102, based on the layer structure of the electronic grid map, filtering and interpolation processing are performed on the boundary data, and the processed coordinate data of the external boundary points of the map are segmented, and linear fitting is performed according to the data points of each segment to obtain multiple fitting straight lines.

[0043] Specifically, in the embodiments of the present application, after determining the layer structure, boundary data filtering and interpolation are performed. Filtering and interpolation are sequentially performed on each boundary data according to the set point spacing. Preferably, according to the set point spacing of 0.3 m, filtering and interpolation are sequentially performed on each boundary data, and then the external boundary data is segmented. The direction angle formed by the first point pointing to the second point is initially calculated as the initial direction angle θ, and it is sequentially determined whether the direction angle |θ i -| exceeds the set segmentation threshold as the basis for segmentation. Subsequently, the direction angle exceeding the threshold is used as the new θ until all points of this boundary are processed.

[0044] After segmenting the external boundary data, external boundary data fitting can be performed. The data points of each segment after segmentation are sequentially subjected to linear fitting using the least squares method to obtain multiple fitting straight lines.

[0045] In step S103, based on multiple fitting straight lines, determine the rotation angle and coordinate translation amount of the coordinate data of the map outer boundary points and the coordinate data of the map inner obstacle boundary points, and respectively rotate and translate the coordinate data of the map outer boundary points and the coordinate data of the map inner obstacle boundary points according to the rotation angle and the coordinate translation amount, so as to obtain the rotated and translated coordinate data of the map outer boundary points and the rotated and translated coordinate data of the map inner obstacle boundary points.

[0046] Optionally, in some embodiments, determining the rotation angle and coordinate translation amount of the coordinate data of the map outer boundary points and the coordinate data of the map inner obstacle boundary points based on multiple fitting straight lines includes: determining the rotation angle based on multiple fitting straight lines, and rotating the coordinate data of the map outer boundary points according to the rotation angle to obtain new coordinate data of the map outer boundary points; obtaining the minimum value of the abscissa and the minimum value of the ordinate in the new coordinate data of the map outer boundary points, and obtaining the coordinate translation amount according to the minimum value of the abscissa and the minimum value of the ordinate.

[0047] Optionally, in some embodiments, determining the rotation angle based on multiple fitting straight lines includes: using each fitting straight line as a new x-axis, and calculating the area of the minimum circumscribed rectangle of the map outer boundary graph; determining the rotation angle according to the area of the minimum circumscribed rectangle.

[0048] Specifically, the coordinate axis rotation in the embodiments of the present application can successively use each fitting straight line as a new x-axis, calculate the minimum circumscribed rectangle of the outer boundary graph, select the rotation angle of the new coordinate system according to whether the area of the minimum circumscribed rectangle is the smallest, and then rotate the outer boundary points to obtain a series of new coordinate point sequences.

[0049] The coordinate axis translation in the embodiments of the present application can select the x coordinate x0 of the minimum value and the y coordinate y0 of the minimum value among all the new coordinate points as the coordinate translation amount of the coordinate axis, subtract x0 and y0 from all the point coordinates respectively to obtain the final rotated and translated new coordinates, and then successively rotate all the inner obstacle boundary data according to the rotation angle obtained in S6, and translate by x0 and y0.

[0050] In step S104, construct an electronic grid map according to the boundary data, the rotated and translated coordinate data of the map outer boundary points, and the rotated and translated coordinate data of the map inner obstacle boundary points.

[0051] Optionally, in some embodiments, an electronic grid map is constructed based on the boundary data, the coordinate data of the rotated and translated external boundary points of the map, and the coordinate data of the rotated and translated internal obstacle boundary points of the map, including: for each layer, based on a preset scale and a preset rounding strategy, the coordinate data of the rotated and translated external boundary points of the map and the coordinate data of the rotated and translated internal obstacle boundary points of the map are processed to obtain the grid coordinates of the external boundary of the map and the grid coordinates of the internal obstacle boundary of the map; according to the grid coordinates of the external boundary of the map, the grid attributes corresponding to the grid of the external boundary of the map, the grid coordinates of the internal obstacle boundary of the map, and the grid attributes corresponding to the grid of the internal obstacle boundary of the map, the grid map of each layer is obtained; the grid maps of all layers are merged to obtain an electronic grid map.

[0052] Specifically, each coordinate point of each newly obtained boundary data after rotation and translation is successively divided by the scale and rounded up to obtain the grid coordinates of the boundary point. At the same time, the corresponding grid attribute is set to the boundary, and then the Two-Pass algorithm is used to divide the grid map into three attributes: inside the boundary, outside the boundary, and the boundary according to the boundary grid.

[0053] Then, the merging is performed according to the layer attributes. All layers are merged into one complete grid map according to the layer attributes. Specifically, traverse each grid. If the grid attribute of the corresponding external boundary layer grid is outside the boundary, the merged attribute remains unchanged; if the grid attribute of the external boundary layer grid is the boundary, the merged attribute remains unchanged; if the grid attribute of the external boundary layer grid is inside the boundary and the grid attribute of the internal boundary layer grid is outside the boundary, the merged attribute remains unchanged. If the grid attribute of the internal boundary layer grid is the boundary, the merged attribute becomes the boundary. If the grid attribute of the internal boundary layer grid is inside the boundary, the merged attribute becomes outside the boundary. Thus, all grids with the grid attribute of inside the boundary represent the areas that the intelligent device can pass through, and the boundary and outside the boundary represent the areas that the intelligent device cannot pass through.

[0054] Thus, after the steps as Figure 2 shown, the embodiments of the present application can obtain a complete grid map, avoiding the defect that the larger the storage space and memory capacity required for the electronic map, the greater the algorithm burden, and being applicable to the path planning algorithm of intelligent devices in unstructured environments.

[0055] The electronic grid map construction method proposed according to the embodiments of the present application obtains the boundary data of the environmental map, determines the layer structure of the electronic grid map according to the boundary data, filters and interpolates the boundary data based on the layer structure of the electronic grid map, segments the coordinate data of the external boundary points of the processed map, fits a straight line according to the data points of each segment, determines the rotation angle and coordinate translation amount of the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map according to the obtained multiple fitting straight lines, rotates and translates the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map according to the rotation angle and coordinate translation amount respectively, and obtains the rotated and translated coordinate data of the external boundary points of the map and the rotated and translated coordinate data of the internal obstacle boundary points of the map, and constructs an electronic grid map according to the boundary data, the rotated and translated coordinate data of the external boundary points of the map, and the rotated and translated coordinate data of the internal obstacle boundary points of the map. Thereby, the problem that it is difficult to directly obtain the constructed map data due to the unstructured environment for path planning is solved, and it can be applied to intelligent devices in an unstructured environment, reducing the algorithm burden.

[0056] Next, an electronic grid map construction device proposed according to the embodiments of the present application will be described with reference to the accompanying drawings.

[0057] Figure 3 It is a block diagram of the electronic grid map construction device according to the embodiments of the present application.

[0058] As Figure 3 shown, the electronic grid map construction device 10 includes: an acquisition module 100, a fitting module 200, a determination module 300, and a construction module 400.

[0059] Among them, the acquisition module 100 is used to acquire the boundary data of the environmental map and determine the layer structure of the electronic grid map according to the boundary data, where the boundary data includes the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map; the fitting module 200 is used to filter and interpolate the boundary data based on the layer structure of the electronic grid map, segment the processed coordinate data of the external boundary points of the map, and perform linear fitting according to the data points of each segment to obtain multiple fitting lines; the determination module 300 is used to determine the rotation angle and coordinate translation amount of the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map according to the multiple fitting lines, and rotate and translate the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map according to the rotation angle and the coordinate translation amount respectively to obtain the rotated and translated coordinate data of the external boundary points of the map and the rotated and translated coordinate data of the internal obstacle boundary points of the map, and the construction module 400 is used to construct the electronic grid map according to the boundary data, the rotated and translated coordinate data of the external boundary points of the map, and the rotated and translated coordinate data of the internal obstacle boundary points of the map.

[0060] Optionally, in some embodiments, the acquisition module 100 is further configured to: determine the number of layers of the electronic grid map according to the coordinate data of the internal obstacle boundary points of the map; determine the layer structure of the electronic grid map according to the coordinate data of the external boundary points of the map, the coordinate data of the internal obstacle boundary points of the map, and the number of layers.

[0061] Optionally, in some embodiments, the determination module 300 is further configured to: determine the rotation angle according to the multiple fitting lines, and rotate the coordinate data of the external boundary points of the map according to the rotation angle to obtain the new coordinate data of the external boundary points of the map; obtain the minimum value of the abscissa and the minimum value of the ordinate in the new coordinate data of the external boundary points of the map, and obtain the coordinate translation amount according to the minimum value of the abscissa and the minimum value of the ordinate.

[0062] Optionally, in some embodiments, the determination module 300 is further configured to: use each fitting line as a new x-axis, and calculate the area of the minimum circumscribed rectangle of the external boundary graph of the map; determine the rotation angle according to the area of the minimum circumscribed rectangle.

[0063] Optionally, in some embodiments, the building block 400 is further configured to: for each layer, process the coordinate data of the rotated and translated external boundary points of the map and the coordinate data of the rotated and translated internal obstacle boundary points of the map based on a preset scale and a preset rounding strategy to obtain the grid coordinates of the external boundary of the map and the grid coordinates of the internal obstacle boundary of the map; obtain the grid map of each layer according to the grid coordinates of the external boundary of the map, the grid attributes corresponding to the grids of the external boundary of the map, the grid coordinates of the internal obstacle boundary of the map, and the grid attributes corresponding to the grids of the internal obstacle boundary of the map; and merge the grid maps of all layers to obtain the electronic grid map.

[0064] It should be noted that the foregoing explanation of the embodiments of the electronic grid map construction method also applies to the electronic grid map construction device of this embodiment, and will not be repeated here.

[0065] According to the electronic grid map construction device provided by the embodiments of the present application, by acquiring the boundary data of the environmental map, determining the layer structure of the electronic grid map according to the boundary data, and based on the layer structure of the electronic grid map, filtering and interpolating the boundary data, segmenting the processed coordinate data of the external boundary points of the map, performing linear fitting according to the data points of each segment, and determining the rotation angle and coordinate translation amount of the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map according to the obtained multiple fitting lines, and respectively rotating and translating the coordinate data of the external boundary points of the map and the coordinate data of the internal obstacle boundary points of the map according to the rotation angle and the coordinate translation amount to obtain the coordinate data of the rotated and translated external boundary points of the map and the coordinate data of the rotated and translated internal obstacle boundary points of the map, and constructing an electronic grid map according to the boundary data, the coordinate data of the rotated and translated external boundary points of the map, and the coordinate data of the rotated and translated internal obstacle boundary points of the map. Thus, the problem that it is difficult to directly obtain the constructed map data due to the unstructured environment for path planning is solved, and it can be applied to intelligent devices in an unstructured environment, reducing the algorithm burden.

[0066] Figure 4 The following is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device may include:

[0067] A memory 401, a processor 402, and a computer program stored on the memory 401 and executable on the processor 402.

[0068] When the processor 402 executes the program, it implements the electronic grid map construction method provided in the foregoing embodiments.

[0069] Further, the electronic device further includes:

[0070] A communication interface 403 for communication between the memory 401 and the processor 402.

[0071] A memory 401 for storing a computer program that can run on the processor 402.

[0072] The memory 401 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0073] If the memory 401, the processor 402, and the communication interface 403 are implemented independently, the communication interface 403, the memory 401, and the processor 402 can be interconnected through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 4 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0074] Optionally, in a specific implementation, if the memory 401, the processor 402, and the communication interface 403 are integrated on a single chip, the memory 401, the processor 402, and the communication interface 403 can communicate with each other through an internal interface.

[0075] The processor 402 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0076] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method for constructing an electronic grid map is implemented.

[0077] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of this application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0078] In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of these features. In the description of this application, the meaning of "N" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0079] Any process or method description shown in a flowchart or described in other ways herein can be understood to represent a module, segment, or portion of code including one or more N executable instructions for implementing a customized logical function or process, and the scope of the preferred embodiments of this application includes additional implementations, where the functions can be executed in a manner that is not in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by those skilled in the art to which the embodiments of this application pertain.

[0080] It should be understood that the various parts of this application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following well-known technologies in the art or a combination of them can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays, field-programmable gate arrays, etc.

[0081] Those of ordinary skill in the technical field of this application can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0082] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. An electronic grid map construction method, characterized in that, Including the following steps: Obtain the boundary data of the environmental map, and determine the layer structure of the electronic grid map according to the boundary data, where the layers include an external map boundary layer and an internal map obstacle boundary layer, and the boundary data includes external map boundary point coordinate data and internal map obstacle boundary point coordinate data; Based on the layer structure of the electronic grid map, perform filtering and interpolation processing on the boundary data, segment the processed external map boundary point coordinate data, and perform linear fitting according to the data points of each segment to obtain multiple fitting lines; Determine the rotation angle and coordinate translation amount of the external map boundary point coordinate data and the internal map obstacle boundary point coordinate data according to the multiple fitting lines, and rotate and translate the external map boundary point coordinate data and the internal map obstacle boundary point coordinate data according to the rotation angle and the coordinate translation amount respectively to obtain the rotated and translated coordinate data of the external map boundary points and the rotated and translated coordinate data of the internal map obstacle boundary points; and Construct the electronic grid map according to the boundary data, the rotated and translated coordinate data of the external map boundary points, and the rotated and translated coordinate data of the internal map obstacle boundary points; specifically including: for each layer, process the rotated and translated coordinate data of the external map boundary points and the rotated and translated coordinate data of the internal map obstacle boundary points based on a preset scale and a preset rounding strategy to obtain the grid coordinates of the external map boundary and the grid coordinates of the internal map obstacle boundary, and at the same time set the corresponding grid attribute to the boundary, and divide the grid map into three attributes: inside the boundary, outside the boundary, and the boundary according to the boundary grid; the grid with the grid attribute of inside the boundary represents the area that the intelligent device can pass through, and the boundary and outside the boundary represent the areas that the intelligent device cannot pass through; obtain the grid map of each layer according to the grid coordinates of the external map boundary, the grid attributes corresponding to the grids of the external map boundary, the grid coordinates of the internal map obstacle boundary, and the grid attributes corresponding to the grids of the internal map obstacle boundary; merge the grid maps of all layers to obtain the electronic grid map.

2. The method according to claim 1, characterized in that, The determining the layer structure of the electronic grid map according to the boundary data includes: Determine the number of layers of the electronic grid map according to the internal map obstacle boundary point coordinate data; Determine the layer structure of the electronic grid map according to the external map boundary point coordinate data, the internal map obstacle boundary point coordinate data, and the number of layers.

3. The method according to claim 1, wherein The determining the rotation angle and coordinate translation amount of the external map boundary point coordinate data and the internal map obstacle boundary point coordinate data according to the multiple fitting lines includes: Determine the rotation angle according to the multiple fitting lines, and rotate the external map boundary point coordinate data according to the rotation angle to obtain the new coordinate data of the external map boundary points; Obtain the minimum value of the abscissa and the minimum value of the ordinate in the new coordinate data of the external map boundary points, and obtain the coordinate translation amount according to the minimum value of the abscissa and the minimum value of the ordinate.

4. The method according to claim 3, characterized in that, Determining the rotation angle according to the multiple fitting lines includes: Taking each fitting line as a new x-axis, and calculating the area of the minimum circumscribed rectangle of the external boundary graph of the map; Determining the rotation angle according to the area of the minimum circumscribed rectangle.

5. An electronic grid map construction device, characterized in that Including: An acquisition module, configured to acquire boundary data of an environmental map, and determine a layer structure of an electronic grid map according to the boundary data, where the layers include an external boundary layer of the map and an internal obstacle boundary layer of the map, and the boundary data includes external boundary point coordinate data of the map and internal obstacle boundary point coordinate data of the map; A fitting module, configured to perform filtering and interpolation processing on the boundary data based on the layer structure of the electronic grid map, segment the processed external boundary point coordinate data of the map, and perform linear fitting on the data points of each segment to obtain multiple fitting lines; A determination module, configured to determine a rotation angle and a coordinate translation amount of the external boundary point coordinate data of the map and the internal obstacle boundary point coordinate data of the map according to the multiple fitting lines, and respectively rotate and translate the external boundary point coordinate data of the map and the internal obstacle boundary point coordinate data of the map according to the rotation angle and the coordinate translation amount to obtain rotated and translated coordinate data of the external boundary points of the map and rotated and translated coordinate data of the internal obstacle boundary points of the map; and A construction module, configured to construct the electronic grid map according to the boundary data, the rotated and translated coordinate data of the external boundary points of the map, and the rotated and translated coordinate data of the internal obstacle boundary points of the map; specifically including: for each layer, processing the rotated and translated coordinate data of the external boundary points of the map and the rotated and translated coordinate data of the internal obstacle boundary points of the map based on a preset scale and a preset rounding strategy to obtain grid coordinates of the external boundary of the map and grid coordinates of the internal obstacle boundary of the map, and at the same time setting the corresponding grid attribute to a boundary, and dividing the grid map into three attributes: inside the boundary, outside the boundary, and the boundary according to the boundary grid; the grid with the grid attribute of inside the boundary represents the area that the intelligent device can pass through, and the boundary and outside the boundary represent the areas that the intelligent device cannot pass through; obtaining the grid map of each layer according to the grid coordinates of the external boundary of the map, the grid attributes corresponding to the grids of the external boundary of the map, the grid coordinates of the internal obstacle boundary of the map, and the grid attributes corresponding to the grids of the internal obstacle boundary of the map; and merging the grid maps of all layers to obtain the electronic grid map.

6. The device according to claim 5, characterized in that, The fitting module is further configured to: Determine the number of layers of the electronic grid map according to the internal obstacle boundary point coordinate data of the map; Determine the layer structure of the electronic grid map according to the external boundary point coordinate data of the map, the internal obstacle boundary point coordinate data of the map, and the number of layers.

7. The device according to claim 5, characterized in that, The determination module is further configured to: Determine a rotation angle according to the multiple fitting lines, and rotate the external boundary point coordinate data of the map according to the rotation angle to obtain new coordinate data of the external boundary points of the map; Obtain the minimum value of the abscissa and the minimum value of the ordinate in the new coordinate data of the external boundary points of the map, and obtain the coordinate translation amount according to the minimum value of the abscissa and the minimum value of the ordinate.

8. An electronic device, characterized in that, Including: A memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the electronic grid map construction method according to any one of claims 1-4.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to be used to implement the electronic grid map construction method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Constructing method and navigation method of global boundary map

    CN108507578A

  • Driving area detection method, device and equipment

    CN114842450A