Collision detection and pose adjustment method and system for picking in mechanical arm box
Through matching and iterative registration of the three-dimensional point cloud of the box, combined with coordinate system construction and pose optimization, the collision problem of the robotic arm in the box selection task is solved, ensuring safety and efficiency.
Patent Information
- Application Number
- CN202511012946.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-08-19
AI Technical Summary
When the robotic arm performs material picking tasks inside the box, it is prone to collision due to complex environment and space limitations, which affects the safety and efficiency of the operation.
By projecting the three-dimensional point cloud of the box to the two-dimensional mesa coordinate system for matching, the initial relative pose is obtained, and iterative registration is performed, the coordinates of the inner and outer corner points of the box are obtained, the box coordinate system is constructed, the Euclidean distance between the picking point and the side wall is calculated, the collision risk is judged, and the position optimization process is carried out when there is a risk.
It realizes safe grasping of the robotic arm in the box, improves operational safety and reliability, and ensures the smooth execution of the picking task.
Smart Images

Figure CN120503220A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotic arm control technology, and in particular to a method and system for robotic arm in-box picking collision detection and posture adjustment. Background Art
[0002] In industrial automation and intelligent logistics systems, robotic arms performing material sorting tasks inside boxes have become a common application scenario. These tasks typically require the robotic arm to identify, locate, and grasp items within a limited and confined space. These tasks are characterized by complex environments, limited space, and high grasping precision. Specifically, boxes are typically closed or semi-enclosed structures, and their inner walls (including the side walls and bottom) significantly restrict the range of motion of the robotic arm. Improper handling can easily lead to collisions, impacting operational safety and efficiency. Summary of the Invention
[0003] The purpose of the present invention is to provide a collision-proof robot arm box picking collision detection and posture adjustment method and system.
[0004] The technical solutions of the present invention are as follows: A method for collision detection and posture adjustment of a robot arm picking within a box, comprising the following operations: S1. After projecting the 3D point cloud of the box onto the 2D table coordinate system, match it with the 2D template image to obtain the box matching points in the image; based on the box matching points in the image, the corresponding point clouds in the 3D point cloud of the box and the 3D template point cloud are used to obtain the initial relative pose relationship; based on the initial relative pose relationship, the 3D point cloud of the box and the 3D template point cloud are iteratively registered until convergence, and the optimal pose transformation matrix is obtained; based on the optimal pose transformation matrix and the 3D template point cloud, the coordinates of the inner and outer corners of the box are obtained; S2. Based on the coordinates of the inner and outer corner points of the box, obtain the horizontal and vertical unit vectors of the box, combine them with the center point of the box bottom, and construct the box coordinate system; convert the box's 3D point cloud to the box coordinate system, and based on the coordinates of the inner corner points and the direction vector information, obtain the spatial plane equation of each side wall of the box; S3. Construct a pose ray equation based on the picking point and the corresponding pose. Use the intersection of the spatial plane equation of each side wall of the box with the pose ray equation as the respective detection point. Obtain the Euclidean distance between the picking point and each detection point, and determine whether all Euclidean distances are not less than a preset distance threshold. If so, obtain the picking task execution information based on the picking point position and the corresponding pose. If not, execute S4. S4. Select a side wall as the target side wall from all side walls whose Euclidean distance is less than a preset distance threshold; perform posture optimization based on the picking point and the detection point on the target side wall to obtain the posture optimization point; obtain the picking task execution information based on the posture optimization point and the picking point.
[0005] The pose optimization point in S4 is the point where the detection point is translated upward in the longitudinal direction to the edge of the target side wall.
[0006] In S4, the operation of posture optimization processing is as follows: construct an objective function based on the vector formed by the picking point and the detection point, and the vector between the picking point and the optimized detection point; and take the optimized detection point corresponding to the minimum vertical coordinate value among all optimized detection points whose objective function value is greater than the target result threshold and whose Euclidean distance to the picking point is greater than the distance threshold as the posture optimization point.
[0007] The objective function calculation formula is as follows: , is the objective function value, Picking point and optimized detection points The vector formed, Picking point and detection points The vector formed, , is the step length of the detection point moving upward in the longitudinal direction, is the number of translation steps.
[0008] The detection points in S3 are calculated using the following formula: , , For the detection point, For picking point, t is the direction distance parameter, is the picking point pose direction vector, 、 、 、 Respectively i The x-axis coefficient, y-axis coefficient, z-axis coefficient and constant term in the spatial plane equation of the side wall.
[0009] The preset distance threshold in S3 is the sum of the connecting rod length and the end effector length of the robot arm.
[0010] A robot arm in-box picking collision detection and posture adjustment system, used to implement the above-mentioned robot arm in-box picking collision detection and posture adjustment method, comprising: The module for generating coordinates of the inner and outer corner points of the box is used to project the three-dimensional point cloud of the box onto the two-dimensional table coordinate system and then match it with the two-dimensional template image to obtain the matching points of the box in the image. Based on the matching points of the box in the image, the corresponding point clouds in the three-dimensional point cloud of the box and the three-dimensional template point cloud are used to obtain the initial relative pose relationship. Based on the initial relative pose relationship, the three-dimensional point cloud of the box and the three-dimensional template point cloud are iteratively aligned until convergence, and the optimal pose transformation matrix is obtained. Based on the optimal pose transformation matrix and the three-dimensional template point cloud, the coordinates of the inner and outer corner points of the box are obtained. The side wall spatial plane equation generation module is used to obtain the horizontal and vertical unit vectors of the box based on the coordinates of the inner and outer corner points of the box, and combine them with the center point of the box bottom to construct the box coordinate system. The 3D point cloud of the box is converted to the box coordinate system, and the spatial plane equation of each side wall of the box is obtained based on the coordinates of the inner corner points and the direction vector information. The detection point generation module is used to construct a pose ray equation based on the picking point and the corresponding pose. The intersection of the spatial plane equation of each side wall of the box and the pose ray equation is used as the respective detection point. The Euclidean distance between the picking point and each detection point is obtained to determine whether all Euclidean distances are not less than a preset distance threshold. If so, the picking task execution information is obtained based on the picking point position and the corresponding pose. If not, the picking pose optimization module is executed. The picking posture optimization module is used to select a side wall as the target side wall from all side walls whose Euclidean distance is less than a preset distance threshold; based on the picking point and the detection point on the target side wall, the posture optimization processing is performed to obtain the posture optimization point; based on the posture optimization point and the picking point, the picking task execution information is obtained.
[0011] A robot arm box picking collision detection and posture adjustment device includes a processor and a memory, wherein the processor implements the above-mentioned robot arm box picking collision detection and posture adjustment method when executing a computer program stored in the memory.
[0012] A computer-readable storage medium is used to store a computer program, wherein when the computer program is executed by a processor, the above-mentioned robot arm box picking collision detection and posture adjustment method is implemented.
[0013] The beneficial effects of the present invention are: The present invention provides a method for collision detection and posture adjustment of a robot arm picking in a box. First, the three-dimensional point cloud of the box is projected onto a two-dimensional table coordinate system for matching to obtain an initial relative posture, and the three-dimensional point cloud of the box and the three-dimensional template point cloud are iteratively aligned according to the initial relative posture relationship to obtain the coordinates of the inner and outer corner points of the box to realize box positioning; then, the horizontal unit vector and the vertical unit vector are obtained according to the coordinates of the inner and outer corner points of the box, and the box coordinate system is constructed in combination with the bottom center point, and then the three-dimensional point cloud of the box is converted to the box coordinate system to obtain the spatial plane equation of each side wall of the box; then, the detection point is obtained by the posture ray of the picking point and the side wall of the box, and whether there is a risk of box collision is judged according to the distance between the detection point and the picking point; if it is safe, an execution vector is generated; otherwise, a target side wall is selected from the side walls with a collision risk, and the posture optimization point is obtained by using the picking point and the target side wall posture optimization, and then the picking task execution information is generated according to the posture optimization point to ensure that the robot arm does not collide with the side wall when grasping in the box, thereby improving the safety and reliability of operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] By reading the detailed description of the preferred embodiment below, the solutions and advantages of the present application will become clear to those skilled in the art. The accompanying drawings are only for illustrating the preferred embodiment and are not to be considered as limiting the present invention.
[0015] In the attached figure: Figure 1 In the embodiment, a schematic diagram of the process of the method of this embodiment; Figure 2 Schematic diagram of the position of the posture optimization point in the embodiment. DETAILED DESCRIPTION
[0016] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings.
[0017] This embodiment provides a method for collision detection and posture adjustment of a robot arm picking within a box. Figure 1 , including the following operations: S1. After projecting the 3D point cloud of the box onto the 2D table coordinate system, match it with the 2D template image to obtain the box matching points in the image; based on the box matching points in the image, the corresponding point clouds in the 3D point cloud of the box and the 3D template point cloud are used to obtain the initial relative pose relationship; based on the initial relative pose relationship, the 3D point cloud of the box and the 3D template point cloud are iteratively registered until convergence, and the optimal pose transformation matrix is obtained; based on the optimal pose transformation matrix and the 3D template point cloud, the coordinates of the inner and outer corners of the box are obtained; S2. Based on the coordinates of the inner and outer corner points of the box, obtain the horizontal and vertical unit vectors of the box, combine them with the center point of the box bottom, and construct the box coordinate system; convert the box's 3D point cloud to the box coordinate system, and based on the coordinates of the inner corner points and the direction vector information, obtain the spatial plane equation of each side wall of the box; S3. Construct a pose ray equation based on the picking point and the corresponding pose. Use the intersection of the spatial plane equation of each side wall of the box with the pose ray equation as the respective detection point. Obtain the Euclidean distance between the picking point and each detection point, and determine whether all Euclidean distances are not less than a preset distance threshold. If so, obtain the picking task execution information based on the picking point position and the corresponding pose. If not, execute S4. S4. Select a side wall as the target side wall from all side walls whose Euclidean distance is less than a preset distance threshold; perform posture optimization based on the picking point and the detection point on the target side wall to obtain the posture optimization point; obtain the picking task execution information based on the posture optimization point and the picking point.
[0018] The method of this embodiment is applicable to a scenario in which an end effector at the end of a robot extends into a box to grasp a target object, and the end effector of the robot is connected to a robotic arm through a connecting rod.
[0019] The specific operation steps are detailed as follows.
[0020] S1. After projecting the three-dimensional point cloud of the box onto the two-dimensional table coordinate system, it is matched with the two-dimensional template image to obtain the box matching points in the image; based on the box matching points in the image, the corresponding point clouds in the three-dimensional point cloud of the box and the three-dimensional template point cloud are used to obtain the initial relative pose relationship; according to the initial relative pose relationship, the three-dimensional point cloud of the box and the three-dimensional template point cloud are iteratively aligned until convergence to obtain the optimal pose transformation matrix; based on the optimal pose transformation matrix and the three-dimensional template point cloud, the coordinates of the inner and outer corners of the box are obtained.
[0021] By projecting the three-dimensional point cloud of the box onto the two-dimensional table coordinate system for matching, the approximate position of the box is quickly locked with the help of the high efficiency of two-dimensional template image matching, and the initial relative pose obtained based on the matching points provides a reliable starting point for subsequent iterative alignment. Then, the optimal pose transformation matrix obtained through iterative alignment can accurately map the inner and outer corner points of the box in the three-dimensional template point cloud to the actual scene, realizing the precise positioning of the box, thereby accurately obtaining its spatial pose and boundary information, providing a high-precision position basis for subsequent automated operations (such as grasping, assembly, etc.), and improving the stability and efficiency of the operation.
[0022] First, the 3D point cloud of the box is obtained, and after projecting it into the 2D table coordinate system, it is matched with the 2D template image to obtain the matching points of the box in the image.
[0023] Specifically, a 3D point cloud template and a corresponding 2D template image of the upper surface of the box are pre-constructed, and the work surface is calibrated to obtain the spatial plane equation of the surface. The 3D point cloud of the box is then obtained and spatially filtered to extract the regional point cloud that may belong to the box. The spatial plane equation of the surface then projects the filtered 3D point cloud data of the box into the 2D table coordinate system to obtain a 2D projection image of the box. A template matching algorithm (including but not limited to the NCC method or the SSD method) is used to match the 2D projection image of the box with the 2D template image on the projection image to obtain the box matching points in the image. The box matching points are the coordinates of the corner points of the upper surface of the box in the image (the 2D projection image of the box), including but not limited to the coordinates of the upper left corner, lower left corner, upper right corner, and lower right corner. Depending on the actual situation, only the upper left corner, lower left corner, and upper right corner coordinates can be selected as the box matching points.
[0024] Then, based on the box matching points in the image, the corresponding point clouds in the box 3D point cloud and the 3D template point cloud are obtained to obtain the initial relative pose relationship.
[0025] Then, based on the initial relative pose relationship, the 3D point cloud of the box and the 3D template point cloud are iteratively registered until convergence to obtain the optimal pose transformation matrix.
[0026] The operation of obtaining the optimal posture transformation matrix is as follows: Step 1. Based on the initial relative posture relationship, the three-dimensional template point cloud is converted to the box coordinate system to obtain the transformed template point cloud; Step 2. In the transformed template point cloud, the nearest neighbor corresponding to each point cloud in the box three-dimensional point cloud is found, and the first matching point cloud pair is formed with each point cloud in the corresponding box three-dimensional point cloud; Step 3. Based on the first matching point cloud pair, a new rotation matrix and translation vector are calculated to obtain a new posture transformation matrix; Repeat steps 1, 2 and 3 until convergence (the change in the distance error between the two times is less than the change threshold) to obtain the optimal rotation matrix and translation vector; Based on the optimal rotation matrix and translation vector, the optimal posture transformation matrix is obtained.
[0027] Finally, based on the optimal pose transformation matrix and the 3D template point cloud, the coordinates of the inner and outer corners of the box are obtained. Specifically, the optimal pose transformation matrix is multiplied with the coordinates of the inner and outer corners of the box in the 3D template point cloud to transform the preset inner and outer corner coordinates in the template to the box scene, obtaining the coordinates of the inner and outer corners of the box.
[0028] S2. Based on the coordinates of the inner and outer corner points of the box, obtain the horizontal unit vector and the vertical unit vector of the box, combine them with the center point of the bottom of the box to construct the box coordinate system; convert the three-dimensional point cloud of the box to the box coordinate system, and based on the coordinates of the inner corner points and the direction vector information, obtain the spatial plane equation of each side wall of the box.
[0029] The horizontal and vertical unit vectors are obtained based on the coordinates of the inner and outer corner points of the box, and the box coordinate system is constructed in combination with the bottom center point. The three-dimensional point cloud of the box is then converted to the box coordinate system, and a local coordinate system with a strong correlation with the box's own structure is established to eliminate external environmental interference, so that the point cloud data can more intuitively reflect the inherent geometric characteristics of the box. At the same time, relying on the inner corner points, the coordinate system benchmark can be accurately anchored to obtain the spatial plane equation of each side wall of the box, providing a unified and reliable coordinate benchmark for subsequent tasks such as box collision detection, simplifying the data processing process and improving analysis accuracy.
[0030] First, based on the coordinates of the inner and outer corners of the box, we obtain the horizontal and vertical unit vectors of the box and combine them with the center point of the box bottom to construct the box coordinate system. The origin of the box coordinate system is the center point of the box bottom, which can be calculated based on the coordinates of the inner and outer corners of the box and the spatial plane equation of the table top.
[0031] Then, the three-dimensional point cloud of the box is converted into the box coordinate system to realize the standardized expression of the box point cloud, and based on the coordinates of the corresponding inner corner points of the box in the box coordinate system and the corresponding direction vector information, the spatial plane equation of each side wall of the box is obtained.
[0032] In the box coordinate system, according to the coordinates of the inner corner points and the direction vector information, the general form of the spatial plane equations of the four side walls of the box is constructed as follows: Ax + By + Cz + D = 0 ; A 、 B 、 C 、 D They are the x-axis coefficient, y-axis coefficient, z-axis coefficient and constant term in the spatial plane equation respectively; further, considering the box coordinate system x The axis is aligned with the transverse direction of the box, and the general form of the plane equations of the left and right side walls of the box can be simplified to x = -D / A, for the two side walls in front and behind the box, their normal vectors are parallel to x Axis direction, the corresponding plane equation can be simplified to y = -D / B .
[0033] S3. Based on the picking point and the corresponding posture, construct the posture ray equation; use the intersection of the spatial plane equation of each side wall of the box with the posture ray equation as their respective detection points; obtain the Euclidean distance between the picking point and each detection point, and determine whether all Euclidean distances are not less than the preset distance threshold; if so, obtain the picking task execution information based on the picking point position and the corresponding posture; if not, execute S4.
[0034] Obtain the intersection of the pose ray used to construct the picking point and the side wall of the box, calculate the distance to the picking point, and determine whether there is a risk of box collision during the picking process; if it is safe, generate an execution vector; otherwise, adjust the pose in time to effectively avoid collision between the robot arm and the side wall of the box, ensure the safety of the picking process, and ensure that the grasping task is performed in a feasible pose, thereby improving the reliability and efficiency of the operation.
[0035] First, a pose ray equation is constructed based on the picking point and its corresponding pose. Starting from the picking point, the ray equation is constructed by combining the pose information in its corresponding pose (such as the axial unit vector in the tool coordinate system of the end-of-arm, representing the picking direction).
[0036] Then, the intersection of the spatial plane equation of each side wall of the box and the pose ray equation is used as the respective detection point.
[0037] The detection point is calculated by the following formula: , , , For the detection point, For picking point, is the picking point pose direction vector, t is the direction distance parameter, 、 、 、 Respectively i The x-axis coefficient, y-axis coefficient, z-axis coefficient and constant term in the spatial plane equation of the side wall.
[0038] Finally, the Euclidean distance between the picking point and each detection point is obtained to determine whether all Euclidean distances are greater than or equal to a preset distance threshold. The preset distance threshold is the sum of the robot arm's connecting rod length and the end effector length.
[0039] If so, that is, the distances between all intersection points and the picking points are not less than the preset distance threshold, it is determined that the current picking posture will not collide with the side wall of the box in this direction, and the picking task execution information is obtained based on the picking point position and the corresponding posture.
[0040] If not, it is determined that there is a potential collision risk, and the posture adjustment method of S4 is executed to ensure the safety and feasibility of the picking task.
[0041] S4. Select a side wall as the target side wall from all side walls whose Euclidean distance is less than a preset distance threshold; perform posture optimization based on the picking point and the detection point on the target side wall to obtain the posture optimization point; obtain the picking task execution information based on the posture optimization point and the picking point.
[0042] When the Euclidean distance is less than the preset threshold, the target side wall is selected from the corresponding side walls, and the posture optimization point is obtained by using the picking point and the target side wall posture optimization. Then, the picking task execution information is generated based on this. This can not only avoid dangerous side walls, but also optimize the motion path through the posture optimization point, further ensuring that the robotic arm does not collide with the side wall when grasping inside the box, thereby improving operational safety and reliability.
[0043] First, a side wall is randomly selected as the target side wall from all side walls whose Euclidean distance is less than a preset distance threshold.
[0044] Then, based on the picking points and the detection points on the target side wall, the pose optimization process is performed to obtain the pose optimization point.
[0045] In order to obtain a safe new picking direction that avoids the side wall without changing the picking point, this embodiment proposes a simple and effective posture optimization processing method, which is: the detection point on the target side wall is translated along the Z axis direction of the box coordinate system (i.e., along the longitudinal direction) to the upper edge of the box, and a new intersection point is obtained as the posture optimization point. Figure 2 , is the point where the detection point moves vertically upward to the edge of the target side wall.
[0046] In order to maintain the stability of the original picking posture to the greatest extent while ensuring obstacle avoidance, and to improve the grasping success rate and control accuracy of the robot arm, this embodiment also designs a posture optimization processing method. The specific operations are: constructing an objective function based on the vector formed by the picking point and the detection point, as well as the vector between the picking point and the optimized detection point; taking the optimized detection point corresponding to the minimum vertical coordinate value among all optimized detection points whose objective function value is greater than the target result threshold and whose Euclidean distance to the picking point is greater than the distance threshold, as the posture optimization point. This method can dynamically adapt to the scene, combine geometric constraints with optimization goals (such as obstacle avoidance, posture stability), and output points that are more in line with actual operation needs, which can reduce collision risks, optimize postures, and significantly improve the grasping success rate and control accuracy of the robot arm.
[0047] The objective function calculation formula is as follows: , is the objective function value, Picking point and optimized detection points The vector formed, Picking point and detection points The vector formed, , is the step length of the detection point moving upward in the longitudinal direction, is the number of translation steps.
[0048] Finally, based on the posture optimization points and picking points, the picking task execution information is obtained.
[0049] This embodiment further provides a robot arm in-box picking collision detection and posture adjustment system, which is used to implement the above-mentioned robot arm in-box picking collision detection and posture adjustment method, including: The module for generating coordinates of the inner and outer corner points of the box is used to project the three-dimensional point cloud of the box onto the two-dimensional table coordinate system and then match it with the two-dimensional template image to obtain the matching points of the box in the image. Based on the matching points of the box in the image, the corresponding point clouds in the three-dimensional point cloud of the box and the three-dimensional template point cloud are used to obtain the initial relative pose relationship. Based on the initial relative pose relationship, the three-dimensional point cloud of the box and the three-dimensional template point cloud are iteratively aligned until convergence, and the optimal pose transformation matrix is obtained. Based on the optimal pose transformation matrix and the three-dimensional template point cloud, the coordinates of the inner and outer corner points of the box are obtained. The side wall spatial plane equation generation module is used to obtain the horizontal and vertical unit vectors of the box based on the coordinates of the inner and outer corner points of the box, and combine them with the center point of the box bottom to construct the box coordinate system. The 3D point cloud of the box is converted to the box coordinate system, and the spatial plane equation of each side wall of the box is obtained based on the coordinates of the inner corner points and the direction vector information. The detection point generation module is used to construct a pose ray equation based on the picking point and the corresponding pose. The intersection of the spatial plane equation of each side wall of the box and the pose ray equation is used as the respective detection point. The Euclidean distance between the picking point and each detection point is obtained to determine whether all Euclidean distances are not less than a preset distance threshold. If so, the picking task execution information is obtained based on the picking point position and the corresponding pose. If not, the picking pose optimization module is executed. The picking posture optimization module is used to select a side wall as the target side wall from all side walls whose Euclidean distance is less than a preset distance threshold; based on the picking point and the detection point on the target side wall, the posture optimization processing is performed to obtain the posture optimization point; based on the posture optimization point and the picking point, the picking task execution information is obtained.
[0050] This embodiment also provides a robotic arm box picking collision detection and posture adjustment device, including a processor and a memory, wherein the processor implements the above-mentioned robotic arm box picking collision detection and posture adjustment method when executing the computer program stored in the memory.
[0051] This embodiment also provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the above-mentioned robot arm box picking collision detection and posture adjustment method is implemented.
[0052] This embodiment provides a method for collision detection and posture adjustment of a robotic arm picking within a box. First, the initial relative posture is obtained by projecting the three-dimensional point cloud of the box onto a two-dimensional table coordinate system for matching. Based on the initial relative posture relationship, the three-dimensional point cloud of the box and the three-dimensional template point cloud are iteratively aligned to obtain the coordinates of the inner and outer corner points of the box to achieve box positioning. Then, the horizontal unit vector and the vertical unit vector are obtained based on the coordinates of the inner and outer corner points of the box, and the box coordinate system is constructed in combination with the bottom center point. The three-dimensional point cloud of the box is then converted to the box coordinate system to obtain the spatial plane equation of each side wall of the box. Next, the detection point is obtained by comparing the posture ray of the picking point with the side wall of the box. Based on the distance between the detection point and the picking point, it is determined whether there is a risk of box collision. If it is safe, an execution vector is generated. Otherwise, a target side wall is selected from the side walls with a collision risk, and the posture optimization point is obtained by using the picking point and the target side wall posture optimization. Then, the picking task execution information is generated based on the posture optimization point to ensure that the robotic arm does not collide with the side wall when grasping within the box, thereby improving the safety and reliability of the operation.
Claims
1. A method for collision detection and posture adjustment of a robot arm picking in a box, characterized in that: The following operations are included: S1. After projecting the 3D point cloud of the box onto the 2D table coordinate system, match it with the 2D template image to obtain the box matching points in the image; based on the box matching points in the image, the corresponding point clouds in the 3D point cloud of the box and the 3D template point cloud are used to obtain the initial relative pose relationship; based on the initial relative pose relationship, the 3D point cloud of the box and the 3D template point cloud are iteratively registered until convergence, and the optimal pose transformation matrix is obtained; based on the optimal pose transformation matrix and the 3D template point cloud, the coordinates of the inner and outer corners of the box are obtained; S2. Obtain the horizontal unit vector and vertical unit vector of the box based on the coordinates of the inner and outer corner points of the box, and combine them with the center point of the bottom of the box to construct the box coordinate system; Convert the 3D point cloud of the box to the box coordinate system, and obtain the spatial plane equation of each side wall of the box based on the coordinates of the inner corner points and the direction vector information; S3. Construct the pose ray equation based on the picking points and the corresponding poses; The intersection of the spatial plane equation of each side wall of the box and the pose ray equation is used as the respective detection point; Obtain the Euclidean distance between the picking point and each detection point, and determine whether all Euclidean distances are not less than the preset distance threshold; If yes, based on the picking point location and corresponding posture, the picking task execution information is obtained; If not, execute S4; S4. Selecting a side wall as a target side wall from all side walls whose Euclidean distance is less than a preset distance threshold; Based on the picking points and the detection points on the target side wall, the pose optimization process is performed to obtain the pose optimization point; Based on the posture optimization points and picking points, the picking task execution information is obtained.
2. A method for collision detection and posture adjustment of a robot arm picking within a box according to claim 1, characterized in that: The pose optimization point in S4 is the point where the detection point is translated upward in the longitudinal direction to the edge of the target side wall.
3. The method for collision detection and posture adjustment of a robot arm picking within a box according to claim 1, characterized in that: In S4, the pose optimization processing operation is as follows: constructing an objective function based on the vector formed by the picking point and the detection point, and the vector between the picking point and the optimized detection point; Among all the optimized detection points whose objective function value is greater than the target result threshold and whose Euclidean distance to the picking point is greater than the distance threshold, the optimized detection point corresponding to the minimum ordinate value is taken as the pose optimization point.
4. A method for collision detection and posture adjustment of a robot arm picking within a box according to claim 3, characterized in that: The objective function calculation formula is as follows: , is the objective function value, Picking point and optimized detection points The vector formed, Picking point and detection points The vector formed, , is the step length of the detection point moving upward in the longitudinal direction, is the number of translation steps.
5. The method for collision detection and posture adjustment of a robot arm picking within a box according to claim 1, characterized in that: The detection points in S3 are calculated using the following formula: , , For the detection point, For picking point, t is the direction distance parameter, is the picking point pose direction vector, 、 、 、 Respectively i The x-axis coefficient, y-axis coefficient, z-axis coefficient and constant term in the spatial plane equation of the side wall.
6. A method for collision detection and posture adjustment of a robot arm picking within a box according to claim 1, characterized in that: The preset distance threshold in S3 is the sum of the connecting rod length and the end effector length of the robot arm.
7. A robot arm box picking collision detection and posture adjustment system, characterized in that: The method for realizing collision detection and posture adjustment of a robot arm picking in a box according to claim 1 is characterized by comprising: The module for generating coordinates of the inner and outer corner points of the box is used to project the three-dimensional point cloud of the box onto the two-dimensional table coordinate system and then match it with the two-dimensional template image to obtain the matching points of the box in the image. Based on the matching points of the box in the image, the corresponding point clouds in the three-dimensional point cloud of the box and the three-dimensional template point cloud are used to obtain the initial relative pose relationship. Based on the initial relative pose relationship, the three-dimensional point cloud of the box and the three-dimensional template point cloud are iteratively aligned until convergence, and the optimal pose transformation matrix is obtained. Based on the optimal pose transformation matrix and the three-dimensional template point cloud, the coordinates of the inner and outer corner points of the box are obtained. The side wall spatial plane equation generation module is used to obtain the horizontal and vertical unit vectors of the box based on the coordinates of the inner and outer corner points of the box, and combine them with the center point of the box bottom to construct the box coordinate system. The 3D point cloud of the box is converted to the box coordinate system, and the spatial plane equation of each side wall of the box is obtained based on the coordinates of the inner corner points and the direction vector information. The detection point generation module is used to construct a pose ray equation based on the picking point and the corresponding pose. The intersection of the spatial plane equation of each side wall of the box and the pose ray equation is used as the respective detection point. The Euclidean distance between the picking point and each detection point is obtained to determine whether all Euclidean distances are not less than a preset distance threshold. If so, the picking task execution information is obtained based on the picking point position and the corresponding pose. If not, the picking pose optimization module is executed. The picking posture optimization module is used to select a side wall as the target side wall from all side walls whose Euclidean distance is less than a preset distance threshold; based on the picking point and the detection point on the target side wall, the posture optimization processing is performed to obtain the posture optimization point; based on the posture optimization point and the picking point, the picking task execution information is obtained.
8. A robot arm box picking collision detection and posture adjustment device, characterized in that: It comprises a processor and a memory, wherein when the processor executes the computer program stored in the memory, it implements the robot arm box picking collision detection and posture adjustment method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that Used to store a computer program, wherein when the computer program is executed by a processor, the robot arm box picking collision detection and posture adjustment method as described in any one of claims 1 to 6 is implemented.