Shortest path planning method for surface processing by robot hand
By optimizing path planning using a locally unfolded triangular mesh model and a sequence tree structure, the problem of high computational complexity for finding the shortest path on a polyhedral surface in a digital twin scenario is solved, achieving efficient path planning and real-time response.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2025-09-30
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies suffer from high computational time and spatial complexity when planning the shortest path on the surface of a polyhedron in a digital twin 3D space, which cannot meet the requirements for real-time response, especially in complex scenarios where the computation time is too long.
A locally expanded triangular mesh model is adopted to construct a sequence tree to record the path propagation process. A divide-and-conquer algorithm is used to generate a Voronoi diagram, and local graphs are merged to determine the shortest path. Path planning is optimized through local expansion and sequence tree structure.
It reduces computational complexity, improves the efficiency and accuracy of path planning, adapts to convex and non-convex polyhedra, and meets the needs of real-time robot trajectory planning.
Smart Images

Figure CN121552330B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of path planning technology, and in particular to a method for shortest path planning in robotic surface processing. Background Technology
[0002] Against the backdrop of rapid advancements in industry and intelligent manufacturing, digital twin technology, by constructing a real-time mapping between physical entities and virtual spaces, has become a core infrastructure supporting the intelligent upgrading of factories. With the popularization of the Industrial Internet of Things (IIoT), more and more complex industrial scenarios need to be realized in virtual space, among which the motion control of robotic arms is an indispensable part. Therefore, the planning of processing trajectories for polyhedral surfaces in the three-dimensional space of digital twins is particularly important.
[0003] Currently, the shortest path algorithm for polyhedral surfaces commonly employs the traditional continuous Dijkstra's algorithm. Extending Dijkstra's algorithm to continuous surfaces involves progressively unfolding the polyhedral surface to simulate wavefront propagation, expanding the shortest path from the source point each time. During this process, Dijkstra's algorithm requires maintaining a global priority queue to store the shadow segments of all adjacent faces (i.e., possible propagation ranges). Each expansion requires recalculating the Euclidean distances of all neighbors for subsequent expansion decisions. This approach not only introduces high time complexity but also consumes significant memory. When facing complex digital twin scenarios, the computation time is excessive, failing to meet the requirements of virtual-real synchronization and real-time response in digital twins. Summary of the Invention
[0004] To address the aforementioned shortcomings, the present invention aims to propose a shortest path planning method for surface processing by a robotic arm. This method satisfies the shortest path calculation requirements for both convex and non-convex polyhedra while maintaining low time and space complexity, and can respond more quickly to meet the real-time robotic arm motion trajectory planning needs.
[0005] To achieve this objective, the present invention adopts the following technical solution:
[0006] A shortest path planning method for surface machining by a robotic arm, the shortest path planning method comprising the following steps:
[0007] S1: Obtain the triangular mesh model in the digital twin scenario and determine the source point for path planning;
[0008] S2: Locally unfold the triangular mesh model along the edges of the triangular facets to a plane, and calculate the mirror image of the source point in the unfolded plane;
[0009] S3: Construct a sequence tree for recording the shortest path propagation process starting from the source point, wherein the sequence tree includes edge nodes and vertex nodes, the edge nodes store edge, mirror point and shaded segment information related to path propagation, the vertex nodes store edge, mirror point and vertex information related to path propagation, or the vertex nodes store vertex information and distance information related to path propagation;
[0010] S4: Traverse the sequence tree, extract the vertices recorded in all vertex nodes, and form an ordered vertex sequence;
[0011] S5: Based on the ordered vertex sequence, the surface of the triangular mesh model is cut along the shortest path from the source point to each vertex and unfolded to the same plane to form an inward layout;
[0012] S6: In the inward layout, the mirror point of the source point and the mirror point of the pseudo-source point corresponding to the vertex node in the sequence tree are used as seed points, and the divide-and-conquer algorithm is used to generate a local Voronoi diagram;
[0013] S7: Merge all local Voronoi diagrams to obtain a global Voronoi diagram, thereby determining the shortest path from any point on the surface of the triangular mesh model to the source point.
[0014] Preferably, step S2 includes:
[0015] The triangular mesh model is locally unfolded along the edges of the triangular facets to a plane, and the mirror image of the source point in the unfolded plane is calculated, wherein the local unfolding includes unfolding the triangular facets related to the shortest path propagation.
[0016] Preferably, when the polyhedron corresponding to the triangular mesh model is a convex polyhedron, step S3 includes:
[0017] The path propagates from the source point, creating edge nodes during the propagation process. Each edge node stores only the first triplet. ,in This represents the edges traversed during shortest path propagation. This represents the mirror image of the source point on the plane. This represents the shaded area formed on the boundary of the patch in the current direction of propagation;
[0018] When the shadow segment does not cover the vertex of the current triangle, a child node is generated for the current edge node to continue propagating in the current direction;
[0019] When the shadow segment covers a vertex, two child nodes are generated for the current edge node to propagate in two new directions respectively, and a vertex node is created at the same time, which stores the second triplet. ,in This represents the physical vertex stored in the current vertex node;
[0020] When the shadow segments of multiple edge nodes simultaneously cover the same vertex, compare the mirror points corresponding to each edge node. The distance to the covered vertex is used to generate two child nodes and create a vertex node for the node with the shortest distance, and generate one child node for the remaining nodes.
[0021] Preferably, when the polyhedron corresponding to the triangular mesh model is a convex polyhedron, step S4 includes:
[0022] The sequence tree is traversed using a depth-first traversal algorithm, visiting all vertex nodes.
[0023] Extract the physical vertices stored in the sequence tree from each vertex node. ;
[0024] Based on the source point mirror point To the physical vertex The Euclidean distance is used to sort the physical vertices in ascending order, forming an ordered vertex sequence.
[0025] Preferably, when the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, step S3 includes:
[0026] When the path propagates to a non-convex vertex, a vertex node is generated using that non-convex vertex as the pseudo-source point. The vertex node stores a tuple. ,in This represents the physical vertex stored in the current vertex node. Represents the shortest path from the physical vertex to the source point, where the vertex node is used to continue the propagation path along the cleavage of the non-convex surface;
[0027] Multiple child nodes are generated for the vertex node, some of which are used for path propagation along the edge, and others are used for the path to pass through the vertex to form a new pseudo source point.
[0028] Preferably, when the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, step S4 includes:
[0029] Traverse the sequence tree to identify and extract all pairs of data containing the given tuples. vertex nodes;
[0030] Obtain the stored physical vertices from the extracted vertex nodes. and its corresponding shortest path distance ;
[0031] Based on the shortest path corresponding to each vertex node The size of the vertex node relative to the physical vertex. Sort the vertices to form an ordered sequence.
[0032] Preferably, step S5 includes:
[0033] The ordered vertex sequence is mapped to a circular index sequence, and each pair of adjacent vertices in the circular index sequence is processed cyclically.
[0034] For each pair of adjacent vertices, calculate the shortest path from the source point to the two vertices, and cut the surface of the triangular mesh model along the two shortest paths;
[0035] The cut surfaces are unfolded onto the same plane to form the inward layout.
[0036] Preferably, step S6 includes:
[0037] When the polyhedron corresponding to the triangular mesh model is a convex polyhedron, all the mirror points of the source point on the plane are used as seed points, and a divide-and-conquer algorithm is used to generate a local Voronoi diagram.
[0038] When the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, the local Voronoi diagram is generated using the mirror points of the source point on the plane and the mirror points of the pseudo-source points corresponding to all propagable vertex nodes in the sequence tree as seed points.
[0039] The process of generating a local Voronoi diagram using a divide-and-conquer algorithm includes: connecting the leftmost and rightmost seed points, dividing the inward layout into two regions, and recursively generating a sub-Voronoi diagram for each region, with the number of recursions being... Satisfying the relation: ,in This indicates the total number of seed points.
[0040] Preferably, step S7 includes:
[0041] When merging local Voronoi diagrams, the perpendicular bisectors of the boundaries of adjacent sub-Voronoi diagrams are calculated, and the ray portion of the perpendicular bisectors is taken as the starting construction hyperline, which is then used for merging.
[0042] During the merging process, when the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, the constructed hyperlines are restricted so that they do not pass through the edges or vertices of the inward layout.
[0043] One of the above technical solutions has the following advantages or beneficial effects:
[0044] This invention obtains a triangular mesh model from a digital twin scenario and determines the source point for path planning, providing a foundation for subsequent path planning. The model is locally unfolded along the edges of triangular faces to a plane, and the mirror point of the source point is calculated, avoiding the complex operation of global face unfolding and reducing computational complexity. Then, a sequence tree is constructed to record the shortest path propagation process, with edge nodes and vertex nodes storing relevant path propagation information. Compared to the global priority queue of traditional algorithms, the tree structure constructed in this invention manages path propagation information more efficiently. By traversing the sequence tree to extract vertices and form an ordered sequence, ordered data support is provided for subsequent unfolding operations. Based on the ordered vertex sequence, the model is cut and unfolded to the same plane to form an inward layout, further optimizing the path planning calculation process. In the inward layout, the source point's mirror image and the pseudo-source point's mirror image are used as seed points. A divide-and-conquer algorithm is used to generate a local Voronoi diagram, which is then merged to obtain the global Voronoi diagram. This process effectively reduces the high time and space complexity caused by maintaining a global priority queue and recalculating shadow segments multiple times in traditional algorithms. For convex polyhedra, the local unfolding and sequence tree construction methods can directly and efficiently solve the shortest path, avoiding redundant calculations when propagating on convex surfaces in traditional algorithms. For non-convex polyhedra, vertex nodes are allowed to have more child nodes to adapt to complex geometric features, ensuring effective path propagation in areas such as depressions, while avoiding the complex operation of finding detour paths in advance. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0046] Figure 1 This is a flowchart of the shortest path planning method for surface processing using a robotic arm provided in an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of the triangular mesh model unfolded along the geodesic plane for the shortest path planning method for surface processing by robotic arms provided in this embodiment of the invention;
[0048] Figure 3 This is a schematic diagram of the sequence tree construction of the shortest path planning method for surface processing by robotic arms provided in this embodiment of the invention;
[0049] Figure 4 This is an inward layout construction flowchart of the shortest path planning method for surface processing by robotic arms provided in this embodiment of the invention. Detailed Implementation
[0050] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0051] In this invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0052] A shortest path planning method for surface machining by robotic arms, such as Figure 1 As shown, the shortest path planning method includes the following steps:
[0053] S1: Obtain the triangular mesh model in the digital twin scenario and determine the source point for path planning;
[0054] It should be noted that the digital twin scenario simulates the three-dimensional environment of a physical entity through a virtual model. The triangular mesh model is a surface mesh composed of multiple triangular faces, used to represent the geometry of the object being processed by the robot arm, providing basic geometric data for path planning. The source point of path planning is the starting position of the robot arm's processing path, defined on the triangular mesh model as a vertex or in-face point, providing a reference starting point for shortest path calculation.
[0055] S2: Locally unfold the triangular mesh model along the edges of the triangular facets to a plane, and calculate the mirror image of the source point in the unfolded plane;
[0056] It should be noted that local unfolding only unfolds the triangular facets related to path propagation in the triangular mesh model along their edges to a two-dimensional plane, rather than global unfolding, in order to reduce computational complexity; the edges of the triangular facets are the boundary lines of the triangular mesh, serving as the basis for unfolding; the unfolding plane is a two-dimensional coordinate space used to simulate the local geometry of the three-dimensional surface; the mirror point is the projection of the source point onto the unfolding plane, calculated through geometric transformation, representing the position of the source point on the plane, and providing a reference for geodesic calculation.
[0057] Understandably, the purpose of this step is to transform the three-dimensional path planning problem into a two-dimensional problem, avoiding the high memory consumption of traditional global expansion through local expansion. Its principle is based on geodesic theory—the shortest path between two points on a three-dimensional surface is approximately a straight line on the locally expanded plane, thereby quickly estimating the path by connecting mirror points. The effect is to significantly reduce the computational resource requirements and improve the real-time performance of path propagation.
[0058] Specifically, such as Figure 2 As shown, by unfolding the triangular facet along the edge OB to the plane, the projection points of the source point and the target point in the unfolded plane are calculated, and the line connecting the two is the geodesic line.
[0059] S3: Construct a sequence tree for recording the shortest path propagation process starting from the source point, wherein the sequence tree includes edge nodes and vertex nodes, the edge nodes store edge, mirror point and shaded segment information related to path propagation, the vertex nodes store edge, mirror point and vertex information related to path propagation, or the vertex nodes store vertex information and distance information related to path propagation;
[0060] It should be noted that a sequence tree is a tree-like data structure used to record the path propagation process, replacing the traditional priority queue and improving storage efficiency. Edge nodes store triple information, including edges (the edges of the triangular facets traversed by the path propagation), mirror points (the projection of the source point onto the plane), and shadow segments (the areas on the facet boundaries in the direction of path propagation), used to describe the intermediate states of the path. Vertex nodes store triple or binary information, including edges, mirror points, vertices (physical vertices) or vertices, and distance (the shortest path to the source point), used to associate the path with physical vertices and support subsequent traversal.
[0061] Understandably, the purpose of this step is to efficiently manage path propagation through sequence trees, avoiding the global queue maintenance required by the traditional Dijkstra algorithm. The principle is that the sequence tree only stores necessary node information and dynamically decides branches through shaded segments, thereby reducing memory usage and computation times. The effect is to improve the path search speed, which is especially suitable for digital twin scenarios with high vertex scale.
[0062] S4: Traverse the sequence tree, extract the vertices recorded in all vertex nodes, and form an ordered vertex sequence;
[0063] It should be noted that traversal is the systematic access to each node in the sequence tree to extract data; a vertex node is a node in the sequence tree that stores physical vertex information; and an ordered vertex sequence is a list of vertices arranged in a specific order, providing input data for inward layout construction.
[0064] Understandably, the purpose of this step is to collect key vertex information from the sequence tree and sort it to support subsequent surface cutting. The principle is to extract physical vertices from the vertex nodes through traversal and sort them according to distance or topological relationships to form a coherent sequence, thereby ensuring the accuracy and efficiency of the inward layout. The effect is to optimize the surface unfolding process and reduce cutting redundancy. The sequence tree constructed in this embodiment is as follows: Figure 3 As shown.
[0065] S5: Based on the ordered vertex sequence, the surface of the triangular mesh model is cut along the shortest path from the source point to each vertex and unfolded to the same plane to form an inward layout;
[0066] It should be noted that the ordered vertex sequence is the vertex list output in step S4; the shortest path is the geodesic path from the source point to each vertex in the sequence; cutting is to divide the triangular mesh surface along these paths to form an expandable region; expanding to the same plane is to map the cut surface to a two-dimensional plane; inward layout is the two-dimensional layout after expansion, used to preserve surface distance features and support Voronoi diagram construction.
[0067] Understandably, the purpose of this step is to create a 2D layout by cutting and unfolding to simplify shortest path queries; the principle is that cutting along the shortest path preserves the original surface geometry, avoiding overlap problems in traditional methods, especially suitable for non-convex polyhedra. The effect is improved accuracy and adaptability of path planning, such as... Figure 4 As shown, a depth-first traversal of the sequence tree is performed. During the traversal, the node type is first determined. If it is a vertex node, it is recorded; if it is an edge node, its child nodes are traversed. After the entire traversal is completed, the vertex visit sequence is obtained, and a circular order is constructed by arranging them at equal angles. Next, the inward layout formation stage begins. A pair of adjacent vertices is taken from the circular order, the shortest path between these two vertices is calculated, and then the surface of the triangular mesh model is cut along these two shortest paths. Finally, the cut surface fragments are unfolded onto the same plane, thus forming a complete inward layout.
[0068] S6: In the inward layout, the mirror point of the source point and the mirror point of the pseudo-source point corresponding to the vertex node in the sequence tree are used as seed points, and the divide-and-conquer algorithm is used to generate a local Voronoi diagram;
[0069] It should be noted that the seed point is the center of the Voronoi diagram, including the source point's mirror point and the pseudo-source point's mirror point; the pseudo-source point is the vertex represented by the vertex node in the sequence tree, and serves as an additional source point in a non-convex polyhedron; the divide-and-conquer algorithm is a recursive partitioning strategy used to efficiently generate Voronoi diagrams; the local Voronoi diagram is the partition of the region corresponding to the seed point, used to define the nearest relationship between points within the region and the seed point, simplifying path lookup.
[0070] Understandably, the purpose of this step is to quickly construct a Voronoi diagram using a divide-and-conquer algorithm to support shortest path calculation. The principle is to divide the layout into sub-regions, recursively generate a Voronoi diagram, and cover all possible path points with seed points, thereby avoiding the high complexity of global calculation. The effect is to significantly improve the efficiency of Voronoi diagram generation and meet real-time requirements.
[0071] S7: Merge all local Voronoi diagrams to obtain a global Voronoi diagram, thereby determining the shortest path from any point on the surface of the triangular mesh model to the source point.
[0072] Preferably, step S2 includes:
[0073] The triangular mesh model is locally unfolded along the edges of the triangular facets to a plane, and the mirror image of the source point in the unfolded plane is calculated, wherein the local unfolding includes unfolding the triangular facets related to the shortest path propagation.
[0074] It should be noted that the edge of a triangular facet is the line segment connecting two vertices in a triangular mesh model, serving as the reference axis for local unfolding; local unfolding is the process of mapping selected triangular faces in a 3D triangular mesh model to a 2D plane through geometric transformation, involving only faces related to shortest path propagation; the unfolded plane is the 2D coordinate space obtained through local unfolding, used to establish the local geometric representation of the 3D surface; the mirror point of the source point is the geometric projection point of the source point on the unfolded plane, calculated through coordinate transformation; the triangular faces related to shortest path propagation refer to the set of triangular faces actually traversed during the path propagation process starting from the source point.
[0075] Understandably, this step replaces the traditional global expansion method with selective local expansion, processing only the triangular faces directly related to path propagation. Based on the locality of path propagation, it avoids redundant calculations on irrelevant faces, thereby significantly reducing computation and memory usage. The effect is to improve processing efficiency while ensuring the accuracy of path calculation, providing support for real-time response in digital twin scenarios.
[0076] Specifically, path planning can employ various methods for local unfolding, such as determining relevant triangular faces based on face access records during sequence tree construction; dynamically determining the initial unfolded face set based on the adjacency relationship of the source point; using an incremental unfolding strategy to unfold new faces as needed during path propagation; and determining the unfolding range through the topological connections between faces. Combinations of different implementation methods can achieve precise local range control, with dynamic determination based on sequence trees providing the most accurate identification of relevant faces, while incremental unfolding minimizes computational overhead.
[0077] Preferably, step S3 includes:
[0078] The path propagates from the source point, creating edge nodes during the propagation process. Each edge node stores only the first triplet. ,in This represents the edges traversed during shortest path propagation. This represents the mirror image of the source point on the plane. This represents the shaded area formed on the boundary of the patch in the current direction of propagation;
[0079] When the shadow segment does not cover the vertex of the current triangle, a child node is generated for the current edge node to continue propagating in the current direction;
[0080] When the shadow segment covers a vertex, two child nodes are generated for the current edge node to propagate in two new directions respectively, and a vertex node is created at the same time, which stores the second triplet. ,in This represents the physical vertex stored in the current vertex node;
[0081] When the shadow segments of multiple edge nodes simultaneously cover the same vertex, compare the mirror points corresponding to each edge node. The distance to the covered vertex is used to generate two child nodes and create a vertex node for the node with the shortest distance, and generate one child node for the remaining nodes.
[0082] It should be noted that an edge node is a node in the sequence tree that records the edge information traversed during path propagation; it only stores the first triplet. ,in These are the triangular facet edges actually traversed during shortest path propagation, used to record the path trajectory; It is the mirror image of the source point on the unfolded plane, serving as a reference point for distance calculation; This is the shaded segment formed on the boundary of the face in the current propagation direction, representing the possible propagation range of the path along that edge. A vertex node is a node in the sequence tree that records physical vertex information and stores the second triplet. ,in It is the physical vertex stored in the current vertex node, used to associate the path with the mesh geometry. The determination of whether the shaded segment covers the vertex is the key condition for determining whether the path propagation needs to branch.
[0083] Understandably, by defining the construction rules of the convex polyhedron sequence tree, a dynamic branching strategy based on shaded segments is adopted to replace the traditional global priority queue maintenance. The principle is to use the geometric characteristics of the convex polyhedron and control the path propagation direction through the spatial relationship between the shaded segments and vertices. While ensuring the optimality of the path, the number of intermediate states that need to be stored is significantly reduced. The effect is to achieve efficient shortest path search and overcome the problem of high computational complexity in the traditional continuous Dijkstra algorithm for path planning on the surface of convex polyhedra.
[0084] Specifically, the path planning system can be implemented in various ways, such as using a breadth-first search strategy to initialize path propagation, creating the first edge node starting from the face containing the source node; determining the range of the shadow segment on the face boundary through geometric calculations, and using a line segment projection algorithm to calculate... When the shaded segment is completely within the middle of an edge, a single child node is created to continue propagation; when the shaded segment contains a vertex, two child nodes are created, each corresponding to a new propagation direction. When multiple edge nodes compete for the same vertex, the distances from each mirror point to the target vertex are compared using Euclidean distance calculation, and the shortest path branch is selected. Combinations of different implementation methods can balance search efficiency and memory usage. Dynamic branching based on shaded segments reduces unnecessary node expansion, while the distance comparison mechanism ensures the selection of the optimal branch during multi-path competition.
[0085] Preferably, when the polyhedron corresponding to the triangular mesh model is a convex polyhedron, step S4 includes:
[0086] The sequence tree is traversed using a depth-first traversal algorithm, visiting all vertex nodes.
[0087] Extract the physical vertices stored in the sequence tree from each vertex node. ;
[0088] Based on the source point mirror point To the physical vertex The Euclidean distance is used to sort the physical vertices in ascending order, forming an ordered vertex sequence.
[0089] It is understandable that the depth-first traversal algorithm system extracts vertex information from the sequence tree and forms an ordered vertex sequence based on Euclidean distance. The principle is to take advantage of the fact that depth-first traversal can completely access all vertex nodes, and combine it with Euclidean distance as the sorting basis to ensure the spatial continuity of the vertex sequence. The effect is to provide optimized input data for subsequent inward layout construction, and improve the efficiency and quality of surface cutting and unfolding.
[0090] Specifically, the path planning system can be implemented in various ways, such as using a recursive or stack-based depth-first traversal algorithm to access the sequence tree nodes; identifying vertex nodes and extracting physical vertices during the traversal process. Coordinate information; calculate the source point mirror point To each physical vertex The Euclidean distance, where mirror point coordinate, As vertex The projected coordinates on the unfolded plane; the vertices are sorted in ascending order by distance using either quicksort or heapsort algorithms. Combinations of different implementations can balance traversal efficiency and sorting performance. Recursive depth-first traversal is simple to implement, stack traversal is more suitable for trees with greater depth, while quicksort has better time complexity on average.
[0091] Preferably, step S3 includes:
[0092] When the path propagates to a non-convex vertex, a vertex node is generated using that non-convex vertex as the pseudo-source point. The vertex node stores a tuple. ,in This represents the physical vertex stored in the current vertex node. Represents the shortest path from the physical vertex to the source point, where the vertex node is used to continue the propagation path along the cleavage of the non-convex surface;
[0093] Multiple child nodes are generated for the vertex node, some of which are used for path propagation along the edge, and others are used for the path to pass through the vertex to form a new pseudo source point.
[0094] It should be noted that non-convex vertices are vertices on the concave regions or hole boundaries of a polyhedron surface, possessing local concavity geometric characteristics; pseudo-source points are temporary source points established when encountering non-convex vertices during path propagation, used to handle path calculations around concave regions; and vertex nodes store binary pairs. middle, It is the physical vertex stored in the current vertex node. It is the shortest path distance from the vertex node to the original source node, which is calculated by accumulating the propagated path length; the cut is a special path trajectory on a non-convex surface, used to bypass concave regions; child nodes are divided into edge propagation child nodes and vertex propagation child nodes, which respectively handle the cases of continuing propagation along the edge and generating new pseudo-source nodes.
[0095] Understandably, by introducing a pseudo-source point mechanism and a binary data structure to process path propagation on non-convex polyhedra, the principle is to use pseudo-source points to reinitialize path propagation at concave vertices, and to achieve bypass propagation on complex surfaces through distance information recording and division of labor among child nodes. The effect is to solve the problem that traditional methods are prone to getting trapped in local optima in path planning on non-convex surfaces, and to improve the completeness and accuracy of path calculation.
[0096] Specifically, the path planning system can be implemented in several ways: identifying non-convex vertices through normal vector analysis or curvature calculation; creating vertex nodes to store binary pairs when the path propagates to non-convex vertices. ,in The value is obtained by accumulating the length of the preceding path segments; when generating child nodes for a vertex node, the number of child nodes is allocated according to the number of edges connected to the vertex, with half used for edge propagation (continuing to propagate along adjacent edges) and half used for vertex propagation (creating new pseudo-source nodes at adjacent vertices); a dynamic distance update mechanism is used to maintain the shortest path information. Combinations of different implementation methods can adapt to various non-convex structures, among which non-convex identification based on normal vectors has high accuracy, while dynamic distance update ensures path optimality.
[0097] Preferably, when the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, step S4 includes:
[0098] Traverse the sequence tree to identify and extract all pairs of data containing the given tuples. vertex nodes;
[0099] Obtain the stored physical vertices from the extracted vertex nodes. and its corresponding shortest path distance ;
[0100] Based on the shortest path corresponding to each vertex node The size of the vertex node relative to the physical vertex. Sort the vertices to form an ordered sequence.
[0101] Understandably, this claim addresses the storage of binary pairs in a non-convex polyhedral sequence tree by specifically handling this process. The vertex nodes are sorted based on the actual shortest path distance. The principle is to use the shortest path distance calculated during the construction of the sequence tree as the sorting basis to ensure that the vertex sequence can accurately reflect the actual reachability relationship between the vertex and the source point. The effect is to provide more accurate and optimized input data for the inward layout construction of non-convex polyhedra and improve the quality of path planning for complex surfaces.
[0102] Specifically, the path planning system can be implemented in various ways, such as using breadth-first or depth-first traversal algorithms to access all nodes in the sequence tree; and using node type identification algorithms to select storage tuples. The vertex nodes; extract physical vertices from the selected vertex nodes. Coordinate information and shortest path distance The numerical value; using quicksort, mergesort, or heapsort algorithms based on The vertices are sorted in ascending order. Combinations of different implementation methods can adapt to sequence trees of different sizes. Breadth-first traversal is suitable for tree structures with greater width, while depth-first traversal is suitable for tree structures with greater depth. Different sorting algorithms have their own advantages under different data sizes.
[0103] Preferably, step S5 includes:
[0104] The ordered vertex sequence is mapped to a circular index sequence, and each pair of adjacent vertices in the circular index sequence is processed cyclically.
[0105] For each pair of adjacent vertices, calculate the shortest path from the source point to the two vertices, and cut the surface of the triangular mesh model along the two shortest paths;
[0106] The cut surfaces are unfolded onto the same plane to form the inward layout.
[0107] It's important to note that a circular index sequence maps an ordered vertex sequence to a circular structure, forming a closed loop. This facilitates the iterative processing of each pair of adjacent vertices, ensuring the continuity and integrity of the vertex sequence for subsequent iterative processing. Adjacent vertices refer to two vertices that are adjacent in the circular index sequence. They serve as the basic unit for path cutting, and the entire cutting process is completed step-by-step by processing each pair of adjacent vertices. Surface cutting refers to dividing the model surface along a specified path (such as the shortest path) so that it can be unfolded onto a plane. Its function is to transform the 3D model surface into a 2D planar layout.
[0108] Understandably, transforming the 3D model surface into a 2D planar layout facilitates subsequent pathfinding and analysis. By mapping the ordered vertex sequence to a circular index sequence, the continuity and integrity of the vertex sequence can be ensured, facilitating the iterative processing of each pair of adjacent vertices. For each pair of adjacent vertices, calculating the shortest path from the source vertex to both vertices and cutting the model surface along these paths ensures optimal cutting paths. Finally, unfolding the cut surfaces onto the same plane to form an inward layout transforms the complex 3D model surface into an easily processed 2D planar layout. This process not only simplifies path planning calculations but also improves computational efficiency while ensuring the accuracy of path planning.
[0109] Preferably, step S6 includes:
[0110] When the polyhedron corresponding to the triangular mesh model is a convex polyhedron, all the mirror points of the source point on the plane are used as seed points, and a divide-and-conquer algorithm is used to generate a local Voronoi diagram.
[0111] When the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, the local Voronoi diagram is generated using the mirror points of the source point on the plane and the mirror points of the pseudo-source points corresponding to all propagable vertex nodes in the sequence tree as seed points.
[0112] The process of generating a local Voronoi diagram using a divide-and-conquer algorithm includes: connecting the leftmost and rightmost seed points, dividing the inward layout into two regions, and recursively generating a sub-Voronoi diagram for each region, with the number of recursions being... Satisfying the relation: ,in This indicates the total number of seed points.
[0113] It should be noted that a convex polyhedron is a polyhedron in which all interior angles are less than 180 degrees and line segments between any two points are inside it. In this step, it serves as one of the fundamental geometric objects for the judgment condition, and in contrast to a non-convex polyhedron, it determines the selection method of the seed point. The mirror point is the corresponding point of the source point after unfolding in the plane; its function is to serve as the starting reference point for generating the Voronoi diagram, providing initial position information for the divide-and-conquer algorithm. The pseudo-source point is a special point generated from the propagable vertex nodes in the sequence tree in the case of a non-convex polyhedron. Its existence is to cope with the path planning complexity brought about by the non-convex structure. The mirror point in the plane is used to supplement the seed point set, allowing the Voronoi diagram to better adapt to the geometric characteristics of the non-convex model. The leftmost and rightmost seed points are extreme points defined according to a certain coordinate system in the current seed point set; their function is to provide the basis for dividing the region for the divide-and-conquer algorithm. The recursion count... This indicates the number of times the process repeatedly calls itself during the divide-and-conquer process, following the... Relationship, The number of seed points is represented by this formula, which reflects the time complexity of the algorithm and ensures that the algorithm can still run efficiently when the number of seed points increases.
[0114] Understandably, the goal is to efficiently generate local Voronoi diagrams based on the polyhedron type. For convex polyhedra, only the mirror image of the source point is needed as seed points to satisfy the Voronoi diagram generation requirements, because the geometric characteristics of convex polyhedra allow these mirror images to fully cover the possible shortest path regions. However, non-convex polyhedra, due to their complex structures such as concavities, require additional pseudo-source mirror images as seed points to ensure the Voronoi diagram accurately reflects complex path relationships. When using a divide-and-conquer algorithm to generate local Voronoi diagrams, the leftmost and rightmost seed points are connected to divide the region, and then each sub-region is recursively processed. The number of recursions depends on... The relationship is determined by halving the size of the seed point set with each partition, thus ensuring the algorithm's logarithmic time complexity. This ensures both the accuracy of the local Voronoi diagram and improves generation efficiency, laying the foundation for subsequent merging to obtain the global Voronoi diagram.
[0115] Preferably, step S7 includes:
[0116] When merging local Voronoi diagrams, the perpendicular bisectors of the boundaries of adjacent sub-Voronoi diagrams are calculated, and the ray portion of the perpendicular bisectors is taken as the starting construction hyperline, which is then used for merging.
[0117] During the merging process, when the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, the constructed hyperlines are restricted so that they do not pass through the edges or vertices of the inward layout.
[0118] It should be noted that the ray portion is the part that extends infinitely in a certain direction from one endpoint of the perpendicular bisector. It serves as the initial segment for constructing hyperlines. A hyperline is a virtual line segment used to merge Voronoi diagrams, connecting different Voronoi regions. Its function is to guide the merging direction and path of the local Voronoi diagrams. For non-convex polyhedra, when the constructed hyperline might cross the edges or vertices of the inward layout, the hyperline needs to be adjusted and restricted. The edges or vertices of the inward layout are the boundaries or vertices of the model after planar unfolding. Restricting the hyperline aims to prevent it from crossing these edges or vertices, thereby avoiding errors or unreasonable situations in the merged Voronoi diagram.
[0119] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0120] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A shortest path planning method for surface processing by a robot hand, characterized by, The shortest path planning method includes the following steps: S1: Obtain the triangular mesh model in the digital twin scenario and determine the source point for path planning; S2: Locally unfold the triangular mesh model along the edges of the triangular facets to a plane, and calculate the mirror image of the source point in the unfolded plane; S3: Construct a sequence tree for recording the shortest path propagation process starting from the source point, wherein the sequence tree includes edge nodes and vertex nodes, the edge nodes store edge, mirror point and shaded segment information related to path propagation, the vertex nodes store edge, mirror point and vertex information related to path propagation, or the vertex nodes store vertex information and distance information related to path propagation; S4: Traverse the sequence tree, extract the vertices recorded in all vertex nodes, and form an ordered vertex sequence; S5: Based on the ordered vertex sequence, the surface of the triangular mesh model is cut along the shortest path from the source point to each vertex and unfolded to the same plane to form an inward layout; S6: In the inward layout, the mirror point of the source point and the mirror point of the pseudo-source point corresponding to the vertex node in the sequence tree are used as seed points, and the divide-and-conquer algorithm is used to generate a local Voronoi diagram; S7: Merge all local Voronoi diagrams to obtain a global Voronoi diagram, thereby determining the shortest path from any point on the surface of the triangular mesh model to the source point; When the polyhedron corresponding to the triangular mesh model is a convex polyhedron, step S3 includes: propagating the path from the source point, creating edge nodes in the process, the edge nodes storing only the first triple wherein denotes an edge crossed by the shortest path propagation, denotes a mirror point of the source point on the plane, denotes a shadow segment formed by the current propagation direction on the facet boundary; When the shadow segment does not cover the vertex of the current triangle, a child node is generated for the current edge node to continue propagating in the current direction; When the shadow segment covers a vertex, two child nodes are generated for the current edge node to propagate in two new directions respectively, while a vertex node is created, which stores the second triple wherein represents the physical vertex stored by the current vertex node; When the shadow segments of multiple edge nodes simultaneously cover the same vertex, compare the mirror points corresponding to each edge node. The distance to the covered vertex is used to generate two child nodes and create a vertex node for the node with the shortest distance, and generate one child node for the remaining nodes.
2. The shortest path planning method for surface processing by a robotic arm according to claim 1, characterized in that, Step S2 includes: The triangular mesh model is locally unfolded along the edges of the triangular facets to a plane, and the mirror image of the source point in the unfolded plane is calculated, wherein the local unfolding includes unfolding the triangular facets related to the shortest path propagation.
3. The shortest path planning method for surface processing by a robotic arm according to claim 1, characterized in that, When the polyhedron corresponding to the triangular mesh model is a convex polyhedron, step S4 includes: The sequence tree is traversed using a depth-first traversal algorithm, visiting all vertex nodes. Extract the physical vertices stored in the sequence tree from each vertex node. ; Based on the source point mirror point To the physical vertex The Euclidean distance is used to sort the physical vertices in ascending order, forming an ordered vertex sequence.
4. The shortest path planning method for surface processing by a robotic arm according to claim 1, characterized in that, When the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, step S3 includes: When the path propagates to a non-convex vertex, a vertex node is generated using that non-convex vertex as the pseudo-source point. The vertex node stores a tuple. ,in This represents the physical vertex stored in the current vertex node. Represents the shortest path from the physical vertex to the source point, where the vertex node is used to continue the propagation path along the cleavage of the non-convex surface; Multiple child nodes are generated for the vertex node, some of which are used for path propagation along the edge, and others are used for the path to pass through the vertex to form a new pseudo source point.
5. The shortest path planning method for surface processing by a robotic arm according to claim 4, characterized in that, When the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, step S4 includes: Traverse the sequence tree to identify and extract all pairs of data containing the given tuples. vertex nodes; Obtain the stored physical vertices from the extracted vertex nodes. and its corresponding shortest path distance ; Based on the shortest path corresponding to each vertex node The size of the vertex node relative to the physical vertex. Sort the vertices to form an ordered sequence.
6. The shortest path planning method for surface processing by a robotic arm according to claim 1, characterized in that, Step S5 includes: The ordered vertex sequence is mapped to a circular index sequence, and each pair of adjacent vertices in the circular index sequence is processed cyclically. For each pair of adjacent vertices, calculate the shortest path from the source point to the two vertices, and cut the surface of the triangular mesh model along the two shortest paths; The cut surfaces are unfolded onto the same plane to form the inward layout.
7. The shortest path planning method for surface processing by a robotic arm according to claim 1, characterized in that, Step S6 includes: When the polyhedron corresponding to the triangular mesh model is a convex polyhedron, all the mirror points of the source point on the plane are used as seed points, and a divide-and-conquer algorithm is used to generate a local Voronoi diagram. When the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, the local Voronoi diagram is generated using the mirror points of the source point on the plane and the mirror points of the pseudo-source points corresponding to all propagable vertex nodes in the sequence tree as seed points. The process of generating a local Voronoi diagram using a divide-and-conquer algorithm includes: connecting the leftmost and rightmost seed points, dividing the inward layout into two regions, and recursively generating a sub-Voronoi diagram for each region, with the number of recursions being... Satisfying the relation: ,in This represents the total number of seed points.
8. The shortest path planning method for surface processing by a robotic arm according to claim 7, characterized in that, Step S7 includes: When merging local Voronoi diagrams, the perpendicular bisectors of the boundaries of adjacent sub-Voronoi diagrams are calculated, and the ray portion of the perpendicular bisectors is taken as the starting construction hyperline, which is then used for merging. During the merging process, when the polyhedron corresponding to the triangular mesh model is a non-convex polyhedron, the constructed hyperlines are restricted so that they do not pass through the edges or vertices of the inward layout.