A mechanical arm grasping method, device and readable medium based on aliased workpiece
Through hand-eye calibration and three-dimensional point cloud processing technology, the problem of identifying and grasping complex workpieces in multi-target aliasing scenarios is solved, and efficient and accurate workpiece pose recognition and collision-free grasping are achieved, which is suitable for the automation of complex workpieces. assembly.
Patent Information
- Application Number
- CN202210705532.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-06-21
AI Technical Summary
It is difficult for the existing technology to achieve high degree of freedom and high-precision assembly in the automated manufacturing of complex workpieces, especially in multi-objective aliasing scenarios. The two-dimensional image analysis method cannot identify the height and angle deviation of complex workpieces, while the three-dimensional point cloud The analysis method has high computational complexity and low recognition accuracy, and is prone to collisions.
Hand-eye calibration is used to obtain the hand-eye relationship matrix, and a three-dimensional model of the template workpiece is constructed. Through three-dimensional point cloud preprocessing, Euclidean clustering, global multi-target three-dimensional point cloud registration and grasping decision-making algorithms, accurate pose recognition of aliased workpieces is achieved. and collision-free grabbing.
It improves the calculation efficiency and recognition stability, realizes fast, collision-free, and accurate grasping pose calculation in multi-workpiece aliasing scenarios, and is suitable for high-precision assembly of complex workpieces.
Smart Images

Figure CN115284279B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robots, and in particular to a robot arm grasping method, device and readable medium based on aliased workpieces. Background Art
[0002] Industrial robots have been widely used in the automated manufacturing process for various complex workpieces in the fields of aerospace, automobiles, etc. (such as inertial measurement unit boxes and bases, liquid-floating stable platform bases, automobile crankshafts, automobile steering knuckles, etc.). Traditional robot teaching methods cannot meet the assembly scenarios with high degrees of freedom and high precision requirements. At this time, industrial robots need to quickly identify and locate the target workpiece when performing tasks, so that the industrial robots can obtain the posture information of the workpiece to be grasped, and finally realize the positioning, sorting and assembly of the workpiece.
[0003] There are two existing vision-guided positioning methods. One is an identification and positioning technology based on two-dimensional image analysis, for example, the application number is CN201910928573.3, and the patent name is A projection welding workstation for automobile body based on 2D vision guidance. It has certain usage defects: this method is only applicable to the positioning and guidance of the position deviation of the target workpiece in the two-dimensional plane, and cannot locate the position and angle deviation in the height direction; the other is an identification and positioning technology based on three-dimensional point cloud analysis, for example, the application number is CN201910928573.3, and the patent name is A projection welding workstation for automobile body based on 2D vision guidance. It has certain usage defects: the RANSAC alignment method used is only applicable to single-target scenes, cannot recognize multiple targets, is not applicable in multi-target aliasing scenes, and the applicable scenes do not need to consider collision detection.
[0004] The recognition and positioning technology based on two-dimensional image analysis is only applicable to two-dimensional scene-guided positioning and simple workpiece structure. However, the workpiece has a complex structure, a single surface color, and a weak texture. Multiple workpieces may be mixed together on the production line, resulting in unstable measurement and recognition results based on two-dimensional image analysis.
[0005] The recognition and positioning technology based on 3D point cloud analysis has the advantage of high-resolution measurement of free-form surfaces. However, there are still the following difficulties in combining it with robots and applying it to production lines: the surface texture of the workpiece is weak and aliased, resulting in low recognition accuracy; the 3D reconstruction calculation is highly complex and inefficient; and the aliasing of workpieces makes collisions prone to occur during the grasping process. Summary of the invention
[0006] In view of the difficulty in identifying and locating the above-mentioned workpiece with weak texture and aliasing complex workpiece, the embodiment of the present application aims to propose a robot arm grasping method, device and readable medium based on aliasing workpiece to solve the problems raised by the above background technology.
[0007] In a first aspect, an embodiment of the present application provides a robot arm grasping method based on an aliased workpiece, comprising the following steps:
[0008] S1, use hand-eye calibration to obtain the hand-eye relationship matrix with the eye outside the hand And build a three-dimensional model of the template workpiece, and obtain at least one grasping posture of the template workpiece The grasping posture is a set of points under different coordinate origins and coordinate systems;
[0009] S2, acquiring a three-dimensional point cloud of the target workpiece and performing preprocessing to obtain a preprocessed three-dimensional point cloud;
[0010] S3, performing Euclidean clustering on the preprocessed three-dimensional point cloud, and setting filtering conditions to filter out the point set of interest of the target workpiece;
[0011] S4, perform global multi-target 3D point cloud registration on the point set of interest to obtain the transformation matrix of the target workpiece under the template workpiece According to the transformation matrix of the target artifact under the template artifact and grasping posture Obtain multiple pose information of the target workpiece under the template workpiece And according to the hand-eye relationship matrix and pose information Calculate the grasping posture of the target workpiece in the robot base coordinate system According to the grasping posture of the target workpiece in the robot base coordinate system Calculate the grab priority value of each grab target and sort it in descending order;
[0012] S5, generating a collision detection space at the template workpiece. The collision detection space is the spatial area between the robot body and the fixture when the robot grasps the template workpiece and during the Z-axis feeding process, and according to the arrangement order of the grasping priority value and the multiple posture information of the target workpiece under the template workpiece Perform collision detection to obtain the first graspable target without point cloud data in the collision detection space, and calculate the grasping posture of the target workpiece corresponding to the graspable target in the robot base coordinate system. Sent to the robotic arm to perform the grasping task.
[0013] As a preferred embodiment, the hand-eye calibration is used in step S1 to obtain the hand-eye relationship matrix when the eye is outside the hand. Specifically include:
[0014] The checkerboard calibration plate is fixedly installed at the end of the robotic arm. The robotic arm position is moved a certain number of times. The camera captures the calibration plate image and records the robotic arm position. The hand-eye relationship matrix is calculated according to the hand-eye calibration calculation model.
[0015] Preferably, at least one gripping posture of the template workpiece The origin of the coordinate system of the point set is the origin of the end tool coordinate system of the robot arm at the optimal grasping posture, and the direction of the coordinate system is consistent with the direction of the end tool of the robot arm at the optimal grasping posture; the coordinate system of different grasping postures of the template workpiece is represented by its rigid transformation matrix to the initial grasping posture coordinate system, and the rigid transformation matrix includes a rotation matrix and a translation matrix.
[0016] Preferably, step S2 specifically includes:
[0017] A 3D camera is used to collect 3D point clouds of chaotically stacked target workpieces;
[0018] A straight-through filtering algorithm is used to remove the three-dimensional point cloud outside the region of interest in the three-dimensional point cloud of the target workpiece, and the three-dimensional point cloud within the region of interest is obtained;
[0019] The three-dimensional point cloud in the area of interest is downsampled by voxel filtering to obtain a preprocessed three-dimensional point cloud.
[0020] Preferably, step S3 performs accelerated Euclidean clustering on the preprocessed three-dimensional point cloud, specifically comprising:
[0021] S31, taking a point P10 in space as the starting point, find n points closest to point p through the KD-Tree nearest neighbor search algorithm, and calculate the Euclidean distances of these n points to P10 respectively. If the distance is less than the set threshold R, the points less than the threshold are placed in class Q (P10);
[0022] S32, randomly select P20 from class Q (P10), and repeat step S31;
[0023] S33, if the set of class Q(P10) does not increase any more, the whole clustering process is terminated, otherwise steps S31-S32 are repeated.
[0024] Preferably, the screening condition in step S3 is to simultaneously satisfy that the number of three-dimensional point clouds is greater than a specified value and the length, width and height of the minimum outer box of the three-dimensional point clouds do not deviate from the specified value by 15%.
[0025] Preferably, step S4 specifically includes:
[0026] The KD-Tree algorithm is used to segment the points of interest of the target workpiece to obtain its spatial data structure;
[0027] Local fitting is performed on the KD-Tree leaf nodes of the interest point set of the target workpiece by using the moving least squares method;
[0028] The FPFH descriptor is used to calculate the feature information of the interest point set of the target workpiece and multiple different grasping postures of the template workpiece according to the spatial data structure calculated by KD-Tree. The first step is to calculate each query point P q A series of The value is recorded as SPFH. In the second step, the k nearest neighbors of each point are recalculated and P is calculated using the neighboring SPFH values. q The final histogram of is calculated as:
[0029]
[0030] In the formula, k is the number of adjacent points of the current query point, P q is the current calculation point, P k The neighboring points of the current point to be calculated, ω k is the current calculation point P q Its adjacent point P k The weight between, FPFH is the fast point feature histogram, SPFH is the simplified point feature histogram;
[0031] According to the calculated FPFH feature information of the target workpiece's interest point set and the FPFH feature information of multiple template workpieces with different grasping postures, point pairs that meet the similarity constraint are selected as registration point pairs, and then multiple pose information of the target workpiece under the template workpiece is calculated. The pose information is the rotation matrix and translation matrix of the rigid transformation of the target workpiece to the template workpiece. The following formula is used to calculate the grasping pose of the target workpiece in the robot base coordinate system: The grasping posture of the target workpiece in the robot base coordinate system Contains (X, Y, Z, θ x ,θ y ,θ z );
[0032] Sort by the Z, θx, and θy values of each grasping posture, assign weight factors a, b, and c respectively, and give priority D to the i-th grasping posture i Assign a value, then the calculation formula for the grasping priority value of the i-th grasping posture is:
[0033]
[0034] Among them, Z i ,θ xi ,θ yi are respectively Z and θ of the i-th grasping posturex ,θ y value;
[0035] The grasping priority values of the recognized grasping postures of the target workpiece in the robot base coordinate system are arranged in descending order.
[0036] Preferably, step S5 specifically includes:
[0037] The collision detection space is pre-generated at the template workpiece, based on the multiple pose information of the target workpiece under the template workpiece. The target workpiece and its surrounding point clouds are rigidly transformed to the collision detection space. If there is no point cloud data in the collision detection space, it is considered a graspable target. If there is a point cloud, it is considered an ungraspable target.
[0038] Collision detection is performed sequentially starting from the target with the highest grasping priority value. The first graspable target detected is used as the final execution grasping target, and the grasping posture corresponding to the execution grasping target in the robot arm base coordinate system is recorded. Sent to the robotic arm to perform the grasping task.
[0039] In a second aspect, an embodiment of the present application provides a robot arm grasping device based on an aliased workpiece, comprising:
[0040] A calibration module is configured to obtain a hand-eye relationship matrix using hand-eye calibration And build a three-dimensional model of the template workpiece, and obtain at least one grasping posture of the template workpiece The grasping posture is a set of points under different coordinate origins and coordinate systems;
[0041] A preprocessing module is configured to obtain a three-dimensional point cloud of a target workpiece and perform preprocessing to obtain a preprocessed three-dimensional point cloud;
[0042] The point cloud clustering module is configured to perform Euclidean clustering on the preprocessed three-dimensional point cloud and set filtering conditions to filter out a set of points of interest of the target workpiece;
[0043] The point cloud registration module is configured to perform global multi-target 3D point cloud registration on the set of points of interest to obtain the transformation matrix of the target workpiece under the template workpiece According to the transformation matrix of the target artifact under the template artifact and grasping posture Obtain multiple pose information of the target workpiece under the template workpiece And according to the hand-eye relationship matrix and pose information Calculate the grasping posture of the target workpiece in the robot base coordinate system According to the grasping posture of the target workpiece in the robot base coordinate system Calculate the grab priority value of each grab target and sort it in descending order;
[0044] The collision detection module is configured to generate a collision detection space at the template workpiece. The collision detection space is the spatial area between the robot body and the fixture when the robot grasps the template workpiece and during the Z-axis feeding process, and according to the arrangement order of the grasping priority value and the multiple posture information of the target workpiece under the template workpiece Perform collision detection to obtain the first graspable target without point cloud data in the collision detection space, and calculate the grasping posture of the target workpiece corresponding to the graspable target in the robot base coordinate system. Sent to the robotic arm to perform the grasping task.
[0045] In a third aspect, an embodiment of the present application provides an electronic device comprising one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement a method as described in any implementation manner in the first aspect.
[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] The present invention provides a robot arm grasping method, device and readable medium based on aliased workpieces, which include a robot arm hand-eye calibration step, a three-dimensional template setting step, a three-dimensional point cloud preprocessing step, a global multi-target three-dimensional point cloud registration algorithm and a grasping decision algorithm, so as to realize collision-free grasping in multi-workpiece aliasing scenes and improve computational efficiency. The method improves the computational efficiency and stability of the algorithm through point cloud preprocessing; obtains the position and posture information of multiple workpieces in multi-workpiece aliasing scenes at the same time through a global multi-target three-dimensional point cloud registration algorithm; and screens the grasping targets of the obtained multiple workpieces through a grasping decision algorithm to ensure optimal collision-free grasping. Compared with the two-dimensional visual guidance method, it can realize more dimensional guidance and positioning. Compared with the general three-dimensional visual guidance method, it realizes fast, collision-free and accurate grasping position and posture calculation in multi-workpiece aliasing scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 is an exemplary device architecture diagram to which an embodiment of the present application may be applied;
[0051] Figure 2 It is a flow chart of a method for grasping aliased workpieces by a robot arm according to an embodiment of the present invention;
[0052] Figure 3 It is a schematic diagram of a robot arm grasping device based on aliased workpieces according to an embodiment of the present invention;
[0053] Figure 4 It is a schematic diagram of the structure of a computer device suitable for implementing the electronic device of the embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] Figure 1 An exemplary device architecture 100 is shown to which the robot arm grasping method based on aliased workpieces or the robot arm grasping device based on aliased workpieces according to the embodiments of the present application can be applied.
[0056] like Figure 1 As shown, the device architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0057] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various applications, such as data processing applications, file processing applications, etc., can be installed on terminal devices 101, 102, 103.
[0058] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or they can be implemented as a single software or software module. No specific limitation is made here.
[0059] The server 105 may be a server that provides various services, such as a background data processing server that processes files or data uploaded by the terminal devices 101, 102, and 103. The background data processing server may process the acquired files or data and generate processing results.
[0060] It should be noted that the robotic arm grasping method based on aliased workpieces provided in the embodiments of the present application can be executed by the server 105, or by the terminal devices 101, 102, 103. Accordingly, the robotic arm grasping device based on aliased workpieces can be set in the server 105, or in the terminal devices 101, 102, 103.
[0061] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided as required. In the case where the processed data does not need to be obtained remotely, the above device architecture may not include a network, but only a server or a terminal device.
[0062] Figure 2 A method for grasping a workpiece by a robot arm based on an aliased workpiece provided in an embodiment of the present application is shown, comprising the following steps:
[0063] S1, use hand-eye calibration to obtain the hand-eye relationship matrix with the eye outside the hand And build a three-dimensional model of the template workpiece, and obtain at least one grasping posture of the template workpiece The grasping posture is a set of points under different coordinate origins and coordinate systems.
[0064] In a specific embodiment, step S1 uses hand-eye calibration to obtain a hand-eye relationship matrix where the eye is outside the hand. Specifically include:
[0065] Eyes outside the hand: The checkerboard calibration plate is fixed on the end of the robotic arm. The robotic arm position is moved a certain number of times. The camera captures the image of the calibration plate and records the position of the robotic arm. The hand-eye relationship matrix is calculated based on the hand-eye calibration calculation model.
[0066] Specifically, the hand-eye relationship matrix It is represented as the position information of the camera in the base coordinate system of the robot. Different calibration methods are used according to the positional relationship between the camera and the robot. The robot position should be moved a certain number of times at least 8 times. A three-dimensional template is made in advance, and the template workpiece is drawn using CAD drawing software. The template workpiece is a three-dimensional model of the target workpiece, and a point set is generated by transformation. The coordinate origin and coordinate system direction of the point set are set according to the initial grasping posture. Multiple coordinate systems can be set for the same template workpiece to establish multiple different grasping postures. Here, only one grasping posture can be established, or multiple grasping postures can be established. The establishment of multiple grasping postures is to avoid physical collision interference of a single grasping posture after the collision detection algorithm, resulting in no grasping calculation. The method of establishing the grasping posture here is to artificially preset the relative position relationship between the template workpiece and the template coordinate system, so as to obtain the grasping posture
[0067] In a specific embodiment, at least one gripping gesture of the template workpiece The origin of the coordinate system of the point set is the origin of the end tool coordinate system (TCP) of the manipulator at the optimal grasping posture, and the direction of the coordinate system is consistent with the direction of the end tool of the manipulator at the optimal grasping posture. And the coordinate system of different grasping postures of the template workpiece is characterized by its rigid transformation matrix to the initial grasping posture coordinate system, and the rigid transformation matrix includes a rotation matrix and a translation matrix.
[0068] S2, obtaining a three-dimensional point cloud of the target workpiece and performing preprocessing to obtain a preprocessed three-dimensional point cloud.
[0069] In a specific embodiment, step S2 specifically includes:
[0070] A 3D camera is used to collect 3D point clouds of chaotically stacked target workpieces;
[0071] A straight-through filtering algorithm is used to remove the three-dimensional point cloud outside the region of interest in the three-dimensional point cloud of the target workpiece, and the three-dimensional point cloud within the region of interest is obtained;
[0072] The three-dimensional point cloud in the area of interest is downsampled by voxel filtering to obtain a preprocessed three-dimensional point cloud.
[0073] Specifically, the preprocessing of the 3D point cloud uses point cloud filtering, and the downsampling factor of the voxel filter is 0.01. The above point cloud preprocessing steps can improve the algorithm calculation efficiency and stability.
[0074] S3, performing Euclidean clustering on the preprocessed three-dimensional point cloud, and setting filtering conditions to filter out the point set of interest of the target workpiece.
[0075] In a specific embodiment, step S3 performs accelerated Euclidean clustering on the preprocessed three-dimensional point cloud, specifically including:
[0076] S31, taking a point P10 in space as the starting point, find n points closest to point p through the KD-Tree nearest neighbor search algorithm, and calculate the Euclidean distances of these n points to P10 respectively. If the distance is less than the set threshold R, the points less than the threshold are placed in class Q (P10);
[0077] S32, randomly select P20 from class Q (P10), and repeat step S31;
[0078] S33, if the set of class Q(P10) does not increase any more, the whole clustering process is terminated, otherwise steps S31-S32 are repeated.
[0079] In a specific embodiment, the screening condition in step S3 is that the number of three-dimensional point clouds is greater than a specified value, and the length, width, and height of the minimum outer box of the three-dimensional point cloud do not deviate from the specified value by 15%.
[0080] Specifically, the Euclidean distance is calculated as follows:
[0081]
[0082] S4, perform global multi-target 3D point cloud registration on the point set of interest to obtain the transformation matrix of the target workpiece under the template workpiece According to the transformation matrix of the target artifact under the template artifact and grasping posture Obtain multiple pose information of the target workpiece under the template workpiece And according to the hand-eye relationship matrix and pose information Calculate the grasping posture of the target workpiece in the robot base coordinate system According to the grasping posture of the target workpiece in the robot base coordinate system Calculate the grab priority value of each grab target and sort them in descending order.
[0083] In a specific embodiment, step S4 specifically includes:
[0084] The KD-Tree algorithm is used to segment the interest point set of the target workpiece screened in step S3 to obtain its spatial data structure;
[0085] Local fitting is performed on the KD-Tree leaf nodes of the interest point set of the target workpiece by using the moving least squares method;
[0086] The FPFH descriptor is used to calculate the feature information of the interest point set of the target workpiece and multiple different grasping postures of the template workpiece according to the spatial data structure calculated by KD-Tree. The first step is to calculate each query point P q A series of The value is recorded as SPFH. In the second step, the k nearest neighbors of each point are recalculated and P is calculated using the neighboring SPFH values. q The final histogram of is calculated as:
[0087]
[0088] In the formula, k is the number of adjacent points of the current query point, P q is the current calculation point, P k The neighboring points of the current point to be calculated, ω k is the current calculation point P q Its adjacent point P k The weight between FPFH and SPFH is the fast point feature histogram and the simplified point feature histogram.
[0089] According to the calculated FPFH feature information of the interest point set of the target workpiece and the FPFH feature information of multiple different grasping postures of the template workpiece, the point pairs that meet the similarity constraint are selected as the registration point pairs, and the mapping relationship between the interest point set of the target workpiece that meets the registration relationship and the different grasping postures of the template workpiece is obtained, and then the multiple posture information of the target workpiece under the template workpiece is calculated. The pose information is the rotation matrix and translation matrix of the rigid transformation of the target workpiece to the template workpiece. The following formula is used to calculate the grasping pose of the target workpiece in the robot base coordinate system: The grasping posture of the target workpiece in the robot base coordinate system Contains (X, Y, Z, θ x ,θ y ,θ z );
[0090] According to the Z, θ of each grasping posture x ,θ y The values are sorted and assigned weight factors a, b, c respectively, and the priority D of each grasping posture is i Assignment, then the calculation formula of the grasping priority value of each grasping posture is:
[0091]
[0092] Among them, Z i ,θ xi ,θ yi are respectively Z and θ of the i-th grasping posture x ,θy value; the sum of weight factors a, b, and c is 1;
[0093] The grasping priority values of the recognized grasping postures of the target workpiece in the robot base coordinate system are arranged in descending order.
[0094] Specifically, the transformation matrix of the target workpiece in the template workpiece coordinate system is: In order to make the template matching result directly equivalent to It is necessary to manually pre-set the relative position relationship between the template workpiece and the template coordinate system to obtain different grasping postures Further based on Calculate multiple pose information of the target workpiece under the template workpiece These posture information need to be converted into the grasping posture of the target workpiece in the robot base coordinate system using the hand-eye relationship matrix after hand-eye calibration. Right now
[0095] S5, generating a collision detection space at the template workpiece. The collision detection space is the spatial area between the robot body and the fixture when the robot grasps the template workpiece and during the Z-axis feeding process, and according to the arrangement order of the grasping priority value and the multiple posture information of the target workpiece under the template workpiece Perform collision detection to obtain the first graspable target without point cloud data in the collision detection space, and calculate the grasping posture of the target workpiece corresponding to the graspable target in the robot base coordinate system. Sent to the robotic arm to perform the grasping task.
[0096] In a specific embodiment, step S5 specifically includes:
[0097] The collision detection space is pre-generated at the template workpiece, based on the multiple pose information of the target workpiece under the template workpiece. The target workpiece and its surrounding point clouds are rigidly transformed to the collision detection space. If there is no point cloud data in the collision detection space, it is considered a graspable target. If there is a point cloud, it is considered an ungraspable target.
[0098] Collision detection is performed sequentially starting from the target with the highest grasping priority value. The first graspable target detected is used as the final execution grasping target, and the grasping posture corresponding to the execution grasping target in the robot arm base coordinate system is recorded. Sent to the robotic arm to perform the grasping task.
[0099] Specifically, the coordinate system of the template workpiece is set to coincide with the coordinate system of the end tool when the robot arm grasps it, so the collision detection space can be made in the coordinate system of the template workpiece, and the minimum outer space of the end fixture structure and its spatial position after the pre-set feed trajectory are defined as the minimum collision detection space. Through the above grasping decision algorithm, the grasping targets of the multiple target workpieces obtained are screened to ensure the optimal collision-free grasping.
[0100] Further references Figure 3 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a robot arm grasping device based on aliased workpieces, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0101] The embodiment of the present application provides a robot arm grasping device based on aliased workpieces, comprising:
[0102] The calibration module 1 is configured to obtain the hand-eye relationship matrix of the eye outside the hand by using hand-eye calibration And build a three-dimensional model of the template workpiece, and obtain at least one grasping posture of the template workpiece The grasping posture is a set of points under different coordinate origins and coordinate systems;
[0103] A preprocessing module 2 is configured to obtain a three-dimensional point cloud of a target workpiece and perform preprocessing to obtain a preprocessed three-dimensional point cloud;
[0104] The point cloud clustering module 3 is configured to perform Euclidean clustering on the preprocessed three-dimensional point cloud and set a screening condition to screen out a set of points of interest of the target workpiece;
[0105] Point cloud registration module 4 is configured to perform global multi-target 3D point cloud registration on the set of points of interest to obtain a transformation matrix of the target workpiece under the template workpiece. According to the transformation matrix of the target artifact under the template artifact and grasping posture Obtain multiple pose information of the target workpiece under the template workpiece And according to the hand-eye relationship matrix and pose information Calculate the grasping posture of the target workpiece in the robot base coordinate system According to the grasping posture of the target workpiece in the robot base coordinate system Calculate the grab priority value of each grab target and sort it in descending order;
[0106] The collision detection module 5 is configured to generate a collision detection space at the template workpiece. The collision detection space is the spatial area between the robot body and the fixture when the robot grasps the template workpiece and during the Z-axis feeding process, and according to the arrangement order of the grasping priority value and the multiple posture information of the target workpiece under the template workpiece Perform collision detection to obtain the first graspable target without point cloud data in the collision detection space, and calculate the grasping posture of the target workpiece corresponding to the graspable target in the robot base coordinate system. Sent to the robotic arm to perform the grasping task.
[0107] Reference below Figure 4 , which shows an electronic device (eg Figure 1 A schematic diagram of the structure of a computer device 400 (a server or terminal device as shown). Figure 4 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0108] like Figure 4 As shown, the computer device 400 includes a central processing unit (CPU) 401 and a graphics processing unit (GPU) 402, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 403 or the program loaded from the storage part 409 to the random access memory (RAM) 404. In the RAM 404, various programs and data required for the operation of the device 400 are also stored. The CPU 401, GPU 402, ROM 403 and RAM 404 are connected to each other through a bus 405. An input / output (I / O) interface 406 is also connected to the bus 405.
[0109] The following components are connected to the I / O interface 406: an input section 407 including a keyboard, a mouse, etc.; an output section 408 including a display such as a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 409 including a hard disk, etc.; and a communication section 410 including a network interface card such as a LAN card, a modem, etc. The communication section 410 performs communication processing via a network such as the Internet. A drive 411 can also be connected to the I / O interface 406 as needed. A removable medium 412, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 411 as needed so that a computer program read therefrom is installed into the storage section 409 as needed.
[0110] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 410, and / or installed from a removable medium 412. When the computer program is executed by a central processing unit (CPU) 401 and a graphics processing unit (GPU) 402, the above-mentioned functions defined in the method of the present application are executed.
[0111] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, device or component, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution device, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution device, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0112] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the device, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based device that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0114] The modules involved in the embodiments described in this application may be implemented by software or hardware, and the modules described may also be set in a processor.
[0115] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device: uses hand-eye calibration to obtain a hand-eye relationship matrix when the eye is outside the hand And build a three-dimensional model of the template workpiece, and obtain at least one grasping posture of the template workpiece The grasping posture is a point set under different coordinate origins and coordinate systems; the 3D point cloud of the target workpiece is obtained and preprocessed to obtain the preprocessed 3D point cloud; the preprocessed 3D point cloud is subjected to Euclidean clustering, and filtering conditions are set to filter out the point set of interest of the target workpiece; the point set of interest is subjected to global multi-target 3D point cloud registration to obtain the transformation matrix of the target workpiece under the template workpiece According to the transformation matrix of the target artifact under the template artifact and grasping posture Obtain multiple pose information of the target workpiece under the template workpiece And according to the hand-eye relationship matrix and pose information Calculate the grasping posture of the target workpiece in the robot base coordinate system According to the grasping posture of the target workpiece in the robot base coordinate system Calculate the grasping priority value of each grasping target and sort them in descending order; generate a collision detection space at the template workpiece. The collision detection space is the spatial area between the robot body and the fixture when the robot grasps the template workpiece and during the Z-axis feeding process, and according to the arrangement order of the grasping priority value and the multiple posture information of the target workpiece under the template workpiece Perform collision detection to obtain the first graspable target without point cloud data in the collision detection space, and calculate the grasping posture of the target workpiece corresponding to the graspable target in the robot base coordinate system. Sent to the robotic arm to perform the grasping task.
[0116] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other.
Claims
1. A robot arm grasping method based on aliased workpieces, characterized in that: The following steps are involved: S1, use hand-eye calibration to obtain the hand-eye relationship matrix with the eye outside the hand And build a three-dimensional model of the template workpiece, and obtain at least one grasping posture of the template workpiece The grasping posture is a point set under different coordinate origins and coordinate systems; S2, acquiring a three-dimensional point cloud of the target workpiece and performing preprocessing to obtain a preprocessed three-dimensional point cloud; S3, performing Euclidean clustering on the preprocessed three-dimensional point cloud, and setting filtering conditions to filter out the point set of interest of the target workpiece; S4, performing global multi-target three-dimensional point cloud registration on the set of points of interest to obtain a transformation matrix of the target workpiece under the template workpiece According to the transformation matrix of the target artifact under the template artifact and grasping posture Obtain multiple pose information of the target workpiece under the template workpiece And according to the hand-eye relationship matrix and pose information Calculate the grasping posture of the target workpiece in the robot base coordinate system According to the grasping posture of the target workpiece in the robot arm base coordinate system Calculate the crawl priority value of each crawl target and sort it in descending order, including: Using a KD-Tree algorithm to segment the point of interest set of the target workpiece to obtain its spatial data structure; Performing local fitting on the KD-Tree leaf nodes of the interest point set of the target workpiece by using a moving least squares method; The FPFH descriptor is used to calculate the feature information of the interest point set of the target workpiece and multiple different grasping postures of the template workpiece according to the spatial data structure calculated by KD-Tree. The first step is to calculate each query point P q A series of The value is recorded as SPFH. In the second step, the k nearest neighbors of each point are recalculated and P is calculated using the neighboring SPFH values. q The final histogram of is calculated as: In the formula, k is the number of adjacent points of the current query point, P q is the current calculation point, P k The neighboring points of the current point to be calculated, ω k is the current calculation point P q Its adjacent point P k The weight between, FPFH is the fast point feature histogram, SPFH is the simplified point feature histogram; According to the calculated FPFH feature information of the target workpiece's interest point set and the FPFH feature information of multiple template workpieces with different grasping postures, point pairs that meet the similarity constraint are selected as registration point pairs, and then multiple pose information of the target workpiece under the template workpiece is calculated. The posture information is the rotation matrix and translation matrix of the rigid transformation of the target workpiece to the template workpiece. The following formula is used to calculate the grasping posture of the target workpiece in the robot base coordinate system: The grasping posture of the target workpiece in the robot arm base coordinate system Contains (X, Y, Z, θ x ,θ y ,θ z ); According to the Z, θ of each grasping posture x ,θ y The values are sorted and assigned weight factors a, b, c respectively, and the priority D of the i-th grasping posture is i Assign a value, then the calculation formula for the grasping priority value of the i-th grasping posture is: Among them, Z i ,θ xi ,θ yi are respectively Z and θ of the i-th grasping posture x ,θ y value; Arrange the grasping priority values of the grasping postures of the identified target workpieces in the robot arm base coordinate system in descending order; S5, generating a collision detection space at the template workpiece, wherein the collision detection space is the spatial area between the robot body and the fixture when the robot grasps the template workpiece and during the Z-axis feeding process, and according to the arrangement order of the grasping priority value and the multiple posture information of the target workpiece under the template workpiece Perform collision detection to obtain the first graspable target without point cloud data in the collision detection space, and calculate the grasping posture of the target workpiece corresponding to the graspable target in the robot arm base coordinate system. Sent to the robotic arm to perform the grasping task.
2. The robot arm grasping method based on aliased workpiece according to claim 1 is characterized in that: The step S1 uses hand-eye calibration to obtain the hand-eye relationship matrix when the eye is outside the hand Specifically include: The checkerboard calibration plate is fixedly installed at the end of the robotic arm. The robotic arm position is moved a certain number of times. The camera captures the calibration plate image and records the robotic arm position. The hand-eye relationship matrix is calculated according to the hand-eye calibration calculation model.
3. The robot arm grasping method based on aliased workpiece according to claim 1, characterized in that: At least one gripping gesture of the template workpiece The origin of the coordinate system of the point set is the origin of the end tool coordinate system of the robot arm in the optimal grasping posture, and the direction of the coordinate system is consistent with the direction of the end tool of the robot arm in the optimal grasping posture; the coordinate system of different grasping postures of the template workpiece is characterized by its rigid transformation matrix to the initial grasping posture coordinate system, and the rigid transformation matrix includes a rotation matrix and a translation matrix.
4. The robot arm grasping method based on aliased workpiece according to claim 1, characterized in that: The step S2 specifically includes: A 3D camera is used to collect 3D point clouds of chaotically stacked target workpieces; A straight-through filtering algorithm is used to remove the three-dimensional point cloud outside the region of interest in the three-dimensional point cloud of the target workpiece to obtain the three-dimensional point cloud within the region of interest; The three-dimensional point cloud in the area of interest is downsampled by voxel filtering to obtain a preprocessed three-dimensional point cloud.
5. The robot arm grasping method based on aliased workpiece according to claim 1, characterized in that: The step S3 performs accelerated Euclidean clustering on the preprocessed three-dimensional point cloud, specifically comprising: S31, taking a point P10 in space as the starting point, find n points closest to point p through the KD-Tree nearest neighbor search algorithm, and calculate the Euclidean distances of these n points to P10 respectively. If the distance is less than the set threshold R, the points less than the threshold are placed in class Q (P10); S32, randomly select P20 from class Q (P10), and repeat step S31; S33, if the set of class Q(P10) does not increase any more, the whole clustering process is terminated, otherwise steps S31-S32 are repeated.
6. The robot arm grasping method based on aliased workpiece according to claim 1, characterized in that: The screening condition in step S3 is to simultaneously satisfy that the number of three-dimensional point clouds is greater than a specified value and the length, width and height of the minimum outer box of the three-dimensional point clouds do not deviate from the specified value by 15%.
7. The robot arm grasping method based on aliased workpiece according to claim 1, characterized in that: The step S5 specifically includes: A collision detection space is pre-generated at the template workpiece, and a plurality of posture information of the target workpiece under the template workpiece is obtained. The target workpiece and its surrounding point cloud are rigidly transformed to the collision detection space. If there is no point cloud data in the collision detection space, it is regarded as a graspable target; if there is a point cloud, it is regarded as an ungraspable target; Collision detection is performed sequentially starting from the target with the highest grasping priority value, and the first graspable target detected is used as the final execution grasping target, and the grasping posture corresponding to the execution grasping target in the robot arm base coordinate system is calculated. Sent to the robotic arm to perform the grasping task.
8. A robot arm grasping device based on aliased workpieces, characterized in that: include: A calibration module is configured to obtain a hand-eye relationship matrix with the eye outside the hand by using hand-eye calibration And build a three-dimensional model of the template workpiece, and obtain at least one grasping posture of the template workpiece The grasping posture is a point set under different coordinate origins and coordinate systems; A preprocessing module is configured to obtain a three-dimensional point cloud of a target workpiece and perform preprocessing to obtain a preprocessed three-dimensional point cloud; The point cloud clustering module is configured to perform Euclidean clustering on the preprocessed three-dimensional point cloud and set filtering conditions to filter out a set of points of interest of the target workpiece; The point cloud registration module is configured to perform global multi-target 3D point cloud registration on the set of points of interest to obtain a transformation matrix of the target workpiece under the template workpiece. According to the transformation matrix of the target artifact under the template artifact and grasping posture Obtain multiple pose information of the target workpiece under the template workpiece And according to the hand-eye relationship matrix and pose information Calculate the grasping posture of the target workpiece in the robot base coordinate system According to the grasping posture of the target workpiece in the robot arm base coordinate system Calculate the crawl priority value of each crawl target and sort it in descending order, including: Using a KD-Tree algorithm to segment the point of interest set of the target workpiece to obtain its spatial data structure; Performing local fitting on the KD-Tree leaf nodes of the interest point set of the target workpiece by using a moving least squares method; The FPFH descriptor is used to calculate the interest point set of the target workpiece and the feature information of multiple different grasping postures of the template workpiece according to the spatial data structure calculated by KD-Tree. The first step is to calculate each query point P q A series of The value is recorded as SPFH. In the second step, the k nearest neighbors of each point are recalculated and P is calculated using the neighboring SPFH values. q The final histogram of is calculated as: In the formula, k is the number of adjacent points of the current query point, P q is the current calculation point, P k The neighboring points of the current point to be calculated, ω k is the current calculation point P q Its adjacent point P k The weight between, FPFH is the fast point feature histogram, SPFH is the simplified point feature histogram; According to the calculated FPFH feature information of the target workpiece's interest point set and the FPFH feature information of multiple template workpieces with different grasping postures, point pairs that meet the similarity constraint are selected as registration point pairs, and then multiple pose information of the target workpiece under the template workpiece is calculated. The position information is the rotation matrix and translation matrix of the rigid transformation of the target workpiece to the template workpiece. The following formula is used to calculate the grasping posture of the target workpiece in the robot base coordinate system: The grasping posture of the target workpiece in the robot arm base coordinate system Contains (X, Y, Z, θ x ,θ y ,θ z ); According to the Z, θ of each grasping posture x ,θ y The values are sorted and assigned weight factors a, b, c respectively, and the priority D of the i-th grasping posture is i Assign a value, then the calculation formula for the grasping priority value of the i-th grasping posture is: Among them, Z i ,θ xi ,θ yi are respectively Z and θ of the i-th grasping posture x ,θ y value; Arrange the grasping priority values of the grasping postures of the identified target workpieces in the robot arm base coordinate system in descending order; The collision detection module is configured to generate a collision detection space at the template workpiece, wherein the collision detection space is the spatial area between the robot body and the fixture when the robot grasps the template workpiece and during the Z-axis feeding process, and according to the arrangement order of the grasping priority value and the multiple posture information of the target workpiece under the template workpiece Perform collision detection to obtain the first graspable target without point cloud data in the collision detection space, and calculate the grasping posture of the target workpiece corresponding to the graspable target in the robot arm base coordinate system. Sent to the robotic arm to perform the grasping task.
9. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
