CN117516558A - Road network generation method, device, computer equipment and computer readable storage medium - Google Patents

Road network generation method, device, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN117516558A
CN117516558A CN202210908010.XA CN202210908010A CN117516558A CN 117516558 A CN117516558 A CN 117516558A CN 202210908010 A CN202210908010 A CN 202210908010A CN 117516558 A CN117516558 A CN 117516558A
Authority
CN
China
Prior art keywords
road network
road
site
euclidean
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210908010.XA
Other languages
Chinese (zh)
Inventor
王桓宇
杜欢
吴伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jizhijia Technology Co Ltd
Original Assignee
Beijing Jizhijia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jizhijia Technology Co Ltd filed Critical Beijing Jizhijia Technology Co Ltd
Priority to CN202210908010.XA priority Critical patent/CN117516558A/en
Publication of CN117516558A publication Critical patent/CN117516558A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching
    • G01C21/32Structuring or formatting of map data

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The invention discloses a road network generation method, a device, computer equipment and a computer readable storage medium. The method and the system can construct the initial road network together according to the track information under the environment information combined with the forbidden region characteristics of the target probability map, improve the safety and reliability of the road network information and reduce the redundancy of the road network. In addition, by extracting the road network width, the reliability of the generated traveling target road network can be improved to a certain extent.

Description

Road network generation method, device, computer equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a road network generating method, a road network generating device, a computer device, and a computer readable storage medium.
Background
Mobile robots have become more and more popular in recent years and the application area has become more and more widespread, and navigation is a key skill of mobile robots. Navigation and path planning are currently mostly based on occupied grid map searches. However, using a grid map for path planning is computationally expensive in the same range of scenarios as compared to using a road network for path planning. In addition, the road network can provide higher-level environmental information, so that research on a road network generation mode is needed.
Conventional road network generation techniques are generally divided into two types. One is to generate a road network based on robot movement track information. Another is to generate a road network based on a map. Generating a road network based on the voronoi diagram of the target area or dividing the target area based on the area dividing technique can be included.
However, both the above-mentioned two conventional road network generation technologies have a problem that the accuracy of the generated road network is poor.
Disclosure of Invention
The invention provides a road network generation method, a road network generation device, computer equipment and a computer readable storage medium, which can overcome the problem of poor road network generation accuracy in the traditional road network generation technology. Specifically, the embodiment of the application discloses the following technical scheme:
In a first aspect, an embodiment of the present application provides a method for generating a road network, where the method includes:
acquiring a target probability map and a plurality of track information of the movable equipment moving in a target area; the target probability map comprises forbidden region attribute characteristics;
constructing an initial road network according to the target probability map and the track information;
simplifying at least one of sites with the same attribute and road sections with the same attribute in the initial road network to obtain a first optimized road network;
extracting the road section width of the first optimized road network to obtain the road section width of each road section; and generating a target road network according to the width of each road section.
With reference to the first aspect, in one possible implementation manner of the first aspect, constructing an initial road network according to the target probability map and the plurality of track information includes:
constructing a first Euclidean symbol distance vector field according to each site in the target probability map and the track information; the first Euclidean symbol distance vector field is a vector field constructed according to Euclidean symbol distances between each station and corresponding obstacles;
optimizing the sites with the same attribute in each site according to the first Euclidean symbol distance vector field to obtain corresponding optimized sites;
Sequentially connecting two adjacent optimization stations in the first track information to obtain an initial road; the first track information is track information with earliest time generated in the plurality of track information;
and constructing an initial road network according to the initial road and the optimized station corresponding to the non-first track information.
With reference to the first aspect, in another possible implementation manner of the first aspect, constructing a first euclidean sign distance vector field according to each site in the target probability map and the trajectory information includes:
extracting a plurality of first key sites in each site; the first key site is a site with target attribute characteristics;
searching first obstacle coordinates corresponding to each first key site in the target probability map;
and constructing a first Euclidean symbol distance vector field according to each first obstacle coordinate.
With reference to the first aspect, in a further possible implementation manner of the first aspect, simplifying, according to the first euclidean sign distance vector field, a site with the same attribute in each site to obtain a corresponding optimized site includes:
according to the first Euclidean symbol distance vector field, aiming at each first key station, acquiring a first Euclidean symbol distance between the first key station and a first obstacle coordinate;
Determining a moving Euclidean symbol distance of a first key station needing to be moved according to the first Euclidean symbol distance, a preset safety distance and a preset punishment function;
and moving the first key station according to the moving Euclidean symbol distance to obtain the optimized station.
With reference to the first aspect, in a further possible implementation manner of the first aspect, simplifying a site with the same attribute in an initial road network includes:
for each track information, acquiring coordinate information of a first target site, a second target site and a third target site which are sequentially adjacent in each optimization site;
calculating curvatures among the first target site, the second target site and the third target site according to the coordinate information;
calculating a second Euclidean symbol distance between the first target site and the third target site according to the coordinate information;
and determining the target deletion site and deleting the target deletion site according to the curvature, the preset curvature threshold, the second Euclidean symbol distance and the preset distance threshold.
With reference to the first aspect, in a further possible implementation manner of the first aspect, determining the target deletion site according to the curvature, the preset curvature threshold, the second euclidean symbol distance, and the preset distance threshold includes:
And under the condition that the curvature is larger than a preset curvature threshold value and the second Euclidean symbol distance is smaller than a preset distance threshold value, taking the second target site as the target deletion site.
With reference to the first aspect, in a further possible implementation manner of the first aspect, simplifying the road segments with the same attribute in the initial road network includes:
acquiring second coordinate information of a plurality of second key stations in non-first track information aiming at each non-first track information in a preset area outside an initial road; the second key site is a site after the target deletion site is deleted;
determining a third Euclidean symbol distance between two adjacent sites in each second key site according to the second coordinate information;
determining a road section to be combined according to the third Euclidean symbol distance and a preset connection distance limiting threshold;
and merging the road sections to be merged into the initial road to obtain the first optimized road network.
With reference to the first aspect, in a further possible implementation manner of the first aspect, determining the to-be-combined road segment according to the third euclidean symbol distance and the preset connection distance limiting threshold includes:
and taking the road section between two adjacent stations as the road section to be combined under the condition that the third Euclidean symbol distance is larger than or equal to the preset connection distance limiting threshold value.
With reference to the first aspect, in a further possible implementation manner of the first aspect, merging the to-be-merged road segment into the initial road to obtain a first optimized road network includes:
projecting a first station in a road section to be combined onto an initial road along the width direction of the initial road, and determining a first projection point;
projecting a second station in the road section to be combined onto the initial road along the width direction of the initial road, and determining a second projection point; the first site is adjacent to the second site;
and sequentially connecting the first site, the first projection point, the second projection point and the second site to obtain a first optimized road network.
With reference to the first aspect, in a further possible implementation manner of the first aspect, the road network generating method further includes:
segment sampling is carried out on each road network segment in the first optimized road network, so that a plurality of sampling points are obtained;
searching for second obstacle coordinates corresponding to the sampling points in the first optimized road network for each sampling point;
constructing a second Euclidean symbol distance vector field according to the second obstacle coordinates; the second Euclidean symbol distance vector field is a vector field constructed according to Euclidean symbol distances between each sampling point and corresponding second obstacle coordinates;
Acquiring environmental gradient information of the first optimized road network station according to the second Euclidean symbol distance vector field; the environment gradient information is used for representing Euclidean distance between the first optimized road network site and the second obstacle coordinate;
optimizing the first optimized road network site according to the environmental gradient information to obtain a second optimized road network site;
and taking the second optimized road network formed by the second optimized road website points as a new first optimized road network.
With reference to the first aspect, in a further possible implementation manner of the first aspect, optimizing the first optimized road network site according to the environmental gradient information to obtain a second optimized road network site includes:
determining a second moving Euclidean symbol distance of the first optimized road network station according to the environment gradient information, the preset safety distance and the preset punishment function;
and moving the first optimized road network station according to the second moving Euclidean symbol distance to obtain a second optimized station.
With reference to the first aspect, in a further possible implementation manner of the first aspect, the extracting a road segment width of the first optimized road network to obtain a road segment width of each road segment includes:
and calculating the width of each road section in the first optimized road network by adopting a preset clustering algorithm.
With reference to the first aspect, in a further possible implementation manner of the first aspect, the method for generating the target probability map includes:
acquiring an initial probability map and preset forbidden region information; the initial probability map is a probability map generated according to the track information;
performing binarization processing on the initial probability map to obtain a reference probability map;
and adding the preset forbidden region information into forbidden region attribute characteristics of the reference probability map to generate a target probability map.
In a second aspect, an embodiment of the present application further provides a road network generating device, where the device includes:
the acquisition module is used for acquiring a target probability map and a plurality of track information of the movable equipment moving in the target area; the target probability map comprises forbidden region attribute characteristics;
the initial road network construction module is used for constructing an initial road network according to the target probability map and the plurality of track information;
the simplifying module is used for simplifying at least one of sites with the same attribute and road sections with the same attribute in the initial road network to obtain a first optimized road network;
the width extraction module is used for extracting the road section width of the first optimized road network to obtain the road section width of each road section;
And the target road network generation module is used for generating a target road network according to the width of each road section.
In a third aspect, embodiments of the present application provide a computer device, including: a processor and a memory for storing computer executable instructions; a processor configured to read instructions from a memory and execute the instructions to implement the method of the first aspect and any implementation manner of the first aspect.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium having stored therein computer instructions for causing the computer to perform the method of the first aspect and any implementation manner of the first aspect.
The road network generating method, the device, the computer equipment and the computer readable storage medium provided by the embodiment are used for constructing an initial road network according to the target probability map and the plurality of track information of the movable equipment moving in the target area by acquiring the target probability map and the plurality of track information, simplifying at least one of sites with the same attribute and road segments with the same attribute in the initial road network to obtain a first optimized road network, extracting road segment widths of the first optimized road network to obtain road segment widths of all road segments, and generating the target road network according to the road segment widths. Compared with the prior art, the method and the device for constructing the road network can construct the initial road network together according to the track information under the environment information combined with the forbidden region characteristics of the target probability map, improve the safety and reliability of the road network information, simplify the sites and the road sections with the same attribute, and reduce the redundancy of the road network. In addition, the reliability of the generated travelable target road network can be improved to a certain extent based on the extraction of the road network width, in other words, the target road network generated under the constraint of the road network width and the robot size can pass through.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an application scenario schematic diagram of a road network generating method provided in an embodiment of the present application;
fig. 2 is an application scenario schematic diagram of another road network generating method provided in an embodiment of the present application;
fig. 3 is a schematic flow chart of a road network generating method according to an embodiment of the present application;
fig. 4 is a target probability map generating method provided in an embodiment of the present application;
fig. 5 is a flowchart for determining coordinates of an obstacle according to an embodiment of the present application;
FIG. 6 is a simplified flow diagram of a station according to an embodiment of the present application;
fig. 7 is a simplified flow diagram of a road section according to an embodiment of the present application;
fig. 8 is a simplified front-rear comparison diagram of a road section according to an embodiment of the present application;
fig. 9 is a schematic flow chart of optimizing a first path network according to an embodiment of the present application;
Fig. 10 is a schematic structural diagram of a cargo area dividing device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a computer device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of another computer device according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solution in the embodiments of the present application and make the above objects, features and advantages of the embodiments of the present application more obvious, the technical solution in the embodiments of the present application is described in further detail below with reference to the accompanying drawings.
Navigation and path planning during robot and vehicle operation are currently mostly based on occupied grid map searches. However, using a grid map for path planning is much more costly than using a road network for path planning calculations in the same range of scenarios. In addition, the road network can provide higher-level environmental information, so that research on a road network generation mode is needed. The directed Graph in the road network mapping Graph theory is composed of edges (Edge) and vertexes (Vertex), and the two vertexes form one Edge. Wherein the edges correspond to road network segments and the vertices correspond to road network sites.
The earliest networks were more manually mapped on site. However, manually drawing road networks is not advantageous from both deployment costs and drawing efficiency. Thus, some ways of automatically generating a road network are slowly emerging. Generally, two road network generation modes are adopted. First, a road network of a target area is generated from a robot (or vehicle) moving trajectory. And secondly, dividing the area according to the generated Veno diagram or map to obtain the road network.
However, the first road network generation method has the advantage of smaller calculation amount, but due to complete dependence on the movement track, when the road network is repeatedly walked for a plurality of times in a certain area, a large number of repeated road networks are generated, and even in extreme cases, the simplifying capability of the road network relative to the occupied grid map is eliminated. Second, there is a positioning error or an error in data processing with respect to a trajectory of movement against an obstacle, and the generated road network robot (or vehicle) cannot pass. And, many constraints need to be added to the machine movement accumulation or performed in some fixed flow. Obviously, the road network generated only based on the movement track has the problem of lower accuracy.
In the second road network generation method, although the generated road network is relatively clean, when an environment map such as transparent glass exists in the actual environment in the target area and a part of the sensors of the robot are prone to be wrong, the generated road network often passes through an object such as transparent glass. Second, for narrow channels through which the robot (or vehicle) cannot pass, road networks are also generated in the narrow channels based on the manner of the voronoi diagram. The road network generated by the map-based road network generation method is located at the center of the free area, and when the free area is relatively large, the generated road network is too sparse, so that the practicability is poor.
In summary, the road network generated by the two generation modes has the problems of inaccurate road network and poor reliability and practicality during use.
Based on the above, the application provides a road network generation method, device, computer equipment and computer readable storage medium, by acquiring a target probability map and a plurality of track information of a movable equipment moving in a target area, constructing an initial road network according to the target probability map and the track information, simplifying at least one of sites with the same attribute and road segments with the same attribute in the initial road network to obtain a first optimized road network, extracting road segment widths of the first optimized road network to obtain road segment widths of each road segment, and generating the target road network according to the road segment widths, so that a relatively accurate road network can be generated.
Before the technical scheme of the embodiment of the application is described, an application scenario of the embodiment of the application is described with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is an application scenario schematic diagram of a road network generating method provided in an embodiment of the present application. The application scenario 1 may include: a server 10 and a removable device 20. Wherein the server 10 and the removable device 20 communicate via a network. The mobile device may include an instant localization and mapping or concurrent mapping and localization mapping system (simultaneous localization and mapping, simply SLAM).
Wherein the server 10 may construct an initial road network by acquiring a target probability map constructed by the mobile device 20 and a plurality of pieces of track information of the mobile device 20 moving in the target area according to the target probability map and the plurality of pieces of track information. Simplifying at least one of sites with the same attribute and road segments with the same attribute in the initial road network to obtain a first optimized road network, extracting road segment widths of the first optimized road network to obtain road segment widths of all road segments, and generating a target road network according to the road segment widths. The server 10 may be one server, or may be a plurality of servers, such as a server cluster, which is not limited herein. Wherein the mobile device 20 may comprise a mobile terminal, mobile robot, vehicle, etc., without limitation.
Fig. 2 is an application scenario schematic diagram of another road network generating method in the embodiment of the present application. The application scenario 2 may include: a removable device 20. The mobile device may include an instant localization and mapping or concurrent mapping and localization mapping system (simultaneous localization and mapping, simply SLAM).
The mobile device 20 may construct an initial road network according to the target probability map and the plurality of track information by acquiring the target probability map constructed by the mobile device and the plurality of track information of the mobile device moving in the target area. Simplifying at least one of sites with the same attribute and road segments with the same attribute in the initial road network to obtain a first optimized road network, extracting road segment widths of the first optimized road network to obtain road segment widths of all road segments, and generating a target road network according to the road segment widths. Wherein the mobile device may comprise a mobile terminal, mobile robot, vehicle, etc., without limitation herein.
The technical scheme provided by the embodiment of the application is used for generating the accurate target road network.
The following describes in detail the technical solutions provided in the embodiments of the present application.
Referring to fig. 3, fig. 3 is a schematic flow chart of a road network generating method according to an embodiment of the present application, where the method may be implemented by the server 10 in the application scenario 1 or may also be implemented by the mobile device 20 in the application scenario 2, and specifically the method includes:
s302, a target probability map and a plurality of track information of the movable device moving in a target area are acquired. The target probability map comprises forbidden region attribute characteristics.
The target probability map may be a probability map generated by the mobile device by using a mapping system based on a plurality of pieces of track information after the mobile device walks in the target area for a plurality of times. The mapping system may include a SLAM system, etc. The forbidden region attribute features are preset forbidden region information of forbidden regions added into the target probability map.
If applied to the server 10 in the application scenario 1, the mobile device 20 may generate the target probability map and then send the target probability map to the server 10, i.e. acquire the target probability map. The track information may be transmitted to the server 10 after the mobile device generates the plurality of track information, that is, the plurality of track information is acquired. Further, the server generates a target probability map from the plurality of trajectory information.
If the method is applied to the mobile device 20 in the application scene 2, a plurality of pieces of track information can be obtained after the target area is moved for a plurality of times. And further, a map building system can be adopted to generate a target probability map in real time according to the track information, the generated target probability map can be stored in a database, and when the target probability map needs to be acquired, the target probability map is acquired from the database, namely the target probability map is acquired.
Fig. 4 is a target probability map generating method according to an embodiment of the present application, as an example, as shown in fig. 4, the target probability map generating method may include:
s402, acquiring an initial probability map and preset forbidden region information. Wherein the initial probability map is a probability map generated from the trajectory information.
The initial probability map is a probability map generated by a preset mapping system according to the plurality of pieces of track information. The preset forbidden region information is a forbidden region in a preset target region. For example, there is a passage area of transparent glass, or a passage area smaller than a preset passage width.
S404, binarizing the initial probability map to obtain a reference probability map.
Specifically, binarization processing is performed on the initial probability map, namely segmentation processing is performed on the image, so that a reference probability map is obtained. The binarization processing may be any binarization processing method such as a bimodal method, a P-parameter method, an iterative method, an OTSU method, and the like, and is not limited herein.
S406, adding the preset forbidden zone information into forbidden zone attribute features of the reference probability map to generate a target probability map.
Specifically, after the reference probability map is generated, the region information is added to the forbidden region attribute characteristics of the reference probability map, and a target probability map with forbidden region attributes is generated. Wherein the target probability map may be a grid map.
S304, constructing an initial road network according to the target probability map and the track information.
Specifically, a preset searching algorithm can be adopted in the target probability map based on the track information to search for obstacle coordinates corresponding to each road website point, and then the corresponding road website points are extrapolated and expanded according to the obstacle coordinates to obtain extrapolated road network stations, and then two adjacent extrapolated road website points are connected to generate an initial road network. The preset searching algorithm may be breadth-first algorithm.
Alternatively, the breadth-first algorithm may include: and acquiring a set G formed by road network segments among stations in each track information, wherein i represents an ith road network segment, and i epsilon G. And sampling each section of road network by adopting a line segment sampling method to obtain a plurality of sampling points. The ith section road network sampling point set Ei, j represents the jth sampling point of the ith section road network, j epsilon Ei. The number of road network segments is N.
In the first step, let i=0. The second step, sampling the i-terminal road network to be E i,j The number of i-segment sample points is denoted as count=0. Thirdly, constructing an Euclidean symbol distance vector field at the j-th website point and simultaneously extracting gradient information. Fourth, judging whether the j-th website point is in the position ofIf the safety area is in the safety area, jumping to a sixth step; if the device is in the unsafe zone, the device jumps to the fifth step. And fifthly, extrapolation processing is carried out on the site corresponding to the j according to the environmental gradient information. Sixth, let j=j+1, and judge whether j is smaller than count, if yes, return to and carry out the third step. If not, executing the seventh step. Seventh, i=i+1, judging whether i is smaller than N, if yes, returning to execute the second step. If not, the algorithm ends.
As an example that may be implemented, constructing an initial road network from a target probability map and a plurality of trajectory information, includes:
S3041, constructing a first Euclidean symbol distance vector field according to each site in the target probability map and the track information. The first Euclidean symbol distance vector field is a vector field constructed according to Euclidean symbol distances between each station and corresponding obstacles.
Specifically, in the range of the target probability map area, road sections formed by stations in each track information in pairs can be sampled, different expansion directions are extended for each sampling point, whether the station corresponding to the sampling point has an obstacle in a safe distance or not is determined, and Euclidean symbol distance between the station and the obstacle is determined. And constructing a first Euclidean symbol distance vector field according to the Euclidean symbol distances between each station and the obstacle. The expansion direction includes a plurality of preset directions, such as southwest, northwest, southwest, northeast, northwest, and the like.
As another example that may be implemented, constructing a first euclidean symbol distance vector field from each site in the target probability map and trajectory information, includes:
s3041a, extracting a plurality of first key sites in each site; the first key site is a site with target attribute characteristics;
S3041b, searching first obstacle coordinates corresponding to each first key site on the target probability map;
and S3041c, constructing a first Euclidean symbol distance vector field according to the coordinates of each first obstacle.
The target attribute feature may be a key feature in a preset moving process of the robot. For example, the first critical station may include a task point, a dock, a break point of a track, etc. of the removable device, without limitation.
Specifically, after a plurality of pieces of track information are acquired, a first key point in each piece of track information may be extracted. When the target probability map (b_map) is acquired, map boundary information (map_bound) of the b_map may be acquired. And can obtain the preset safety window (s_f), expansion coefficient (factor), expansion direction (dx and dy), expansion direction quantity (direct). For example, direct is 8, dx= {0,1,1,1,0, -1, -1, -1}, dy= { 1, -1,0,1,1,1,0, -1}. The direct may be set to other numbers according to actual needs, for example, direct is 4, and the direction coordinates of dx and dy may be adaptively modified.
For each piece of track information, according to the first key points, road sections between two adjacent first key points can be constructed, and each road section is sampled to obtain a plurality of sampling points. For each road section, a preset first sampling point (x_s, y_s) is used for determining whether the coordinate point in the 0-map boundary information is accessed, and if not, the coordinate point is added into a queue (queue). The first sample point is then pushed out based on the queue.push function and accessed. Judging whether the queue is empty or not, and ending if the queue is empty. If not, the current sampling point (x_c, y_c) in the queue is placed at the forefront of the queue using the queue.top function. And then, judging whether the (x_c, y_c) exists in the safety window or not by utilizing a vaill function, and if so, performing direction expansion on the (x_c, y_c) by utilizing a queue.top function. If not, outputting the current sampling point, namely the obstacle coordinates.
The direction expansion is performed by determining whether k is smaller than the number of expansion directions if the expansion direction k=0. If k is greater than or equal to direct, returning to the step of executing the judgment of whether the queue is empty. If k < direct, x=x_c+factor x dx [ k ], y=y_c+factor dy [ k ] in the extended coordinates (x, y) of the current sampling point. And (3) legality judgment is carried out on the extended coordinates by utilizing the vaild function, namely whether the extended coordinates are positioned in the safety window is judged, and if not, the extended coordinates (x, y) are output, namely the obstacle coordinates. If yes, pushing the point corresponding to the expansion coordinate out of the queue by using the queue. And further, the expansion direction k=k+1, and the step of judging whether k is smaller than the number of expansion directions is performed. For example, the flow of determining the coordinates of an obstacle may be referred to in fig. 5, and fig. 5 is a flowchart of determining the coordinates of an obstacle.
Judging whether the point is in the binary map, if the initial given point is in the free space, the first point in the barrier encountered in the direction expansion is an illegal point, outputting the illegal point, and outputting the corresponding Euclidean symbol distance to be a positive value; otherwise, if the initial given point is in the obstacle, the first point which is encountered in BFS expansion and is not in the obstacle is an illegal point, the output is carried out, and the corresponding Euclidean symbol distance is a negative value.
After the obstacle coordinates of each sampling point are determined, the Euclidean symbol distance between the obstacle coordinates and each first key site can be determined, and then a first Euclidean symbol distance vector field is constructed.
In this embodiment, a plurality of first key sites in each site are extracted, first obstacle coordinates corresponding to the target probability map of each first key site are searched, and a first euclidean symbol distance vector field is constructed according to each first obstacle coordinate. The calculation amount can be reduced by extracting the key site first. And aiming at each key site, whether barrier points needing to be avoided exist or not can be determined, so that a road network constructed later can be more accurate.
And S3042, optimizing the sites with the same attribute in each site according to the first Euclidean symbol distance vector field to obtain the corresponding optimized site.
Wherein, the stations with the same attribute are stations with barriers in the safety window.
Specifically, the euclidean distance between the site where the obstacle exists and the respective corresponding obstacle may be determined according to the first euclidean distance vector field. And further, the sites with the obstacles can be subjected to smooth optimization according to Euclidean distances between the sites with the obstacles and the corresponding obstacles and a preset smooth term punishment function, so that optimized sites are obtained. So as to avoid the phenomenon that the direction of extrapolating sites with obstacles always faces to one side and is contrary to the intention of the road network construction, and obtain more accurate road network sites.
As an example that can be implemented, optimizing the sites with the same attribute in each site according to the first euclidean symbol distance vector field to obtain a corresponding optimized site, including:
s3042a, according to the first Euclidean symbol distance vector field, for each first key station, obtaining a first Euclidean symbol distance between the first key station and the first obstacle coordinates.
S3042b, determining the moving Euclidean symbol distance of the first key station needing to move according to the first Euclidean symbol distance, the preset safety distance and the preset punishment function.
And S3042c, moving the first key station according to the moving Euclidean symbol distance to obtain the optimized station.
Specifically, according to the first euclidean symbol distance vector field, for each first critical station, a first euclidean symbol distance c between the first critical station and the first obstacle coordinates is obtained ij . Judging the first Euclidean symbol distance and 0 to the preset safety distance s f And carrying a preset penalty function, and determining the moving Euclidean symbol distance f (i, j) of the first key station to be moved.
Wherein, the punishment function of predetermineeing is:
according to the embodiment, the first Euclidean symbol distance between the first key station and the first obstacle coordinates is obtained for each first key station according to the first Euclidean symbol distance vector field, the moving Euclidean symbol distance of the first key station which needs to be moved is determined according to the first Euclidean symbol distance, the preset safety distance and the preset punishment function, and the first key station is moved according to the moving Euclidean symbol distance, so that the optimized station is obtained. The calculation amount can be reduced by extracting the key site first. And aiming at each key site, whether barrier points needing to be avoided exist or not can be determined, so that a road network constructed later can be more accurate.
S3044, sequentially connecting two adjacent optimization stations in the first track information to obtain an initial road; the first track information is track information with earliest time generated in the plurality of track information;
specifically, after the first track information is obtained, two adjacent optimization sites can be connected in sequence to obtain an initial road. The plurality of pieces of track information are generated in accordance with the time sequence in which the track information is generated. The first track information is track information with earliest time generated in the plurality of track information.
S3046, constructing an initial road network according to the initial road and the optimized station corresponding to the non-first track information.
Specifically, a road network map including an initial road network and an optimized site corresponding to non-first track information may be used as the initial road network.
In the embodiment, according to a first Euclidean symbol distance vector field, optimizing stations with the same attribute in each station to obtain corresponding optimized stations, and sequentially connecting two adjacent optimized stations in first track information to obtain an initial road; the first track information is track information with earliest time generated in the track information, and an initial road network is constructed according to the initial road and the optimized station corresponding to the non-first track information. The simplified and smooth road network can be obtained, and on the basis of considering the track information, the colleague can consider the environment information based on the target probability map to obtain a more accurate road network.
S306, simplifying at least one of sites with the same attribute and road segments with the same attribute in the initial road network to obtain a first optimized road network.
The sites with the same attribute can comprise sites, wherein a road section formed by a plurality of sites is positioned in a preset curvature range. The road segments having the same attribute may include road segments having inclination angles within a preset range within a preset area in non-first track information within the preset range. For example, a road segment parallel to the original road.
Specifically, the sites in the initial road network can be simplified, the sites within the preset curvature range can be deleted, and a new road section can be generated. The road segments can be simplified, and the road segments which are not the first track information in the preset range are combined with the hard road segments in the initial road. Advanced site simplification is also possible, further simplifying for road segments.
As an example that may be implemented, simplifying a site with the same attribute in an initial road network includes:
s3062, acquiring coordinate information of a first target site, a second target site and a third target site which are sequentially adjacent in each optimization site according to each track information.
S3064, calculating the curvature among the first target site, the second target site and the third target site according to the coordinate information.
S3066, calculating a second Euclidean symbol distance between the first target site and the third target site according to the coordinate information.
S3068, determining a target deletion site and deleting the target deletion site according to the curvature, the preset curvature threshold, the second Euclidean symbol distance and the preset distance threshold.
Specifically, for each track information, coordinate information of a first target site, a second target site and a third target site which are sequentially adjacent in each optimized site is obtained, curvatures among the first target site, the second target site and the third target site are calculated according to the coordinate information, a second Euclidean symbol distance between the first target site and the third target site is calculated according to the coordinate information, and a target deletion site is determined and deleted by comparing the curvatures with a preset curvature threshold value, the second Euclidean symbol distance and a preset distance threshold value.
Further, as an example that may be implemented, determining the target deletion site according to the curvature, the preset curvature threshold, the second euclidean symbol distance, and the preset distance threshold includes:
and under the condition that the curvature is larger than a preset curvature threshold value and the second Euclidean symbol distance is smaller than a preset distance threshold value, taking the second target site as the target deletion site.
Referring to fig. 6, fig. 6 is a simplified flow diagram of a station. Wherein count is the number of optimized sites in each track information, max_k is a preset curvature threshold, k is curvature, max_len is a preset distance threshold, and index represents the index of the road site points. And 0 and 1 represent a No. 0 road network site and a No. 1 road network site, the conn function is used for constructing two road network sites into a road network segment, the deConn function is used for eliminating the connection state of the corresponding index road network site, the computer K function is used for calculating curvature, the dist function is used for calculating the Euclidean distance between the two road network sites, and the erase function is used for deleting the road network site corresponding to the index. Wherein, max_len is used for eliminating accumulated errors of curvature, and the second is used for ensuring that the rear node is in a communication range during the distributed scheduling of the multiple robots. The values of max_k and max_len may be set according to a specific actual scenario.
Count, max_k, and max_len are input in advance. Determine if count is less than 2? If yes, ending. If not, selecting the No. 0 road network station and the No. 1 road network station. The road network index is 2. Judging whether the open circuit network index is smaller than the count or not, if not, ending. If yes, judging whether index is smaller than 2. If yes, index=index+1, and return to execute the step of judging whether the network breaking index is smaller than count. If not, calculating the curvature k between the index-2, index-1 and index three points by using the computer K function, and further calculating the second Euler symbol distance cur_dist between the index-2 and the index by using the dist function. It is determined whether k is smaller than max_k and cur_dist is smaller than max_len. If yes, eliminating the connection state of the corresponding index road network site by adopting a deConn function, constructing a road network segment by adopting the index-2 and the index, deleting the road network site index-1 corresponding to the index by adopting an erase function, and returning the count=count-1 to execute the step of judging whether the road network index is smaller than the count. If not, constructing the index-1 and the index into a road network segment by adopting a conn function, returning to execute the step of index=index+1, and returning to execute the step of judging whether the road network index is smaller than count.
In this embodiment, coordinate information of a first target site, a second target site and a third target site, which are sequentially adjacent in each optimization site, is obtained by aiming at each track information, curvatures among the first target site, the second target site and the third target site are calculated according to the coordinate information, a second euclidean symbol distance between the first target site and the third target site is calculated according to the coordinate information, and a target deletion site is determined and deleted by comparing the curvatures with a preset curvature threshold value, the second euclidean symbol distance and a preset distance threshold value. The accumulated errors of curvature can be eliminated, and the second effect is that the rear nodes can be ensured to be in the communication range during the distributed scheduling of the multiple robots.
As another example that may be implemented, simplifying the road segments with the same attribute in the initial road network includes:
s3068, acquiring second coordinate information of a plurality of second key stations in non-first track information aiming at each non-first track information in a preset area outside an initial road; the second key site is a site after the deletion target deletion site.
S3070, determining a third Euclidean symbol distance between two adjacent sites in each second key site according to the second coordinate information.
S3072, determining the road sections to be combined according to the third Euclidean symbol distance and a preset connection distance limiting threshold.
And S3074, merging the road sections to be merged into the initial road to obtain the first optimized road network.
It should be noted that when the initial road network is obtained, an initial road, that is, a road generated from the first trajectory information, has been generated. In order to generate a clearer and simpler road network, the road segments to be combined formed by the second key stations in the non-first track information are required to be combined to the initial road.
Specifically, the second coordinate information of the plurality of second key stations in the non-first track information can be obtained for each non-first track information in the connection distance limit in the preset area outside the initial road. And comparing the third Euclidean symbol distance with a preset connection distance limiting threshold value, and determining the road sections to be combined. And calculating a third Euclidean symbol distance between two adjacent sites in each second key site by adopting a calculation formula of the Euclidean symbol distance. And connecting the stations of the road network to be combined with the stations in the corresponding initial road sections respectively.
Further, determining the road section to be combined according to the third euclidean symbol distance and a preset connection distance limiting threshold value includes: and taking the road section between two adjacent stations as the road section to be combined under the condition that the third Euclidean symbol distance is larger than or equal to the preset connection distance limiting threshold value.
Optionally, merging the road segments to be merged into the initial road to obtain a first optimized road network, including:
and S3074a, projecting the first station in the road section to be merged onto the initial road along the width direction of the initial road, and determining a first projection point.
S3074b, projecting a second station in the road section to be combined onto the initial road along the width direction of the initial road, and determining a second projection point; the first station is adjacent to the second station.
S3074c, sequentially connecting the first site, the first projection point, the second projection point and the second site to obtain a first optimized road network.
For example, referring to fig. 7, fig. 7 is a simplified flow diagram of a road segment. Wherein count is the number of road network stations, road_w is the width of a preset area outside a preset initial road, conn_dist is a connection distance limiting threshold, S is a set of road network nodes for recording skipped road network stations, and index is an indication index of a station i. If a plurality of continuous road network nodes are skipped, only the head node and the tail node in the section of continuous road network nodes are needed to be recorded, and N [ i ] represents the road network node with index of i number.
The count, head_w, conn_dist may be input in advance. Let index=1, s= { }. It is determined whether index is less than count. If not, ending. If yes, further judging whether a site pointed by index exists in the head_w. If yes, the index is eliminated, after the count=count+1, and the step of judging whether the index is smaller than the count is executed. If the index-1 is not present, calculating a third Euclidean symbol distance between the index-1 and the index by adopting a dist function, judging whether the third Euclidean symbol distance is smaller than a connection distance limiting threshold, and if the third Euclidean symbol distance is smaller than the connection distance limiting threshold, connecting the index-1 and the index by adopting a conn function, and constructing a road section. If not, record the skipped set of road network nodes s=su { N [ index-1], N [ index ] }, let index=index+1, and return to execute the step of judging whether index is smaller than count. Wherein, the comparison diagram for road section simplification can be seen in fig. 8, and fig. 8 is; a simplified front-back comparison diagram of road network.
As another implementation manner, road segments formed between optimized stations corresponding to the plurality of pieces of track information can be combined by taking the average value of the road segments.
In this embodiment, the second coordinate information of a plurality of second key stations in the non-first track information may be obtained by aiming at each non-first track information in the preset area outside the initial road, a third euclidean symbol distance between two adjacent stations in each second key station may be determined according to the second coordinate information, a road section to be combined may be determined according to the third euclidean symbol distance and a preset connection distance limiting threshold, and the road section to be combined may be combined into the initial road to obtain the first optimized road network. Only key roads can be reserved, so that field resources are saved, road storage resources are saved and road searching efficiency is improved in application.
It should be noted that, after the first optimized road network is obtained, the first optimized road network may be further optimized, and fig. 9 is a schematic flow chart of the optimization of the first road network. As an example that may be implemented, referring to fig. 9, the road network generating method further includes:
s502, line segment sampling is carried out on each road network segment in the first optimized road network, and a plurality of sampling points are obtained.
Specifically, line segment sampling can be performed on each road network segment during the issuance of arcGIS batch equidistant dividing lines, so as to obtain a plurality of sampling points. The method may also be used by sampling other line segments, and is not limited herein.
S504, searching for second obstacle coordinates corresponding to the sampling points in the first optimized road network according to the sampling points.
Specifically, a preset searching algorithm is adopted to search coordinates corresponding to the nearest second obstacle of the sampling point in the first optimized road network, namely second obstacle coordinates. The preset search algorithm may employ a preferential search algorithm (BFS).
S506, constructing a second Euclidean symbol distance vector field according to the second obstacle coordinates; the second Euclidean symbol distance vector field is a vector field constructed according to Euclidean symbol distances between each sampling point and the corresponding second obstacle coordinates.
Specifically, after the coordinates of the second obstacle are obtained, the Euclidean symbol distance is calculated according to the coordinates of the second obstacle and the corresponding stations, and a second Euclidean symbol distance vector field is constructed.
S508, according to the second Euclidean symbol distance vector field, environment gradient information of the first optimized road network station is obtained, and the environment gradient information is used for representing Euclidean distances before the first optimized road network station and the second obstacle coordinates.
Specifically, the environmental gradient information of the first optimized road network site can be extracted according to the Euclidean symbol distance vector field.
And S510, optimizing the first optimized road network site according to the environment gradient information to obtain a second optimized road network site.
Specifically, according to the environmental gradient information, the optimization site needing to be expanded is expanded outwards so as to avoid the obstacle, and then the second optimization road network site is obtained.
As an example that may be implemented, optimizing the first optimized road network site according to the environmental gradient information to obtain a second optimized road network site includes:
s5101, determining a second moving Euclidean symbol distance of the first optimized road network station according to the environment gradient information, the preset safe distance and the preset punishment function.
S5102, the first optimized road network site is moved according to the second moving Euclidean symbol distance, and a second optimized site is obtained.
Specifically, the environmental gradient information and the preset safety distance can be substituted into the preset penalty function f (i, j), so that the second moving Euclidean symbol distance of the first optimized road network station is determined. And moving the first optimized road network station according to the second moving Euclidean symbol distance to obtain a second optimized station.
In this embodiment, the second moving euclidean symbol distance of the first optimized road network station is determined, and the first optimized road network station is moved according to the second moving euclidean symbol distance to obtain the second optimized station, so that the road network station can be further optimized, obstacles in the target probability map can be avoided as far as possible, and the obtained road network is more accurate.
And S512, taking the second optimized road network formed by the second optimized road network points as a new first optimized road network.
Specifically, when the second optimized road network formed by the second optimized road website points is optimized, the second optimized road network is used as a new first optimized road network.
In this embodiment, each site in the first optimized road network is further optimized, so that the first optimized road network is more accurate and is obtained by avoiding the obstacle.
And S308, extracting the road section width of the first optimized road network to obtain the road section width of each road section.
Specifically, a preset clustering algorithm may be used to calculate the width of each road segment in the first optimized road network. The preset clustering algorithm may include a compact clustering algorithm. When extracting the road segment width, i e G can be represented by first defining the road segment set G, i representing the i-th road network. i section road network sampling point set E i,j Represents the j sampling point of the i-section road network, j E i . Road network width set W, W i Representing the width of the i-th road network. The number of road segments is N. min_w represents the minimum road network width and INF represents the maximum distance. Wherein the algorithm steps may include:
the first step: i=0, wi to n=0.
The second step is to sample the section i of road network marked as E i,j =0, min_w=inf, and the number of i-segment sampling points is denoted as count.
Thirdly, obtaining nearest obstacle points on two sides of the ith section at the jth path website point according to a compact clustering algorithm to be marked as P and Q;
and fourthly, respectively calculating the distance from P, Q to the ith network segment, and summing the distances and the ith network segment to be denoted as cur_w.
Fifth, if cur_w < min_w, min_w=cur_w, otherwise go to sixth.
Sixth step j=j+1.
And seventh, judging whether j is smaller than count, if yes, turning to the third step, otherwise turning to the eighth step.
Eighth step, wi=min_w, i=i+1.
And ninth, judging whether i is smaller than N, if so, turning to the second step, otherwise, ending.
S310, generating a target road network according to the width of each road section.
Specifically, the target road network may be generated by adding the road segment widths to the width attribute of the first optimized road network.
Alternatively, taking the execution body of the present embodiment as the server 110, after the target road network is generated, the target generating network may be sent to the mobile device 120, so as to instruct the mobile device to move according to the target road network.
In the embodiment of the application, an initial road network is constructed according to a target probability map and a plurality of pieces of track information of movable equipment moving in a target area, at least one of sites with the same attribute and road segments with the same attribute in the initial road network is simplified to obtain a first optimized road network, the road segment width of the first optimized road network is extracted to obtain the road segment width of each road segment, and the target road network is generated according to the road segment widths. Compared with the prior art, the method and the device for constructing the road network can construct the initial road network together according to the track information under the environment information combined with the forbidden region characteristics of the target probability map, improve the safety and reliability of the road network information, simplify the sites and the road sections with the same attribute, and reduce the redundancy of the road network. In addition, the reliability of the generated travelable target road network can be improved to a certain extent based on the extraction of the road network width, in other words, the target road network generated under the constraint of the road network width and the robot size can pass through.
Embodiments of the apparatus corresponding to the foregoing method embodiments are described below.
Based on the method shown in fig. 3, the present embodiment further provides a road network generating device, which is configured to execute the road network generating method in the foregoing embodiment.
Specifically, fig. 10 is a schematic structural diagram of a road network generating device in an embodiment of the present application. As shown in fig. 10, the apparatus includes:
an obtaining module 902, configured to obtain a target probability map and a plurality of track information of a mobile device moving in a target area; the target probability map comprises forbidden region attribute characteristics;
the initial road network construction module 904 is configured to construct an initial road network according to the target probability map and the plurality of track information;
a simplifying module 906, configured to simplify at least one of a site with the same attribute and a road segment with the same attribute in the initial road network, so as to obtain a first optimized road network;
the width extraction module 908 is configured to perform segment width extraction on the first optimized road network to obtain segment widths of each segment;
the target road network generating module 910 is configured to generate a target road network according to the width of each road segment.
Optionally, a preset clustering algorithm is adopted to calculate the width of each road section in the first optimized road network.
Regarding the specific limitations and the possible beneficial effects of the road network generating device, reference may be made to the limitations of the road network generating method hereinabove, and no further description is given here.
Optionally, the initial road network construction module 904 includes:
A first construction unit 9041, configured to construct a first euclidean symbol distance vector field according to each site in the target probability map and the track information; the first Euclidean symbol distance vector field is a vector field constructed according to Euclidean symbol distances between each station and corresponding obstacles;
the simplification unit 9042 is configured to optimize the sites with the same attribute in each site according to the first euclidean symbol distance vector field, so as to obtain corresponding optimized sites;
the station connection unit 9043 is used for sequentially connecting two adjacent optimization stations in the first track information to obtain an initial road; the first track information is track information with earliest time generated in the plurality of track information;
the second construction unit 9044 is configured to construct an initial road network according to the initial road and the optimization site corresponding to the non-first track information.
Optionally, the first building unit 9041 is specifically configured to extract a plurality of first key sites in each site; the first key site is a site with target attribute characteristics; searching first obstacle coordinates corresponding to each first key site in the target probability map; and constructing a first Euclidean symbol distance vector field according to each first obstacle coordinate.
Optionally, the simplification unit 9042 is specifically configured to obtain, for each first key station, a first euclidean symbol distance between the first key station and the first obstacle coordinate according to the first euclidean symbol distance vector field; determining a moving Euclidean symbol distance of a first key station needing to be moved according to the first Euclidean symbol distance, a preset safety distance and a preset punishment function; and moving the first key station according to the moving Euclidean symbol distance to obtain the optimized station.
Optionally, the simplification unit 9042 is specifically configured to obtain, for each track information, coordinate information of a first target site, a second target site, and a third target site that are sequentially adjacent to each other in each optimization site; calculating curvatures among the first target site, the second target site and the third target site according to the coordinate information; calculating a second Euclidean symbol distance between the first target site and the third target site according to the coordinate information; and determining the target deletion site and deleting the target deletion site according to the curvature, the preset curvature threshold, the second Euclidean symbol distance and the preset distance threshold.
Optionally, the simplifying unit 9042 is specifically configured to, when the curvature is greater than a preset curvature threshold, and the second euclidean symbol distance is less than a preset distance threshold, take the second target site as the target deletion site.
Optionally, the simplification unit 9042 is specifically configured to obtain, for each non-first track information in the preset area outside the initial road, second coordinate information of a plurality of second key sites in the non-first track information; the second key site is a site after the target deletion site is deleted; determining a third Euclidean symbol distance between two adjacent sites in each second key site according to the second coordinate information; determining a road section to be combined according to the third Euclidean symbol distance and a preset connection distance limiting threshold; and merging the road sections to be merged into the initial road to obtain the first optimized road network.
Optionally, the simplifying unit 9042 is specifically configured to, in a case where the third euclidean symbol distance is greater than or equal to a preset connection distance limiting threshold, use a road segment between two adjacent sites as the road segment to be merged.
Optionally, the simplification unit 9042 is specifically configured to project the first station in the road section to be merged onto the initial road along the initial road width direction, and determine a first projection point; projecting a second station in the road section to be combined onto the initial road along the width direction of the initial road, and determining a second projection point; the first site is adjacent to the second site; and sequentially connecting the first site, the first projection point, the second projection point and the second site to obtain a first optimized road network.
Optionally, the road network generating device further includes:
the sampling module 912 is configured to perform line segment sampling on each road network segment in the first optimized road network to obtain a plurality of sampling points;
the searching module is used for searching the second obstacle coordinates corresponding to the sampling points in the first optimized road network for each sampling point;
a second construction module 914, configured to construct a second euclidean symbol distance vector field according to the second obstacle coordinates; the second Euclidean symbol distance vector field is a vector field constructed according to Euclidean symbol distances between each sampling point and corresponding second obstacle coordinates;
the gradient information obtaining module 916 is configured to obtain environmental gradient information of the first optimized road network station according to the second euclidean symbol distance vector field; the environment gradient information is used for representing Euclidean distance between the first optimized road network site and the second obstacle coordinate;
the optimizing module 918 is configured to optimize the first optimized road network site according to the environmental gradient information to obtain a second optimized road network site; and taking the second optimized road network formed by the second optimized road website points as a new first optimized road network.
Optionally, the optimization module 918 includes:
a second euclidean symbol distance determining unit 9181 configured to determine a second moving euclidean symbol distance of the first optimized road network station according to the environmental gradient information, the preset safety distance, and the preset penalty function;
And the mobile unit 9182 is configured to move the first optimized road network station according to the second moving euclidean symbol distance, to obtain a second optimized station.
Optionally, the road network generating device further includes:
the initial map obtaining module 920 is configured to obtain an initial probability map and preset forbidden region information; the initial probability map is a probability map generated according to the track information;
the binarization processing module 922 is used for performing binarization processing on the initial probability map to obtain a reference probability map;
the attribute adding module 924 is configured to add preset forbidden region information to forbidden region attribute features of the reference probability map, and generate a target probability map.
Regarding the specific limitations and the possible beneficial effects of the road network generating device, reference may be made to the limitations of the road network generating method hereinabove, and no further description is given here. The respective modules in the road network generating apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In a specific implementation, the embodiment of the application further provides a computer device, which may be a server in the foregoing embodiment, and is configured to implement all or part of the steps of the foregoing method for dividing a cargo collecting area.
Fig. 11 is a schematic structural diagram of a computer device according to the present embodiment. Comprising the following steps: at least one processor 110, memory 120, and at least one interface 130, and may further include a communication bus 140 for connecting these components.
Wherein the at least one processor 110 may be a CPU or processing chip configured to read and execute computer program instructions stored in the memory 120 to enable the at least one processor 110 to perform the method flows of the various embodiments described above.
The memory 120 may be a non-transitory memory (non-transitory memory) that may include volatile memory, such as high-speed random access memory (Random Access Memory, RAM), or may include non-volatile memory, such as at least one disk memory.
At least one interface 130 includes an input-output interface, and a communication interface, which may be a wired or wireless interface, to enable a communication connection between the electronic device and other devices. The input-output interface may be used to connect peripheral devices such as a display screen, a keyboard, etc.
In some embodiments, the memory 120 stores computer readable program instructions, and when the processor 110 reads and executes the program instructions in the memory 120, a method for dividing a cargo area according to the foregoing embodiment may be implemented.
In addition, the present embodiment further provides a computer program product for storing computer readable program instructions, where the instructions are executed by the processor 110 to implement a road network generating method in the foregoing embodiment.
In addition, the present embodiment also provides a computer device, which may be a terminal, which may be a robot or a vehicle, or the like. The internal structure of the terminal may be as shown in fig. 12. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a road network generation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structures shown in fig. 11 and 12 are block diagrams of only portions of structures that are relevant to the present application and are not intended to limit the computer device on which the present application may be implemented, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In a specific implementation, the embodiment of the present application further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the method in any of the embodiments above.
It is noted that in the present application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable storage medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
For the purposes of this description, a "computer-readable storage medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM).
In addition, the computer-readable storage medium may even be paper or other suitable medium upon which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory. It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof.
In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
The embodiments of the present invention described above do not limit the scope of the present invention.

Claims (16)

1. A road network generation method, the method comprising:
acquiring a target probability map and a plurality of track information of the movable equipment moving in a target area; the target probability map comprises forbidden region attribute characteristics;
constructing an initial road network according to the target probability map and the track information;
simplifying at least one of sites with the same attribute and road sections with the same attribute in the initial road network to obtain a first optimized road network;
extracting the road section width of the first optimized road network to obtain the road section width of each road section;
and generating a target road network according to the width of each road section.
2. The method of claim 1, wherein constructing an initial road network from the target probability map and the plurality of trajectory information comprises:
constructing a first Euclidean symbol distance vector field according to each site in the target probability map and the track information; the first Euclidean symbol distance vector field is a vector field constructed according to Euclidean symbol distances between each station and corresponding obstacles;
Optimizing the sites with the same attribute in each site according to the first Euclidean symbol distance vector field to obtain corresponding optimized sites;
sequentially connecting two adjacent optimization stations in the first track information to obtain an initial road; the first track information is track information with earliest time generated in a plurality of track information;
and constructing the initial road network according to the initial road and the optimized station corresponding to the non-first track information.
3. The method of claim 2, wherein constructing a first euclidean distance vector field from each site in the target probability map and the trajectory information comprises:
extracting a plurality of first key sites in the sites; the first key site is a site with target attribute characteristics;
searching first obstacle coordinates corresponding to the target probability map of each first key station;
and constructing a first Euclidean symbol distance vector field according to each first obstacle coordinate.
4. A method according to claim 3, wherein the simplifying the sites with the same attribute in each site according to the first euclidean symbol distance vector field to obtain the corresponding optimized site includes:
According to the first Euclidean symbol distance vector field, for each first key station, acquiring a first Euclidean symbol distance between the first key station and the first obstacle coordinate;
determining a moving Euclidean symbol distance of the first key station needing to be moved according to the first Euclidean symbol distance, a preset safety distance and a preset punishment function;
and moving the first key station according to the moving Euclidean symbol distance to obtain the optimized station.
5. The method according to any one of claims 2-4, wherein said simplifying the sites with the same attributes in the initial road network comprises:
for each piece of track information, acquiring coordinate information of a first target site, a second target site and a third target site which are sequentially adjacent in each optimized site;
calculating curvatures among the first target site, the second target site and the third target site according to the coordinate information;
calculating a second Euclidean symbol distance between the first target site and the third target site according to the coordinate information;
and determining a target deletion site and deleting the target deletion site according to the curvature, the preset curvature threshold, the second Euclidean symbol distance and the preset distance threshold.
6. The method of claim 5, wherein the determining the target deletion site based on the curvature, the preset curvature threshold, the second euclidean symbol distance, and the preset distance threshold comprises:
and taking the second target site as a target deletion site under the condition that the curvature is larger than a preset curvature threshold value and the second Euclidean symbol distance is smaller than the preset distance threshold value.
7. The method of claim 5, wherein said simplifying the road segments of the initial road network having the same attribute comprises:
for each piece of non-first track information in the preset area outside the initial road, second coordinate information of a plurality of second key stations in the non-first track information is obtained; the second key site is a site after deleting the target deleted site;
determining a third Euclidean symbol distance between two adjacent sites in each second key site according to the second coordinate information;
determining a road section to be combined according to the third Euclidean symbol distance and a preset connection distance limiting threshold;
and merging the road sections to be merged into the initial road to obtain the first optimized road network.
8. The method of claim 6, wherein the determining the road segment to be merged according to the third euclidean symbol distance and a preset connection distance limiting threshold value comprises:
and taking the road section between the two adjacent stations as the road section to be combined under the condition that the third Euclidean symbol distance is larger than or equal to the preset connection distance limiting threshold value.
9. The method of claim 7, wherein merging the segments to be merged into the initial road to obtain the first optimized road network comprises:
projecting a first station in the road section to be combined onto the initial road along the width direction of the initial road, and determining a first projection point;
projecting a second station in the road section to be combined onto the initial road along the width direction of the initial road, and determining a second projection point; the first site is adjacent to the second site;
and sequentially connecting the first site, the first projection point, the second projection point and the second site to obtain a first optimized road network.
10. The method according to any one of claims 1-4, further comprising:
Segment sampling is carried out on each road network segment in the first optimized road network to obtain a plurality of sampling points;
for each sampling point, searching a second obstacle coordinate corresponding to the sampling point in the first optimized road network;
constructing a second Euclidean symbol distance vector field according to the second obstacle coordinates; the second Euclidean symbol distance vector field is a vector field constructed according to Euclidean symbol distances between the sampling points and the corresponding second obstacle coordinates;
acquiring environmental gradient information of the first optimized road network station according to the second Euclidean symbol distance vector field; the environment gradient information is used for representing Euclidean distance between the first optimized road network site and the second obstacle coordinate;
optimizing the first optimized road network site according to the environment gradient information to obtain a second optimized road network site;
and taking the second optimized road network formed by the second optimized road website points as a new first optimized road network.
11. The method of claim 10, wherein optimizing the first optimized road network site according to the environmental gradient information to obtain a second optimized road network site comprises:
Determining a second moving Euclidean symbol distance of the first optimized road network station according to the environment gradient information, the preset safety distance and a preset punishment function;
and moving the first optimized road network station according to the second moving Euclidean symbol distance to obtain the second optimized station.
12. The method according to any one of claims 1-4, wherein the extracting the road segment width of the first optimized road network to obtain the road segment width of each road segment includes:
and calculating the width of each road section in the first optimized road network by adopting a preset clustering algorithm.
13. The method according to any one of claims 1-4, wherein the method for generating the target probability map comprises:
acquiring an initial probability map and preset forbidden region information; the initial probability map is a probability map generated according to the track information;
performing binarization processing on the initial probability map to obtain a reference probability map;
and adding the preset forbidden region information into forbidden region attribute characteristics of the reference probability map to generate the target probability map.
14. A road network generation device, the device comprising:
The acquisition module is used for acquiring a target probability map and a plurality of track information of the movable equipment moving in the target area; the target probability map comprises forbidden region attribute characteristics;
the initial road network construction module is used for constructing an initial road network according to the target probability map and the track information;
the simplifying module is used for simplifying at least one of sites with the same attribute and road sections with the same attribute in the initial road network to obtain a first optimized road network;
the width extraction module is used for extracting the road section width of the first optimized road network to obtain the road section width of each road section;
and the target road network generation module is used for generating a target road network according to the road section widths.
15. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 13 when the computer program is executed.
16. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 13.
CN202210908010.XA 2022-07-29 2022-07-29 Road network generation method, device, computer equipment and computer readable storage medium Pending CN117516558A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210908010.XA CN117516558A (en) 2022-07-29 2022-07-29 Road network generation method, device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210908010.XA CN117516558A (en) 2022-07-29 2022-07-29 Road network generation method, device, computer equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117516558A true CN117516558A (en) 2024-02-06

Family

ID=89749952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210908010.XA Pending CN117516558A (en) 2022-07-29 2022-07-29 Road network generation method, device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117516558A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117933519A (en) * 2024-03-21 2024-04-26 腾讯科技(深圳)有限公司 Road network optimization method and related device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117933519A (en) * 2024-03-21 2024-04-26 腾讯科技(深圳)有限公司 Road network optimization method and related device
CN117933519B (en) * 2024-03-21 2024-06-11 腾讯科技(深圳)有限公司 Road network optimization method and related device

Similar Documents

Publication Publication Date Title
CN112212874B (en) Vehicle track prediction method and device, electronic equipment and computer readable medium
CN110032181A (en) Barrier localization method, device, computer equipment and storage medium in semantic map
CN107301254A (en) A kind of road network hot spot region method for digging
CN107976688A (en) Obstacle detection method and related device
CN114440916B (en) Navigation method, device, equipment and storage medium
CN101630463A (en) Method for automatic vectorization of road network digital raster map
Bastani et al. Machine-assisted map editing
US9910878B2 (en) Methods for processing within-distance queries
JP2020042793A (en) Obstacle distribution simulation method, device, and terminal based on probability plot
CN117516558A (en) Road network generation method, device, computer equipment and computer readable storage medium
CN115346183A (en) Lane line detection method, terminal and storage medium
CN115218916A (en) Safety path planning method and device
CN116363856A (en) Method and device for generating road intersection topological structure
CN109238296A (en) A kind of high-precision indoor navigation method and device
CN105701555A (en) Method and system for dividing road network
CN109446437B (en) Information mining method, device, server and storage medium
CN104121917A (en) Method and device for automatically discovering new bridge
JP6070123B2 (en) Position information concealment method, position information concealment device, and position information concealment program
CN112733782B (en) Urban functional area identification method based on road network, storage medium and electronic equipment
CN110796129A (en) Text line region detection method and device
CN115311887A (en) Method, equipment and storage medium for constructing high-quality public service resource accessibility model
CN114630269A (en) Signal processing method, device, equipment and storage medium
CN108960738B (en) Laser radar data clustering method under warehouse channel environment
CN113124849A (en) Indoor path planning method and device, electronic equipment and storage medium
CN112069899A (en) Road shoulder detection method and device and storage medium

Legal Events

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