A path planning method, device and equipment of a mechanical arm and a storage medium
By setting start points, process points, and end points in the material tray, the pose of unmarked grid cells is calculated and the path is planned, which solves the problem of parameter deviation caused by collisions in the robotic arm and improves teaching efficiency and ease of operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU XINHAO PRECISION TECH CO LTD
- Filing Date
- 2023-08-04
- Publication Date
- 2026-06-26
AI Technical Summary
During long-term operation, the robotic arm may collide with other objects, causing deviations in internal parameters and resulting in loading and unloading failures. Existing teaching operations are cumbersome and inefficient.
By setting the four cells with marked poses in the material tray as the starting point, process point, constraint point, and ending point, the poses of the unmarked cells are calculated, and the A* pathfinding algorithm is used to plan the path, generating a path suitable for loading and unloading materials in each cell.
It simplifies the teaching operation and improves teaching efficiency, especially when the material tray has a large working area and a large number of materials need to be picked up and placed. It is suitable for the microcontroller in the robotic arm and facilitates on-site adjustment.
Smart Images

Figure CN117103252B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automation technology, and more particularly to a path planning method, apparatus, device, and storage medium for a robotic arm. Background Technology
[0002] With production efficiency improving year by year, production activities are placing increasingly higher demands on the precision of the material loading process. Loading and unloading robotic arms can load and unload workpieces such as shafts, discs, and plates, and can also perform tasks such as flipping and transferring these workpieces, making the application range of loading and unloading robotic arms in production increasingly wider.
[0003] During long-term operation, the robotic arm may collide with other objects, causing deviations in internal parameters and resulting in loading and unloading failures. In this case, the postures of each loading and unloading point on the robotic arm's movement path will be recalibrated and taught.
[0004] Because the robotic arm has many different positions for loading and unloading, the teaching operation is quite cumbersome and inefficient. Summary of the Invention
[0005] This invention provides a path planning method, apparatus, device, and storage medium for a robotic arm to address how to improve the efficiency of teaching a robotic arm.
[0006] According to one aspect of the present invention, a path planning method for a robotic arm is provided, comprising:
[0007] A robotic arm with a rectangular material tray is determined. The material tray has multiple grids for placing materials. The grids with marked poses are located at the four corner points.
[0008] The four grids with calibrated poses are respectively set as the start point, process point, constraint point and end point;
[0009] The pose of the unlabeled grid is calculated based on the starting point, the process point, the constraint point, and the ending point to obtain the path point;
[0010] Based on the starting point, the process point, the constraint point, the ending point, and the path point, the robotic arm is planned to use a path suitable for loading and unloading materials in each of the grids.
[0011] According to another aspect of the present invention, a path planning device for a robotic arm is provided, comprising:
[0012] The robotic arm determination module is used to determine the robotic arm whose path is to be planned. The robotic arm is equipped with a rectangular material tray, which has multiple grids for placing materials. The grids in the material tray that have been marked with their poses are located at the four corner points.
[0013] The calibration point definition module is used to set the four calibrated grids as the start point, process point, constraint point and end point, respectively.
[0014] The path point calculation module is used to calculate the pose of the unlabeled grid based on the starting point, the process point, the constraint point and the ending point, and obtain the path points;
[0015] The path planning module is used to plan a path suitable for loading and unloading materials in each of the grids for the robotic arm based on the starting point, the process point, the constraint point, the ending point and the path point.
[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the path planning method for the robotic arm according to any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program configured to cause a processor to execute and implement the path planning method of the robotic arm according to any embodiment of the present invention.
[0021] In this embodiment, a robotic arm with a rectangular material tray is determined. The tray contains multiple grids for placing materials, with the marked grids located at the four corners. These four marked grids are designated as the start point, process point, constraint point, and end point, respectively. The poses of the unmarked grids are calculated based on these points to obtain path points. Finally, the robotic arm plans paths suitable for loading and unloading materials from each grid based on these points. This embodiment calibrates the grids at the four corners of the material tray and automatically generates paths based on them. This reduces the amount of teaching operations and lowers the computational requirements. This is particularly beneficial when the working area of the material tray is large and a large number of materials are picked up and placed. It is suitable for microcontrollers in robotic arms. Furthermore, even with the defined grids at the four corners, there is still some room for reordering, facilitating on-site teaching and adjustment, thus greatly improving the simplicity and efficiency of teaching.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a path planning method for a robotic arm according to Embodiment 1 of the present invention;
[0025] Figure 2 This is a schematic diagram of a material tray according to Embodiment 1 of the present invention;
[0026] Figure 3A and Figure 3B This is an example diagram of a planned path provided according to Embodiment 1 of the present invention;
[0027] Figure 4 This is a schematic diagram of the structure of a path planning device for a robotic arm according to Embodiment 2 of the present invention;
[0028] Figure 5 This is a schematic diagram of the structure of an electronic device provided according to Embodiment 3 of the present invention. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] Example 1
[0032] Figure 1 This is a flowchart of a path planning method for a robotic arm according to Embodiment 1 of the present invention. This method can be executed by a path planning device for the robotic arm, which can be implemented in hardware and / or software and can be configured in an electronic device. For example... Figure 1 As shown, the method includes:
[0033] Step 101: Determine the robotic arm whose path needs to be planned.
[0034] In practical applications, when errors accumulate or significant deviations occur during long-term operation of the robotic arm, when the robotic arm collides with other objects, when the robotic arm moves to another position, or when the robotic arm malfunctions, the robotic arm can be re-taught and its movement path can be replanned. During the movement, the robotic arm can perform operations such as loading and unloading materials.
[0035] The robotic arm is equipped with a rectangular material tray, which can be fixed in a certain position and cannot be moved, or it can be placed on an AGV (Automated Guided Vehicle) and moved to a designated position by the AGV. This embodiment does not impose any restrictions on this.
[0036] The material tray contains multiple compartments for placing materials. In different production environments, the products being produced are different, and the types of materials also vary, such as transistors, resistors, capacitors, and so on.
[0037] Generally, one grid is used to place one material. The layout of these grids is standardized. For example, the length of the material tray is divided into a (a is a positive integer) equal parts, and the width of the material tray is divided into b (b is a positive integer) equal parts, dividing the material tray into a×b grids of the same size and all of the same shape.
[0038] During the teaching process, users can pre-mark the pose of the material tray at the four corner points of the grid. To improve fault tolerance, the marked pose is the pose presented when the robotic arm is at the center of the grid.
[0039] Pose includes position and attitude. For a six-axis robotic arm, position includes x, y and z coordinates, and attitude includes yaw, roll and pitch.
[0040] The user inputs the poses of the four corner cells in the material tray into the teach pendant, which then transmits the poses of these cells to the robotic arm. For example, Figure 2 As shown, the grids with marked orientations in the material tray are located at the four corner points P. 11 P 1a P b1 With P ba .
[0041] Step 102: Set the four grids with the already marked poses as the starting point, process point, constraint point, and ending point, respectively.
[0042] Since the grids in the material tray have a relatively standardized layout, the four grids with marked poses can be defined as the starting point, process point, constraint point, and ending point, respectively, as a reference for calculating the poses of other grids and planning paths.
[0043] The starting point is the location where the path begins, the process point is the location the path passes through, the constraint point is the location the path passes through, and the ending point is the location where the path ends.
[0044] Let the pose of the starting point be pose of process points pose of constraint points pose of the endpoint
[0045] In the actual implementation, the cells located at the four corner points of the material tray can be arbitrarily set as start points, process points, constraint points, and end points.
[0046] Furthermore, the process point serves to guide the direction of the path. If the starting point and the process point are diagonally opposite, the robotic arm cannot determine the initial direction of movement in the original program. Therefore, the starting point and the process point cannot be distributed at the two corners of the diagonal.
[0047] Then, one of the grids with the marked pose can be set as the starting point according to business needs (such as cooperating with other robotic arms for loading and unloading).
[0048] According to business needs (such as cooperating with other robotic arms for loading and unloading), one of the grids that meets the guidance conditions and has been marked with a positioning posture is set as the process point. The guidance condition is that it is not diagonally opposite to the starting point.
[0049] According to business needs (such as cooperating with other robotic arms for loading and unloading), set the remaining two marked grids as constraint points and end points respectively.
[0050] Step 103: Calculate the pose of the unlabeled grid based on the starting point, process point, constraint point and ending point to obtain the path point.
[0051] In this embodiment, based on the known layout of each cell in the material tray, it is possible to predict the unmarked cells in the material tray, excluding the start point, process point, constraint point, and end point. Then, based on the marked poses of the start point, process point, constraint point, and end point, the poses of these cells are calculated, and the cells with calculated poses are marked as path points. The path points are the positions traversed by the path, and the order of traversal is not limited.
[0052] In one embodiment of the present invention, step 103 may include the following steps:
[0053] Step 1031: Mark the horizontal axis fixed point, vertical axis fixed point, and diagonal fixed point in the process point, constraint point, and end point respectively.
[0054] In this embodiment, the starting point can be used as a reference, and one of the process point, constraint point and ending point can be marked as the horizontal axis fixed point, the other of the process point, constraint point and ending point can be marked as the vertical axis fixed point, and the remaining one of the process point, constraint point and ending point can be marked as the diagonal fixed point.
[0055] In this case, if the row direction of the material tray is set as the X-axis and the column direction as the Y-axis, then the fixed point of the horizontal axis and the starting point are located in the same row cell, the fixed point of the vertical axis and the starting point are located in the same column cell, and the fixed point of the diagonal is diagonally opposite to the starting point.
[0056] Therefore, the fixed point on the horizontal axis can be any one of the process point, constraint point, and end point; the fixed point on the vertical axis can be any one of the process point, constraint point, and end point; and the fixed point on the diagonal can be any one of the constraint point and end point.
[0057] Step 1032: Calculate the first horizontal axis distance between two adjacent cells using the starting point and the horizontal axis fixed point.
[0058] In this embodiment, the pose of the starting point and the pose of the horizontal axis fixed point can be used to calculate the distance between two adjacent grids on the horizontal axis, which is denoted as the first horizontal axis spacing.
[0059] Generally, the first horizontal axis spacing is the distance between the same positions (such as the midpoint) in two adjacent cells.
[0060] In the specific implementation, the difference between the starting point and the horizontal axis fixed point on the horizontal axis is calculated as the first horizontal axis distance. That is, the difference between the x coordinate of the pose of the starting point and the x coordinate of the pose of the horizontal axis fixed point is calculated and recorded as the first horizontal axis distance.
[0061] Subtract one from the number of cells in a row of the material tray to get the number of horizontal axis intervals.
[0062] Calculate the ratio between the first horizontal axis distance and the number of horizontal axis intervals, and use it as the first horizontal axis spacing between two adjacent cells.
[0063] Therefore, the spacing of the first horizontal axis is expressed as:
[0064] d x = (x1-x0) / (a-1)
[0065] Where, d x x1 is the x-coordinate of the first horizontal axis spacing, x0 is the x-coordinate of the starting point, and a is the number of cells in a row in the material tray.
[0066] Step 1033: Use the starting point and the vertical axis fixed point to calculate the first vertical axis distance between two adjacent cells.
[0067] In this embodiment, the pose of the starting point and the pose of the vertical axis fixed point can be used to calculate the distance between two adjacent grids on the vertical axis, which is denoted as the first vertical axis spacing.
[0068] Generally, the first vertical axis spacing is the distance between the same positions (such as the midpoint) in two adjacent cells.
[0069] In the specific implementation, the difference between the starting point and the fixed point on the vertical axis is calculated as the first vertical axis distance. That is, the difference between the y coordinate in the pose of the starting point and the y coordinate in the pose of the fixed point on the vertical axis is calculated and denoted as the first vertical axis distance.
[0070] Subtract one from the number of cells in a column of the material tray to get the number of vertical axis intervals.
[0071] Calculate the ratio between the first vertical axis distance and the number of vertical axis intervals, and use it as the first vertical axis spacing between two adjacent cells.
[0072] Therefore, the spacing along the first vertical axis is expressed as:
[0073] d y =(y1-y0) / (b-1)
[0074] Where, dy y1 is the y-coordinate of the first vertical axis spacing, y0 is the y-coordinate of the starting point, and b is the number of cells in a column of the material tray.
[0075] Step 1034: Use diagonal fixed points to verify the spacing between the first horizontal axis and the first vertical axis.
[0076] Generally, there may be a certain angle between the robotic arm and the material tray. The pose of the diagonal fixed point is different from the pose of the horizontal axis fixed point and the vertical axis fixed point. Therefore, the diagonal fixed point can be used to verify whether the first horizontal axis spacing and the first vertical axis spacing are valid.
[0077] On the one hand, the second horizontal axis spacing between two adjacent cells is calculated using the starting point and the diagonal fixed point.
[0078] Furthermore, the method for calculating the first horizontal axis spacing is the same as the method for calculating the second horizontal axis spacing.
[0079] For example, calculate the difference between the starting point and the diagonal fixed point on the horizontal axis, and use it as the second horizontal axis distance.
[0080] Subtract one from the number of cells in a row of the material tray to get the number of horizontal axis intervals.
[0081] Calculate the ratio between the second horizontal axis distance and the number of horizontal axis intervals, and use it as the second horizontal axis spacing between two adjacent cells.
[0082] On the other hand, the second vertical axis spacing between two adjacent cells is calculated using the starting point and the diagonal fixed point.
[0083] Furthermore, the method for calculating the first vertical axis spacing is the same as the method for calculating the second vertical axis spacing.
[0084] For example, calculate the difference between the starting point and the diagonal fixed point on the vertical axis, and use it as the second vertical axis distance.
[0085] Subtract one from the number of cells in a column of the material tray to get the number of vertical axis intervals.
[0086] Calculate the ratio between the first vertical axis distance and the number of vertical axis intervals, and use it as the second vertical axis spacing between two adjacent cells.
[0087] For the first horizontal axis spacing and the second horizontal axis spacing, the difference between the first horizontal axis spacing and the second horizontal axis spacing can be calculated as the horizontal axis deviation, and the horizontal axis deviation can be compared with a preset first threshold.
[0088] For the first vertical axis spacing and the second vertical axis spacing, the difference between the first vertical axis spacing and the second vertical axis spacing can be calculated as the vertical axis deviation, and the vertical axis deviation can be compared with a preset second threshold.
[0089] If the horizontal axis deviation is greater than the preset first threshold (indicating a large horizontal axis deviation), and / or the vertical axis deviation is greater than the preset second threshold (indicating a large vertical axis deviation), then the first horizontal axis spacing and the first vertical axis spacing are determined to be illegal. At this time, a calibration error can be indicated, prompting the user to recalibrate the grid positions of the material tray at the four corner points.
[0090] If the horizontal axis deviation is less than or equal to a preset first threshold (indicating a small horizontal axis deviation), and the vertical axis deviation is less than or equal to a preset second threshold (indicating a small vertical axis deviation), then the first horizontal axis spacing and the first vertical axis spacing are determined to be valid.
[0091] Step 1035: If the first horizontal axis spacing and the first vertical axis spacing are valid, then add the first horizontal axis spacing and the first vertical axis spacing to the starting point in sequence to obtain the pose of each grid.
[0092] If the first horizontal axis spacing and the first vertical axis spacing are valid, then based on the starting point, the first horizontal axis spacing and the first vertical axis spacing can be added sequentially to the horizontal axis and the vertical axis in the order of each cell to obtain the pose of each cell.
[0093] In practice, the number of first intervals on the horizontal axis and the number of second intervals on the vertical axis between each cell and the starting point can be counted separately.
[0094] Generally, the first interval number is the order of the grid on the horizontal axis minus the order of the starting point, and the second interval number is the order of the grid on the vertical axis minus the order of the starting point.
[0095] On the one hand, the horizontal axis offset is obtained by multiplying the first horizontal axis spacing by the first interval number.
[0096] On the other hand, the vertical axis offset is obtained by multiplying the first vertical axis spacing by the second interval number.
[0097] While keeping the z-coordinate, yaw, roll, and pitch of the starting point constant, horizontal and vertical offsets are added to the pose of the starting point to obtain the pose of each grid.
[0098] The horizontal axis offset is added to the x-coordinate, and the vertical axis offset is added to the y-coordinate.
[0099] Let P ij The cell in the i-th row and j-th column of the material tray, i∈b, j∈a, where a is the number of cells in a row of the material tray and b is the number of cells in a column of the material tray.
[0100] The pose of the starting point is dx d is the spacing along the first horizontal axis. y This represents the spacing along the first vertical axis.
[0101] Therefore, the poses of all the cells are as follows:
[0102]
[0103] P ij The pose is calculated as follows:
[0104] P 11 =P0,
[0105] Step 1036: If the grid is not marked with a pose, then set the grid as a path point.
[0106] For cells located at the four corners of the material tray, the calculated pose can be ignored, and the calibrated pose should be used as the standard.
[0107] For cells other than the four corner points of the material tray, they can be set as path points when calculating the pose.
[0108] Step 104: Based on the starting point, process point, constraint point, end point, and path point, plan a path for the robotic arm suitable for loading and unloading materials in each grid.
[0109] In this embodiment, the robotic arm can be planned using pathfinding algorithms such as A* (A-Star) to plan paths suitable for moving materials up and down in each grid, according to the definitions of starting point, process point, constraint point, ending point and path point.
[0110] Since the path is required to pass through each cell, the path planning process requires passing through the starting point, process points, constraint points, ending point, and all path points.
[0111] In the specific implementation, a first path condition and a second path condition can be determined. The first path condition is to start from the starting point, pass through the process points, and reach the ending point. In this case, the first path condition constrains the order between the starting point, the process points, and the ending point. The second path condition is to pass through the constraint points and each path point. In this case, the second path condition does not constrain the order between the constraint points and each path point.
[0112] The A* pathfinding algorithm is used to generate paths for the robotic arm that meet the first and second path conditions, which serve as the paths for loading and unloading materials in each cell.
[0113] When the locations of the starting point, process points, constraint points, and ending points differ, the planned paths will also differ.
[0114] For example, such as Figure 3A The path shown, P 11 Starting point, P 1a For process points, P b1 P is a constraint point. ba As the end point, such as Figure 3B The path shown, P 11 Starting point, P 1a For process points, P b1 As the endpoint, P ba For process points.
[0115] In this embodiment, a robotic arm with a rectangular material tray is determined. The tray contains multiple grids for placing materials, with the marked grids located at the four corners. These four marked grids are designated as the start point, process point, constraint point, and end point, respectively. The poses of the unmarked grids are calculated based on these points to obtain path points. Finally, the robotic arm plans paths suitable for loading and unloading materials from each grid based on these points. This embodiment calibrates the grids at the four corners of the material tray and automatically generates paths based on them. This reduces the amount of teaching operations and lowers the computational requirements. This is particularly beneficial when the working area of the material tray is large and a large number of materials are picked up and placed. It is suitable for microcontrollers in robotic arms. Furthermore, even with the defined grids at the four corners, there is still some room for reordering, facilitating on-site teaching and adjustment, thus greatly improving the simplicity and efficiency of teaching.
[0116] Example 2
[0117] Figure 4 This is a schematic diagram of the path planning device for a robotic arm provided in Embodiment 2 of the present invention. Figure 4 As shown, the device includes:
[0118] The robotic arm determination module 401 is used to determine the robotic arm to be planned. The robotic arm is equipped with a rectangular material tray, in which multiple grids for placing materials are distributed. The grids in the material tray that have been marked with their positions are located at the four corner points.
[0119] The calibration point definition module 402 is used to set the four calibrated grids as the start point, process point, constraint point and end point respectively;
[0120] The path point calculation module 403 is used to calculate the pose of the unlabeled grid based on the starting point, the process point, the constraint point and the ending point, and obtain the path point;
[0121] The path planning module 404 is used to plan a path suitable for loading and unloading materials in each of the grids for the robotic arm based on the starting point, the process point, the constraint point, the ending point and the path point.
[0122] In one embodiment of the present invention, the calibration point definition module 402 includes:
[0123] The first point setting module is used to set one of the grids whose pose has been marked as the starting point;
[0124] The second setting module is used to set one of the grids that meets the guidance conditions and has been marked with a pose as a process point, wherein the guidance condition is that it is not diagonally opposite to the starting point;
[0125] The third setting module is used to set the remaining two calibrated grids as constraint points and end points, respectively.
[0126] In one embodiment of the present invention, the path point calculation module 403 includes:
[0127] The comparison point marking module is used to mark the horizontal axis fixed point, the vertical axis fixed point, and the diagonal fixed point in the process point, the constraint point, and the end point, respectively. The horizontal axis fixed point is located in the same row of the grid as the starting point, the vertical axis fixed point is located in the same column of the grid as the starting point, and the diagonal fixed point is diagonally opposite to the starting point.
[0128] The first horizontal axis spacing calculation module is used to calculate the first horizontal axis spacing between two adjacent grids using the starting point and the horizontal axis fixed point;
[0129] The first vertical axis spacing calculation module is used to calculate the first vertical axis spacing between two adjacent grids using the starting point and the vertical axis fixed point;
[0130] The spacing verification module is used to verify the first horizontal axis spacing and the first vertical axis spacing using the diagonal fixed points;
[0131] The pose calculation module is used to, if the verification of the first horizontal axis spacing and the first vertical axis spacing is valid, sequentially add the first horizontal axis spacing and the first vertical axis spacing to the starting point to obtain the pose of each of the grids;
[0132] The path point setting module is used to set the grid as a path point if the grid is not marked with a pose.
[0133] In one embodiment of the present invention, the first horizontal axis spacing calculation module is further configured to:
[0134] Calculate the difference between the starting point and the fixed point on the horizontal axis, and use it as the first horizontal axis distance;
[0135] Subtract one from the number of cells in a row of the material tray to obtain the number of horizontal axis intervals;
[0136] Calculate the ratio between the first horizontal axis distance and the number of horizontal axis intervals, and use it as the first horizontal axis spacing between two adjacent cells.
[0137] In one embodiment of the present invention, the first longitudinal axis spacing calculation module is further configured to:
[0138] Calculate the difference between the starting point and the fixed point on the vertical axis on the horizontal axis, and use it as the first vertical axis distance;
[0139] Subtract one from the number of cells in a column of the material tray to obtain the number of vertical axis intervals;
[0140] Calculate the ratio between the first vertical axis distance and the number of vertical axis intervals, and use it as the first vertical axis spacing between two adjacent cells.
[0141] In one embodiment of the present invention, the spacing verification module:
[0142] The second horizontal axis spacing calculation module is used to calculate the second horizontal axis spacing between two adjacent grids using the starting point and the diagonal fixed point;
[0143] The second vertical axis spacing calculation module is used to calculate the second vertical axis spacing between two adjacent grids using the starting point and the diagonal fixed point;
[0144] The horizontal axis deviation calculation module is used to calculate the difference between the first horizontal axis spacing and the second horizontal axis spacing as the horizontal axis deviation;
[0145] The longitudinal axis deviation calculation module is used to calculate the difference between the first longitudinal axis spacing and the second longitudinal axis spacing, as the longitudinal axis deviation;
[0146] An illegal determination module is used to determine that the first horizontal axis spacing and the first vertical axis spacing are illegal if the horizontal axis deviation is greater than a preset first threshold and / or the vertical axis deviation is greater than a preset second threshold.
[0147] The validity determination module is used to determine that the first horizontal axis spacing and the first vertical axis spacing are valid if the horizontal axis deviation is less than or equal to a preset first threshold and the vertical axis deviation is less than or equal to a preset second threshold.
[0148] In one embodiment of the present invention, the second horizontal axis spacing calculation module is further configured to:
[0149] Calculate the difference between the starting point and the diagonal fixed point on the horizontal axis, and use it as the second horizontal axis distance;
[0150] Subtract one from the number of cells in a row of the material tray to obtain the number of horizontal axis intervals;
[0151] Calculate the ratio between the second horizontal axis distance and the number of horizontal axis intervals, and use it as the second horizontal axis spacing between two adjacent grids.
[0152] In one embodiment of the present invention, the second vertical axis spacing calculation module is further configured to:
[0153] Calculate the difference between the starting point and the diagonal fixed point on the vertical axis, and use it as the second vertical axis distance;
[0154] Subtract one from the number of cells in a column of the material tray to obtain the number of vertical axis intervals;
[0155] Calculate the ratio between the second vertical axis distance and the number of vertical axis intervals, and use it as the second vertical axis spacing between two adjacent cells.
[0156] In one embodiment of the present invention, the pose calculation module includes:
[0157] The interval count module is used to count the first interval on the horizontal axis and the second interval on the vertical axis between each of the grids and the starting point.
[0158] The horizontal axis offset calculation module is used to multiply the first horizontal axis spacing by the first interval quantity to obtain the horizontal axis offset.
[0159] The vertical axis offset calculation module is used to multiply the first vertical axis spacing by the second interval quantity to obtain the vertical axis offset.
[0160] The offset addition module is used to add the horizontal axis offset and the vertical axis offset to the pose of the starting point to obtain the pose of each of the grid cells.
[0161] In one embodiment of the present invention, the path planning module 404 includes:
[0162] The path condition determination module is used to determine a first path condition and a second path condition, wherein the first path condition is to start from the starting point, pass through the process points and reach the ending point, and the second path condition is to pass through the constraint points and each of the path points.
[0163] The path planning module is used to generate a path for the robotic arm that conforms to the first path condition and the second path condition, as a path for loading and unloading materials in each of the grids.
[0164] The path planning device for the robotic arm provided in this embodiment of the invention can execute the path planning method for the robotic arm provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the path planning method for the robotic arm.
[0165] Example 3
[0166] Figure 5 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0167] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0168] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0169] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as path planning methods for a robotic arm.
[0170] In some embodiments, the path planning method for the robotic arm can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded into and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the path planning method for the robotic arm described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the path planning method for the robotic arm by any other suitable means (e.g., by means of firmware).
[0171] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0172] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0173] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0174] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0175] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0176] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0177] Example 4
[0178] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the path planning method for a robotic arm as provided in any embodiment of this invention.
[0179] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0180] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0181] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A path planning method for a robotic arm, characterized in that, include: A robotic arm with a rectangular material tray is determined. The material tray has multiple grids for placing materials. The grids with marked poses are located at the four corner points. The four grids with calibrated poses are respectively set as the start point, process point, constraint point and end point; Based on the starting point, the process point, the constraint point, and the ending point, calculate the pose of the unlabeled grid and obtain the path point; Based on the starting point, the process point, the constraint point, the ending point, and the path point, the robotic arm is planned to follow a path suitable for loading and unloading materials in each of the grids. The step of calculating the pose of the unlabeled grid cells based on the starting point, the process point, the constraint point, and the ending point to obtain path points includes: Mark the horizontal axis fixed point, vertical axis fixed point, and diagonal fixed point in the process point, the constraint point, and the end point, respectively. The horizontal axis fixed point is located in the same row of the grid as the starting point, the vertical axis fixed point is located in the same column of the grid as the starting point, and the diagonal fixed point is diagonally opposite to the starting point. The first horizontal axis distance between two adjacent cells is calculated using the starting point and the horizontal axis fixed point. The first vertical axis distance between two adjacent cells is calculated using the starting point and the vertical axis fixed point. The first horizontal axis spacing and the first vertical axis spacing are verified using the diagonal fixed points; If the first horizontal axis spacing and the first vertical axis spacing are valid, then the first horizontal axis spacing and the first vertical axis spacing are added sequentially based on the starting point to obtain the pose of each of the grids; If the grid cell is not labeled with a pose, then the grid cell is set as a path point; The step of verifying the first horizontal axis spacing and the first vertical axis spacing using the diagonal fixed points includes: The second horizontal axis distance between two adjacent grid cells is calculated using the starting point and the diagonal fixed point. The second vertical axis distance between two adjacent grid cells is calculated using the starting point and the diagonal fixed point. Calculate the difference between the first horizontal axis spacing and the second horizontal axis spacing, and use it as the horizontal axis deviation; Calculate the difference between the first vertical axis spacing and the second vertical axis spacing, and use it as the vertical axis deviation; If the horizontal axis deviation is greater than a preset first threshold, and / or the vertical axis deviation is greater than a preset second threshold, then the first horizontal axis spacing and the first vertical axis spacing are determined to be illegal. If the horizontal axis deviation is less than or equal to a preset first threshold, and the vertical axis deviation is less than or equal to a preset second threshold, then the first horizontal axis spacing and the first vertical axis spacing are determined to be valid.
2. The method according to claim 1, characterized in that, The step of setting the four lattices with calibrated poses as the start point, process point, constraint point, and end point respectively includes: Set one of the grids whose pose has been marked as the starting point; Set one of the grids that meets the guidance condition and has been calibrated as a process point, wherein the guidance condition is that it is not diagonally opposite to the starting point; Set the remaining two lattices with calibrated poses as constraint points and end points, respectively.
3. The method according to claim 1, characterized in that, The step of calculating the first horizontal axis distance between two adjacent cells using the starting point and the horizontal axis fixed point includes: Calculate the difference between the starting point and the fixed point on the horizontal axis, and use it as the first horizontal axis distance; Subtract one from the number of cells in a row of the material tray to obtain the number of horizontal axis intervals; Calculate the ratio between the first horizontal axis distance and the number of horizontal axis intervals, and use it as the first horizontal axis spacing between two adjacent grids. The step of calculating the first vertical axis distance between two adjacent cells using the starting point and the vertical axis fixed point includes: Calculate the difference between the starting point and the fixed point on the vertical axis on the vertical axis, and use it as the first vertical axis distance; Subtract one from the number of cells in a column of the material tray to obtain the number of vertical axis intervals; Calculate the ratio between the first vertical axis distance and the number of vertical axis intervals, and use it as the first vertical axis spacing between two adjacent cells.
4. The method according to claim 1, characterized in that, The process of sequentially adding the first horizontal axis spacing and the first vertical axis spacing based on the starting point to obtain the pose of each of the grid cells includes: Count the number of first intervals on the horizontal axis and the number of second intervals on the vertical axis between each of the grid cells and the starting point; Multiply the first horizontal axis spacing by the first interval quantity to obtain the horizontal axis offset; Multiply the first vertical axis spacing by the second interval quantity to obtain the vertical axis offset; The pose of each grid cell is obtained by adding the horizontal axis offset and the vertical axis offset to the pose of the starting point.
5. The method according to any one of claims 1-4, characterized in that, The step of planning a path for the robotic arm to move materials up and down each of the grids based on the starting point, the process point, the constraint point, the ending point, and the path point includes: Determine the first path condition and the second path condition, wherein the first path condition is to start from the starting point, pass through the process points and reach the ending point, and the second path condition is to pass through the constraint points and each of the path points; The robotic arm generates paths that conform to the first path condition and the second path condition, which serve as paths for loading and unloading materials in each of the grids.
6. A path planning device for a robotic arm, characterized in that, include: The robotic arm determination module is used to determine the robotic arm whose path is to be planned. The robotic arm is equipped with a rectangular material tray, which has multiple grids for placing materials. The grids in the material tray that have been marked with their poses are located at the four corner points. The calibration point definition module is used to set the four calibrated grids as the start point, process point, constraint point and end point, respectively. The path point calculation module is used to calculate the pose of the unlabeled grid based on the starting point, the process point, the constraint point and the ending point, and obtain the path points; The path planning module is used to plan a path suitable for loading and unloading materials in each of the grids for the robotic arm based on the starting point, the process point, the constraint point, the ending point and the path point; The path point calculation module includes: The comparison point marking module is used to mark the horizontal axis fixed point, the vertical axis fixed point, and the diagonal fixed point in the process point, the constraint point, and the end point, respectively. The horizontal axis fixed point is located in the same row of the grid as the starting point, the vertical axis fixed point is located in the same column of the grid as the starting point, and the diagonal fixed point is diagonally opposite to the starting point. The first horizontal axis spacing calculation module is used to calculate the first horizontal axis spacing between two adjacent grids using the starting point and the horizontal axis fixed point; The first vertical axis spacing calculation module is used to calculate the first vertical axis spacing between two adjacent grids using the starting point and the vertical axis fixed point; The spacing verification module is used to verify the first horizontal axis spacing and the first vertical axis spacing using the diagonal fixed points; The pose calculation module is used to, if the verification of the first horizontal axis spacing and the first vertical axis spacing is valid, sequentially add the first horizontal axis spacing and the first vertical axis spacing to the starting point to obtain the pose of each of the grids; The path point setting module is used to set the grid as a path point if the grid is not marked with a pose. The spacing verification module includes: The second horizontal axis spacing calculation module is used to calculate the second horizontal axis spacing between two adjacent grids using the starting point and the diagonal fixed point; The second vertical axis spacing calculation module is used to calculate the second vertical axis spacing between two adjacent grids using the starting point and the diagonal fixed point; The horizontal axis deviation calculation module is used to calculate the difference between the first horizontal axis spacing and the second horizontal axis spacing, as the horizontal axis deviation; The longitudinal axis deviation calculation module is used to calculate the difference between the first longitudinal axis spacing and the second longitudinal axis spacing, as the longitudinal axis deviation; An illegal determination module is used to determine that the first horizontal axis spacing and the first vertical axis spacing are illegal if the horizontal axis deviation is greater than a preset first threshold and / or the vertical axis deviation is greater than a preset second threshold. The validity determination module is used to determine that the first horizontal axis spacing and the first vertical axis spacing are valid if the horizontal axis deviation is less than or equal to a preset first threshold and the vertical axis deviation is less than or equal to a preset second threshold.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the path planning method of the robotic arm according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the path planning method of the robotic arm according to any one of claims 1-5.