CN114255241A - Region segmentation method, device and equipment for path planning and storage medium - Google Patents

Region segmentation method, device and equipment for path planning and storage medium Download PDF

Info

Publication number
CN114255241A
CN114255241A CN202111352625.0A CN202111352625A CN114255241A CN 114255241 A CN114255241 A CN 114255241A CN 202111352625 A CN202111352625 A CN 202111352625A CN 114255241 A CN114255241 A CN 114255241A
Authority
CN
China
Prior art keywords
segmentation
area
obtaining
edge
voronoi
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.)
Granted
Application number
CN202111352625.0A
Other languages
Chinese (zh)
Other versions
CN114255241B (en
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.)
Peng Cheng Laboratory
Original Assignee
Peng Cheng Laboratory
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 Peng Cheng Laboratory filed Critical Peng Cheng Laboratory
Priority to CN202111352625.0A priority Critical patent/CN114255241B/en
Publication of CN114255241A publication Critical patent/CN114255241A/en
Application granted granted Critical
Publication of CN114255241B publication Critical patent/CN114255241B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/20Instruments for performing navigational calculations

Abstract

The invention relates to the technical field of robot path planning, in particular to a region segmentation method, a device, equipment and a storage medium for path planning. Segmenting the region to be segmented by applying a Voronoi diagram segmentation method to obtain a Voronoi segmentation diagram; according to the Voronoi division diagram, obtaining alternative edges contained in the Voronoi division diagram, wherein two vertexes of the alternative edges are both positioned in a task area, and the task area is an area where a terminal in the area to be divided executes a task; obtaining a prior boundary edge according to the alternative edge; and obtaining a target segmentation area according to the prior boundary edge and the Voronoi segmentation graph. According to the method, the non-task area in the task area to be segmented is removed through the alternative edge, and then the area is segmented according to the prior boundary edge, so that the number of turns can be reduced when the terminal moves on the path obtained after segmentation, and the task execution efficiency of the terminal is improved.

Description

Region segmentation method, device and equipment for path planning and storage medium
Technical Field
The invention relates to the technical field of robot path planning, in particular to a region segmentation method, a device, equipment and a storage medium for path planning.
Background
The area coverage path planning is a basic technology (the robot, the detection and exploration unmanned aerial vehicle and the agricultural robot are all terminals for executing tasks) which is relied on when the sweeping robot, the detection and exploration unmanned aerial vehicle and the agricultural robot execute the tasks. The existing area coverage path planning algorithm comprises the following steps as a whole: firstly, dividing an area to be covered; secondly, planning a path inside each sub-area; and thirdly, calculating the sequence and the path of accessing each sub-area.
Since the robot needs to accelerate and decelerate during the turning process, in order to complete the area coverage task quickly, an important index for measuring the area coverage algorithm is the number of turns in the planned path. For this reason, in step two, the robot usually travels along a zigzag movement path. In order to ensure that the robot can proceed in a zigzag path in each sub-area, in step one, the area to be covered needs to be segmented. Existing research has made an important advance in the question of how to demarcate areas that can be covered by a glyph route, namely the glyph decomposition algorithm (BCD algorithm). By utilizing the algorithm, the area to be covered can be divided into a plurality of sub-areas on the premise of giving the cleaning direction, and the interior of each sub-area can be cleaned by using the zigzag route.
The BCD algorithm solves the problem of how to realize the first step and the second step to a certain extent, and on the basis, researchers have proposed a series of algorithms based on optimization solution of the sub-region access sequence in recent years. Mannadiar et al proposed that "key points" used in the decomposition of regions in the BCD algorithm were used as vertices of the graph, each decomposed region was used as an edge of the graph, and further the problem of traversing all regions was transformed into the problem of the skewness on the graph (i.e., how to traverse all edges). Vandermeulen et al propose that the virtual centers of the cleaning start point, end point, and sub-regions of each sub-region can be used as the vertices of the graph to construct the traveler problem to optimize the traversal order.
The algorithm can be summarized as using the BCD algorithm to realize the first step and the second step, and then optimizing the third step. A common limitation of these algorithms is that the tasks must be performed in the same direction for each sub-area, and for some environments that are more square or have fewer obstructions, better processing of the tasks can be achieved even if the tasks are performed in the same direction for each sub-area. However, for the outdoor environment, because the boundary in the outdoor environment is often no longer regular, and the number of obstacles in the outdoor environment is various and dense, taking the minimum number of turns of the terminal as a standard, adopting a single direction will greatly reduce the performance of the area coverage algorithm. For this reason, an optimization algorithm for the first and second steps needs to be designed.
In summary, in the prior art, dividing the area to be covered increases the number of turns when the terminal executes the task, thereby reducing the efficiency of the terminal in executing the task.
Thus, there is a need for improvements and enhancements in the art.
Disclosure of Invention
In order to solve the technical problems, the invention provides a region segmentation method, a device, equipment and a storage medium for path planning, which solve the problem that in the prior art, the segmentation of a region to be covered increases the number of turns when a terminal executes a task, thereby reducing the efficiency of the terminal in executing the task.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a region segmentation method for path planning, including:
segmenting the region to be segmented by applying a Voronoi diagram segmentation method to obtain a Voronoi segmentation diagram;
according to the Voronoi division diagram, obtaining alternative edges contained in the Voronoi division diagram, wherein two vertexes of the alternative edges are both positioned in a task area, and the task area is an area needing to execute a task in the area to be divided;
obtaining a prior boundary edge according to the alternative edge;
and obtaining a target segmentation area according to the prior boundary edge and the Voronoi segmentation graph, wherein the target segmentation area is used for planning a path required by executing a task.
In one implementation, the obtaining, according to the voronoi partition map, an alternative edge included in the voronoi partition map includes:
obtaining a division surface contained in the Voronoi division diagram according to the Voronoi division diagram;
preprocessing the Voronoi division diagram according to the vertex corresponding to the division surface and the task area to obtain the preprocessed Voronoi division diagram;
and obtaining the alternative edge according to the preprocessed Voronoi division diagram.
In one implementation, the preprocessing the voronoi partition map according to the vertex corresponding to the partition surface and the task area to obtain the voronoi partition map after preprocessing includes:
deleting the segmentation surfaces corresponding to the vertexes outside the task area to obtain the preprocessed Voronoi division diagram.
In one implementation, the obtaining an a priori bounding edge according to the candidate edge includes:
calculating the distance between the point on the alternative edge and the boundary corresponding to the task area;
calculating a distance gradient corresponding to a point on the alternative edge according to the distance;
obtaining an evaluation function value corresponding to the alternative edge according to the distance and the distance gradient;
and obtaining the prior boundary edge according to the evaluation function value.
In one implementation, the calculating a distance gradient corresponding to a point on the candidate edge according to the distance includes:
calculating a point corresponding to the minimum distance between the alternative edge and the nearest boundary of the task area, and recording as a nearest point;
calculating the distance between the nearest point and the nearest boundary of the task area, recording as a first distance, and calculating a tangent vector of the alternative edge at the nearest point;
calculating the distance from the coordinate corresponding to the sum of the coordinate corresponding to the closest point and the tangent vector to the nearest boundary of the task area, and recording as a second distance;
and obtaining the distance gradient according to the difference between the second distance and the first distance.
In an implementation manner, the obtaining an evaluation function value corresponding to the candidate edge according to the distance and the distance gradient includes:
and obtaining an evaluation function value corresponding to the candidate edge according to the sum of the first distance and the absolute value of the distance gradient.
In one implementation, the obtaining the prior boundary edge according to the evaluation function value includes:
according to the alternative edges, obtaining the alternative edges adjacent to the alternative edges, and marking as alternative adjacent edges, wherein the alternative edges and the alternative adjacent edges have a common vertex;
when the evaluation function value corresponding to the alternative adjacent edge is larger than the evaluation function value corresponding to the alternative edge, marking the alternative edge as a cutting edge;
calculating a point corresponding to the minimum distance between the cutting edge and the nearest boundary of the task area, and recording as a cutting point;
and obtaining the prior boundary edge according to the cutting point, the cutting edge and the task area, wherein the cutting point is positioned on the prior boundary edge, the prior boundary edge is perpendicular to the cutting edge, and two end points of the prior boundary edge are positioned on the boundary of the task area.
In one implementation, the obtaining a target segmentation region according to the prior boundary edge and the voronoi segmentation map, where the target segmentation region is used to plan a path required for executing a task, includes:
obtaining adjacent segmentation faces contained in the Voronoi division diagram according to the Voronoi division diagram, wherein the adjacent segmentation faces have a common edge;
fusing the adjacent segmentation surfaces of the Voronoi segmentation graph, which do not contain the prior boundary edge nor the boundary of the task area, into a plane to obtain a primary segmentation area;
obtaining each primary partition plane contained in the primary partition area according to the primary partition area;
dividing each primary division plane along the longest edge of each primary division plane by adopting a zigzag decomposition algorithm to obtain a secondary division area;
and obtaining the target segmentation area according to the secondary segmentation area.
In one implementation, the obtaining the target segmentation area according to the quadratic segmentation area includes:
according to the secondary segmentation areas, obtaining each secondary segmentation plane contained in the secondary segmentation areas;
fusing the adjacent secondary segmentation planes which do not contain the prior boundary edge into a plane to obtain the fused secondary segmentation area;
dividing each plane along the longest edge of the planes contained in the secondary divided areas after fusion by adopting a Chinese character 'Hui' decomposition algorithm to obtain a tertiary divided area;
obtaining the height corresponding to each secondary division plane according to each vertex of each secondary division plane and a normal vector of a first unit vector, wherein the first unit vector is a unit vector perpendicular to the direction of the longest side of the primary division plane;
obtaining each cubic division plane contained in the cubic division area according to the cubic division area;
obtaining the height corresponding to each cubic division plane according to each vertex of each cubic division plane and a normal vector of a second unit vector, wherein the second unit vector is a unit vector which is perpendicular to the direction of the longest edge of the plane contained in the quadratic division area;
and obtaining the target segmentation area by the height corresponding to each secondary segmentation plane and the height corresponding to each tertiary segmentation plane.
In one implementation, the step of the region segmentation method is followed by further steps of:
obtaining each target segmentation plane corresponding to the target segmentation area;
obtaining a zigzag path corresponding to each target segmentation plane through each target segmentation plane;
and applying a traveling salesman planning algorithm to the zigzag path to obtain the sequence of executing tasks by each target segmentation plane.
In a second aspect, an embodiment of the present invention further provides a device for a method for dividing a region for path planning, where the device includes the following components:
the Voronoi division module is used for dividing the region to be divided by applying a Voronoi diagram division method to obtain a Voronoi division diagram;
the alternative edge calculation module is used for obtaining alternative edges contained in the Voronoi division diagram according to the Voronoi division diagram, wherein two vertexes of the alternative edges are both positioned in a task area, and the task area is an area which needs to execute a task in the area to be divided;
the prior boundary edge calculation module is used for obtaining a prior boundary edge according to the alternative edge;
and the segmentation module is used for obtaining a target segmentation area according to the prior boundary edge and the Voronoi segmentation graph, and the target segmentation area is used for planning a path required by executing a task.
In a third aspect, an embodiment of the present invention further provides a terminal device, where the terminal device includes a memory, a processor, and a region segmentation program stored in the memory and operable on the processor for path planning, and when the processor executes the region segmentation program for path planning, the step of implementing the region segmentation method for path planning is implemented.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a region segmentation program for path planning is stored on the computer-readable storage medium, and when the region segmentation program for path planning is executed by a processor, the steps of the region segmentation method for path planning described above are implemented.
Has the advantages that: the method defines the edges of two vertexes in a task area (the area to be segmented comprises a task area and a non-task area, the task area is an area where a terminal needs to execute a task, and the non-task area is an area where the terminal does not need to execute the task) as alternative edges, then obtains prior boundary edges according to the alternative edges, and finally segments the area to be segmented according to the prior boundary edges to obtain a target segmentation area comprising each segmentation plane.
When the terminal reaches a non-task area (an obstructed area) while performing a task, the terminal needs to turn, and the turning reduces the efficiency of the terminal in performing the task. According to the invention, the non-task area in the task area to be segmented is removed through the alternative edge, and then the area is segmented according to the prior boundary edge, so that the number of turns can be reduced when the terminal moves on the path obtained after segmentation, and the task execution efficiency of the terminal is improved.
Drawings
FIG. 1 is a flow chart of the present invention;
fig. 2 is a schematic block diagram of an internal structure of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention is clearly and completely described below by combining the embodiment and the attached drawings of the specification. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Research shows that the area coverage path planning is a basic technology (the robot, the investigation and exploration unmanned aerial vehicle and the agricultural robot are all terminals for executing tasks) which is relied on when the sweeping robot, the investigation and exploration unmanned aerial vehicle and the agricultural robot execute the tasks. The existing area coverage path planning algorithm comprises the following steps as a whole: firstly, dividing an area to be covered; secondly, planning a path inside each sub-area; and thirdly, calculating the sequence and the path of accessing each sub-area.
Since the robot needs to accelerate and decelerate during the turning process, in order to complete the area coverage task quickly, an important index for measuring the area coverage algorithm is the number of turns in the planned path. For this reason, in step two, the robot usually travels along a zigzag movement path. In order to ensure that the robot can proceed in a zigzag path in each sub-area, in step one, the area to be covered needs to be segmented. Existing research has made an important advance in the question of how to demarcate areas that can be covered by a glyph route, namely the glyph decomposition algorithm (BCD algorithm). By utilizing the algorithm, the area to be covered can be divided into a plurality of sub-areas on the premise of giving the cleaning direction, and the interior of each sub-area can be cleaned by using the zigzag route.
The BCD algorithm solves the problem of how to realize the first step and the second step to a certain extent, and on the basis, researchers have proposed a series of algorithms based on optimization solution of the sub-region access sequence in recent years. Mannadiar et al proposed that "key points" used in the decomposition of regions in the BCD algorithm were used as vertices of the graph, each decomposed region was used as an edge of the graph, and further the problem of traversing all regions was transformed into the problem of the skewness on the graph (i.e., how to traverse all edges). Vandermeulen et al propose that the virtual centers of the cleaning start point, end point, and sub-regions of each sub-region can be used as the vertices of the graph to construct the traveler problem to optimize the traversal order.
The algorithm can be summarized as using the BCD algorithm to realize the first step and the second step, and then optimizing the third step. A common limitation of these algorithms is that the tasks must be performed in the same direction for each sub-area, and for some environments that are more square or have fewer obstructions, better processing of the tasks can be achieved even if the tasks are performed in the same direction for each sub-area. However, for the outdoor environment, because the boundary in the outdoor environment is often no longer regular, and the number of obstacles in the outdoor environment is various and dense, taking the minimum number of turns of the terminal as a standard, adopting a single direction will greatly reduce the performance of the area coverage algorithm. For this reason, an optimization algorithm for the first and second steps needs to be designed. In the prior art, the division of the area to be covered increases the number of turns when the terminal executes the task, thereby reducing the efficiency of the terminal executing the task.
In order to solve the technical problems, the invention provides a region segmentation method, a device, equipment and a storage medium for path planning, which solve the problem that in the prior art, the segmentation of a region to be covered increases the number of turns when a terminal executes a task, thereby reducing the efficiency of the terminal in executing the task. When the method is specifically implemented, firstly, a Voronoi diagram segmentation method is applied to a region to be segmented to obtain a Voronoi segmentation diagram; then obtaining alternative edges contained in the Voronoi division diagram according to the Voronoi division diagram; and then obtaining a prior boundary edge according to the alternative edge. And finally, obtaining a target segmentation area according to the prior boundary edge and the Voronoi segmentation graph. The path planning is carried out according to the target division area obtained by the invention, the turning times of the terminal on the path can be reduced, and the task execution efficiency of the terminal is improved.
For example, the region to be divided is an irregular polygon, a circular region (a region where the obstacle is located, i.e., a non-task region) is inside the polygon, and the region is not required to be executed by the terminal, and the region inside the polygon is a task region except for the circular region. In order to make the directions of executing tasks inconsistent (the directions are inconsistent and the turn times of a terminal can be reduced), dividing the to-be-divided region by adopting a Voronoi diagram division method to obtain five division surfaces, wherein the five division surfaces correspond to thirteen edges, and two vertexes of two edges in the thirteen edges are completely positioned in the non-task region; three edges are that a vertex is positioned in the task area and a vertex is positioned in the non-task area; and finally planning a path of the terminal when the terminal executes the task according to the target segmentation area, so that the turn times of the terminal when executing the task can be reduced, and the working efficiency of the terminal is improved.
Exemplary method
The area segmentation method for path planning in the embodiment can be applied to terminal equipment, and the terminal equipment can be terminal products with a mobile function, such as a sweeping robot, a detection and exploration unmanned aerial vehicle, an agricultural robot and the like. In this embodiment, as shown in fig. 1, the region segmentation method for path planning specifically includes the following steps:
s100, applying a Voronoi diagram segmentation method to the region to be segmented for segmentation to obtain a Voronoi segmentation diagram.
In this embodiment, the area to be divided is a task area covered by the sweeping robot that needs to execute a task, the area to be divided is a polygon, and the polygon is provided with an obstacle, an impassable area, and a building (all of the three are non-task areas, and all of the three areas except the three are task areas) in the polygon, and the obstacle, the impassable area, and the building are also polygons. And taking each side of the polygon as the input of the Voronoi diagram segmentation method to obtain the Voronoi diagram.
The Weinu segmentation is performed on the to-be-segmented areas firstly, so that the directions of the sweeping robot when executing tasks in the subsequent target segmented areas are as inconsistent as possible, and the inconsistent directions can reduce the turning times of the sweeping robot, thereby improving the sweeping efficiency of the sweeping robot.
S200, obtaining alternative edges contained in the Voronoi division diagram according to the Voronoi division diagram, wherein two vertexes of the alternative edges are both located in a task area, and the task area is an area of the area to be divided, where a terminal needs to execute a task.
The step S200 includes the following steps S201, S202, S203:
s201, obtaining a splitting plane included in the Voronoi division diagram according to the Voronoi division diagram.
The division of the region to be divided by voronoi can result in a plurality of division surfaces, which may be irregular patterns.
S202, preprocessing the Voronoi division diagram according to the vertex corresponding to the division surface and the task area to obtain the preprocessed Voronoi division diagram.
In the embodiment, the division surfaces whose vertexes are located outside the task area are deleted from the voronoi division map, that is, the voronoi division map is preprocessed. The reason why the foregoing preprocessing is performed on the voronoi diagram is to reduce the amount of subsequent calculation.
S203, obtaining the alternative edge according to the preprocessed Voronoi division diagram.
In this embodiment, for any edge in the voronoi diagram obtained in step 202, if both vertices of the edge are in the task area, the edge is called a candidate edge.
For example, if the voronoi diagram includes five partition surfaces, and five vertices of a pentagon partition surface are located outside the task area, the pentagon partition surface is deleted from the voronoi diagram, and then only four partition surfaces remain in the voronoi diagram. And then searching edges corresponding to the four division surfaces, assuming that the four division surfaces have twenty edges in total, and selecting fifteen edges with two vertexes in the task area from the twenty edges, wherein the fifteen edges are the alternative edges.
And S300, obtaining a prior boundary edge according to the alternative edge.
The step S300 includes steps S301, S302, S303, S304, S305, S306, S307, S308, S309, S3010, S3011 as follows:
s301, calculating the distance between the point on the alternative edge and the boundary corresponding to the task area.
S302, calculating a point corresponding to the minimum distance between the candidate edge and the nearest boundary of the task area, and recording the point as a nearest point.
S303, calculating the distance between the nearest point and the nearest boundary of the task area, and recording as a first distance.
S304, calculating the tangent vector of the candidate edge at the nearest point.
S305, calculating the distance from the coordinate corresponding to the sum of the coordinate corresponding to the closest point and the tangent vector to the nearest boundary of the task area, and recording the distance as a second distance.
S306, obtaining the distance gradient according to the difference between the second distance and the first distance.
In this embodiment, the distance gradient g (p) obtained in steps S301 to S306*(e)):
Figure BDA0003356361410000101
In the formula, p*(e) Is the closest point on the candidate edge e (the closest point is represented by coordinates), d (p)*(e) Is a point p)*(e) Distance (first distance) from nearest boundary of the task area, delta is alternative edge e at p*(e) The tangent vector of (c), t is a constant, t is 0.01 in this embodiment, d (p)*(e) + t δ) as coordinate p*(e) Distance of + t δ to the nearest boundary of the task area.
S307, obtaining an evaluation function value corresponding to the candidate edge according to the distance and the distance gradient, that is, obtaining an evaluation function value v (e) corresponding to the candidate edge according to a sum of the first distance and an absolute value of the distance gradient:
V(e)=ad(p*(e))+b|g(p*(e))|
wherein a and b are parameters, | g (p)*(e) Is g (p)*(e) Absolute value of).
S308, according to the alternative edges, obtaining the alternative edges adjacent to the alternative edges, and marking as alternative adjacent edges, wherein the alternative edges and the alternative adjacent edges have a common vertex.
S309, when the evaluation function value corresponding to the candidate adjacent edge is larger than the evaluation function value corresponding to the candidate edge, marking the candidate edge as a cutting edge.
For example, the following steps are carried out: for example, one of the alternative sides A has three adjacent alternative sides B, C and D. And the evaluation function value of the A is larger than the evaluation function values corresponding to the B, the C and the D, so that the A is the cutting edge.
S3010, calculating a point corresponding to the minimum distance between the cutting edge and the nearest boundary of the task area, and recording the point as a cutting point.
There are many points on the cut edge, and among them, one point has the smallest distance to the nearest boundary of the task area, and this point is the cut point.
S3011, making a line segment which is perpendicular to the cutting edge and has two end points positioned on the boundary of the task area through the cutting point to obtain the prior boundary edge.
S400, obtaining a target segmentation area according to the prior boundary edge and the Voronoi segmentation graph, wherein the target segmentation area is used for planning a path required by executing a task.
Step S400 includes steps S401, S402, S403, S404, S405, S406, S407, S408, S409, S410, S411:
s401, obtaining adjacent segmentation faces contained in the Voronoi division map according to the Voronoi division map, wherein the adjacent segmentation faces have a common edge.
S402, fusing the adjacent segmentation surfaces, which do not contain the prior boundary edge or the boundary of the task region, in the Vono segmentation graph into a plane to obtain a primary segmentation region.
In this embodiment, the voronoi partition map is stored in a half-edge map, and the facets in the voronoi map are fused by using a half-edge map data structure: and for any two adjacent surfaces (adjacent means that the adjacent surfaces have a common edge), if the common edge is not a prior boundary edge or the boundary of the task area, the two adjacent surfaces are fused into a surface. The plane segmentation finally obtained in the embodiment only includes the task area boundary and the prior boundary edge. Namely, the primary segmentation of the task area by using the prior information and the heuristic algorithm is realized.
And S403, obtaining each primary partition plane contained in the primary partition area according to the primary partition area.
S404, segmenting each primary segmentation plane along the longest edge of each primary segmentation plane by adopting a zigzag decomposition algorithm to obtain a secondary segmentation area.
For the primary division planes obtained in step S403, further division is performed along the longest side of the plane in each primary division plane using the BCD algorithm or the trapezoidal division algorithm. Recording the direction of each divided surface in the dividing process, and recording the current dividing direction of any surface c as dir1(c) In that respect In addition, if the a priori boundary edge needs to be divided into two, the newly divided edge needs to be marked as the a priori boundary edge.
S405, obtaining each secondary segmentation plane contained in the secondary segmentation area according to the secondary segmentation area.
S406, fusing the adjacent quadratic segmentation planes which do not contain the prior boundary edge into a plane to obtain the fused quadratic segmentation region.
Randomly selecting a face c1, randomly selecting a face c2 adjacent to the face c1, and if no prior boundary edge exists in the shared edges of c1 and c2, merging the faces c1 and c2 into a face, which is recorded as c 3.
And S407, dividing each plane along the longest edge of the planes contained in the secondary divided areas after fusion by adopting a zigzag decomposition algorithm to obtain a tertiary divided area.
C3 is decomposed along the longest side direction by using a BCD algorithm; during the decomposition, the direction dir of the decomposition is recorded2(c) And marking the prior boundary edge.
And S408, obtaining the height corresponding to each secondary division plane according to each vertex of each secondary division plane and a normal vector of a first unit vector, wherein the first unit vector is a unit vector perpendicular to the direction of the longest edge of the primary division plane.
Assuming that the secondary segmented region has only two faces c1, c2, and c1 corresponding to a height h (c 1):
h(c1)=maxk=1,…,m{n(c1)Tpk|}-mink=1,…,m{n(c1)Tpk|}
height h (c1) for c 2:
h(c2)=maxk=1,…,m{n(c2)Tpk|}-mink=1,…,m{n(c2)Tpk|}
wherein n (c)1) Is a sum of n (c)2) Are all unit vectors, T is the transpose of the vector, pkAre the vertices on the face, and m is the number of vertices.
And S409, obtaining each cubic division plane contained in the cubic division area according to the cubic division area.
And S410, obtaining the height corresponding to each cubic division plane according to each vertex of each cubic division plane and a normal vector of a second unit vector, wherein the second unit vector is a unit vector which is perpendicular to the direction of the longest edge of the plane contained in the cubic division area.
Calculating the cubic division plane s by using the formula1,…sk′Corresponding height
And S411, obtaining the target segmentation area by the height corresponding to each secondary segmentation plane and the height corresponding to each tertiary segmentation plane.
Calculating a cost value f ({ c) consisting of the heights corresponding to the respective quadratic segmentation planes1,c2}):
f({c1,c2})=h(c1)+h(c2)+γ
Calculating a cost value f ({ s) composed of the heights corresponding to the respective cubic division planes1,…sk′}):
f({s1,…sk′})=h(s1)+…+h(sk′)+γ(k′-1)
If f ({ s)1,…sk′})≤f({c1,c2}), the current decomposition result is retained, namely the score obtained by segmenting the fused image is obtainedTaking the segmentation area as a target segmentation area; otherwise, the secondary segmented region before the fusion of the faces c1 and c2 is not used as the target segmented region.
In this embodiment, the quadratic segmentation planes are repeatedly randomly selected, and whether fusion of the quadratic segmentation planes is required is determined until the number of repetitions reaches the set number.
After the target segmentation area is obtained in steps S100-S400, the sweeping robot plans a path in the target segmentation area, and the path planning method includes the following steps: obtaining each target segmentation plane corresponding to the target segmentation area; obtaining a zigzag path corresponding to each target segmentation plane through each target segmentation plane; and applying a traveling salesman planning algorithm to the zigzag path to obtain the sequence of executing tasks by each target segmentation plane.
Specifically, the method comprises the following steps: for the target divided region (plane division result) obtained in S400, a zigzag path is planned for each of the planes, and the cleaning direction of the arbitrary plane C is the dividing direction dir (C). The start point and end point of the zigzag path for each face are recorded, and for any face C, the start point of the zigzag path is denoted as P (C) and the end point is denoted as Q (C). The traversal order of each sub-area (surface) is determined by solving the asymmetric traveler problem. Namely, constructing a graph G, wherein each face C of the current segmentation is taken as a vertex in the graph G; two directed edges (C1, C2) and (C2, C1) exist between any two surfaces C1 and C2, the lengths of the edges (C1 and C2) are the lengths of the shortest collision-free paths from Q (C1) to P (C2) on a plane, and the lengths of the edges (C2 and C1) are the lengths of the shortest collision-free paths from P (C1) to Q (C2) on the plane. After the graph G is constructed, the asymmetric traveler problem traversing all the vertices in the graph G can be solved by using the existing tool (for example, by using LKH software). The traversal order of the robot map G plans the visit order to visit the facets within the target segmented region.
In summary, the present invention defines an edge where both vertices are located in a task area (where the area to be segmented includes a task area and a non-task area, where the task area is an area where a terminal needs to execute a task and the non-task area is an area where the terminal does not need to execute the task) as an alternative edge, then obtains a prior boundary edge according to the alternative edge, and finally segments the area to be segmented according to the prior boundary edge, thereby obtaining a target segmentation area including each segmentation plane. When the terminal reaches a non-task area (an obstructed area) while performing a task, the terminal needs to turn, and the turning reduces the efficiency of the terminal in performing the task. According to the invention, the non-task area in the task area to be segmented is removed through the alternative edge, and then the area is segmented according to the prior boundary edge, so that the number of turns can be reduced when the terminal moves on the path obtained after segmentation, and the task execution efficiency of the terminal is improved.
Exemplary devices
The present embodiment also provides a device for a method for area segmentation for path planning, where the device includes the following components:
the Voronoi division module is used for dividing the region to be divided by applying a Voronoi diagram division method to obtain a Voronoi division diagram;
the alternative edge calculation module is used for obtaining alternative edges contained in the Voronoi division diagram according to the Voronoi division diagram, wherein two vertexes of the alternative edges are both positioned in a task area, and the task area is an area of a terminal in the area to be divided, wherein the terminal needs to execute a task;
the prior boundary edge calculation module is used for obtaining a prior boundary edge according to the alternative edge;
and the segmentation module is used for obtaining a target segmentation area according to the prior boundary edge and the Voronoi segmentation graph, and the target segmentation area is used for planning a path required by executing a task.
Based on the above embodiments, the present invention further provides a terminal device, and a schematic block diagram thereof may be as shown in fig. 2. The terminal equipment comprises a processor, a memory, a network interface, a display screen and a temperature sensor which are connected through a system bus. Wherein the processor of the terminal device is configured to provide computing and control capabilities. The memory of the terminal equipment comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The network interface of the terminal device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a region segmentation method for path planning. The display screen of the terminal equipment can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the terminal equipment is arranged in the terminal equipment in advance and used for detecting the operating temperature of the internal equipment.
It will be understood by those skilled in the art that the block diagram of fig. 2 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the terminal device to which the solution of the present invention is applied, and a specific terminal device may include more or less components than those shown in the figure, or may combine some components, or have different arrangements of components.
In one embodiment, a terminal device is provided, where the terminal device includes a memory, a processor, and a region segmentation program stored in the memory and executable on the processor for path planning, and when the processor executes the region segmentation program for path planning, the following operation instructions are implemented:
segmenting the region to be segmented by applying a Voronoi diagram segmentation method to obtain a Voronoi segmentation diagram;
according to the Voronoi division diagram, obtaining alternative edges contained in the Voronoi division diagram, wherein two vertexes of the alternative edges are both positioned in a task area, and the task area is an area of a terminal in the area to be divided, wherein the terminal needs to execute a task;
obtaining a prior boundary edge according to the alternative edge;
and obtaining a target segmentation area according to the prior boundary edge and the Voronoi segmentation graph, wherein the target segmentation area is used for planning a path required by executing a task.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a method, an apparatus, a device and a storage medium for area segmentation for path planning, wherein the method comprises: segmenting the region to be segmented by applying a Voronoi diagram segmentation method to obtain a Voronoi segmentation diagram; according to the Voronoi division diagram, obtaining alternative edges contained in the Voronoi division diagram, wherein two vertexes of the alternative edges are both positioned in a task area, and the task area is an area of a terminal in the area to be divided, wherein the terminal needs to execute a task; obtaining a prior boundary edge according to the alternative edge; and obtaining a target segmentation area according to the prior boundary edge and the Voronoi segmentation graph, wherein the target segmentation area is used for planning a path required by executing a task. The invention can reduce the turning times when the terminal moves on the path obtained after the division, thereby improving the efficiency of the terminal in executing the task.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (13)

1. A region segmentation method for path planning, comprising:
segmenting the region to be segmented by applying a Voronoi diagram segmentation method to obtain a Voronoi segmentation diagram;
according to the Voronoi division diagram, obtaining alternative edges contained in the Voronoi division diagram, wherein two vertexes of the alternative edges are both positioned in a task area, and the task area is an area where a terminal in the area to be divided executes a task;
obtaining a prior boundary edge according to the alternative edge;
and obtaining a target segmentation area according to the prior boundary edge and the Voronoi segmentation graph, wherein the target segmentation area is used for planning a path required by executing a task.
2. The method of region segmentation for path planning as set forth in claim 1, wherein the obtaining, according to the voronoi segmentation map, the candidate edges included in the voronoi segmentation map comprises:
obtaining a division surface contained in the Voronoi division diagram according to the Voronoi division diagram;
preprocessing the Voronoi division diagram according to the vertex corresponding to the division surface and the task area to obtain the preprocessed Voronoi division diagram;
and obtaining the alternative edge according to the preprocessed Voronoi division diagram.
3. The method of segmenting a region for path planning as claimed in claim 2, wherein the step of preprocessing the voronoi segmentation map according to the vertices corresponding to the segmentation planes and the task region to obtain the voronoi segmentation map after preprocessing comprises:
deleting the segmentation surfaces corresponding to the vertexes outside the task area to obtain the preprocessed Voronoi division diagram.
4. The method of region segmentation for path planning as set forth in claim 1, wherein the obtaining a priori boundary edges according to the candidate edges comprises:
calculating the distance between the point on the alternative edge and the boundary corresponding to the task area;
calculating a distance gradient corresponding to a point on the alternative edge according to the distance;
obtaining an evaluation function value corresponding to the alternative edge according to the distance and the distance gradient;
and obtaining the prior boundary edge according to the evaluation function value.
5. The method of claim 4, wherein the calculating a distance gradient corresponding to a point on the candidate edge according to the distance comprises:
calculating a point corresponding to the minimum distance between the alternative edge and the nearest boundary of the task area, and recording as a nearest point;
calculating the distance between the nearest point and the nearest boundary of the task area, and recording as a first distance;
calculating a tangent vector of the candidate edge at the nearest point;
calculating the distance from the coordinate corresponding to the sum of the coordinate corresponding to the closest point and the tangent vector to the nearest boundary of the task area, and recording as a second distance;
and obtaining the distance gradient according to the difference between the second distance and the first distance.
6. The method of claim 5, wherein the obtaining the evaluation function value corresponding to the candidate edge according to the distance and the distance gradient comprises:
and obtaining an evaluation function value corresponding to the candidate edge according to the sum of the first distance and the absolute value of the distance gradient.
7. The method of region segmentation for path planning as set forth in claim 4, wherein the obtaining the a priori boundary edges according to the evaluation function values comprises:
according to the alternative edges, obtaining the alternative edges adjacent to the alternative edges, and marking as alternative adjacent edges, wherein the alternative edges and the alternative adjacent edges have a common vertex;
when the evaluation function value corresponding to the alternative adjacent edge is larger than the evaluation function value corresponding to the alternative edge, marking the alternative edge as a cutting edge;
calculating a point corresponding to the minimum distance between the cutting edge and the nearest boundary of the task area, and recording as a cutting point;
and obtaining the prior boundary edge according to the cutting point, the cutting edge and the task area, wherein the cutting point is positioned on the prior boundary edge, the prior boundary edge is perpendicular to the cutting edge, and two end points of the prior boundary edge are positioned on the boundary of the task area.
8. The region segmentation method for path planning as claimed in claim 1, wherein the obtaining a target segmentation region according to the prior boundary edge and the voronoi segmentation map, the target segmentation region being used for planning a path required for executing a task, includes:
obtaining adjacent segmentation faces contained in the Voronoi division diagram according to the Voronoi division diagram, wherein the adjacent segmentation faces have a common edge;
fusing the adjacent segmentation surfaces of the Voronoi segmentation graph, which do not contain the prior boundary edge nor the boundary of the task area, into a plane to obtain a primary segmentation area;
obtaining each primary partition plane contained in the primary partition area according to the primary partition area;
dividing each primary division plane along the longest edge of each primary division plane by adopting a zigzag decomposition algorithm to obtain a secondary division area;
and obtaining the target segmentation area according to the secondary segmentation area.
9. The method as claimed in claim 8, wherein said obtaining the target segmentation area according to the quadratic segmentation area comprises:
according to the secondary segmentation areas, obtaining each secondary segmentation plane contained in the secondary segmentation areas;
fusing the adjacent secondary segmentation planes which do not contain the prior boundary edge into a plane to obtain the fused secondary segmentation area;
dividing each plane along the longest edge of the planes contained in the secondary divided areas after fusion by adopting a Chinese character 'Hui' decomposition algorithm to obtain a tertiary divided area;
obtaining the height corresponding to each secondary division plane according to each vertex of each secondary division plane and a normal vector of a first unit vector, wherein the first unit vector is a unit vector perpendicular to the direction of the longest side of the primary division plane;
obtaining each cubic division plane contained in the cubic division area according to the cubic division area;
obtaining the height corresponding to each cubic division plane according to each vertex of each cubic division plane and a normal vector of a second unit vector, wherein the second unit vector is a unit vector which is perpendicular to the direction of the longest edge of the plane contained in the quadratic division area;
and obtaining the target segmentation area by the height corresponding to each secondary segmentation plane and the height corresponding to each tertiary segmentation plane.
10. The region segmentation method for path planning as set forth in claim 9, wherein the region segmentation method step is followed by further including:
obtaining each target segmentation plane corresponding to the target segmentation area;
obtaining a zigzag path corresponding to each target segmentation plane through each target segmentation plane;
and applying a traveling salesman planning algorithm to the zigzag path to obtain the sequence of executing tasks by each target segmentation plane.
11. An apparatus of a region segmentation method for path planning, the apparatus comprising:
the Voronoi division module is used for dividing the region to be divided by applying a Voronoi diagram division method to obtain a Voronoi division diagram;
the alternative edge calculation module is used for obtaining alternative edges contained in the Voronoi division diagram according to the Voronoi division diagram, wherein two vertexes of the alternative edges are both positioned in a task area, and the task area is an area where a terminal in the area to be divided executes a task;
the prior boundary edge calculation module is used for obtaining a prior boundary edge according to the alternative edge;
and the segmentation module is used for obtaining a target segmentation area according to the prior boundary edge and the Voronoi segmentation graph, and the target segmentation area is used for planning a path required by executing a task.
12. A terminal device, characterized in that the terminal device comprises a memory, a processor and a region segmentation program for path planning stored in the memory and operable on the processor, and the processor implements the steps of the region segmentation method for path planning according to any one of claims 1 to 10 when executing the region segmentation program for path planning.
13. A computer-readable storage medium, on which a region segmentation program for path planning is stored, which, when executed by a processor, implements the steps of the region segmentation method for path planning of any one of claims 1 to 10.
CN202111352625.0A 2021-11-16 2021-11-16 Region segmentation method, device, equipment and storage medium for path planning Active CN114255241B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111352625.0A CN114255241B (en) 2021-11-16 2021-11-16 Region segmentation method, device, equipment and storage medium for path planning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111352625.0A CN114255241B (en) 2021-11-16 2021-11-16 Region segmentation method, device, equipment and storage medium for path planning

Publications (2)

Publication Number Publication Date
CN114255241A true CN114255241A (en) 2022-03-29
CN114255241B CN114255241B (en) 2023-10-20

Family

ID=80790919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111352625.0A Active CN114255241B (en) 2021-11-16 2021-11-16 Region segmentation method, device, equipment and storage medium for path planning

Country Status (1)

Country Link
CN (1) CN114255241B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116152277A (en) * 2023-03-10 2023-05-23 麦岩智能科技(北京)有限公司 Map segmentation method and device, electronic equipment and medium
WO2023236734A1 (en) * 2022-06-06 2023-12-14 珠海一微半导体股份有限公司 Map region division method, chip, terminal and robot system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030132947A1 (en) * 2002-01-14 2003-07-17 Huitao Luo Systems and methods for processing boundary information of a graphical object
JP2003271707A (en) * 2002-03-19 2003-09-26 Ntt Data Corp System and method for assisting airspace designing
US8004517B1 (en) * 2005-06-24 2011-08-23 Geomagic, Inc. Methods, apparatus and computer program products that model three-dimensional surface structures
CN106682787A (en) * 2017-01-09 2017-05-17 北京航空航天大学 Method for quickly generating generalized Voronoi diagram based on wavefront algorithm
CN108664022A (en) * 2018-04-27 2018-10-16 湘潭大学 A kind of robot path planning method and system based on topological map
CN111750869A (en) * 2020-08-14 2020-10-09 中国电子科技集团公司第五十四研究所 Unmanned aerial vehicle path planning method for reconstructing Voronoi diagram in real time
CN112581624A (en) * 2020-12-23 2021-03-30 中国计量大学 Two-dimensional finite element mesh subdivision algorithm based on distance function defined boundary
CN112783169A (en) * 2020-12-31 2021-05-11 科大讯飞(苏州)科技有限公司 Path planning method and device and computer readable storage medium
CN113470052A (en) * 2021-07-12 2021-10-01 绍兴文理学院 Adherent rock blockiness binary image segmentation method and system based on concave-convex characteristics

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030132947A1 (en) * 2002-01-14 2003-07-17 Huitao Luo Systems and methods for processing boundary information of a graphical object
JP2003271707A (en) * 2002-03-19 2003-09-26 Ntt Data Corp System and method for assisting airspace designing
US8004517B1 (en) * 2005-06-24 2011-08-23 Geomagic, Inc. Methods, apparatus and computer program products that model three-dimensional surface structures
CN106682787A (en) * 2017-01-09 2017-05-17 北京航空航天大学 Method for quickly generating generalized Voronoi diagram based on wavefront algorithm
CN108664022A (en) * 2018-04-27 2018-10-16 湘潭大学 A kind of robot path planning method and system based on topological map
CN111750869A (en) * 2020-08-14 2020-10-09 中国电子科技集团公司第五十四研究所 Unmanned aerial vehicle path planning method for reconstructing Voronoi diagram in real time
CN112581624A (en) * 2020-12-23 2021-03-30 中国计量大学 Two-dimensional finite element mesh subdivision algorithm based on distance function defined boundary
CN112783169A (en) * 2020-12-31 2021-05-11 科大讯飞(苏州)科技有限公司 Path planning method and device and computer readable storage medium
CN113470052A (en) * 2021-07-12 2021-10-01 绍兴文理学院 Adherent rock blockiness binary image segmentation method and system based on concave-convex characteristics

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨福艳;周明全;邓擎琼;: "勾画式交互的网格模型分割", 计算机工程与应用, no. 36, pages 175 - 177 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023236734A1 (en) * 2022-06-06 2023-12-14 珠海一微半导体股份有限公司 Map region division method, chip, terminal and robot system
CN116152277A (en) * 2023-03-10 2023-05-23 麦岩智能科技(北京)有限公司 Map segmentation method and device, electronic equipment and medium
CN116152277B (en) * 2023-03-10 2023-09-22 麦岩智能科技(北京)有限公司 Map segmentation method and device, electronic equipment and medium

Also Published As

Publication number Publication date
CN114255241B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
CN114255241B (en) Region segmentation method, device, equipment and storage medium for path planning
US7932904B2 (en) Generation of constrained voronoi grid in a plane
US6985810B2 (en) Real-time route and sensor planning system with variable mission objectives
CN110221600B (en) Path planning method and device, computer equipment and storage medium
US20210027634A1 (en) Route planning method and device
Arnold Automated stereo perception
CN109668561B (en) Indoor path planning method, terminal and readable storage medium
CN112884894A (en) Scene reconstruction data acquisition method and device, computer equipment and storage medium
CN111750860B (en) Round-trip path planning method and device and electronic equipment
WO2003071465A2 (en) Architecture for automatic evaluation of team reconnaissance and surveillance plans
CN113793351A (en) Laser filling method and device of multi-layer contour pattern based on contour line
CN112631281A (en) Cleaning robot and path planning method thereof
CN111080786A (en) BIM-based indoor map model construction method and device
CN114460965A (en) Unmanned aerial vehicle three-dimensional obstacle avoidance method based on improved artificial potential field method
Jeon et al. An entry-exit path planner for an autonomous tractor in a paddy field
CN114740853A (en) Path planning method, terminal device and storage medium
CN116721229B (en) Method, device, equipment and storage medium for generating road isolation belt in map
CN113894428B (en) Laser filling method and device for single-layer outline pattern based on zigzag shape
CN116089557A (en) Data processing method, device and storage medium
CN114442642B (en) Path planning method, path planning device, computer equipment and storage medium
CN113902755B (en) Laser filling method and device for zigzag-based multilayer outline pattern
Hernandez et al. A path planning algorithm for an AUV guided with homotopy classes
CN115993817A (en) Autonomous exploration method, device and medium for tensor field driven hierarchical path planning
CN110335360B (en) Three-dimensional element layout visualization method and device
CN117553804B (en) Path planning method, path planning device, computer equipment 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
GR01 Patent grant
GR01 Patent grant