Test tube shaking method and system based on DH parametric method and storage medium
Through the DH parameter method and camera-robotic arm system, the test tube type is automatically identified and the shaking trajectory is determined, which solves the automation and standardization problems of the test tube shaking process, improves operating efficiency and accuracy, and reduces the sample failure rate.
Patent Information
- Application Number
- CN202310181342.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2024-09-03
AI Technical Summary
It is difficult to automate and standardize the test tube shaking process with existing technology, resulting in irregular operation and increasing the failure rate of specimens.
Using a method based on the DH parameter method, combined with a camera and a robotic arm, the test tube type is determined by obtaining test tube data, and the shaking trajectory data is determined based on the DH parameter method, and the robotic arm automatically shakes the test tube.
It realizes the automation and standardization of test tube shaking, reduces manual operation errors, improves operation efficiency and accuracy, and is suitable for medical and experimental fields.
Smart Images

Figure CN118577176A
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the fields of biological, chemical experiments and medical supplies, and in particular to a test tube shaking method, system and storage medium based on the DH (Denavit-Hartenberg parameters) parameter method. Background Art
[0002] In the experiment, the shaking trajectories of test tubes for different purposes are different. At present, manual shaking is mostly used for test tubes, but due to the wide variety of test tubes, different shaking trajectories and times, manual operation often leads to problems of non-standard operation. For example, in medical coagulation test tubes, some operators forget to flip and shake after collecting a tube of blood or do not reverse and shake it enough times before collecting the next tube of blood, which will cause blood coagulation in the specimen and increase the unqualified rate of the specimen. Existing shaking machines can only provide a single function of shaking, and the shaking trajectory is mostly a single fixed trajectory. The automation and standardization of the test tube shaking process is an urgent problem to be solved. Summary of the invention
[0003] The present invention provides a test tube shaking method, system and storage medium based on the DH parameter method, so as to solve the problem of automation and standardization difficulty in the manual test tube shaking process.
[0004] In a first aspect, an embodiment of the present invention provides a test tube shaking method based on a DH parameter method, comprising:
[0005] Applicable to a test tube shaking device with a camera and a robotic arm, wherein the test tube shaking device is provided with a target test tube rack for placing the test tube to be shaken, comprising:
[0006] Acquire test tube data on the target test tube rack acquired by the camera;
[0007] Determine the test tube type according to the test tube data;
[0008] Using the DH parameter method, the shaking trajectory data required in the process of shaking the test tube is determined according to the test tube type;
[0009] The robot arm picks up the test tube to be shaken in the target test tube rack and shakes it according to the shaking trajectory data.
[0010] Preferably, the target test tube rack is arranged at a position 7 cm to 13 cm away from the front of the robotic arm.
[0011] Preferably, the DH parameter method is used to determine the shaking trajectory data required in the process of shaking the test tube according to the test tube type, specifically including:
[0012] A reference coordinate system is assigned to each joint of the robotic arm, and a DH parameter table of the robotic arm model is obtained from the reference coordinate system, wherein the DH parameter table contains four parameters: connecting rod length a, connecting rod offset d, connecting rod torsion α, and joint rotation angle θ. These four parameters are used to represent the angular position relationship between each pair of adjacent joint connecting rods in the robotic arm;
[0013] Determine the steps of transforming from one joint to the next joint, and obtain a transformation matrix consisting of coordinate system i-1 and coordinate system i, where i is the total number of coordinate systems of the manipulator;
[0014] According to the DH parameter table and the transformation matrix of the coordinate system i-1 and the coordinate system i, the transformation matrix between each adjacent joint is obtained. To get the total transformation matrix of the robot arm:
[0015] According to the parameters in the DH parameter table and the total transformation matrix Get the end effector position (p x 、p y 、p z ) and the basic coordinate system: in is the coordinate system i to the end effector position (p x 、p y 、p z )’s transformation matrix;
[0016] Based on the conversion relationship, the total transformation matrix is inversely solved to obtain the angle θi of each joint when the end effector corresponding to the test tube type is located.
[0017] Preferably, the robot arm is provided with an RGB camera, and the acquiring of the test tube data on the target test tube rack acquired by the camera is specifically: acquiring a test tube image through the RGB camera, and using the test tube image as the test tube data;
[0018] The determining the test tube type according to the test tube data specifically includes: using a Danet model to determine the test tube type according to the test tube data.
[0019] Preferably, the Danet (dense inception and attention gate) model is used to determine the test tube type according to the test tube data, specifically:
[0020] The test tube image is obtained through an RGB camera as the test tube data. The Stem layer contains a 7×7 convolution kernel, which converts the size of the input test tube image into 56*56*64 pixels to extract image features;
[0021] The vgpooling layer pools the concatenated feature maps, taking into account the global information of the feature maps;
[0022] The Attention gate block module processes the concatenated feature map to obtain the attention coefficient matrix, which is multiplied by the feature map matrix obtained by the Dense-inception block module to obtain a new output feature map.
[0023] The newly output feature map is used as the input of the next Dense-inception block module, passes through the Flatten layer and the softmax layer, and outputs the test tube type.
[0024] Preferably, the robotic arm has a total of six coordinate systems.
[0025] Preferably, the test tube types include: one or more of blood collection tubes, test tubes that need to be shaken evenly, and test tubes that are difficult to decompose and fuse; wherein the shaking trajectory of the blood collection tubes is upside down; the shaking trajectory of the test tubes that need to be shaken evenly is a vortex; and the shaking trajectory of the test tubes that decompose and fuse is shaking left and right until they are evenly mixed.
[0026] In a second aspect, the present invention provides a test tube shaking system based on the DH parameter method, a test tube shaking device with a camera and a robotic arm, wherein the test tube shaking device is provided with a target test tube rack for placing the test tube to be shaken, comprising:
[0027] An acquisition module, used for acquiring the test tube data on the target test tube rack acquired by the camera;
[0028] A judgment module, used for judging the test tube type according to the test tube data;
[0029] A trajectory data determination module, for determining the shaking trajectory data required in the process of shaking the test tube according to the test tube type by using the DH parameter method;
[0030] The shaking module is used for the mechanical arm to pick up and shake the test tube to be shaken in the target test tube rack according to the shaking trajectory data.
[0031] Preferably, the trajectory data determination module includes:
[0032] A reference coordinate system determination submodule is used to assign a reference coordinate system to each joint of the robotic arm, and obtain a DH parameter table of the robotic arm model from the reference coordinate system, wherein the DH parameter table contains four parameters: connecting rod length a, connecting rod offset d, connecting rod torsion α, and joint rotation angle θ. These four parameters are used to represent the angular position relationship between each pair of adjacent joint connecting rods in the robotic arm;
[0033] A sub-transformation matrix determination sub-module, used to determine the steps of transforming from one joint to the next joint, and obtain a transformation matrix consisting of coordinate system i-1 and coordinate system i, where i is the total number of coordinate systems of the manipulator;
[0034] The total transformation matrix determination submodule is used to obtain the transformation matrix between each adjacent joint according to the DH parameter table and the transformation matrix of the coordinate system i-1 and the coordinate system i. To get the total transformation matrix of the robot arm:
[0035] The end effector transformation relationship determination submodule is used to determine the parameters in the DH parameter table and the total transformation matrix Get the end effector position (p x 、p y 、p z ) and the basic coordinate system: in is the coordinate system i to the end effector position (p x 、p y 、p z ), n, o, and a represent the three coordinate axes of the terminal coordinate system. It is the coordinate transformation matrix between the basic coordinate system and the terminal coordinate system.
[0036] A joint angle calculation submodule, for obtaining an inverse solution of the total transformation matrix based on the conversion relationship to obtain the angle θi of each joint when the end effector corresponding to the test tube type is located; and / or
[0037] The mechanical arm is provided with an RGB camera, and the acquisition module is specifically used to: acquire a test tube image through the RGB camera, and use the test tube image as the test tube data;
[0038] The judgment module is specifically used to: use the Danet model to judge the test tube type according to the test tube data;
[0039] The test tube types include: one or more of blood collection tubes, test tubes that need to be shaken, and test tubes that are difficult to decompose and fuse.
[0040] In a third aspect, the present invention further provides a computer storage medium, in which instructions are stored, and when the instructions are executed, the above-mentioned test tube shaking method based on the DH parameter method is executed.
[0041] The present invention provides a test tube shaking method, system and storage medium based on the DH parameter method. Test tubes of different colors and types can be distinguished by acquiring images from a camera and using a Danet model algorithm. The shaking trajectory data of the test tubes is determined by the DH parameter method, and a multi-joint mechanical arm is used to automatically and standardizedly shake the test tubes. Different test tubes can be shaken efficiently and accurately, so that the shaking of the test tubes is automated and standardized without manual intervention. The method can be applicable to medical test tubes, as well as to biological and chemical experiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flow chart of the test tube shaking method based on the DH parameter method in Example 1 of the present invention;
[0043] Figure 2 is the robot arm joint coordinate system model in the first embodiment of the present invention;
[0044] Figure 3 is a flowchart of the DH parameter method in the first embodiment of the present invention;
[0045] Figure 4 The structural flow chart of the Danet model in the first embodiment of the present invention;
[0046] Figure 5 It is a structural block diagram of a test tube shaking system based on the DH parameter method illustrated in the first embodiment of the present invention. DETAILED DESCRIPTION
[0047] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0048] Embodiment 1
[0049] Figure 1-4 A flow chart of a test tube shaking method based on the DH parameter method provided in Embodiment 1 of the present invention is applied to a test tube shaking device with a camera and a robotic arm, wherein a target test tube rack for placing the test tube to be shaken is provided on the test tube shaking device, including:
[0050] S1 obtains the test tube data on the target test tube rack acquired by the camera.
[0051] In this embodiment, an RGB camera is provided on the robot arm to obtain test tube data on a target test tube rack acquired by the camera, specifically: obtaining a test tube image through the RGB camera, and using the test tube image as the test tube data.
[0052] The target test tube rack is arranged at a position 7 cm to 13 cm in front of the robotic arm. Preferably, the target test tube rack is arranged at a position 10 cm in front of the robotic arm.
[0053] S2 determines the test tube type according to the test tube data.
[0054] like Figure 4 As shown, in this embodiment, the test tube type is determined according to the test tube data, specifically: the Danet model is used to determine the test tube type according to the test tube data, specifically:
[0055] S21: The test tube image is obtained as the test tube data through the RGB camera. The Stem layer contains a 7×7 convolution kernel, which converts the size of the input test tube image into 56*56*64 pixels and extracts the image features;
[0056] S22: The vgpooling layer performs pooling on the concatenated feature maps, taking into account the global information of the feature maps;
[0057] S23: The Attention gate block module processes the concatenated feature map to obtain the attention coefficient matrix, which is multiplied by the feature map matrix obtained by the Dense-inception block module to obtain a new output feature map;
[0058] S24: The newly output feature map is used as the input of the next Dense-inception block module, passes through the Flatten layer and the softmax layer, and outputs the test tube type.
[0059] The types of test tubes include: blood collection tubes, test tubes that need to be shaken, and test tubes that are difficult to decompose and fuse.
[0060] S3 uses the DH parameter method to determine the shaking trajectory data required in the process of shaking the test tube according to the test tube type.
[0061] Among them, DH parameters (Denavit–Hartenberg parameters) are a mathematical model of a robotic arm and a coordinate system determination system that uses four parameters to express the position and angle relationship between two pairs of joint links.
[0062] In this embodiment, it specifically includes:
[0063] S31: Assign a reference coordinate system to each joint of the robotic arm, and obtain the DH parameter table of the robotic arm model from the reference coordinate system, where there are four parameters in the DH parameter table: connecting rod length a, connecting rod offset d, connecting rod torsion α and joint angle θ. The connecting rod length a is the common normal length between the axes of the two joints (the rotation axis of the rotary joint, the translation axis of the translation joint).
[0064] The link offset d is the distance between the common normal of a joint with the next joint and its common normal with the previous joint along the joint axis.
[0065] Link twist α is the angle by which the axis of one joint rotates relative to the axis of the other joint about their common normal.
[0066] The joint rotation angle θ is the rotation angle of the common normal of a joint with the next joint and the common normal of the joint with the previous joint around the joint axis. These four parameters are used to express the angular position relationship between each pair of adjacent joint links in the robot arm;
[0067] S32: Determine the step of transforming from one joint to the next joint, and obtain a transformation matrix consisting of coordinate system i-1 and coordinate system i, where i is the total number of coordinate systems of the robotic arm;
[0068] S33: According to the DH parameter table and the transformation matrix of the coordinate system i-1 and the coordinate system i, the transformation matrix between each adjacent joint is obtained. To get the total transformation matrix of the robot arm:
[0069] S34: According to the parameters in the DH parameter table and the total transformation matrix Get the end effector position (p x 、p y 、p z ) and the basic coordinate system: in is the coordinate system i to the end effector position (p x 、p y 、p z )’s transformation matrix;
[0070] S35: Based on the conversion relationship, the inverse solution of the total transformation matrix is obtained to obtain the angle θi of each joint when the end effector corresponding to the test tube type is located.
[0071] In this embodiment, the robotic arm has a total of six coordinate systems, which can meet the shaking requirements of various types of test tubes, and the calculation amount is small, which is easy to operate.
[0072] The following example shows the calculation process of the angle θi of each joint of the robot arm in the above six coordinate systems using the DH parameter method:
[0073] Step 301, using the DH parameter method to calculate the trajectory of taking, shaking and putting back the shaken test tube.
[0074] Step 302, firstly, a reference coordinate system needs to be assigned to each joint of the robotic arm based on the standard DH parameter method. The robotic arm has a total of six coordinate systems.
[0075] Step 303, obtain the DH parameter table of the robot arm according to the DH parameter method: There are four parameters in the DH parameter table, and we can use these four parameters to represent the angular position relationship between every two adjacent pairs of joint links in the robot arm.
[0076] The meanings of the four parameters in the DH parameter table are as follows.
[0077] The link length a is the length of the common normal between the axes of the two joints (the rotation axis of the revolute joint, the translation axis of the translation joint).
[0078] The link offset d is the distance between the common normal of a joint with the next joint and its common normal with the previous joint along the joint axis.
[0079] Link twist α is the angle by which the axis of one joint rotates relative to the axis of the other joint about their common normal.
[0080] The joint rotation angle θ is the rotation angle between the common normal of a joint and the next joint and the common normal of a joint and the previous joint around the axis of the joint.
[0081] Step 304, then determine the steps of transforming from one joint to the next joint; the transformation of the joint coordinate system is often composed of several basic transformations, and the transformation matrix of the coordinate system i-1 and the coordinate system i is shown in formula (1).
[0082]
[0083] Substituting the parameters in the DH parameter table into equation (1), we can get the transformation matrix between adjacent joints: Combining all the transformations from the base to the first joint, and then from the first joint to the second joint and finally to the last joint, we get the total transformation matrix of the robot arm:
[0084]
[0085]
[0086] Among them, p x 、p y 、p z Represents the position of the end effector. The above formula is a function of joint variables θ1, θ2, ..., θ6.
[0087] Agreement:
[0088] c i =cos(θ i ), s i = sin(θ i ), cii+1 =cos(θ i +θ i+1 ), s ii+1 = sin(θ i +θ i+1 ).
[0089] Substituting the DH parameters into equation (3) can express the transformation relationship between the end effector and the basic coordinate system.
[0090] Furthermore, in step 4, mathematical software is used to solve the values of θ1, θ2, ... θ5 of each joint during the movement process.
[0091] Multiply both sides of equation (3) by We can get formula (4)
[0092]
[0093]
[0094] According to the principle of equality of opposites on both sides of the equation, the angles of each joint are solved in turn, as follows:
[0095] θ1: from s1(p x -n x a e -a x d e )=c1(p y -n y a e -a y d e )
[0096] We can get θ1=atan2(p y -n y a e -a y d e , p x -n x a e -a x d e )
[0097] θ5: from s1n x -c1n y =s5 and s1o x -c1o y =c5
[0098] θ5=atan2(s1n x -c1n z , s1o x -c1o z )
[0099] Available
[0100] θ3: a3c 23 +a2c2=c1(p x -n x a e -a x d e )+s1(p y -n y a e -a y d e )and
[0101] a3s 23 +a2s2=p z -n z a e -a z d e
[0102] Available
[0103] θ2: Also from a3c 23 +a2c2=c1(p x -n x a e -a x d e )+s1(p y -n y a e -a y d e )
[0104] a3s 23 +a2s2=p z -n z a e -a z d e Separating out θ3, we get
[0105] a3c 23 +a2c2=c1m+s1n,a3s 23 +a2s2=t.
[0106] So θ2=atan2(s2,c2)
[0107] θ4: c 234 =c1a x +s1a y and 234 =a z Simplified: θ2+θ3+θ4=atan2(a z , c1a x +s1ay )
[0108] We can get θ4=atan2(a z , c1a x +s1a y )-θ2-θ3
[0109] Step 305, the process of finding the inverse solution of the above relationship is completed in the software MATLAB, and the angles of each joint of the robot end effector at different positions are obtained by finding the inverse solution of the total transformation matrix.
[0110] The S4 robot arm picks up the test tube to be shaken in the target test tube rack and shakes it according to the shaking trajectory data.
[0111] Among them, the shaking trajectory of the blood collection tube is upside down; the shaking trajectory of the test tube that needs to be shaken evenly is a vortex; the shaking trajectory of the test tube for decomposition and fusion is shaking left and right until it is evenly mixed.
[0112] The following is a specific example of shaking the anticoagulant test tube of the present invention:
[0113] Step 501. Place a test tube rack at a specific location, and place the anticoagulant test tube to be shaken in the test tube rack.
[0114] Step 502. The camera on the robotic arm scans the anticoagulant test tube to be shaken and determines that the test tube type is a rapid serum tube.
[0115] Step 503. The system determines that the rapid serum test tube needs to be inverted 5 to 8 times along an upside-down trajectory.
[0116] Step 504. The robotic arm picks up the rapid serum test tube on the target test tube rack and automatically and standardizedly shakes it upside down 5 to 8 times according to the trajectory specified by the system.
[0117] Step 505. The robotic arm puts the shaken rapid serum tube back to the target test tube rack smoothly and accurately.
[0118] Embodiment 2
[0119] like Figure 5 As shown, the present invention also provides a test tube shaking system based on the DH parameter method, comprising: a test tube shaking device with a camera and a mechanical arm, the test tube shaking device is provided with a target test tube rack for placing the test tube to be shaken, comprising:
[0120] An acquisition module 601 is used to acquire test tube data on a target test tube rack acquired by a camera;
[0121] A determination module 602 is used to determine the test tube type according to the test tube data;
[0122] The trajectory data determination module 603 is used to determine the shaking trajectory data required in the process of shaking the test tube according to the test tube type by using the DH parameter method;
[0123] The shaking module 604 is used for the robot arm to pick up and shake the test tube to be shaken in the target test tube rack according to the shaking trajectory data.
[0124] The trajectory data determination module 603 further includes:
[0125] The reference coordinate system determination submodule 631 is used to assign a reference coordinate system to each joint of the robot arm, and obtain the DH parameter table of the robot arm model from the reference coordinate system, wherein the DH parameter table includes four parameters: connecting rod length a, connecting rod offset d, connecting rod torsion α and joint rotation angle θ, and these four parameters are used to represent the angular position relationship between each pair of adjacent joint connecting rods in the robot arm;
[0126] The sub-transformation matrix determination sub-module 632 is used to determine the steps of transforming from one joint to the next joint, and obtain the transformation matrix of the coordinate system i-1 and the coordinate system i, where i is the total number of coordinate systems of the manipulator;
[0127] The total transformation matrix determination submodule 633 is used to obtain the transformation matrix between each adjacent joint according to the DH parameter table and the transformation matrix of the coordinate system i-1 and the coordinate system i. To get the total transformation matrix of the robot arm:
[0128] The end effector conversion relationship determination submodule 634 is used to determine the end effector conversion relationship according to the parameters in the DH parameter table and the total transformation matrix. Get the end effector position (p x 、p y 、p z ) and the basic coordinate system: in is the coordinate system i to the end effector position (p x 、p y 、p z ), n, o, and a represent the three coordinate axes of the terminal coordinate system. It is the coordinate transformation matrix between the basic coordinate system and the terminal coordinate system.
[0129] The joint angle calculation submodule 635 is used to obtain the inverse solution of the total transformation matrix based on the conversion relationship to obtain the angle θi of each joint when the end effector corresponding to the test tube type is located; and / or
[0130] In some embodiments, the robot arm is provided with an RGB camera, and the acquisition module 601 is specifically used to: acquire a test tube image through the RGB camera, and use the test tube image as the test tube data; the judgment module 602 is specifically used to: use the Danet model to judge the test tube type according to the test tube data;
[0131] The test tube types include: one or more of blood collection tubes, test tubes that need to be shaken, and test tubes that are difficult to decompose and fuse.
[0132] The system of this embodiment can execute any of the test tube shaking methods based on the DH parameter method provided in the aforementioned embodiments, and thus can also achieve the corresponding technical effects, which have been described in detail above and will not be repeated here.
[0133] An embodiment of the present invention also provides a computer device, including a processor and a memory; the memory is used to store computer instructions, and the processor is used to run the computer instructions stored in the memory to execute any one of the sewage treatment process remote control methods provided in the aforementioned embodiments, thereby also being able to achieve the corresponding technical effects, which have been described in detail above and will not be repeated here.
[0134] Correspondingly, an embodiment of the present invention also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed, any one of the remote control methods for sewage treatment processes provided in the aforementioned embodiments is executed, thereby also being able to achieve the corresponding technical effects, which have been described in detail above and will not be repeated here.
[0135] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of various embodiments of the present invention.
[0137] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A test tube shaking method based on DH parameter method, characterized in that: Applicable to a test tube shaking device with a camera and a robotic arm, wherein the test tube shaking device is provided with a target test tube rack for placing the test tube to be shaken, comprising: Acquire test tube data on the target test tube rack acquired by the camera; Determine the test tube type according to the test tube data; Using the DH parameter method, the shaking trajectory data required in the process of shaking the test tube is determined according to the test tube type; The robot arm picks up the test tube to be shaken in the target test tube rack and shakes it according to the shaking trajectory data.
2. The test tube shaking method based on the DH parameter method as claimed in claim 1, characterized in that: The target test tube rack is arranged at a position 7 cm to 13 cm away from the front of the robot arm.
3. The test tube shaking method based on the DH parameter method as claimed in claim 1, characterized in that: The DH parameter method is used to determine the shaking trajectory data required in the process of shaking the test tube according to the test tube type, specifically including: A reference coordinate system is assigned to each joint of the robotic arm, and a DH parameter table of the robotic arm model is obtained from the reference coordinate system, wherein the DH parameter table contains four parameters: connecting rod length a, connecting rod offset d, connecting rod torsion α, and joint rotation angle θ. These four parameters are used to represent the angular position relationship between each pair of adjacent joint connecting rods in the robotic arm; Determine the steps of transforming from one joint to the next joint, and obtain a transformation matrix consisting of coordinate system i-1 and coordinate system i, where i is the total number of coordinate systems of the manipulator; According to the DH parameter table and the transformation matrix of the coordinate system i-1 and the coordinate system i, the transformation matrix between each adjacent joint is obtained. To get the total transformation matrix of the robot arm: According to the parameters in the DH parameter table and the total transformation matrix Get the end effector position (p x 、p y 、p z ) and the basic coordinate system: in is the coordinate system i to the end effector position (p x 、p y 、p z )’s transformation matrix; Based on the conversion relationship, the total transformation matrix is inversely solved to obtain the angle θi of each joint when the end effector corresponding to the test tube type is located.
4. The test tube shaking method based on the DH parameter method as claimed in claim 3, characterized in that: The robot arm is provided with an RGB camera, and the acquiring of the test tube data on the target test tube rack acquired by the camera is specifically: acquiring a test tube image through the RGB camera, and using the test tube image as the test tube data; The determining the test tube type according to the test tube data specifically includes: using a Danet model to determine the test tube type according to the test tube data.
5. The test tube shaking method based on the DH parameter method as claimed in claim 4, characterized in that: The Danet model is used to determine the test tube type according to the test tube data, specifically: The test tube image is obtained through an RGB camera as the test tube data. The Stem layer contains a 7×7 convolution kernel, which converts the size of the input test tube image into 56*56*64 pixels to extract image features; The vgpooling layer pools the concatenated feature maps, taking into account the global information of the feature maps; The Attention gate block module processes the concatenated feature map to obtain the attention coefficient matrix, which is multiplied by the feature map matrix obtained by the Dense-inception block module to obtain a new output feature map. The newly output feature map is used as the input of the next Dense-inception block module, passes through the Flatten layer and the softmax layer, and outputs the test tube type.
6. The test tube shaking method based on the DH parameter method as claimed in claim 2, characterized in that: The robotic arm has a total of six coordinate systems.
7. The test tube shaking method based on the DH parameter method as claimed in claim 1, characterized in that: The test tube types include: one or more of blood collection tubes, test tubes that need to be shaken evenly, and test tubes that are difficult to decompose and fuse; wherein the shaking trajectory of the blood collection tubes is upside down; the shaking trajectory of the test tubes that need to be shaken evenly is a vortex; and the shaking trajectory of the test tubes that decompose and fuse is left and right shaking until they are evenly mixed.
8. A test tube shaking system based on DH parameter method, characterized in that: A test tube shaking device with a camera and a mechanical arm, wherein a target test tube rack for placing the test tube to be shaken is provided on the test tube shaking device, comprising: An acquisition module, used for acquiring the test tube data on the target test tube rack acquired by the camera; A judgment module, used for judging the test tube type according to the test tube data; A trajectory data determination module, for determining the shaking trajectory data required in the process of shaking the test tube according to the test tube type by using the DH parameter method; The shaking module is used for the mechanical arm to pick up and shake the test tube to be shaken in the target test tube rack according to the shaking trajectory data.
9. A test tube shaking system based on DH parameter method as claimed in claim 8, characterized in that: The trajectory data determination module comprises: A reference coordinate system determination submodule is used to assign a reference coordinate system to each joint of the robotic arm, and obtain a DH parameter table of the robotic arm model from the reference coordinate system, wherein the DH parameter table contains four parameters: connecting rod length a, connecting rod offset d, connecting rod torsion α, and joint rotation angle θ. These four parameters are used to represent the angular position relationship between each pair of adjacent joint connecting rods in the robotic arm; A sub-transformation matrix determination sub-module, used to determine the steps of transforming from one joint to the next joint, and obtain a transformation matrix consisting of coordinate system i-1 and coordinate system i, where i is the total number of coordinate systems of the manipulator; The total transformation matrix determination submodule is used to obtain the transformation matrix between each adjacent joint according to the DH parameter table and the transformation matrix of the coordinate system i-1 and the coordinate system i. To get the total transformation matrix of the robot arm: The end effector transformation relationship determination submodule is used to determine the parameters in the DH parameter table and the total transformation matrix Get the end effector position (p x 、p y 、p z ) and the basic coordinate system: in is the coordinate system i to the end effector position (p x 、p y 、p z ), n, o, and a represent the three coordinate axes of the terminal coordinate system. It is the coordinate transformation matrix between the basic coordinate system and the terminal coordinate system; A joint angle calculation submodule, for obtaining an inverse solution of the total transformation matrix based on the conversion relationship to obtain the angle θi of each joint when the end effector corresponding to the test tube type is located; The mechanical arm is provided with an RGB camera, and the acquisition module is specifically used to: acquire a test tube image through the RGB camera, and use the test tube image as the test tube data; The judgment module is specifically used to: use the Danet model to judge the test tube type according to the test tube data; The test tube types include: one or more of blood collection tubes, test tubes that need to be shaken, and test tubes that are difficult to decompose and fuse.
10. A computer storage medium, characterized in that: The storage medium stores instructions, which, when executed, execute a test tube shaking method based on the DH parameter method as described in any one of claims 8 to 9.
Citation Information
Patent Citations
Intelligent pharmacist robot system and controlling method thereof
CN105127997A
Robot automatic inspection and analysis system and using method
CN106771290A
Inverse kinematic solving method of manual operation and control of multi-joint mechanical arm
CN108356820A
Container top hole identification method
CN113989633A
Automatic clamping and uniform shaking mechanism
CN202204719U
