Path planning method, device and equipment for log stacking and code spraying and medium
By building a dynamic hierarchical network model of log stacks and performing collision detection, the coding path was optimized, automated coding was achieved, the problem of low efficiency of manual coding was solved, and the efficiency of log operations in the port was improved.
Patent Information
- Application Number
- CN202510873655.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-06-26
AI Technical Summary
In the existing technology, log measuring and coding in the port log industry still rely on manual operations, resulting in heavy workload and long time consumption, which limits operational efficiency.
By collecting the position and diameter information of each log in the log stack, a dynamic hierarchical network model is constructed to plan the coding path, embed collision detection logic, optimize the coding path, and control the coding equipment to automatically code.
It reduces the time complexity of finding the optimal path, improves coding efficiency, reduces manual intervention, and improves work efficiency.
Smart Images

Figure CN120806307A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of code spraying path planning, in particular to a path planning method, device and equipment for log pile code spraying and a medium. BACKGROUND
[0002] At present, artificial intelligence and industrial automation are developing rapidly, and various industries use artificial intelligence and industrial automation to improve production efficiency and work efficiency. As a labor-intensive industry, the port log industry still uses manual log measurement and code spraying. This method has problems such as heavy workload and long time-consuming, which greatly limits the port log work efficiency. SUMMARY
[0003] Therefore, the present application provides a path planning method, device and equipment for log pile code spraying and a medium to solve the problem of low work efficiency caused by manual code spraying in the prior art.
[0004] In a first aspect, the present application provides a path planning method for log pile code spraying, which comprises:
[0005] Collecting position information of an end face of each log in a log pile to be code sprayed and corresponding diameter grade information;
[0006] Modeling the log pile to be code sprayed into a dynamic layered network model according to the position information and the diameter grade information;
[0007] Traversing log nodes in the dynamic layered network model to generate a code spraying path;
[0008] Performing collision detection on the code spraying path and optimizing the code spraying path according to the collision detection result;
[0009] Inputting a log code spraying order list corresponding to the optimized code spraying path to a code spraying device to control the code spraying device to spray codes according to the log code spraying order.
[0010] The present application converts the log pile into a layered network model by collecting the position information of the end face of each log in the log pile and the diameter grade information, combines the physical constraints of the log pile, realizes log node traversal in the layered network model, performs code spraying path planning, embeds collision detection logic, dynamically optimizes the code spraying path, and controls the code spraying device to automatically spray codes, thereby replacing manual code spraying, reducing the time complexity of finding the optimal path, and improving the code spraying efficiency.
[0011] In an optional embodiment, modeling the log pile to be code sprayed into a dynamic layered network model according to the position information and the diameter grade information comprises:
[0012] According to the position information and the diameter grade information, calculating the average distance between the centers of the log end faces;
[0013] According to the average interval of the center of the end face of the log, the log pile to be sprayed with a code is dynamically layered network modeled.
[0014] The present application reflects the distribution of logs in the pile by calculating the average interval of the center of the end face of the log, and dynamically layered network models the log pile according to the average interval of the center of the end face of the log, so as to facilitate path planning in the layered network model.
[0015] In an optional embodiment, the average interval of the center of the end face of the log is calculated according to the position information and the diameter grade information, comprising:
[0016] The upper boundary and the lower boundary of the log pile in the vertical direction and the left boundary and the right boundary of the log pile in the horizontal direction are calculated by using the boundary calculation function respectively;
[0017] The sum of the diameter grades of all logs of the log pile is divided by the number of logs to determine the average interval of the center of the end face of the log.
[0018] The present application precisely positions the space occupied by the log pile by the upper boundary and the lower boundary of the log pile in the vertical direction and the left boundary and the right boundary of the log pile in the horizontal direction, and determines the average interval of the center of the end face of the log according to the sum of the diameter grades of all logs of the log pile divided by the number of logs, so as to reflect the distribution density of logs in the log pile.
[0019] In an optional embodiment, the log pile to be sprayed with a code is dynamically layered network modeled according to the average interval of the center of the end face of the log, comprising:
[0020] The number of rows of the log pile is dynamically divided by using the upper boundary and the lower boundary of the log pile in the vertical direction and the average interval of the center of the end face of the log;
[0021] The number of columns of the log pile is dynamically divided by using the left boundary and the right boundary of the log pile in the horizontal direction and the average interval of the center of the end face of the log;
[0022] The row index function and the column index function are used to calculate the row number and the column number of each log respectively;
[0023] According to the row number and the column number of each log, the log pile to be sprayed with a code is dynamically constructed into a layered network model in combination with the position information of the end face of the log.
[0024] The present application dynamically divides the number of rows and the number of columns of the log pile respectively, and calculates the row number and the column number of each log by using the index function respectively, so as to ensure that each log is mapped into an effective row and an effective column, and the log pile is converted into a layered network model, providing a basis for path planning.
[0025] In an alternative embodiment, the log nodes of the dynamic hierarchical network model are traversed to generate the inkjet path, comprising:
[0026] The log nodes in the dynamic hierarchical network model are traversed in a spiral progressive manner to obtain log node traversal results;
[0027] The inkjet sequence list is converted into the inkjet path.
[0028] The present application traverses the log nodes in a spiral progressive manner, ensures the continuity of the path, reduces invalid node traversal, combines the log node traversal results with the path planning algorithm, and generates the optimal inkjet path to improve the path planning efficiency.
[0029] In an alternative embodiment, the inkjet path is subjected to collision detection, and the inkjet path is optimized according to the collision detection results, comprising:
[0030] The log outlines are collected to form a log outline set;
[0031] The collision detection algorithm is used to detect the collision between the inkjet path and the log outline set, and to determine whether the log in the inkjet path intersects with other adjacent logs;
[0032] If the log in the inkjet path intersects with other adjacent logs, the inkjet path is optimized.
[0033] The present application detects the collision between the inkjet path and the log outline set through the collision detection algorithm, avoids obstacles in the path planning process, and avoids collision to avoid inkjet failure caused by deviation of the inkjet path.
[0034] In an alternative embodiment, the log outlines are collected, comprising:
[0035] The log outlines are collected according to the inkjet position of the two adjacent logs in the inkjet path, the position information of the log end face, and the diameter grade information, using a contour collection function.
[0036] The present application obtains the log outline according to the inkjet position of the two adjacent logs in the inkjet path, the position information of the log end face, and the diameter grade information to fit the actual outline of the log pile.
[0037] In a second aspect, the present application provides a path planning device for log pile inkjet, comprising:
[0038] The acquisition module is used to acquire the position information of the end face of each log in the log pile to be inkjetted and the corresponding diameter grade information;
[0039] The modeling module is configured to model the log pile to be marked into a dynamic layered network model according to the position information and the diameter grade information.
[0040] The traversal module is configured to traverse the log nodes in the dynamic layered network model to generate a marking path.
[0041] The path optimization module is configured to perform collision detection on the marking path and optimize the marking path according to the collision detection result.
[0042] The marking module is configured to input a log marking sequence list corresponding to the optimized marking path to a marking device and control the marking device to mark according to the log marking sequence.
[0043] In a third aspect, the present application provides a computer device, comprising a memory and a processor, the memory and the processor are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the path planning method for log pile marking according to the first aspect or any of the corresponding embodiments thereof.
[0044] In a fourth aspect, the present application provides a computer readable storage medium, which stores computer instructions for making a computer execute the path planning method for log pile marking according to the first aspect or any of the corresponding embodiments thereof. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed in the specific embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0046] Figure 1 is a flowchart of the path planning method for log pile marking according to an embodiment of the present application;
[0047] Figure 2 is a log marking sequence diagram according to an embodiment of the present application;
[0048] Figure 3 is a structural block diagram of the path planning device for log pile marking according to an embodiment of the present application;
[0049] Figure 4 is a hardware structure diagram of the computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0051] At present, the log measurement system relies on a code spraying subsystem to mark logs, and the code spraying subsystem needs to plan a code spraying path of the logs to achieve the goal of the shortest time and shortest path. The log code spraying path planning belongs to the traveling salesman problem. The traditional methods for solving the traveling salesman problem include the ant colony algorithm, dynamic programming, the nearest neighbor method, and the machine learning method. However, the above methods cannot achieve high calculation speed and the optimal path at the same time without training data. Embodiments of the present application provide a path planning method for log stacking code spraying. By collecting position information and diameter class information of the end face of the logs, and combining physical constraint information of the log stacking, the traveling salesman problem of the log stacking code spraying is optimized, the log code spraying path planning problem is re-modeled, the calculation speed is improved, the optimal path is generated, the work efficiency is improved, and the difficulty of log warehouse management is reduced.
[0052] According to the embodiments of the present application, a path planning method for log stacking code spraying is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0053] In the present embodiment, a path planning method for log stacking code spraying is provided, which can be used in a mobile terminal, Figure 1 is a flowchart of the path planning method for log stacking code spraying according to the embodiments of the present application, as Figure 1 shown, the flowchart includes the following steps:
[0054] In step S101, the position information of the end face of each log in the log stacking to be sprayed and the corresponding diameter class information are collected.
[0055] In the embodiments of the present application, the log measurement system provides the position information of the end face of each log in the log stacking and the corresponding diameter class information. Specifically, the log stacking to be sprayed is scanned and imaged, the position information P w of the end face of each log in the log stacking is analyzed, and the corresponding diameter class information D w is obtained.
[0056] Specifically, the position information and the diameter grade information of the log end face are acquired by using a path code spraying planning algorithm, as shown in the following formula (1):
[0057] Path=path_planning(P w ,D w ) (1)
[0058] Wherein, P w ∈N×3, D w ∈N×1, N is the number of logs.
[0059] In step S102, the log pile to be sprayed is modeled into a dynamic layered network model according to the position information and the diameter grade information.
[0060] In the embodiment of the present application, the position information and the corresponding diameter grade information of the log end face are combined to perform vertical layering and horizontal blocking respectively, and the pile height is divided into several layers from bottom to top, each layer corresponds to a horizontal network layer, and in each layer, the horizontal direction is divided into several grid units, each grid unit corresponds to a node, and the log information of the position is stored. In the same layer, adjacent nodes are connected within the layer to reflect the adjacent relationship of the logs in the horizontal direction, and the nodes in the upper and lower layers are connected between layers to reflect the support structure of the pile, so as to map each log to the node and construct a layered network model. When the log is put into the pile or removed, the node state is updated, and the network model is dynamically adjusted.
[0061] In step S103, the log nodes in the dynamic layered network model are traversed to generate a code spraying path.
[0062] In the embodiment of the present application, the node traversal mode is set in advance, which includes but is not limited to the vertical layering from top to bottom or from bottom to top, and the horizontal traversal path in a single layer, such as grid row priority (snake traversal), nearest neighbor priority (greedy algorithm), region grouping traversal, etc. This is only an example and is not limited. According to the traversed log node, a code spraying path is generated, which is converted into an executable instruction of a code spraying device to spray according to the code spraying path.
[0063] In step S104, the code spraying path is collision detected, and the code spraying path is optimized according to the collision detection result.
[0064] In the embodiment of the present application, in order to avoid obstacles in the code spraying path, the generated code spraying path is collision detected, the possibility of intersection between the path between the code spraying positions of each two logs in the code spraying path and the outlines of the two logs and adjacent logs is calculated in sequence, so as to optimize the code spraying path and avoid obstacles.
[0065] Step S105, input the optimized wood code printing order list corresponding to the wood code printing path to the wood code printing device, and control the wood code printing device to print codes according to the wood code printing order.
[0066] In the embodiment of the present application, the communication connection with the wood code printing device is established, the optimized wood code printing path is converted into instructions executable by the wood code printing device, and the corresponding wood code printing order is input into the wood code printing device, so that the wood code printing device prints codes according to the order, thereby reducing the idle movement time of the wood code printing device and improving the wood code printing efficiency.
[0067] The path planning method for wood pile printing provided in the embodiment is used for converting the wood pile into a hierarchical network model by collecting the position information and the diameter grade information of the end face of each wood in the wood pile, combining the physical constraints of the wood pile, performing wood node traversal in the hierarchical network model, planning the wood code printing path, and embedding collision detection logic to dynamically optimize the wood code printing path, so as to control the wood code printing device to automatically print codes, replace manual code printing, reduce the time complexity of finding the optimal path, and improve the wood code printing efficiency.
[0068] In the embodiment, a path planning method for wood pile printing is provided, and the flow includes the following steps:
[0069] Step S201, collect the position information and the corresponding diameter grade information of the end face of each wood in the wood pile to be printed.
[0070] For details, please refer to Figure 1 The step S101 of the embodiment is not described here again.
[0071] Step S202, model the wood pile to be printed into a dynamic hierarchical network model according to the position information and the diameter grade information.
[0072] Specifically, the above step S202 includes:
[0073] Step S2021, calculate the average distance of the center of the wood end face according to the position information and the diameter grade information.
[0074] Step S2022, dynamically model the wood pile to be printed into a hierarchical network according to the average distance of the center of the wood end face.
[0075] In the embodiment of the present application, the average distance diff of the center of the wood end face is calculated according to the diameter grade information and the number of woods, and the wood pile to be printed is modeled into a dynamic hierarchical network. Specifically, the sort_wood(*) function is used to dynamically plan the wood code printing order of each wood, and then the DLNWood is used to establish a wood index storage container after the dynamic hierarchical network modeling, and the storage container is used to store data.
[0076] The average distance between the ends of the logs is calculated to reflect the distribution of the logs in the stack. The log stack is then dynamically modeled into a hierarchical network based on the average distance between the ends of the logs, so as to facilitate path planning in the hierarchical network model.
[0077] Specifically, the above step S2021 includes:
[0078] Step S20211, using the boundary calculation function to calculate the upper boundary and lower boundary of the log stack in the vertical direction and the left boundary and right boundary in the horizontal direction respectively.
[0079] Step S20212: The average distance between the centers of the end faces of the logs is determined as the result of dividing the sum of the diameters of all the logs in the log stack by the number of logs.
[0080] In the embodiment of the present invention, the cal_bound(*) function is used to calculate the upper boundary B of the log stack in the vertical direction. ru , lower boundary B rd and the left border B in the horizontal direction cu , right boundary B cd , as shown in the following formula:
[0081] B ru , B rd , B cu , B cd =cal_bound(P w , D w ) (2)
[0082] The sum of the diameters of all logs in the log pile D sum Divide by the number of logs N to get the log end center distance diff, as shown in the following formula:
[0083] diff=D sum / N(3)
[0084] The space occupied by the log stack is accurately located by measuring the upper and lower boundaries of the log stack in the vertical direction and the left and right boundaries in the horizontal direction. The average spacing between the centers of the log ends is determined based on the sum of the diameters of all logs in the log stack divided by the number of logs, which reflects the density of the log distribution in the log stack.
[0085] Specifically, the above step S2022 includes:
[0086] Step S20221: Dynamically divide the log stack into rows using the upper and lower boundaries of the log stack in the vertical direction and the average distance between the centers of the log ends.
[0087] Step S20222, using the left boundary, the right boundary of the log stack in the horizontal direction and the average interval of the log end face center, dynamically dividing the column number of the log stack.
[0088] Step S20223, using the row index function and the column index function to calculate the row number and the column number of each log.
[0089] Step S20224, according to the row number and the column number of each log, combining the position information of the log end face, dynamically constructing a hierarchical network model for the log stack to be coded.
[0090] In the embodiment of the present application, according to the upper boundary B ru and the lower boundary B rd of the log stack in the vertical direction and the average interval of the log end face center diff, dynamically dividing the row number N r of the log stack, which is specifically shown as follows:
[0091]
[0092] Using the left boundary B cu and the right boundary B cd of the log stack in the horizontal direction and the average interval of the log end face center diff, dynamically dividing the column number N c of the log stack, which is specifically shown as follows:
[0093]
[0094] Using the row index function row_index function to calculate the row number NO row of each log, which is specifically shown as follows:
[0095] NO row =row_index(P w , N r ) (6)
[0096] Using the column index function col_index function to calculate the column number NO col of each log, which is specifically shown as follows:
[0097] NO col =col_index(P w , N c ) (7)
[0098] According to the row number NO row and the column number NO col of each log, combining the position information P w, the sort_wood function is used to dynamically plan the coding order of each log. DLNWood is the log index storage container after dynamic hierarchical network modeling, as shown in the following formula:
[0099] DLNWood=sort_wood(P w , NO row , NO col ) (8)
[0100] By dynamically dividing the log stack into rows and columns, and using index functions to calculate the row number and column number of each log respectively, we can ensure that each log is mapped to a valid row and column, and transform the log stack into a hierarchical network model, providing a basis for path planning.
[0101] Step S203: traverse the log nodes in the dynamic hierarchical network model to generate a coding path.
[0102] Specifically, the above step S203 includes:
[0103] Step S2031: traverse the log nodes in the dynamic hierarchical network model in a spiral progressive manner to obtain the log node traversal result.
[0104] Step S2032: Generate a coding sequence list based on the log node traversal result using a path planning algorithm, and convert the coding sequence list into a coding path.
[0105] In the embodiment of the present invention, the spiral progressive traversal refers to starting from a certain position of the log stack and expanding outward layer by layer along a spiral path, ensuring that each log node is traversed while ensuring the continuity of the coding path.
[0106] For symmetrical log stacks, the geometric center of the stack can be used as the starting point for traversal. For asymmetrical log stacks, the node near the stack entrance can be used as the starting point for traversal. The traversal process expands outward or inward in a spiral, traversing each log node one by one to ensure that every log node is covered.
[0107] According to the log node traversal results, generate a coding sequence list, such as Figure 2 As shown, the coding sequence of logs is represented by numbers, and then the coding sequence list is converted into coding path instructions that can be executed by the coding equipment.
[0108] The log nodes are traversed in a spiral progressive manner to ensure the continuity of the path and reduce invalid node traversal. The log node traversal results are combined with the path planning algorithm to generate the optimal coding path and improve the path planning efficiency.
[0109] Step S204, collision detection is performed on the inkjet code path, and the inkjet code path is optimized according to the collision detection result.
[0110] Specifically, the step S204 includes:
[0111] Step S2041, collecting the log profiles to form a log profile set.
[0112] Step S2042, performing collision detection on the inkjet code path and the log profile set by using a collision detection algorithm to determine whether the logs in the inkjet code path intersect with other adjacent logs.
[0113] Step S2043, if the logs in the inkjet code path intersect with other adjacent logs, the inkjet code path is optimized.
[0114] In the embodiment of the present application, the log profiles and the adjacent log profiles are collected to form a log profile set. The collision detection algorithm takes the inkjet code positions of the adjacent two logs in the inkjet code path and the log profile set as inputs, and takes the collision detection result as output, to avoid obstacles in the inkjet code path. Specifically, the path between the inkjet code positions of every two logs in the inkjet code path is calculated in sequence, and the possibility of intersection between the path and the two logs and the adjacent logs is determined. If the logs in the inkjet code path do not intersect with other adjacent logs, no collision will occur, and the inkjet code path does not need to be optimized. If the logs in the inkjet code path intersect with other adjacent logs, collision will occur, and a new path is planned to avoid collision.
[0115] Specifically, the distance between the path segment and the log axis is calculated, a safety threshold range is set, and it is determined whether the calculated distance between the path segment and the log axis is within the safety threshold range. If it is out of the safety threshold range, it is determined that intersection occurs.
[0116] Specifically, the step S2041 includes:
[0117] Step S20411, collecting the log profiles by using a profile collection function according to the inkjet code positions of the adjacent two logs in the inkjet code path, the position information of the log end face and the diameter grade information.
[0118] In the embodiment of the present application, the log profiles are collected by using the Collect(*) function to form a profile set. Specifically, the inkjet code positions of the adjacent two logs in the inkjet code path are determined, and the profile set Conts is formed according to the inkjet code positions P1 and P2 of the adjacent two logs in the inkjet code path, the position information P w and the corresponding diameter grade information D w , and is specifically shown in the following formula:
[0119] Conts=Collect(P1,P2,P w , Dw ) (10)
[0120] Avoid obstacles by collision detection algorithm, optimize to generate new path Path * , as shown in the following formula:
[0121] Path * =CA(P1,P2,Conts) (11)
[0122] By collecting the ink jet position of the adjacent two logs in the ink jet path, the position information of the log end face and the diameter grade information, the log contour is obtained to fit the actual contour of the log pile.
[0123] Step S205, input the optimized ink jet path corresponding to the log ink jet order list to the ink jet equipment, control the ink jet equipment to ink jet according to the log ink jet order.
[0124] For details, see Figure 1 Step S105 of the embodiment shown, which will not be repeated here.
[0125] The path planning method for log pile ink jet provided in this embodiment avoids obstacles and collision in the path planning process through collision detection algorithm for collision detection of the ink jet path and the log contour set, to avoid ink jet failure caused by deviation of the ink jet path.
[0126] Compared with using traditional traveling salesman problem, such as brute force enumeration method, dynamic programming, branch and bound method, greedy algorithm, etc., the solution time complexity thereof is O((n-1)!), O(n 2 2 n ), O(n!), O(n 2 ), and the solution time complexity of the path planning method for log pile ink jet provided in this embodiment can reach O(nlog(n)), which is much lower than the traditional method, and the optimal path is found in a case of greatly shortened calculation time, thereby improving the ink jet efficiency of the log scale system.
[0127] In this embodiment, a path planning device for log pile ink jet is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and is contemplated.
[0128] The path planning device for log pile ink jet provided in this embodiment, as shown in Figure 3 , comprises:
[0129] The collection module 301 is configured to collect position information and corresponding diameter grade information of an end face of each log in a log stack to be coded.
[0130] The modeling module 302 is configured to model the log stack to be coded into a dynamic layered network model according to the position information and the diameter grade information.
[0131] The traversal module 303 is configured to traverse log nodes in the dynamic layered network model to generate a coding path.
[0132] The path optimization module 304 is configured to perform collision detection on the coding path and optimize the coding path according to a collision detection result.
[0133] The coding module 305 is configured to input a log coding sequence list corresponding to the optimized coding path to a coding device and control the coding device to code according to the log coding sequence.
[0134] In some optional embodiments, the modeling module 302 includes:
[0135] The calculation unit is configured to calculate an average interval of log end face centers according to the position information and the diameter grade information.
[0136] The modeling unit is configured to model the log stack to be coded into a dynamic layered network according to the average interval of the log end face centers.
[0137] In some optional embodiments, the calculation unit includes:
[0138] The first calculation subunit is configured to calculate an upper boundary and a lower boundary in a vertical direction and a left boundary and a right boundary in a horizontal direction of the log stack by using a boundary calculation function.
[0139] The determination subunit is configured to determine a result of dividing a sum of diameter grades of all logs in the log stack by a number of logs as the average interval of the log end face centers.
[0140] In some optional embodiments, the modeling unit includes:
[0141] The first division subunit is configured to dynamically divide a number of rows of the log stack by using the upper boundary and the lower boundary in the vertical direction of the log stack and the average interval of the log end face centers.
[0142] The second division subunit is configured to dynamically divide a number of columns of the log stack by using the left boundary and the right boundary in the horizontal direction of the log stack and the average interval of the log end face centers.
[0143] The second calculation subunit is configured to calculate a row index and a column index of each log by using a row index function and a column index function, respectively.
[0144] The modeling subunit is configured to dynamically construct a hierarchical network model of the log pile to be marked according to the row number and column number of each log and in combination with the position information of the log end face.
[0145] In some optional embodiments, the traversal module 303 includes:
[0146] The traversal unit is configured to traverse the log nodes in the dynamic hierarchical network model in a spiral progressive manner to obtain a log node traversal result.
[0147] The sequential list generation unit is configured to generate a marking sequence list according to the log node traversal result by using a path planning algorithm and convert the marking sequence list into a marking path.
[0148] In some optional embodiments, the path optimization module 304 includes:
[0149] The contour collection unit is configured to collect the log contours to form a log contour set.
[0150] The judgment unit is configured to perform collision detection on the marking path and the log contour set by using a collision detection algorithm and determine whether the log in the marking path intersects with other adjacent logs.
[0151] The optimization unit is configured to optimize the marking path if the log in the marking path intersects with other adjacent logs.
[0152] In some optional embodiments, the contour collection unit includes:
[0153] The contour collection subunit is configured to collect the log contour by using a contour collection function according to the marking position of two adjacent logs in the marking path, the position information of the log end face, and the diameter grade information.
[0154] Further function descriptions of the above-mentioned various modules and units are the same as those of the above-mentioned corresponding embodiments, and thus are not described herein again.
[0155] The path planning device for log pile marking in the present embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory executing one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.
[0156] The present embodiment further provides a computer device having the above-mentioned Figure 3 path planning device for log pile marking.
[0157] Please refer to Figure 4, Figure 4 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0158] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0159] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.
[0160] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0161] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0162] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 can be connected by a bus or other means, Figure 4 The bus connection is taken as an example.
[0163] The input device 30 can receive inputted digital or character information, and generate key signal input related to user settings and function control of the computer device, such as a touch screen, etc. The output device 40 can include a display device, etc.
[0164] The embodiments of the present application also provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded from a network and stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned memories. It can be understood that the computer, the processor, the microprocessor controller or the programmable hardware include storage components that can store or receive software or computer code, which, when accessed and executed by the computer, the processor or the hardware, implements the method shown in the above embodiments.
[0165] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, the operation of the computer can call or provide the method and / or technical solutions according to the present application. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source file, executable file, installation package file, etc. Correspondingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer executes the corresponding compiled program after compiling the instructions, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0166] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope of the present application.
Claims
1. A path planning method for log stacking coding, characterized in that: The method comprises: Collect the position information and corresponding diameter information of each log end face in the log pile to be coded; Modeling the log stack to be coded into a dynamic layered network model based on the position information and the diameter information; Traverse the log nodes in the dynamic hierarchical network model to generate the coding path; Performing collision detection on the coding path, and optimizing the coding path according to the collision detection result; The log coding sequence list corresponding to the optimized coding path is input into the coding device, and the coding device is controlled to perform coding according to the log coding sequence.
2. The method according to claim 1, characterized in that The method of modeling the log stack to be coded into a dynamic layered network model based on the position information and the diameter information includes: Calculating the average distance between the centers of the log ends based on the position information and the diameter grade information; According to the average spacing between the centers of the log end faces, a dynamic hierarchical network model is performed on the stack of logs to be coded.
3. The method according to claim 2, characterized in that Calculating the average spacing between the centers of the log ends according to the position information and the diameter information includes: Use the boundary calculation function to calculate the upper boundary, lower boundary in the vertical direction, and left boundary, right boundary in the horizontal direction of the log stack; The average distance between the centers of the log ends is determined as the sum of the diameters of all logs in the log stack divided by the number of logs.
4. The method according to claim 3, characterized in that The method of dynamically hierarchically modeling the log stack to be coded based on the average spacing between the centers of the log end faces includes: Dynamically divide the number of rows of log stacks using the upper and lower boundaries of the log stack in the vertical direction and the average distance between the centers of the log ends; Dynamically divide the number of log stacks into columns using the left and right boundaries of the log stack in the horizontal direction and the average distance between the centers of the log ends; Use the row index function and column index function to calculate the row number and column number of each log respectively; According to the row and column numbers of each log and the position information of the end face of the log, the logs to be coded are dynamically stacked to form a hierarchical network model.
5. The method according to claim 1, wherein The process of traversing the log nodes of the dynamic hierarchical network model and generating a coding path includes: Traverse the log nodes in the dynamic hierarchical network model in a spiral progressive manner to obtain the log node traversal results; A path planning algorithm is used to generate a coding sequence list according to the log node traversal result, and the coding sequence list is converted into a coding path.
6. The method according to claim 1, characterized in that The performing collision detection on the coding path and optimizing the coding path according to the collision detection result includes: Collect log outlines to form a log outline set; The collision detection algorithm is used to perform collision detection on the coding path and the log outline set to determine whether the log in the coding path intersects with other adjacent logs; If a log intersects with other adjacent logs in the coding path, the coding path is optimized.
7. The method according to claim 6, characterized in that The collected log profiles include: The log contours are collected using the contour collection function based on the coding positions of two adjacent logs in the coding path, the position information of the log end faces, and the diameter information.
8. A path planning device for log stacking coding, characterized in that: The device comprises: The acquisition module is used to collect the position information and corresponding diameter information of each log end face in the log pile to be coded; A modeling module, configured to model the log stack to be coded into a dynamic layered network model based on the position information and the diameter information; The traversal module is used to traverse the log nodes in the dynamic hierarchical network model and generate the coding path; A path optimization module is used to perform collision detection on the coding path and optimize the coding path according to the collision detection result; The coding module is used to input the log coding sequence list corresponding to the optimized coding path into the coding equipment, and control the coding equipment to perform coding according to the log coding sequence.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the path planning method for coding log stacking according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the path planning method for coding log stacks according to any one of claims 1 to 7.
Citation Information
Patent Citations
Robot trajectory optimization method and device for wood spray coating industry
CN108161941A
Method and device for planning target area operation, storage medium and processor
CN108846325A
Path planning method, device and equipment of spraying robot and storage medium
CN115464660A
Intelligent scale measuring method and system for log stack diameter level measurement
CN118552602A
Complete vehicle wood measuring scale system based on deep learning algorithm and method thereof
CN118602933A