A mechanical arm angle determination method and device, electronic equipment and storage medium
By generating and filtering variable sets, and combining the constraints of the human body and the machine, the optimal robotic arm angle is obtained through iterative calculation, which solves the problem of low positioning accuracy of the robotic arm and improves the operation performance of the robotic arm.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU WISEKING MEDICAL ROBOT CO LTD
- Filing Date
- 2023-04-25
- Publication Date
- 2026-06-09
Smart Images

Figure CN117124316B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics, and more specifically, to a method, apparatus, electronic device, and storage medium for determining the angle of a robotic arm. Background Technology
[0002] Currently, with the continuous development of artificial intelligence, the application of robots in various scenarios is gradually increasing. Medical robots, since their inception, have been a typical representative of cutting-edge technology and, standing at the intersection of the two major trends of robotics and healthcare, have become one of the hottest topics.
[0003] In existing technologies, the positioning of robotic arms is mostly based on the doctor's experience, which makes it impossible to determine the position of the robotic arm according to the actual situation, resulting in low positioning accuracy of the robotic arm. Summary of the Invention
[0004] The purpose of this application is to provide a method, device, electronic device, and storage medium for determining the angle of a robotic arm, thereby improving the accuracy of the robotic arm's positioning, optimizing the configuration of the robotic arm's positioning, and improving the robotic arm's operational performance.
[0005] In a first aspect, embodiments of this application provide a method for determining the angle of a robotic arm. The method includes: generating a first variable group; wherein the first variable group includes multiple sub-variables, and the sub-variables include robotic arm angle values; removing sub-variables in the first variable group that do not meet preset constraints to obtain a second variable group; the preset constraints are generated based on a human body structure mathematical model and a robot kinematic model, which are pre-generated and located in the same coordinate system; calculating results based on each sub-variable in the second variable group and a preset objective function; generating a new first variable group based on the calculation results, and processing based on the new first variable group until the conditions for stopping iteration are met; and determining a target sub-variable based on the calculation results obtained in the last iteration, the target sub-variable including a target robotic arm angle value.
[0006] This application's embodiments generate constraints based on a mathematical model of human anatomy and a kinematic model of the robot, thus considering both human and machine constraints during the selection of variable sets. Furthermore, when the iteration count does not meet the stop-iteration condition, new variable sets are continuously generated based on the calculation results. This ensures that the final robotic arm angle value is the optimal solution considering both human and machine constraints, thereby improving the accuracy of the robotic arm's positioning, optimizing its configuration, and enhancing its operational performance.
[0007] In some embodiments, generating a new first variable group based on the calculation results includes: taking a preset number of sub-variables with the best performance in the second variable group as a third variable group based on the calculation results; generating a random variable group; and generating a new first variable group based on the third variable group and the random variable group.
[0008] This application embodiment generates a new first variable group based on the best-performing sub-variable group and random variable group in the second variable group. This ensures that when calculating the objective function, a better variable group is selected based on the previously obtained optimal variable group, thereby optimizing the variable group. This results in a series of optimal solutions for the final objective function calculation, improving the accuracy of the robotic arm's positioning, optimizing the robotic arm's configuration, and enhancing the robotic arm's operational performance.
[0009] In some embodiments, the calculation results are obtained by calculating based on each sub-variable in the second variable group and a preset objective function, including: determining the end-effector pose corresponding to each sub-variable in the second variable group; generating a Jacobian matrix based on the end-effector pose; calculating the singular values of the Jacobian matrix; and calculating the calculation results based on the singular values and the preset objective function.
[0010] This application embodiment determines the Jacobian matrix by the end-effector pose corresponding to each sub-variable, and calculates the singular values of the Jacobian matrix to perform calculations on a preset objective function, thereby obtaining the calculation results. This ensures the validity of the calculation results, thereby obtaining the optimal solution for the robot arm angle from the valid results, ensuring the accuracy of the robot arm positioning, optimizing the robot arm positioning configuration, and improving the robot arm's operational performance.
[0011] In some embodiments, the calculation results are obtained by calculating based on each sub-variable in the second variable group and a preset objective function, including: determining the end-effector pose corresponding to each sub-variable in the second variable group; obtaining the angle between each robotic arm based on the end-effector pose; and calculating the calculation results based on the angle between each robotic arm and the preset objective function.
[0012] This application embodiment obtains the included angles between each robotic arm by using the end-effector poses corresponding to each sub-variable. The included angles are then used to calculate a preset objective function to obtain the calculation results. This ensures the validity of the calculation results, thereby obtaining the optimal solution for the robotic arm angles from the valid results. This ensures the accuracy of the robotic arm positioning, optimizes the robotic arm positioning configuration, and improves the robotic arm's operational performance.
[0013] In some embodiments, a mathematical model of human body structure is generated in advance, including: acquiring human physiological structure; determining the position of human physiological structure in a preset coordinate system; and constructing a mathematical model of human body structure based on the position of human physiological structure in the preset coordinate system.
[0014] This application embodiment constructs a mathematical model of human body structure in a preset coordinate system, so that the constructed mathematical model of human body structure has a coordinate reference, rather than being arbitrarily constructed, thus ensuring that the selection of variable groups based on the constraints generated by the mathematical model of human body structure is meaningful.
[0015] In some embodiments, the conditions for stopping iteration include the total number of iterations reaching a preset number of iterations or the calculation result corresponding to the current iteration number including a sub-variable less than a preset value.
[0016] This application embodiment determines whether the iteration process has ended based on the stopping condition, thus avoiding over-optimization or under-optimization when iterating the variable group. This ensures that the final robotic arm angle value is the optimal solution obtained by simultaneously considering the constraints of both the human body and the machine, thereby improving the accuracy of the robotic arm's positioning, optimizing the configuration of the robotic arm's positioning, and improving the robotic arm's operational performance.
[0017] In some embodiments, the preset constraints include intervention point position constraints and distance constraints for the robotic arm to avoid collisions; wherein, the intervention point position constraints are determined based on a mathematical model of human body structure, and the distance constraints for the robotic arm to avoid collisions are determined based on a robot kinematics model.
[0018] This application embodiment determines the intervention point position constraint through a mathematical model of human body structure and determines the distance constraint for the robotic arm to avoid collisions through a robot kinematic model. This allows the preset constraint conditions to simultaneously consider the constraint factors of both the human body and the machine, improving the accuracy of the robotic arm's positioning, thereby optimizing the configuration of the robotic arm's positioning and improving the robotic arm's operational performance.
[0019] Secondly, embodiments of this application provide a robotic arm angle determination device, which includes: a generation module for generating a first variable group; wherein the first variable group includes multiple sub-variables, and the sub-variables include robotic arm angle values; a elimination module for eliminating sub-variables in the first variable group that do not meet preset constraints to obtain a second variable group; the preset constraints are generated based on a human body structure mathematical model and a robot kinematic model, which are pre-generated and located in the same coordinate system; a calculation module for calculating calculation results based on each sub-variable in the second variable group and a preset objective function; an iteration module for generating a new first variable group based on the calculation results and processing based on the new first variable group until the condition for stopping iteration is met; and a determination module for determining a target sub-variable based on the calculation results obtained in the last iteration, wherein the target sub-variable includes a target robotic arm angle value.
[0020] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, a storage medium, and a bus, wherein the processor and the memory communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor can execute the method steps of the first aspect by calling the program instructions.
[0021] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium, comprising: the computer-readable storage medium storing computer instructions, the computer instructions causing the computer to perform the method steps of the first aspect.
[0022] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A flowchart illustrating a method for determining the angle of a robotic arm, as provided in this application embodiment;
[0025] Figure 2 A schematic diagram of a robotic arm provided for an embodiment of this application;
[0026] Figure 3 A plan view of the instrument formation in a surgical area provided in an embodiment of this application;
[0027] Figure 4 A schematic diagram of intervention point location constraints provided in an embodiment of this application;
[0028] Figure 5 A schematic diagram of a distance constraint for collision avoidance by a robotic arm provided in an embodiment of this application;
[0029] Figure 6 A schematic diagram illustrating a calculation result provided in an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of a robotic arm angle determination device provided in an embodiment of this application;
[0031] Figure 8 This is a schematic diagram of the electronic device structure provided in an embodiment of this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0033] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0034] It should be noted that all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0035] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0036] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0037] It is understood that the robotic arm angle determination method provided in this application embodiment can be applied to terminal devices (also known as electronic devices) and servers; wherein the terminal device can specifically be a smartphone, tablet computer, computer, personal digital assistant (PDA), etc.; the server can specifically be an application server or a web server.
[0038] To facilitate understanding, the technical solutions provided in the embodiments of this application will be described below using a server as the execution subject as an example to illustrate the application scenarios of the robotic arm angle determination method provided in the embodiments of this application.
[0039] Figure 1 A flowchart of a robotic arm angle determination method provided in this application embodiment is shown below. Figure 1 As shown, the method includes:
[0040] Step 101: The server generates a first variable group; wherein the first variable group includes multiple sub-variables, and the sub-variables include the robot arm angle value.
[0041] In the specific implementation process, the first variable group is a set of variables randomly generated by the server based on the actual situation of the robotic arm, and the variable group consists of parameter values of the optimization object. The first variable group includes multiple sub-variables. For example, if a robotic arm includes 3 joints, and each joint includes 3 angles, and if it is currently necessary to optimize the angles of two joints in the robotic arm, then a sub-variable includes the angle values of the two joints, that is, 6 parameter values. Then the server randomly generates multiple sub-variables containing 6 parameter values within the angle range of the robotic arm joints, thus forming the first variable group. The angle range of the robotic arm joints is determined according to the actual surgical situation. For example, if the angle range of the robotic arm joints is [150°, 200°], then the first variable group is randomly generated within the range of [150°, 200°]. If the variable range is [150°, 180°], then the first variable group is randomly generated within the range of [150°, 180°]. The specific generation of the first variable group can be based on the actual situation, and this application does not impose specific limitations on it.
[0042] To facilitate understanding of the robotic arm's configuration, this application provides an example of a robotic arm. Figure 2 A schematic diagram of a robotic arm provided for an embodiment of this application, such as... Figure 2 As shown, the robotic arm includes passive joints and active joints, wherein the passive joints include joint 1, joint 2, joint 3, and joint 4, and the active joints include joint 5, joint 6, and joint 7. i The X-axis and Z-axis of the i-th joint in the joint coordinate system are represented by the X-axis and Z-axis respectively. i Let represent the Z-axis of the i-th joint in the joint coordinate system, and d and a represent the parameters of the DH modeling method. According to Figure 2 This reveals the connection and angular relationships between the joints.
[0043] It should be understood that the sub-variable includes the angle value of at least one joint of the robotic arm, and the angle value of each joint is used as a parameter of the sub-variable. Therefore, a sub-variable may include one parameter, four parameters, or six parameters. The number of parameters of the sub-variable can be determined according to the actual situation, and this application does not make a specific limitation in this regard.
[0044] Step 102: The server removes the sub-variables in the first variable group that do not meet the preset constraints to obtain the second variable group.
[0045] The preset constraints are generated based on the mathematical model of human body structure and the kinematic model of robot. The mathematical model of human body structure and the kinematic model of robot are pre-generated and are located in the same coordinate system.
[0046] In the specific implementation process, the preset constraints are predetermined and determined based on the actual situation of the patient and the actual situation of the surgical robotic arm. That is, the preset constraints are generated based on the mathematical model of human body structure and the kinematic model of robot. The actual situation of the patient is reflected through the mathematical model of human body structure, and the actual situation of the surgical robotic arm is reflected through the kinematic model of robot.
[0047] When the server eliminates sub-variables from the first variable group according to preset constraints, at least one constraint must be met. That is, if a sub-variable in the first variable group does not meet the constraints of the human body structure mathematical model, it is eliminated. Alternatively, if a sub-variable in the first variable group does not meet the constraints of the robot kinematics model, it is eliminated. Or, if a sub-variable in the first variable group does not meet either the constraints of the human body structure mathematical model or the robot kinematics model, it is eliminated. It should be noted that when filtering the first variable group, the sub-variable groups to be eliminated can be marked. That is, if a sub-variable group only fails to meet one constraint, the degree of non-compliance is low and can be marked as 1; if a sub-variable group fails to meet multiple constraints, the degree of non-compliance is moderate and can be marked as 2; if a sub-variable group fails to meet all constraints, the degree of non-compliance is high and can be marked as 3. The variable groups can be analyzed based on these markings to determine the characteristics of the non-compliant variable groups.
[0048] It should be understood that a preset constraint condition may include multiple sub-constraint conditions. For example, if the current preset constraint condition is based on a mathematical model of human anatomy, the multiple sub-constraint conditions may be constraints on the location of the intervention point, whether there is an existing wound, and the planning of the intervention point location area, etc. The specific preset constraint conditions can be determined according to the actual situation, and this application does not impose specific limitations on them. Similarly, since different types of robotic arms can correspond to different robot kinematic models, the preset constraint conditions based on the robot kinematic model can also be determined according to the actual situation, and this application does not impose specific limitations on them.
[0049] It should be noted that the mathematical model of human anatomy and the kinematic model of the robot reside in the same coordinate system. This shared coordinate system means that both the mathematical model and the kinematic model can be in the robot coordinate system, the human coordinate system, or the world coordinate system. It should be clarified that the human coordinate system refers to a coordinate system constructed with the human body as a reference. The mathematical model of human anatomy describes the specific situation of the human body, while the kinematic model of the robot describes the specific situation of the robotic arm. The mathematical model of human anatomy includes, but is not limited to, models of pneumoperitoneum, gallbladder, and appendix. The specific model can be established according to the actual situation, and this application does not impose specific limitations on it. The kinematic model of the robot includes, but is not limited to, the modified DH method, the POE model, and the quaternion method. The specific model can be determined according to the actual situation, and this application does not impose specific limitations on it.
[0050] Step 103: The server calculates the result based on each sub-variable in the second variable group and the preset objective function.
[0051] In the specific implementation process, the preset objective function is pre-set based on the indicators to be optimized according to actual needs. After obtaining the second set of variables, the preset objective function can be calculated based on each sub-variable in the second set of variables to obtain the calculation result. It should be noted that since the preset objective function is determined based on the indicators to be optimized according to actual needs, there is no fixed formula to express the preset objective function. In the specific implementation process, the optimization objective function can be defined as a collision interference distance objective function, a matching degree function between the workspace and the lesion space, a motion flexibility optimization index function, and an instrument coordination and hand-eye coordination index function, etc. The preset objective function can be set according to the actual situation, and this application does not make specific limitations on it.
[0052] To facilitate understanding of the preset objective functions, this application provides two exemplary types of preset objective functions. Preset objective function 1 is a motion flexibility optimization index function, used to optimize the flexibility of the robotic arm. Preset objective function 2 is a machine coordination and hand-eye coordination index function, used to optimize the coordination of the robotic arm.
[0053] Step 104: The server generates a new first variable set based on the calculation results, and processes the data based on the new first variable set until the condition for stopping the iteration is met.
[0054] In practical implementation, to obtain the optimal robotic arm angle value, it is necessary to continuously optimize the robotic arm angle value. This continuous optimization process is essentially an iterative process. Therefore, it is necessary to iteratively generate a new first set of variables, and based on the new first set of variables, to eliminate sub-variables that do not meet the requirements and to calculate the sub-variables that meet the requirements with the preset objective function. When generating the new first set of variables, in order to retain the better sub-variables from the previous iteration, it is necessary to determine them based on the calculation results of the previous iteration.
[0055] It should be noted that the conditions for stopping iteration are predetermined based on the actual optimization process. For example, the conditions for stopping iteration could be that the total number of iterations reaches a preset number of iterations, or that the calculation result corresponding to the current iteration number includes a sub-variable with a value less than a preset value. The specific conditions can be set according to the actual situation, and this application does not impose any specific limitations on them.
[0056] Step 105: The server determines the target sub-variable based on the calculation results obtained in the last iteration. The target sub-variable includes the target robotic arm angle value.
[0057] In the specific implementation process, the calculation results that meet the stopping iteration conditions are output, and the output calculation results are plotted or tabulated so as to intuitively see the specific situation of each calculation result. In this way, the appropriate optimal solution is selected from the calculation results based on the degree of change and focus of the results, that is, the target sub-variable is determined from the calculation results obtained from the last iteration.
[0058] This application's embodiments generate constraints based on a mathematical model of human anatomy and a kinematic model of the robot, thus considering both human and machine constraints during the selection of variable sets. Furthermore, when the iteration count does not meet the stop-iteration condition, new variable sets are continuously generated based on the calculation results. This ensures that the final robotic arm angle value is the optimal solution considering both human and machine constraints, thereby improving the accuracy of the robotic arm's positioning, optimizing its configuration, and enhancing its operational performance.
[0059] In some embodiments, the server generates a new first variable group based on the calculation results, including: taking a preset number of sub-variables with the best performance in the second variable group as a third variable group based on the calculation results; generating a random variable group; and generating a new first variable group based on the third variable group and the random variable group.
[0060] In the specific implementation process, not all the sub-variables in the second variable group obtained after elimination under preset constraints have good calculation results. Therefore, it is necessary to select the sub-variables in the second variable group based on the calculation results of each sub-variable in the second variable group and the preset objective function, and select the sub-variables with the best performance of a preset number, namely the third variable group, as part of the new first variable group in the next round.
[0061] If we simply use a predetermined number of optimal sub-variables as the basis for the next round of calculation, we are limited to iterating repeatedly within that predetermined number of optimal sub-variables until we obtain the optimal one. Clearly, such iteration can only yield one optimal solution, which is meaningless for different types of robotic arms or different joint angles within the same robotic arm. Therefore, in addition to using the optimal third variable group from the previous generation as part of the new first variable group for the next round, we also need to randomly generate a new variable group to form a new first variable group with the third variable group. From this new random variable group, we can then select the predetermined number of optimal sub-variables. When the iteration stops, we will obtain multiple predetermined number of optimal sub-variables, ensuring that the calculated value of the objective function includes a series of optimal solutions. Therefore, we can select the appropriate optimal solution from the calculated results based on the degree of change and the focus of the calculation.
[0062] It should be understood that since some sub-variables are randomly generated, a situation may arise where, apart from the optimal variable set from the previous generation, the randomly generated variable sets do not meet the constraints. In this case, the calculation object of the next iteration is the same as that of the previous iteration, which is equivalent to performing an invalid iteration. Therefore, the generation of random variable sets must also be considered when determining the conditions for stopping iteration.
[0063] It should be noted that the preset number of sub-variables is determined based on the specific calculation results. For example, the preset number of sub-variables could be 20%, 30%, or 50% of the second variable group, depending on the specific circumstances. This application does not impose any specific limitations on this.
[0064] This application embodiment generates a new first variable group based on the best-performing sub-variable group and random variable group in the second variable group. This ensures that when calculating the objective function, a better variable group is selected based on the previously obtained optimal variable group, thereby optimizing the variable group. This results in a series of optimal solutions for the final objective function calculation, improving the accuracy of the robotic arm's positioning, optimizing the robotic arm's configuration, and enhancing the robotic arm's operational performance.
[0065] In some embodiments, the server calculates the result based on each sub-variable in the second variable group and a preset objective function, including: determining the end-effector pose of the robotic arm corresponding to each sub-variable in the second variable group; generating a Jacobian matrix based on the end-effector pose; calculating the singular values of the Jacobian matrix; and calculating the result based on the singular values and the preset objective function.
[0066] In the specific implementation process, the preset objective function is defined as the motion flexibility optimization index function, specifically expressed as: Where IDCV is the motion flexibility optimization index, μ is the mean of the singular values of the Jacobian matrix, and σ is the standard deviation of the singular values of the Jacobian matrix. min This represents the minimum singular value of the Jacobian matrix. It should be noted that the minimum singular value of the Jacobian matrix can also be used as a criterion for judging worst-case performance in the motion flexibility optimization index function.
[0067] Since the sub-variables include the robot arm angle values, the end-effector pose can be determined based on these angle values. The end-effector pose matrix can then be obtained from the robot's kinematics model, and a Jacobian matrix is generated from this matrix. The singular values of the Jacobian matrix are then calculated, and the results are obtained based on these singular values and a preset objective function.
[0068] To facilitate understanding of what the Jacobian matrix is, for example, consider a robot kinematics model based on the modified DH method. Under this model, the Jacobian matrix can be expressed as: Where d represents the z-axis offset corrected in the DH method, c represents cosine, s represents sinine, and θ represents sine. i Let represent the angle of the i-th joint. It should be noted that different robot kinematics models can lead to the same robot end-effector pose, and the Jacobian matrix is related to the end-effector pose. Therefore, the Jacobian matrix is unique in the generalized Cartesian coordinate system.
[0069] This application embodiment determines the Jacobian matrix by the end-effector pose corresponding to each sub-variable, and calculates the singular values of the Jacobian matrix to perform calculations on a preset objective function, thereby obtaining the calculation results. This ensures the validity of the calculation results, thereby obtaining the optimal solution for the robot arm angle from the valid results, ensuring the accuracy of the robot arm positioning, optimizing the robot arm positioning configuration, and improving the robot arm's operational performance.
[0070] In some embodiments, the server calculates the results based on each sub-variable in the second variable group and a preset objective function, including: determining the end-effector pose of the robotic arm corresponding to each sub-variable in the second variable group; obtaining the angle between each robotic arm based on the end-effector pose; and calculating the results based on the angle between each robotic arm and the preset objective function.
[0071] In the specific implementation process, the preset objective function is defined as the index function of instrument coordination and hand-eye coordination, specifically expressed as follows: Among them, HICI is an index of instrument coordination and hand-eye coordination. Figure 3 A plan view of the instrument formation in a surgical area provided in an embodiment of this application, such as Figure 3 As shown, the solid black circle represents the lesion point. When the left and right instruments point to the same lesion point, they form an instrument plane, and the angle between the two instruments is [value missing]. The optimal included angle is ψ m The projection of the endoscope onto the instrument plane forms angles with the two instruments respectively. and The tilt angle of the endoscope is indicated. The values of the instrument coordination and hand-eye coordination index functions can be determined based on the above parameters, where he represents the hand-eye coordination index, ic represents the instrument coordination index, and λ1 and λ2 are specific gravities, which can be set to 0.5.
[0072] Since the sub-variables include the robot arm angle value, the end-effector pose of the robot arm can be determined based on the robot arm angle value. Based on the end-effector pose, the position and orientation of the robot arm can be obtained, and the angle between each instrument can be obtained. Then, the calculation is performed based on the angle and the preset objective function to obtain the calculation result.
[0073] This application embodiment obtains the included angles between each robotic arm by using the end-effector poses corresponding to each sub-variable. The included angles are then used to calculate a preset objective function to obtain the calculation results. This ensures the validity of the calculation results, thereby obtaining the optimal solution for the robotic arm angles from the valid results. This ensures the accuracy of the robotic arm positioning, optimizes the robotic arm positioning configuration, and improves the robotic arm's operational performance.
[0074] In some embodiments, the server pre-generates a mathematical model of human body structure, including: acquiring human physiological structure; determining the position of human physiological structure in a preset coordinate system; and constructing a mathematical model of human body structure based on the position of human physiological structure in the preset coordinate system.
[0075] In the specific implementation process, the preset coordinate system can be the robot coordinate system, the world coordinate system, or the human coordinate system constructed with humans as the reference object.
[0076] To facilitate understanding of how to construct a mathematical model of the human body structure within a preset coordinate system, an example is given using the robot coordinate system as a reference:
[0077] By fixing the positions of the robot and the hospital bed, the relative pose relationship between the robot and the human body is obtained. In the robot coordinate system, the relative position P(P...) of the human body is obtained. x P y P z ).
[0078] Obtaining human physiological structure specifically involves acquiring the patient's human physiological structural parameters. These parameters can be obtained through actual measurement of the patient's physiological structure or through three-dimensional scanning and reconstruction. Human physiological structural parameters include, but are not limited to, the patient's height H, chest width W, distance N from the patient's head to the 12th rib, and the position U of the umbilicus. x U y U z The lengths of the three axes of the pneumoperitoneum are a, b, and c, where a is half the width of the patient's chest, b is the distance from the umbilicus to the xiphoid process of the sternum, c is the height of the pneumoperitoneum, and the gallbladder is located at T(T). x T y T z ), the location of the appendix M (M x M y M z The distance S between the umbilicus and the ilium, and the distance Q between the two iliums, etc. It should be understood that the obtained physiological structural parameters are all based on relative positions P (P...). x P y P z The parameters are obtained in the robot coordinate system, and other types of human physiological structural parameters can also be obtained depending on the actual situation. This application does not make specific limitations on this.
[0079] After obtaining the corresponding human physiological structure parameters, the relative position P(P) can be used in the robot coordinate system. x P y P z Construct a mathematical model of human physiological structure, which may specifically include a mathematical model of pneumoperitoneum. Mathematical model of the gallbladder Mathematical model of the appendix It should be understood that, in addition to the mathematical model of human body structure shown in the embodiments of this application, other types of mathematical models of human body structure can be constructed according to specific circumstances, such as mathematical models of liver, pancreas, spleen, etc., and this application does not make specific limitations on them.
[0080] This application embodiment constructs a mathematical model of human body structure in a preset coordinate system, so that the constructed mathematical model of human body structure has a coordinate reference, rather than being arbitrarily constructed, thus ensuring that the selection of variable groups based on the constraints generated by the mathematical model of human body structure is meaningful.
[0081] In some embodiments, the conditions for stopping iteration include the total number of iterations reaching a preset number of iterations or the calculation result corresponding to the current iteration number including a sub-variable less than a preset value.
[0082] In the specific implementation process, the preset number of iterations is a pre-set value, which can be set to 100, 200, or 300 times, etc., depending on the actual situation. This application does not impose a specific limitation on this. The preset value is also a pre-set value, which can be set to 20, 30, or 50 times, etc., depending on the actual situation. This application does not impose a specific limitation on this.
[0083] This application embodiment determines whether the iteration process has ended based on the stopping condition, thus avoiding over-optimization or under-optimization when iterating the variable group. This ensures that the final robotic arm angle value is the optimal solution obtained by simultaneously considering the constraints of both the human body and the machine, thereby improving the accuracy of the robotic arm's positioning, optimizing the configuration of the robotic arm's positioning, and improving the robotic arm's operational performance.
[0084] In some embodiments, the preset constraints include intervention point position constraints and distance constraints for the robotic arm to avoid collisions; wherein, the intervention point position constraints are determined based on a mathematical model of human body structure, and the distance constraints for the robotic arm to avoid collisions are determined based on a robot kinematics model.
[0085] In the specific implementation process, the intervention point location constraint determined based on the mathematical model of human anatomy can be expressed as x. l ∈[T x M x ], y l ∈[0,W / 3], x r ∈[T x M x ], y r ∈[-W / 2,-W / 4], Figure 4 This is a schematic diagram of an intervention point location constraint provided in an embodiment of this application, as shown below. Figure 4 As shown, the specific locations of human physiological structures are given, such as the location of the umbilicus, gallbladder, and appendix. Here, L represents the permissible intervention area of the left robotic arm, and R represents the permissible intervention area of the right robotic arm. The positional constraints of the intervention point can be determined based on the specific locations of human physiological structures.
[0086] The distance constraint for avoiding collisions by the robotic arm, determined based on the robot's kinematic model, is a safe distance of 350mm between the center points of the telecentric mechanisms of adjacent robotic arms. Figure 5 This application provides a schematic diagram of a distance constraint for a robotic arm to avoid collisions, as shown in the embodiment. Figure 5 As shown, in the robot base coordinate system, the specific positions of the left arm, right arm and middle arm of the robotic arm are shown. Among them, the two hollow small circles near the navel represent the position of the intervention point. The distance constraint for the robotic arm to avoid collision is determined according to the specific position of the human physiological structure.
[0087] It should be understood that, in the specific implementation process, the constraints can be adjusted according to the actual situation, and this application does not make specific limitations in this regard.
[0088] This application embodiment determines the intervention point position constraint through a mathematical model of human body structure and determines the distance constraint for the robotic arm to avoid collisions through a robot kinematic model. This allows the preset constraint conditions to simultaneously consider the constraint factors of both the human body and the machine, improving the accuracy of the robotic arm's positioning, thereby optimizing the configuration of the robotic arm's positioning and improving the robotic arm's operational performance.
[0089] To facilitate understanding of the robotic arm angle determination method provided in this application's embodiments, the process of determining the robotic arm angle in a combined cholecystectomy and appendectomy is illustrated using this example. The objects to be determined are the angle values of two joints of the robotic arm. One joint includes three angle values, so two joints result in six angle values; therefore, one sub-variable includes six parameters. The determination process is as follows:
[0090] By fixing the positions of the robot and the hospital bed, the relative pose relationship between the robot and the human body is obtained. In the robot coordinate system, the relative position P(P...) of the human body is obtained. x P y P z ), where P is set to (558,0,0). Given P, the following human physiological structural parameters are obtained: height H = 1700mm, chest width W = 360mm, distance from head to 12th rib N = 540mm, lengths of the three axes of the pneumoperitoneum a = 165mm, b = 150mm, c = 200mm, distance between umbilicus and ilium S = 60mm, distance between the two iliums Q = 320mm, and position of umbilicus U(U x U y U z )=(P x +0.382H,0,c), the location of the gallbladder T(T x T y T z )=(P x +N, -W / 4, 80), the location of the appendix M (M x M y M z )=(T x +2S / 3, -Q / 3, 0). In addition to determining the mathematical model of the human body structure, the positional constraints of the intervention point can be determined, specifically x. l ∈[T x M x ], y l ∈[0,W / 3], x r ∈[T x M x ], yr ∈[-W / 2,-W / 4].
[0091] The robot's kinematic model is a modified DH method, where the distances of each robotic arm from the base coordinate system are D0 and D1. i =188mm, D e =358mm. The distance constraint for avoiding collisions by the robotic arm, determined by the robot's kinematic model, is a safe distance of 350mm between the center points of the telecentric mechanisms of adjacent robotic arms.
[0092] After determining the constraints, a first set of variables is randomly generated. This first set of variables has a size of 100, meaning it includes 100 sub-variables, each containing 6 parameters. The iteration termination condition is set to end after 200 iterations. The preset objective functions are a motion flexibility optimization index function and a device coordination and hand-eye coordination index function. The specific process for calculating the results based on the selected sub-variables and objective functions is detailed in the above embodiment and will not be repeated here.
[0093] After obtaining the calculation results, they will be presented in the form of graphs and tables. Figure 6 Table 1 is a schematic diagram of a calculation result provided in an embodiment of this application. In this table, IDCV is the motion flexibility optimization index, HICI is the device coordination and hand-eye coordination index, and θ represents the joint angle value. According to... Figure 6 As shown in Table 1, the IDCV values are close and vary little, indicating that the robot's flexibility is similar under each optimal solution. However, the HICI value varies significantly, indicating that the robot's coordination differs considerably under each optimal solution. Taking all factors into consideration, ID8 is selected as the optimal solution for this example, and the robot is positioned according to the optimization results.
[0094] Table 1
[0095]
[0096]
[0097] It should be noted that the robotic arm angle determination method provided in this application embodiment is only used to determine the robotic arm angle and cannot directly identify, determine or eliminate the cause or lesion of a living human or animal body.
[0098] Figure 7 This is a schematic diagram of a robotic arm angle determination device provided in an embodiment of this application, as shown below. Figure 7 As shown, the device includes: a generation module 701, a rejection module 702, a calculation module 703, an iteration module 704, and a determination module 705.
[0099] The generation module 701 generates a first variable set, which includes multiple sub-variables, including the robot arm angle value. The elimination module 702 removes sub-variables from the first variable set that do not meet preset constraints to obtain a second variable set. The preset constraints are generated based on a human body structure mathematical model and a robot kinematic model, which are pre-generated and located in the same coordinate system. The calculation module 703 calculates the results based on each sub-variable in the second variable set and a preset objective function. The iteration module 704 generates a new first variable set based on the calculation results and processes the new first variable set until the conditions for stopping the iteration are met. The determination module 705 determines the target sub-variable based on the calculation results obtained in the last iteration, including the target robot arm angle value.
[0100] Based on the above embodiments, the iteration module 704 is specifically used to select the preset number of sub-variables with the best performance in the second variable group as the third variable group according to the calculation results; generate a random variable group; and generate a new first variable group according to the third variable group and the random variable group.
[0101] Based on the above embodiments, the calculation module 703 is specifically used to determine the end-effector pose of the robotic arm corresponding to each sub-variable in the second variable group; generate a Jacobian matrix based on the end-effector pose; calculate the singular values of the Jacobian matrix; and calculate the calculation result based on the singular values and a preset objective function.
[0102] Based on the above embodiments, the calculation module 703 is specifically used to determine the end pose of the robotic arm corresponding to each sub-variable in the second variable group; obtain the included angle between each robotic arm based on the end pose; and calculate the calculation result based on the included angle between each robotic arm and the preset objective function.
[0103] Based on the above embodiments, the elimination module 702 is specifically used to obtain human physiological structure; determine the position of human physiological structure in a preset coordinate system; and construct a mathematical model of human structure based on the position of human physiological structure in the preset coordinate system.
[0104] Figure 8 This is a schematic diagram of the electronic device structure provided in the embodiments of this application, such as... Figure 8 As shown, the electronic device includes a processor 801, a memory 802, and a bus 803; wherein the processor 801 and the memory 802 communicate with each other through the bus 803. The processor 801 is used to call program instructions in the memory 802 to execute the methods provided in the above-described method embodiments.
[0105] Processor 801 can be an integrated circuit chip with signal processing capabilities. The aforementioned processor 501 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), an On-Premises Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.
[0106] The memory 802 may include, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0107] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the methods provided in the above-described method embodiments, such as: generating a first variable group; wherein the first variable group includes multiple sub-variables, and the sub-variables include the robot arm angle value; removing sub-variables in the first variable group that do not meet preset constraints to obtain a second variable group; the preset constraints are generated based on a human body structure mathematical model and a robot kinematic model, which are pre-generated and located in the same coordinate system; calculating the calculation result based on each sub-variable in the second variable group and a preset objective function; generating a new first variable group based on the calculation result, and processing based on the new first variable group until the condition for stopping iteration is met; determining the target sub-variable based on the calculation result obtained in the last iteration, and the target sub-variable includes the target robot arm angle value.
[0108] This embodiment provides a non-transitory computer-readable storage medium storing computer instructions that cause the computer to execute the methods provided in the above-described method embodiments, such as: generating a first variable group; wherein the first variable group includes multiple sub-variables, the sub-variables including the robot arm angle value; removing sub-variables in the first variable group that do not meet preset constraints to obtain a second variable group; the preset constraints are generated based on a human body structure mathematical model and a robot kinematic model, which are pre-generated and located in the same coordinate system; calculating the calculation result based on each sub-variable in the second variable group and a preset objective function; generating a new first variable group based on the calculation result and processing based on the new first variable group until the condition for stopping iteration is met; determining the target sub-variable based on the calculation result obtained in the last iteration, the target sub-variable including the target robot arm angle value.
[0109] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0110] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0111] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0112] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for determining the angle of a robotic arm, characterized in that, The method includes: Generate a first variable group; wherein the first variable group includes multiple sub-variables, and the sub-variables include the robot arm angle value; The sub-variables in the first variable group that do not meet the preset constraints are removed to obtain the second variable group; the preset constraints are generated based on the human body structure mathematical model and the robot kinematic model, which are pre-generated and located in the same coordinate system; The calculation results are obtained based on each sub-variable in the second variable group and the preset objective function. A new first set of variables is generated based on the calculation results, and processing is performed based on the new first set of variables until the condition for stopping iteration is met. The target sub-variable is determined based on the calculation results obtained from the last iteration, and the target sub-variable includes the target robotic arm angle value; The step of generating a new first variable set based on the calculation results includes: Based on the calculation results, the preset number of sub-variables with the best performance in the second variable group are used as the third variable group; Generate a set of random variables, and generate the new first set of variables based on the third set of variables and the set of random variables.
2. The method according to claim 1, characterized in that, The step of obtaining the calculation result based on each sub-variable in the second variable group and the preset objective function includes: Determine the end effector pose of the robotic arm corresponding to each sub-variable in the second variable group; Generate a Jacobian matrix based on the end pose; Calculate the singular values of the Jacobian matrix; The calculation result is obtained based on the singular value and the preset objective function.
3. The method according to claim 1, characterized in that, The step of obtaining the calculation result based on each sub-variable in the second variable group and the preset objective function includes: Determine the end effector pose of the robotic arm corresponding to each sub-variable in the second variable group; The included angle between the robotic arms is obtained based on the end-effector pose; The calculation result is obtained based on the angle between each robotic arm and the preset objective function.
4. The method according to claim 1, characterized in that, The pre-generated mathematical model of human body structure includes: Obtaining human physiological structure; Determine the position of the human physiological structure in a preset coordinate system; A mathematical model of the human body structure is constructed based on the position of the human physiological structure in a preset coordinate system.
5. The method according to claim 1, characterized in that, The conditions for stopping iteration include the total number of iterations reaching a preset number of iterations or the calculation result corresponding to the current iteration number including a sub-variable with a value less than a preset value.
6. The method according to any one of claims 1-5, characterized in that, The preset constraints include intervention point position constraints and distance constraints for the robotic arm to avoid collisions; wherein, the intervention point position constraints are determined based on the mathematical model of human body structure, and the distance constraints for the robotic arm to avoid collisions are determined based on the robot kinematics model.
7. A robotic arm angle determination device, characterized in that, The device includes: A generation module is used to generate a first variable group; wherein the first variable group includes multiple sub-variables, and the sub-variables include robot arm angle values; The elimination module is used to eliminate sub-variables in the first variable group that do not meet the preset constraints to obtain the second variable group; the preset constraints are generated based on the human body structure mathematical model and the robot kinematic model, the human body structure mathematical model and the robot kinematic model are pre-generated, and the human body structure mathematical model and the robot kinematic model are located in the same coordinate system; The calculation module calculates the results based on each sub-variable in the second variable group and the preset objective function. The iterative module generates a new first variable set based on the calculation results and processes the data based on the new first variable set until the condition for stopping the iteration is met. The determination module determines the target sub-variable based on the calculation results obtained in the last iteration, and the target sub-variable includes the target robotic arm angle value; Specifically, the iteration module is used for: Based on the calculation results, the preset number of sub-variables with the best performance in the second variable group are used as the third variable group; Generate a set of random variables, and generate the new first set of variables based on the third set of variables and the set of random variables.
8. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the robotic arm angle determination method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the robotic arm angle determination method as described in any one of claims 1 to 6.