Control method and device for contusion tool, electronic equipment and storage medium

文档序号:307 发布日期:2021-09-17 浏览:43次 中文

1. A method of controlling a filing tool, comprising:

acquiring an initial posture of a filing tool in a base coordinate system and position coordinates of key points, wherein the position coordinates of the key points comprise position coordinates of the top end of the filing tool;

transforming the frustrating tool from an initial pose to a kinematic pose based on a transformation matrix;

fixing the position coordinate of the top end of the rasping tool, controlling the rasping tool to rasp in the motion posture through a robot arm, and acquiring the motion track of the origin of the flange of the mechanical arm;

and adjusting the pose of the rasping tool according to the movement track of the original point of the flange of the mechanical arm.

2. The method of claim 1, wherein transforming the frustrating tool from an initial pose to a kinematic pose based on a transformation matrix comprises:

based on a coordinate system conversion matrix T, converting a first coordinate system taking the original point of the flange of the mechanical arm as the original point of the coordinate system into a second coordinate system taking the top end of the grinding tool as the original point of the coordinate system;

performing matrix multiplication operation on the coordinate system conversion matrix T and the first rotation matrix M to obtain an MT matrix;

transforming the frustrating tool from the initial pose to the kinematic pose based on the MT matrix.

3. The method of claim 2, wherein adjusting the pose of the frustrating tool according to the motion trajectory of the robot arm flange origin comprises:

when the grinding angle of the grinding tool is determined to be larger than or equal to a set grinding angle threshold value according to the movement track of the original point of the flange of the mechanical arm, converting the current movement posture of the grinding tool into the initial posture through an inverse matrix and a reverse matrix of the coordinate system conversion matrix T;

correcting the initial pose of the frustrating tool based on a second rotation matrix M1;

and transforming the initial pose corrected by the frustration tool into a corresponding motion pose based on the transformation matrix.

4. The method of claim 3, wherein:

the coordinate system transformation matrix T is: t ═ trans (0, -k, -q), where k represents the length of MN, q represents the length of OM, N represents the tip position of the filing tool, O represents the robotic arm flange origin, and M represents the drop foot of the robotic arm flange origin on the filing tool;

the first rotation matrix M is: m ═ rotx (a); the rotx (α) represents a rotation angle α of the rasping tool about the x-axis;

the second rotation matrix M1 is: m1A rotation angle β of the tool about the y-axis;

the Y axis is the direction of MN; the z-axis is the OM direction; determining an x-axis according to the direction of a right-hand rule;

the inverse matrix is: t isinverse=transl(0,k,q)*rotx(-a)。

5. The method according to any one of claims 1 to 4, further comprising:

determining a filing depth limit point of the acetabular cup according to the initial position coordinate of the spherical center of the inner spherical surface of the acetabular cup;

and determining the feedback resistance of the filing tool for filing the acetabular cup according to the detected current position coordinates of the spherical center of the inner spherical surface of the acetabular cup and the filing depth limit point.

6. The method of claim 5, wherein determining the feedback resistance to the acetabular cup for the frustration tool to frustrate the acetabular cup based on the detected current positional coordinates of the inner spherical center of the acetabular cup and the frustration depth limit point comprises:

calculating a coordinate difference value between the current position coordinate of the inner spherical surface center of the acetabular cup and the frustration depth limit point;

and determining the feedback resistance of the bruising tool to the acetabular cup according to the mapping relation between the coordinate difference and the reaction threshold of the mechanical sensor of the mechanical arm.

7. The method of claim 6, further comprising:

when the coordinate difference value between the current position coordinate of the inner spherical surface center of the acetabular cup and the frustration depth limiting point is smaller than or equal to a preset threshold value, the mechanical arm controls the frustration tool to stop moving.

8. A control device for a filing tool, comprising:

the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an initial posture of a filing tool in a base coordinate system and position coordinates of key points, and the position coordinates of the key points comprise position coordinates of the top end of the filing tool;

the attitude transformation module is used for transforming the frustrating tool from an initial attitude to a motion attitude based on a transformation matrix;

the grinding and filing module is used for fixing the position coordinate of the top end of the grinding and filing tool, controlling the grinding and filing tool through a machine arm to grind and file under the motion posture, acquiring the motion track of the original point of the flange of the mechanical arm, and adjusting the pose of the grinding and filing tool according to the motion track of the original point of the flange of the mechanical arm.

9. An electronic device, comprising:

a memory and a processor, the memory and the processor being communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method of controlling the frustrating tool according to any one of claims 1-7.

10. A computer-readable storage medium storing computer instructions for causing a computer to execute the method of controlling a frustrating tool according to any one of claims 1-7.

Background

In the full-automatic hip joint replacement operation of using the robot, the grinding tool needs to be limited to a certain degree to prevent the grinding tool from excessively penetrating into the acetabulum to grind off, and the angle of the grinding tool also needs to be limited to a certain degree to prevent the grinding tool from mistakenly grinding the acetabulum. But currently there is no automatic control method for the brute force tool.

Disclosure of Invention

In view of this, embodiments of the present invention provide a method and an apparatus for controlling a frustrating tool, an electronic device, and a storage medium, so as to automatically control a frustrating process of the frustrating tool.

According to a first aspect, an embodiment of the present invention provides a method for controlling a frustrating tool, including: acquiring an initial posture of a filing tool in a base coordinate system and position coordinates of key points, wherein the position coordinates of the key points comprise position coordinates of the top end of the filing tool; transforming the frustrating tool from an initial pose to a kinematic pose based on a transformation matrix; fixing the position coordinate of the top end of the rasping tool, controlling the rasping tool to rasp in the motion posture through a robot arm, and acquiring the motion track of the origin of the flange of the mechanical arm; and adjusting the pose of the rasping tool according to the movement track of the original point of the flange of the mechanical arm.

With reference to the first aspect, in a first implementation of the first aspect, transforming the frustrating tool from an initial pose to a kinematic pose based on a transformation matrix comprises: based on a coordinate system conversion matrix T, converting a first coordinate system taking the original point of the flange of the mechanical arm as the original point of the coordinate system into a second coordinate system taking the top end of the grinding tool as the original point of the coordinate system; performing matrix multiplication operation on the coordinate system conversion matrix T and the first rotation matrix M to obtain an MT matrix; transforming the frustrating tool from the initial pose to the kinematic pose based on the MT matrix.

With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, adjusting the pose of the frustrating tool according to the movement track of the origin of the flange of the mechanical arm includes: when the grinding angle of the grinding tool is determined to be larger than or equal to a set grinding angle threshold value according to the movement track of the original point of the flange of the mechanical arm, converting the current movement posture of the grinding tool into the initial posture through an inverse matrix and a reverse matrix of the coordinate system conversion matrix T; correcting the initial pose of the frustrating tool based on a second rotation matrix M1; and transforming the initial pose corrected by the frustration tool into a corresponding motion pose based on the transformation matrix.

With reference to the second embodiment of the first aspect, in a third embodiment of the first aspect, the coordinate system transformation matrix T is: t ═ trans (0, -k, -q), where k represents the length of MN, q represents the length of OM, N represents the tip position of the filing tool, O represents the robotic arm flange origin, and M represents the drop foot of the robotic arm flange origin on the filing tool; the first rotation matrix M is: m ═ rotx (a); the rotx (α) represents a rotation angle α of the rasping tool about the x-axis; the second rotation matrix M1 is: m1A rotation angle β of the tool about the y-axis;

the Y axis is the direction of MN; the z-axis is the OM direction; determining an x-axis according to the direction of a right-hand rule;

the inverse matrix is: t isinverse=transl(0,k,q)*rotx(-a)。

With reference to the first aspect through the third embodiment of the first aspect, in a fourth embodiment of the first aspect, the method further includes: determining a filing depth limit point of the acetabular cup according to the initial position coordinate of the spherical center of the inner spherical surface of the acetabular cup; and determining the feedback resistance of the filing tool for filing the acetabular cup according to the detected current position coordinates of the spherical center of the inner spherical surface of the acetabular cup and the filing depth limit point.

With reference to the fourth embodiment of the first aspect, in the fifth embodiment of the first aspect, determining a feedback resistance of the filing tool for filing the acetabular cup according to the detected current position coordinates of the inner spherical center of the acetabular cup and the filing depth limit point includes: calculating a coordinate difference value between the current position coordinate of the inner spherical surface center of the acetabular cup and the frustration depth limit point; and determining the feedback resistance of the bruising tool to the acetabular cup according to the mapping relation between the coordinate difference and the reaction threshold of the mechanical sensor of the mechanical arm.

With reference to the fifth embodiment of the first aspect, in the sixth embodiment of the first aspect, the method further comprises: when the coordinate difference value between the current position coordinate of the inner spherical surface center of the acetabular cup and the frustration depth limiting point is smaller than or equal to a preset threshold value, the mechanical arm controls the frustration tool to stop moving.

According to a second aspect, embodiments of the present invention provide a control apparatus for a filing tool, comprising:

the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring an initial posture of a filing tool in a base coordinate system and position coordinates of key points, and the position coordinates of the key points comprise position coordinates of the top end of the filing tool;

the attitude transformation module is used for transforming the frustrating tool from an initial attitude to a motion attitude based on a transformation matrix;

the grinding and filing module is used for fixing the position coordinate of the top end of the grinding and filing tool, controlling the grinding and filing tool through a machine arm to grind and file under the motion posture, acquiring the motion track of the original point of the flange of the mechanical arm, and adjusting the pose of the grinding and filing tool according to the motion track of the original point of the flange of the mechanical arm.

According to a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the method for controlling a frustrating tool according to the first aspect or any implementation manner of the first aspect.

According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions for causing a computer to execute the method for controlling a frustrating tool according to the first aspect or any one of the implementation manners of the first aspect.

The control method of the tool comprises the steps of obtaining an initial posture of the tool in a base coordinate system and position coordinates of key points, wherein the position coordinates of the key points comprise position coordinates of the top end of the tool; transforming the frustrating tool from an initial pose to a kinematic pose based on a transformation matrix; fixing the position coordinate of the top end of the rasping tool, controlling the rasping tool to rasp in the motion posture through a robot arm, and acquiring the motion track of the origin of the flange of the mechanical arm; the pose of the filing tool is adjusted according to the motion track of the origin of the flange of the mechanical arm, so that the filing tool can be controlled to rotate according to the motion track, the method further comprises the step of determining a filing depth limit point of the acetabular cup according to the initial position coordinate of the inner spherical center of the acetabular cup, and when the coordinate difference value between the current position coordinate of the inner spherical center of the acetabular cup and the filing depth limit point is smaller than or equal to a preset threshold value, the mechanical arm controls the filing tool to stop moving. Therefore, the angle and the depth of movement of the bruising tool can be controlled in the process of acetabular bruising of an operator, so that the acetabulum is prevented from being worn, and the use safety of the bruising tool and the operation effect of a patient are improved.

Drawings

The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and not to be construed as limiting the invention in any way, and in which:

FIG. 1 is a schematic flow chart illustrating a control method of a frustrating tool according to embodiment 1 of the present invention;

FIG. 2 is a schematic view of a first position during movement of the rasp tool;

FIG. 3 is a second schematic view of the position of the rasp tool during movement;

FIG. 4 is a schematic view of the conical motion of the rasping tool;

fig. 5 is a schematic structural diagram of a control device of a filing tool in embodiment 2 of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Example 1

Embodiment 1 of the present invention provides a control method for a frustrating tool, and fig. 1 is a schematic flow chart of the control method for the frustrating tool in embodiment 1 of the present invention. Fig. 2 is a schematic view of an initial posture of the frustrating tool during a movement process, and fig. 3 is a schematic view of a movement posture of the frustrating tool during a movement process, as shown in fig. 1, a control method of the frustrating tool in embodiment 1 of the present invention includes the following steps:

s101: the method comprises the steps of obtaining an initial posture of the filing tool under a base coordinate system and position coordinates of key points, wherein the position coordinates of the key points comprise position coordinates of the top end of the filing tool.

In embodiment 1 of the present invention, a spherical filing tool is installed at the top end position N of the filing tool, the spherical center of the spherical filing tool is located at point N, and the acetabulum is filed by the filing tool.

In example 1 of the present invention, the filing tool is a filing bar.

S102: transforming the frustrating tool from an initial pose to a kinematic pose based on a transformation matrix.

As a specific implementation, based on the transformation matrix, the following technical solution may be adopted to transform the frustrating tool from the initial pose to the motion pose: based on a coordinate system conversion matrix T, converting a first coordinate system taking the original point of the flange of the mechanical arm as the original point of the coordinate system into a second coordinate system taking the top end of the grinding tool as the original point of the coordinate system; performing matrix multiplication operation on the coordinate system conversion matrix T and the first rotation matrix M to obtain an MT matrix; transforming the frustrating tool from the initial pose to the kinematic pose based on the MT matrix.

Specifically, the initial posture shown in fig. 2 is assumed when the tip position N of the filing tool reaches the preset current rotational position. In fig. 2, point N represents the tip position of the filing tool, point O represents the origin of the flange of the robot arm, and point M represents the projection of point O on the filing tool. The OM direction is a z-axis, the MN direction is a y-axis, and the x-axis is determined according to the right-hand rule.

For example, the coordinate system transformation matrix T may be of the form: t ═ trans (0, -k, -q), where k represents the length of MN (the length of MN represents the length of the filing tool), q represents the length of OM (the length of OM represents the vertical distance from the robot flange origin O point to the filing tool), N represents the tip position of the filing tool, O represents the robot flange origin, and M represents the foot on the filing tool from the robot flange origin O.

The first rotation matrix M may be of the form: m-rotx (a), where as shown in fig. 3, the angle between PN and MN is an angle a, i.e., the angle MNP is an angle a, and rotx (α) represents the rotation matrix required for the frustrating tool to rotate the angle α around the x-axis.

The rotation of the rasping tool according to the rotation trajectory can be controlled to make the rasping tool perform a conical motion, for example, as shown in fig. 4, R corresponds to PN in fig. 3, α represents a rotation angle, 116b represents a rasping tool mounted at a distal end position of the rasping tool, for example, a ball-shaped rasp for bone rasping, P represents a rotation position, and C represents a depth limit point of the rasping tool. The depth limit point of the filing tool can be determined along the axial distance extension by n millimeters according to the preoperatively planned acetabular cup spherical center, for example, n can be 1, 2, and the like, which is not limited in the embodiment of the application.

Performing matrix multiplication operation on the coordinate system conversion matrix T and the first rotation matrix M to obtain an MT matrix; transforming the frustrating tool from the initial pose of fig. 2 to the kinematic pose of fig. 3 based on the MT matrix.

S103: and fixing the position coordinate of the top end of the rasping tool, controlling the rasping tool to carry out rasping under the motion posture through a robot arm, and acquiring the motion track of the original point of the flange of the mechanical arm.

S104: and adjusting the pose of the rasping tool according to the movement track of the original point of the flange of the mechanical arm.

As a specific implementation manner, the following technical scheme can be adopted for adjusting the pose of the filing tool according to the movement track of the origin of the flange of the mechanical arm: when the grinding angle of the grinding tool is determined to be larger than or equal to the set grinding angle threshold value according to the movement track of the flange origin of the mechanical arm, the inverse matrix and the inverse matrix (T) of the coordinate system transformation matrix T are usedinverseTransforming the frustrating tool from a current motion pose to the initial pose; correcting the initial pose of the frustrating tool based on a second rotation matrix M1; and transforming the initial pose corrected by the frustration tool into a corresponding motion pose based on the transformation matrix.

By way of example, the second rotation matrix M1 may be of the form: m1A rotation angle β of the tool about the y-axis. Therefore, the initial posture of the frustrating tool can be adjusted according to the preset angle adjustment amount, and the robot motion matrix of each micro component of the conical motion is obtained.

The angle of the rasping tool can be controlled through the steps S101 to S104, and the rasping tool can move to a complete conical track through different continuous repeated steps S101 to S104.

As a further embodiment, the movement of the rasp tool also requires depth control, and therefore the method of controlling the rasp tool also includes the steps of: determining a filing depth limit point of the acetabular cup according to the initial position coordinate of the spherical center of the inner spherical surface of the acetabular cup; and determining the feedback resistance of the filing tool for filing the acetabular cup according to the detected current position coordinates of the spherical center of the inner spherical surface of the acetabular cup and the filing depth limit point.

Specifically, according to the detected current position coordinates of the spherical center of the inner spherical surface of the acetabular cup and the frustration depth limit point, the following technical scheme can be adopted for determining the feedback resistance of the frustration tool for frustration on the acetabular cup: calculating a coordinate difference value between the current position coordinate of the inner spherical surface center of the acetabular cup and the frustration depth limit point; and determining the feedback resistance of the bruising tool to the acetabular cup according to the mapping relation between the coordinate difference and the reaction threshold of the mechanical sensor of the mechanical arm. Therefore, the feedback resistance of the mechanical sensor is set to be larger when the position is closer to the frustration depth limit point, so that the feedback resistance is set to be more reasonable and humanized.

Specifically, when the coordinate difference between the current position coordinate of the inner spherical surface center of the acetabular cup and the frustration depth limiting point is smaller than or equal to a preset threshold value, the mechanical arm controls the frustration tool to stop moving. Thereby allowing control of the depth of the rastered tool.

Specifically, the filing depth limit point of the filing tool can be determined according to the limit point C of the acetabular cup guided into the system by the planning structure, so that the spherical center of the inner spherical surface of the acetabular cup cannot exceed the limit point C during manual or automatic filing. The position of the mechanical arm is detected in real time, the closer the mechanical arm is to the limit point, the larger the reaction threshold value of the mechanical sensor is set, the larger the resistance is when the mechanical arm is pushed by hand, the more the mechanical arm is pushed, once the mechanical arm reaches the position of the limit point C, the power of the tool is cut off, and the reaction threshold value of the mechanical arm is set to be infinite. Mechanical arm mechanical sensor reaction threshold definition: we set a threshold for the robot sensor, say 10N force, with the robot stationary if the force applied to the robot is less than 10N and moving if it is greater than 10N.

The utility model provides an in-process that can carry out the acetabular bone at the art person and rub the sword controls the angle and the degree of depth of tool motion, avoids wearing out the acetabular bone to improve the safety in utilization and the patient's of tool that rubs the sword operation effect.

Example 2

In accordance with embodiment 1 of the present invention, embodiment 2 of the present invention provides a control device for a filing tool. Fig. 5 is a schematic structural diagram of a frustration tool control apparatus according to embodiment 2 of the present invention, and as shown in fig. 2, the frustration tool control apparatus according to embodiment 2 of the present invention includes an obtaining module 20, an attitude changing module 22, and a frustration module 24.

Specifically, the obtaining module 20 is configured to obtain an initial posture of the filing tool in a base coordinate system and position coordinates of key points, where the position coordinates of the key points include position coordinates of a top end of the filing tool;

an attitude transformation module 22 for transforming the frustrating tool from an initial attitude to a kinematic attitude based on a transformation matrix;

the rasping module 24 is configured to fix a position coordinate of a top end of the rasping tool, control the rasping tool to perform rasping in the motion posture through a robot arm, obtain a motion trajectory of an origin of a flange of the robot arm, and adjust a pose of the rasping tool according to the motion trajectory of the origin of the flange of the robot arm, where specific details of the rasping tool control device may be understood with reference to corresponding descriptions and effects in the embodiments shown in fig. 1 to 4, and details are not repeated here.

Example 3

Embodiments of the present invention further provide an electronic device, which may include a processor and a memory, where the processor and the memory may be connected by a bus or in another manner.

The processor may be a Central Processing Unit (CPU). The Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or a combination thereof.

The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the control method of the frustration tool in the embodiments of the present invention (e.g., the obtaining module 20, the pose transformation module 22, and the frustration module 24 shown in fig. 5). The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, namely, the control method of the frustrating tool in the above method embodiment is realized.

The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor, and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The one or more modules are stored in the memory and, when executed by the processor, perform a method of controlling a frustrating tool as in the embodiments of fig. 1-3.

The details of the electronic device may be understood by referring to the corresponding descriptions and effects in the embodiments shown in fig. 1 to fig. 5, which are not described herein again.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.

Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种动态修正机械手臂位置误差的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!