Robot arm control method and device, electronic equipment and readable storage medium
By controlling the movement of the robot arm, the needle insertion position before and after the replacement of the surgical needle is kept consistent, the problem of inaccurate needle insertion position control in the prior art is solved, and the accuracy and safety of eye hole insertion and needle insertion operation are improved. sex.
Patent Information
- Application Number
- CN202411651105.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-19
AI Technical Summary
The existing eye hole insertion and needle insertion operations are easily affected by factors such as artificial error, accuracy limitation and operation fatigue, which leads to inconsistent with the micro-needle needle insertion position and the needle insertion position of the through-hole needle insertion needle, resulting in eye tissue. multiple injuries.
By controlling the movement of the robot arm, the needle entry position before and after the replacement of the surgical needle is kept consistent. The specific steps include controlling the robot arm to move the preset distance in the opposite direction of the target needle entry direction after the through-hole needle is punctured, and determining the The first position of the needle tip of the through hole needle; after changing the through hole needle to the injection microneedle, control the movement of the robot arm to adjust the position of the injection microneedle tip to the second position, and finally adjust it to the first position Positioning position so that the needle entry position of the injection microneedle is consistent with the needle entry position of the through-hole needle.
Through the robotic arm control method, the accuracy of needle entry position control is improved, ensuring the consistent needle entry position before and after the replacement of surgical needle, and reducing damage to eye tissue.
Smart Images

Figure CN119454243A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic control technology, and in particular to a robot arm control method, device, electronic device and readable storage medium. Background Art
[0002] Eye puncture and needle insertion refers to the operation in ophthalmic surgery where a puncture hole is first made in a specific part of the eyeball using a puncture needle, and then an injection microneedle is inserted and injected at the punctured hole. It is necessary to ensure that the insertion position of the injection microneedle is consistent with the insertion posture (position and angle) of the puncture needle so that the injection microneedle can accurately enter the eyeball from the puncture hole, thereby reducing the damage to the eye tissue caused by the surgical operation.
[0003] Existing puncture and needle insertion are often performed manually, which are easily affected by human errors, precision limitations, operator fatigue and other factors, resulting in inconsistency between the microneedle insertion posture and the through-hole needle insertion posture, causing multiple injuries to the eye tissue, and the accuracy of needle insertion posture control is low. Summary of the invention
[0004] In view of this, the embodiments of the present application at least provide a robot arm control method, device, electronic device and readable storage medium. By controlling the movement of the robot arm, the needle insertion posture before and after replacing the surgical needle can be kept consistent, thereby improving the accuracy of needle insertion posture control.
[0005] This application mainly includes the following aspects:
[0006] In a first aspect, an embodiment of the present application provides a robot arm control method, which is applied to a robot arm, wherein a through-hole needle is installed at the end of the robot arm; the method comprises:
[0007] After the through-hole needle puncture is completed, the robot arm is controlled to move a preset distance in the opposite direction of the through-hole needle target insertion direction, and the first position of the through-hole needle tip is determined;
[0008] The robot arm is controlled to move to a preset safety position, and after the through-hole needle is replaced with an injection microneedle, the robot arm is controlled to move to adjust the posture of the injection microneedle tip to a second posture; the second posture is the posture of the injection microneedle tip after the through-hole needle in the first posture is replaced with the injection microneedle, which is determined based on the shapes of the through-hole needle and the injection microneedle;
[0009] Controlling the movement of the robot arm to adjust the injection microneedle tip from the second posture to the first posture;
[0010] The robot arm is controlled to move the preset distance along the target needle insertion direction so that the needle insertion posture of the injection microneedle is consistent with the needle insertion posture of the through-hole needle.
[0011] In a second aspect, an embodiment of the present application further provides a robot arm control device, which is applied to a robot arm, and a through-hole needle is installed at the end of the robot arm; the robot arm control device includes:
[0012] A determination module, used for controlling the robot arm to move a preset distance in the opposite direction of the target insertion direction of the through-hole needle after the through-hole needle puncture is completed, and determining the first position of the through-hole needle tip;
[0013] A first execution module is used to control the robot arm to move to a preset safety position, and after the through-hole needle is replaced with an injection microneedle, control the robot arm to move so as to adjust the posture of the injection microneedle tip to a second posture; the second posture is the posture of the injection microneedle tip after the through-hole needle in the first posture is replaced with the injection microneedle, which is determined based on the shapes of the through-hole needle and the injection microneedle;
[0014] A second execution module is used to control the movement of the robot arm to adjust the injection microneedle tip from the second posture to the first posture;
[0015] The third execution module is used to control the robot arm to move the preset distance along the target needle insertion direction so that the needle insertion posture of the injection microneedle is consistent with the needle insertion posture of the through-hole needle.
[0016] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the robot arm control method as described above.
[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the robot arm control method as described above are executed.
[0018] The embodiment of the present application provides a robot arm control method, device, electronic device and readable storage medium, wherein the robot arm control method is applied to a robot arm, a through-hole needle is installed at the end of the robot arm, and the method includes: after the through-hole needle is pierced, controlling the robot arm to move a preset distance in the opposite direction of the target insertion direction of the through-hole needle, and determining the first posture of the through-hole needle tip; controlling the robot arm to move to a preset safe position, and after the through-hole needle is replaced with an injection microneedle, controlling the robot arm to move to adjust the posture of the injection microneedle tip to a second posture; the second posture is the posture of the injection microneedle tip after the through-hole needle in the first posture is replaced with the injection microneedle based on the shapes of the through-hole needle and the injection microneedle; controlling the robot arm to move, adjusting the injection microneedle tip from the second posture to the first posture; controlling the robot arm to move a preset distance along the target insertion direction, so that the insertion posture of the injection microneedle is consistent with the insertion posture of the through-hole needle. In this way, by controlling the movement of the robot arm, the insertion posture before and after the surgical needle is replaced can be kept consistent, thereby improving the accuracy of the needle insertion posture control.
[0019] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A flow chart of a robot arm control method provided in an embodiment of the present application is shown;
[0022] Figure 2 A schematic diagram of the joints of the robot arm when the through-hole needle is in the first posture in the embodiment of the present application is shown;
[0023] Figure 3 A schematic diagram of the joints of a mechanical arm in a preset safe position in an embodiment of the present application is shown;
[0024] Figure 4 A schematic diagram of the joints of the robot arm when the injection microneedle is in the second position in the embodiment of the present application is shown;
[0025] Figure 5 A schematic diagram of the joints of the robot arm when the injection microneedle tip is adjusted from the second posture to the first posture in the embodiment of the present application is shown;
[0026] Figure 6A functional module diagram of a robot arm control device provided in an embodiment of the present application is shown;
[0027] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0029] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.
[0030] See also Figure 1 , Figure 1 This is a flow chart of a robot arm control method provided in an embodiment of the present application. This embodiment provides a robot arm control method, which can be applied to a robot arm, wherein a through-hole needle is installed at the end of the robot arm. Figure 1 As shown, the robot arm control method provided in the embodiment of the present application includes the following steps:
[0031] S101, after the through-hole puncturing is completed, the robot arm is controlled to move a preset distance in the opposite direction of the target insertion direction of the through-hole puncturing needle, and the first position of the through-hole puncturing needle tip is determined.
[0032] In the embodiment of the present application, in order to solve the problem of low accuracy of needle insertion posture control caused by manual operation to control puncture and needle insertion, the present application ensures the accuracy of needle insertion posture control by controlling the movement of a robot arm. A through-hole needle is installed at the end of the robot arm, and the robot arm can be moved by master-slave control to make the through-hole needle complete the through-hole insertion process at the eyeball position.
[0033] In this step, after the through-hole needle is pierced, the through-hole needle body is located in the eyeball, and the robot arm is controlled to move a preset distance in the opposite direction of the through-hole needle target insertion direction, and the posture of the through-hole needle tip after moving the preset distance is used as the key point of needle insertion, and is determined as the first posture of the through-hole needle tip, so that after the surgical needle is replaced, the posture of the replaced surgical microneedle tip is adjusted to the first posture, and then after moving the preset distance in the target needle insertion direction, the replaced surgical microneedle can be inserted with the same posture as the through-hole needle before replacement, thereby ensuring the accuracy of needle insertion position control. Among them, the preset distance is set according to actual needs, taking into account the length of each surgical needle, the distance from the eyeball, and the control accuracy, to ensure that the needle tip will not be too close to the eyeball after the needle is withdrawn to cause safety hazards, nor will it be too far from the eyeball to affect the insertion accuracy, and no specific restrictions are made here.
[0034] S102, controlling the robot arm to move to a preset safety position, and after replacing the through-hole needle with an injection microneedle, controlling the robot arm to move to adjust the posture of the injection microneedle tip to a second posture; the second posture is the posture of the injection microneedle tip after replacing the through-hole needle in the first posture with an injection microneedle, which is determined based on the shapes of the through-hole needle and the injection microneedle.
[0035] In the embodiment of the present application, after determining the first posture, it is necessary to replace the piercing needle that has completed the piercing task with an injection microneedle. Since the first posture is relatively close to the eyeball, it is very dangerous to replace the surgical needle at this time. Therefore, the robot arm is first controlled to move to a preset safe position. The preset safe position is a position away from the eyeball and convenient for replacing the surgical needle. It can be set according to actual conditions and is not limited here.
[0036] In this step, after the through-hole needle is replaced with the injection microneedle, the robot arm is controlled to move to adjust the posture of the injection microneedle tip to the second posture. Here, due to the difference in shape and size between the through-hole needle and the injection microneedle, generally speaking, the surgical microneedle is thinner and smaller than the through-hole needle, and the installation method of the two at the end of the robot arm is also different, and thus the way the robot arm controls the insertion of the surgical microneedle is also different from the way the through-hole needle is controlled. In order to ensure the accuracy of the needle insertion posture, firstly, based on the shape calculation of the through-hole needle and the injection microneedle, the posture of the injection microneedle tip after the through-hole needle in the first posture is theoretically replaced with the injection microneedle, which is used as the second posture, and the robot arm is first controlled to move to roughly adjust the posture of the replaced injection microneedle tip in the preset safety position to the second posture.
[0037] S103, controlling the movement of the robot arm to adjust the injection microneedle tip from the second posture to the first posture.
[0038] In this step, after the posture of the injection microneedle tip located at the preset safety position is roughly adjusted to the second posture, the injection microneedle tip is adjusted from the second posture to the first posture through fine adjustment, so that the injection microneedle and the through-hole needle maintain the same needle insertion posture.
[0039] S104, controlling the robot arm to move the preset distance along the target needle insertion direction, so that the needle insertion posture of the injection microneedle is consistent with the needle insertion posture of the through-hole needle.
[0040] In this step, the robot arm is controlled to move a preset distance along the target needle insertion direction, so that the replaced injection microneedle is inserted in the same needle insertion posture and method as the through-hole needle before S101, thereby improving the accuracy of needle insertion posture control.
[0041] In a possible implementation, the robot arm is a multi-axis robot arm, and controlling the robot arm to move a preset distance in a direction opposite to a target insertion direction of the through-hole needle and determining a first position of the through-hole needle tip includes:
[0042] Step a1, after controlling the robot arm to move a preset distance in the opposite direction of the target needle insertion direction of the through hole, for any joint of the robot arm, determine the positive kinematic transformation matrix corresponding to the joint according to the positive kinematic transformation and multiple target parameters of the joint; the target parameters include the connecting rod length, the connecting rod torsion angle, the connecting rod offset and the joint angle.
[0043] In the embodiment of the present application, the robot arm is a multi-axis robot arm. Specifically, the embodiment of the present application is illustrated by taking a five-axis robot arm as an example. Figure 2 , Figure 2 Schematic diagram of the joints of the robot arm when the through-hole needle is in the first position in the embodiment of the present application. Figure 2 As shown, in order to determine the first pose of the through-hole needle tip as the subsequent reference pose after the robot arm is controlled to move a preset distance in the opposite direction of the target needle insertion direction of the through-hole, the pose coordinates of the first pose need to be fixed. However, since the end coordinate system of the end of the robot arm is constantly changing with the movement of the robot arm, the pose coordinates of the through-hole needle tip in the end coordinate system cannot be fixed with the movement of the end coordinate system, so the pose coordinates need to be represented by a fixed coordinate system. The base coordinate system of the robot arm is a fixed coordinate system, therefore, it is necessary to convert the pose coordinates of the through-hole needle tip in the end coordinate system into the pose coordinates of the base coordinate system of the robot arm.
[0044] In this step, first, for any joint of the robot arm, the forward kinematic transformation matrix corresponding to the joint is determined based on the forward kinematic transformation and multiple target parameters of the joint.
[0045] Specifically, forward kinematics (FK) is used to calculate the position and posture of the end of the robot arm after a given joint angle, that is, the posture. The multiple target parameters are DH parameters (Denavit-Hartenberg), which are used to describe the geometric and kinematic relationships between each joint and the connecting rod. Specifically, they include four parameters: connecting rod length a i , connecting rod torsion angle α i , connecting rod offset d i and the joint angle θ i For a five-axis robot arm, these parameters correspond to each joint of the robot arm, that is, the value of i ranges from 1 to 5. Using the DH parameters, a positive kinematic transformation matrix T can be established for each pair of adjacent joints and links. i , used for coordinate transformation between various joint coordinate systems.
[0046] Among them, each positive kinematic transformation matrix T i It can be expressed as:
[0047]
[0048] Step a2: determining a total transformation matrix from the end coordinate system of the robot arm to the base coordinate system of the robot arm according to the forward kinematic transformation matrix corresponding to each of the joints.
[0049] In this step, by multiplying the forward kinematic transformation matrices corresponding to each joint to perform coordinate transfer, the total transformation matrix T0 from the end coordinate system of the robot arm to the base coordinate system of the robot arm can be obtained; where T0 = T1·T2·T3·T4·T5.
[0050] Step a3, calculating the first pose coordinates of the through-hole needle tip in the base coordinate system according to the pose coordinates of the through-hole needle tip in the terminal coordinate system and the total transformation matrix, and determining the first pose coordinates as the first pose of the through-hole needle tip.
[0051] In this step, the first position coordinates of the through-hole needle tip in the base coordinate system are calculated according to the position coordinates of the through-hole needle tip in the terminal coordinate system and the total transformation matrix T0, and the first position coordinates are determined as the first position of the through-hole needle tip. Specifically, the position coordinates are expressed in the form of a quaternion, including three-dimensional coordinates x, y, z and homogeneous coordinates w of the three-dimensional coordinates, then the first position coordinates can be expressed as (x1, y1, z1, w1).
[0052] Furthermore, after the through-hole needle is replaced with an injection microneedle, controlling the robot arm to move so as to adjust the posture of the injection microneedle tip to a second posture comprises:
[0053] Step b1, after replacing the through-hole needle with an injection microneedle, determine the pose coordinates of the injection microneedle tip in the terminal coordinate system according to the shapes of the through-hole needle and the injection microneedle and the pose coordinates of the through-hole needle tip in the terminal coordinate system.
[0054] In the present application, please refer to Figure 3 , Figure 3 Schematic diagram of the joints of the robotic arm with a preset safety position in the embodiment of the present application. Figure 3 As shown, the through-hole needle is replaced with an injection microneedle at a preset safety position. Further, after the through-hole needle is replaced with the injection microneedle at the preset safety position, the position coordinates of the injection microneedle tip in the end coordinate system of the end of the robot arm are calculated based on the shapes of the through-hole needle and the injection microneedle after the through-hole needle in the first position is directly replaced with the injection microneedle.
[0055] Step b2, based on the posture coordinates of the injection microneedle tip in the terminal coordinate system and the total transformation matrix, calculate the second posture coordinates of the injection microneedle tip in the base coordinate system after the through-hole needle in the first posture is replaced with the injection microneedle, and determine the second posture coordinates as the second posture of the injection microneedle tip.
[0056] In this step, see Figure 4 , Figure 4 Schematic diagram of the joints of the robot arm when the injection microneedle is in the second position in the embodiment of the present application. Figure 4 As shown, according to the total transformation matrix of the end coordinate system of the robot arm relative to the base coordinate system when the through-hole needle is in the first pose obtained by the above calculation, and the pose coordinates of the injection microneedle tip in the end coordinate system of the robot arm end after the through-hole needle in the first pose is directly replaced with the injection microneedle in theory, the pose coordinates of the microneedle tip in the end coordinate system of the robot arm end are converted to the base coordinate system and fixed as the second pose coordinates, and the second pose coordinates are determined as the second pose of the injection microneedle tip. Among them, the second pose coordinates can be expressed as (x0, y0, z0, w0).
[0057] Step b3, iteratively solving the inverse kinematics equation according to the second posture coordinates to determine the first motion vector of each joint of the robot arm; the motion vector of any of the joints includes the rotation angle and / or translation distance of the joint.
[0058] In the embodiment of the present application, if the posture of the injection microneedle tip is to be adjusted to the second posture, it is necessary to iteratively solve the inverse kinematics equation according to the second posture coordinates to determine the first motion vector of each joint of the robot arm. Specifically, the inverse kinematics (IK) equation is an equation for calculating the target posture of the end effector of a given robot arm, that is, the first posture and the second posture in this application, the joint angle of the robot arm. The purpose of inverse kinematics is to find a set of joint angles that enables the end effector of the robot arm to reach a specific posture.
[0059] In this step, given the second pose coordinates (x0, y0, z0, w0), the inverse kinematics equation is solved by Newton's method. For any joint i, an initial motion vector guess value is first selected. Update the joint motion vector value using Newton's iteration method:
[0060]
[0061] In the formula, J + It is the inverse matrix of the Jacobian matrix of the forward motion transformation matrix; is the positive kinematic function, P d is the desired end effector pose, i.e., the second pose coordinates (x0, y0, z0, w0).
[0062] Finally, the first motion vector θ of each joint is obtained i ; Wherein, the motion vector of any joint includes the rotation angle and / or translation distance of the joint.
[0063] Step b4, controlling each joint of the robot arm to move according to the corresponding first motion vector to adjust the posture of the injection microneedle tip to a second posture.
[0064] In this step, the first motion vector θ of each joint is obtained. i Then, each joint of the robot arm is controlled to move according to the corresponding first motion vector to adjust the posture of the injection microneedle tip to the second posture.
[0065] Further, the controlling each joint of the robot arm to move according to the corresponding first motion vector to adjust the posture of the injection microneedle tip to a second posture includes:
[0066] Control the joints of the robot arm according to the corresponding first motion vector, first translate the injection microneedle tip through the longitudinal axis to the longitudinal axis position corresponding to the second posture, then translate the injection microneedle tip through the transverse axis and vertical axis to the transverse axis and vertical axis positions corresponding to the second posture, and finally adjust the rotation angle to make the angle of the injection microneedle tip consistent with the angle corresponding to the second posture, so as to adjust the posture of the injection microneedle tip to the second posture.
[0067] In the embodiment of the present application, when performing coarse adjustment of the posture, the injection microneedle tip is first translated to y0 via the Y-axis, and then translated to x0, z0 via the X-axis and Z-axis, and finally the rotation angle is adjusted to make the angle of the injection microneedle tip consistent with the angle w0 corresponding to the second posture, so as to adjust the posture of the injection microneedle tip to the second posture.
[0068] Further, controlling the movement of the robot arm to adjust the injection microneedle tip from the second posture to the first posture includes:
[0069] Step c1, iteratively solving the inverse kinematics equation according to the first posture coordinates to determine the second motion vector of each joint of the robot arm.
[0070] Step c2, controlling each joint of the robot arm to move according to the corresponding second motion vector, and adjusting the injection microneedle tip from the second posture to the first posture.
[0071] See also Figure 5 , Figure 5 The figure is a schematic diagram of the joints of the robot arm when the injection microneedle tip is adjusted from the second posture to the first posture in the embodiment of the present application. The description of step c1 and step c2 can refer to the description of step b3 and step b4, and can achieve the same technical effect, which will not be described in detail.
[0072] Further, the controlling each joint of the robot arm to move according to the corresponding second motion vector to adjust the injection microneedle tip from the second posture to the first posture includes:
[0073] Control the joints of the robot arm according to the corresponding second motion vector, first adjust the rotation angle to make the angle of the injection microneedle tip consistent with the angle corresponding to the first posture, then translate the injection microneedle tip through the horizontal and vertical axes to the horizontal and vertical axis positions corresponding to the first posture, and finally translate the injection microneedle tip through the longitudinal axis to the longitudinal axis position of the first posture, and adjust the injection microneedle tip from the second posture to the first posture.
[0074] In the embodiment of the present application, when fine-tuning the posture, the angle of the injection microneedle tip is first adjusted to be consistent with the angle w1 corresponding to the first posture, and then the injection microneedle tip is translated to x1, z1 through the X-axis and Z-axis, and finally the injection microneedle tip is translated to y1 through the Y-axis to adjust the injection microneedle tip from the second posture to the first posture.
[0075] The embodiment of the present application provides a robot arm control method, which is applied to a robot arm, and a through-hole needle is installed at the end of the robot arm; the method includes: after the through-hole needle is pierced, the robot arm is controlled to move a preset distance in the opposite direction of the target insertion direction of the through-hole needle, and the first posture of the through-hole needle tip is determined; the robot arm is controlled to move to a preset safe position, and after the through-hole needle is replaced with an injection microneedle, the robot arm is controlled to move to adjust the posture of the injection microneedle tip to a second posture; the second posture is the posture of the injection microneedle tip after the through-hole needle in the first posture is replaced with the injection microneedle based on the shapes of the through-hole needle and the injection microneedle; the robot arm is controlled to move, and the injection microneedle tip is adjusted from the second posture to the first posture; the robot arm is controlled to move a preset distance along the target insertion direction, so that the insertion posture of the injection microneedle is consistent with the insertion posture of the through-hole needle. In this way, by controlling the movement of the robot arm, the insertion posture before and after the surgical needle is replaced can be kept consistent, thereby improving the accuracy of the needle insertion posture control.
[0076] Based on the same application concept, the embodiment of the present application also provides a robot arm control device corresponding to the robot arm control method provided in the above embodiment. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the robot arm control method in the above embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0077] See also Figure 6 , Figure 6 This is a functional module diagram of a robot arm control device provided in an embodiment of the present application. This embodiment of the present application provides a robot arm control device, which can be applied to a robot arm, and a through-hole needle is installed at the end of the robot arm. Figure 6 As shown, the robot arm control device 600 includes:
[0078] The determination module 610 is used to control the robot arm to move a preset distance in the opposite direction of the target insertion direction of the through-hole needle after the through-hole needle puncture is completed, and determine the first position of the through-hole needle tip.
[0079] The first execution module 620 is used to control the robot arm to move to a preset safe position, and after the through-hole needle is replaced with an injection microneedle, control the robot arm to move to adjust the posture of the injection microneedle tip to a second posture; the second posture is the posture of the injection microneedle tip after the through-hole needle in the first posture is replaced with an injection microneedle, which is determined based on the shapes of the through-hole needle and the injection microneedle.
[0080] The second execution module 630 is used to control the movement of the robot arm to adjust the injection microneedle tip from the second posture to the first posture.
[0081] The third execution module 640 is used to control the robot arm to move the preset distance along the target needle insertion direction so that the needle insertion posture of the injection microneedle is consistent with the needle insertion posture of the through-hole needle.
[0082] In a possible implementation, the robot arm is a multi-axis robot arm, and when the determination module 610 is used to control the robot arm to move a preset distance in the opposite direction of the target insertion direction of the through-hole needle and determine the first position of the needle tip of the through-hole needle, the determination module 610 is specifically used to:
[0083] After controlling the robot arm to move a preset distance in the direction opposite to the target needle insertion direction of the through hole, for any joint of the robot arm, a forward kinematic transformation matrix corresponding to the joint is determined according to the forward kinematic transformation and a plurality of target parameters of the joint; the target parameters include the connecting rod length, the connecting rod torsion angle, the connecting rod offset and the joint angle;
[0084] Determine a total transformation matrix from the end coordinate system of the robot arm to the base coordinate system of the robot arm according to the forward kinematic transformation matrix corresponding to each of the joints;
[0085] According to the pose coordinates of the through-hole needle tip in the terminal coordinate system and the total transformation matrix, the first pose coordinates of the through-hole needle tip in the base coordinate system are calculated, and the first pose coordinates are determined as the first pose of the through-hole needle tip.
[0086] Further, after the through-hole needle is replaced with an injection microneedle, when the first execution module 620 controls the robot arm to move so as to adjust the posture of the injection microneedle tip to the second posture, the first execution module 620 is specifically used to:
[0087] After the through-hole needle is replaced with an injection microneedle, the position coordinates of the injection microneedle tip in the terminal coordinate system are determined according to the shapes of the through-hole needle and the injection microneedle and the position coordinates of the through-hole needle tip in the terminal coordinate system;
[0088] According to the posture coordinates of the injection microneedle tip in the terminal coordinate system and the total transformation matrix, calculate the second posture coordinates of the injection microneedle tip in the base coordinate system after the through-hole needle in the first posture is replaced with the injection microneedle, and determine the second posture coordinates as the second posture of the injection microneedle tip;
[0089] Iteratively solving the inverse kinematics equation according to the second posture coordinates to determine a first motion vector of each joint of the robot arm; the motion vector of any of the joints includes a rotation angle and / or a translation distance of the joint;
[0090] The joints of the robot arm are controlled to move according to the corresponding first motion vector to adjust the posture of the injection microneedle tip to a second posture.
[0091] Further, when the first execution module 620 is used to control each joint of the robot arm to move according to the corresponding first motion vector to adjust the posture of the injection microneedle tip to the second posture, the first execution module 620 is specifically used to:
[0092] Control the joints of the robot arm according to the corresponding first motion vector, first translate the injection microneedle tip through the longitudinal axis to the longitudinal axis position corresponding to the second posture, then translate the injection microneedle tip through the transverse axis and vertical axis to the transverse axis and vertical axis positions corresponding to the second posture, and finally adjust the rotation angle to make the angle of the injection microneedle tip consistent with the angle corresponding to the second posture, so as to adjust the posture of the injection microneedle tip to the second posture.
[0093] Furthermore, when the second execution module 630 is used to control the movement of the robot arm to adjust the injection microneedle tip from the second posture to the first posture, the second execution module 630 is specifically used to:
[0094] Iteratively solving the inverse kinematics equation according to the first posture coordinates to determine a second motion vector of each joint of the robotic arm;
[0095] The joints of the robot arm are controlled to move according to the corresponding second motion vector, and the injection microneedle tip is adjusted from the second posture to the first posture.
[0096] Further, when the second execution module 630 is used to control each joint of the robot arm to move according to the corresponding second motion vector to adjust the injection microneedle tip from the second posture to the first posture, the second execution module 630 is specifically used to:
[0097] Control the joints of the robot arm according to the corresponding second motion vector, first adjust the rotation angle to make the angle of the injection microneedle tip consistent with the angle corresponding to the first posture, then translate the injection microneedle tip through the horizontal and vertical axes to the horizontal and vertical axis positions corresponding to the first posture, and finally translate the injection microneedle tip through the longitudinal axis to the longitudinal axis position of the first posture, and adjust the injection microneedle tip from the second posture to the first posture.
[0098] The embodiment of the present application provides a robot arm control device, which is applied to a robot arm, wherein a through-hole needle is installed at the end of the robot arm, and the robot arm control device includes: a determination module, which is used to control the robot arm to move a preset distance in the opposite direction of the target insertion direction of the through-hole needle after the through-hole needle is pierced, and determine the first posture of the through-hole needle tip; a first execution module, which is used to control the robot arm to move to a preset safe position, and after the through-hole needle is replaced with an injection microneedle, control the robot arm to move to adjust the posture of the injection microneedle tip to a second posture; the second posture is the posture of the injection microneedle tip after the through-hole needle in the first posture is replaced with an injection microneedle, which is determined based on the shapes of the through-hole needle and the injection microneedle; the second execution module is used to control the movement of the robot arm to adjust the injection microneedle tip from the second posture to the first posture; the third execution module is used to control the robot arm to move a preset distance along the target insertion direction, so that the insertion posture of the injection microneedle is consistent with the insertion posture of the through-hole needle. In this way, by controlling the movement of the robot arm, the needle insertion position can be kept consistent before and after the surgical needle is replaced, thereby improving the accuracy of needle insertion position control.
[0099] Based on the same application idea, please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 700 includes a processor 710 , a memory 720 and a bus 730 .
[0100] The memory 720 stores machine-readable instructions executable by the processor 710. When the electronic device 700 is running, the processor 710 communicates with the memory 720 through the bus 730. The machine-readable instructions are executed by the processor 710 to execute the steps of the robot arm control method provided in the above embodiment. The specific implementation method can be found in the method embodiment, which will not be repeated here.
[0101] Based on the same application concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the robot arm control method provided in the above embodiment are executed. The specific implementation method can be found in the method embodiment, which will not be repeated here.
[0102] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0103] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0104] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0105] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0106] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0107] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0108] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A robot arm control method, characterized in that: Applied to a robot arm, a through-hole needle is installed at the end of the robot arm; the method comprises: After the through-hole puncture is completed, the robot arm is controlled to move a preset distance in the opposite direction of the through-hole puncture target needle insertion direction, and the first position of the through-hole puncture needle tip is determined; The robot arm is controlled to move to a preset safety position, and after the through-hole needle is replaced with an injection microneedle, the robot arm is controlled to move to adjust the posture of the injection microneedle tip to a second posture; the second posture is the posture of the injection microneedle tip after the through-hole needle in the first posture is replaced with the injection microneedle, which is determined based on the shapes of the through-hole needle and the injection microneedle; Controlling the movement of the robot arm to adjust the injection microneedle tip from the second posture to the first posture; The robot arm is controlled to move the preset distance along the target needle insertion direction so that the needle insertion posture of the injection microneedle is consistent with the needle insertion posture of the through-hole needle.
2. The robot arm control method according to claim 1, characterized in that: The robot arm is a multi-axis robot arm, and the method of controlling the robot arm to move a preset distance in the opposite direction of the target insertion direction of the through-hole needle and determining the first position of the needle tip of the through-hole needle includes: After controlling the robot arm to move a preset distance in the direction opposite to the target needle insertion direction of the through hole, for any joint of the robot arm, a forward kinematic transformation matrix corresponding to the joint is determined according to the forward kinematic transformation and a plurality of target parameters of the joint; the target parameters include the connecting rod length, the connecting rod torsion angle, the connecting rod offset and the joint angle; Determine a total transformation matrix from the end coordinate system of the robot arm to the base coordinate system of the robot arm according to the forward kinematic transformation matrix corresponding to each of the joints; According to the pose coordinates of the through-hole needle tip in the terminal coordinate system and the total transformation matrix, the first pose coordinates of the through-hole needle tip in the base coordinate system are calculated, and the first pose coordinates are determined as the first pose of the through-hole needle tip.
3. The robot arm control method according to claim 2, characterized in that: The posture coordinates are expressed in a quaternion format, including three-dimensional coordinates and homogeneous coordinates of the three-dimensional coordinates.
4. The robot arm control method according to claim 2, characterized in that: After the through-hole needle is replaced with an injection microneedle, controlling the robot arm to move so as to adjust the position of the injection microneedle tip to a second position, comprises: After the through-hole needle is replaced with an injection microneedle, the position coordinates of the injection microneedle tip in the terminal coordinate system are determined according to the shapes of the through-hole needle and the injection microneedle and the position coordinates of the through-hole needle tip in the terminal coordinate system; According to the posture coordinates of the injection microneedle tip in the terminal coordinate system and the total transformation matrix, calculate the second posture coordinates of the injection microneedle tip in the base coordinate system after the through-hole needle in the first posture is replaced with the injection microneedle, and determine the second posture coordinates as the second posture of the injection microneedle tip; Iteratively solving the inverse kinematics equation according to the second posture coordinates to determine a first motion vector of each joint of the robot arm; the motion vector of any of the joints includes a rotation angle and / or a translation distance of the joint; The joints of the robot arm are controlled to move according to the corresponding first motion vector to adjust the posture of the injection microneedle tip to a second posture.
5. The robot arm control method according to claim 4, characterized in that: The controlling each joint of the robot arm to move according to the corresponding first motion vector to adjust the posture of the injection microneedle tip to a second posture includes: Control the joints of the robot arm according to the corresponding first motion vector, first translate the injection microneedle tip through the longitudinal axis to the longitudinal axis position corresponding to the second posture, then translate the injection microneedle tip through the transverse axis and vertical axis to the transverse axis and vertical axis positions corresponding to the second posture, and finally adjust the rotation angle to make the angle of the injection microneedle tip consistent with the angle corresponding to the second posture, so as to adjust the posture of the injection microneedle tip to the second posture.
6. The robot arm control method according to claim 4, characterized in that: The controlling the movement of the robot arm to adjust the injection microneedle tip from the second posture to the first posture includes: Iteratively solving the inverse kinematics equation according to the first posture coordinates to determine a second motion vector of each joint of the robotic arm; The joints of the robot arm are controlled to move according to the corresponding second motion vector, and the injection microneedle tip is adjusted from the second posture to the first posture.
7. The robot arm control method according to claim 6, characterized in that: The controlling each joint of the robot arm to move according to the corresponding second motion vector to adjust the injection microneedle tip from the second posture to the first posture includes: Control the joints of the robot arm according to the corresponding second motion vector, first adjust the rotation angle to make the angle of the injection microneedle tip consistent with the angle corresponding to the first posture, then translate the injection microneedle tip through the horizontal and vertical axes to the horizontal and vertical axis positions corresponding to the first posture, and finally translate the injection microneedle tip through the longitudinal axis to the longitudinal axis position of the first posture, and adjust the injection microneedle tip from the second posture to the first posture.
8. A robot arm control device, characterized in that: Applied to a robot arm, a through-hole needle is installed at the end of the robot arm; the robot arm control device includes: A determination module, used for controlling the robot arm to move a preset distance in the opposite direction of the target insertion direction of the through-hole needle after the through-hole needle puncture is completed, and determining the first position of the through-hole needle tip; A first execution module is used to control the robot arm to move to a preset safety position, and after the through-hole needle is replaced with an injection microneedle, control the robot arm to move so as to adjust the posture of the injection microneedle tip to a second posture; the second posture is the posture of the injection microneedle tip after the through-hole needle in the first posture is replaced with the injection microneedle, which is determined based on the shapes of the through-hole needle and the injection microneedle; A second execution module is used to control the movement of the robot arm to adjust the injection microneedle tip from the second posture to the first posture; The third execution module is used to control the robot arm to move the preset distance along the target needle insertion direction so that the needle insertion posture of the injection microneedle is consistent with the needle insertion posture of the through-hole needle.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the robot arm control method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the robot arm control method according to any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Path planning method and apparatus for robotic arm, storage medium, and computer device
WO2024193630A1