A force-position hybrid control method and device based on visual servo correction
The force-position hybrid control method modified by visual servo solves the accuracy and safety problems of the TCP position and attitude control of the robotic arm during anterior cruciate ligament reconstruction surgery, and improves the drilling accuracy and safety.
Patent Information
- Application Number
- CN202410360634.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-03-27
AI Technical Summary
In anterior cruciate ligament reconstruction surgery, it is difficult to accurately control the position and attitude of the robotic arm tool center point (TCP) during robot-assisted drilling operations, affecting drilling accuracy and safety.
Using a force-position hybrid control method based on visual servo correction, by obtaining the TCP position and attitude, combined with infrared optical positioning NDI data, the target bone path position and attitude error is calculated, and visual correction is performed within the preset threshold to adjust the TCP position and attitude. , to ensure that the force control direction is consistent with the direction of the bone canal.
It improves the system accuracy and safety of drilling, ensures the cooperative human-machine dragging function of the robotic arm during the drilling process, and reduces errors and risks during surgery.
Smart Images

Figure CN118177964B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of intelligent medical control technology, and in particular to a force-position hybrid control method and device based on visual servo correction. Background Art
[0002] Generally, anterior cruciate ligament reconstruction surgery is a surgery to replace the ruptured tendon with an autologous or allogeneic tendon to ensure normal movement of the knee joint. During the operation, bone tunnels need to be drilled in the femur and tibia, and the tendon is passed through the bone tunnel and fixed. The robot-assisted anterior cruciate ligament reconstruction surgery system needs to complete the drilling operation.
[0003] Therefore, during the drilling process, the robot arm TCP (Tool Center Point) needs to be controlled to ensure drilling accuracy and safety. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a force-position hybrid control method and device based on visual servoing correction.
[0005] The present disclosure provides a force-position hybrid control method based on visual servo correction, the method comprising:
[0006] In force control mode, obtain the tool center point TCP position and TCP posture;
[0007] When the infrared optical positioning NDI data update is detected, the target bone channel position and the target bone channel posture in the TCP coordinate system are calculated according to the NDI data;
[0008] Calculate according to the TCP position and the TCP posture and the target bone tunnel position and the target bone tunnel posture to obtain a position error and a posture error between the TCP and the target bone tunnel;
[0009] When the target coordinate position error is less than a preset first threshold, determining position adjustment data and TCP attitude adjustment data in a first direction and a second direction of the TCP position according to the position error, the attitude error and a preset visual correction range;
[0010] Determine position adjustment data in a third direction of the TCP position according to the target direction external force data;
[0011] The TCP is controlled according to the position adjustment data of the first direction, the second direction and the third direction of the TCP position and the TCP posture adjustment data.
[0012] The embodiment of the present disclosure also provides a force-position hybrid control device based on visual servo correction, the device comprising:
[0013] The first acquisition module is used to obtain the TCP position and TCP posture of the robot arm in the force control mode;
[0014] A first calculation module is used to calculate the target bone channel position and the target bone channel posture in the TCP coordinate system according to the NDI data when the infrared optical positioning NDI data is detected to be updated;
[0015] A second calculation module is used to calculate according to the TCP position and the TCP posture and the target bone channel position and the target bone channel posture to obtain a position error and a posture error between the TCP and the target bone channel;
[0016] A first updating module is used to determine the position adjustment data of the first direction and the second direction of the TCP position and the TCP posture adjustment data according to the position error, the posture error and a preset visual correction range when the target coordinate position error is less than a preset first threshold;
[0017] A second updating module is used to determine the position adjustment data of the third direction of the TCP position according to the target direction external force data;
[0018] A control module is used to control the TCP according to the position adjustment data of the first direction, the second direction and the third direction of the TCP position and the TCP posture adjustment data.
[0019] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the force-position hybrid control method based on visual servo correction as provided in the embodiment of the present disclosure.
[0020] An embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the force-position hybrid control method based on visual servo correction as provided in the embodiment of the present disclosure.
[0021] Compared with the prior art, the technical solution provided by the embodiment of the present disclosure has the following advantages: the force-position hybrid control solution based on visual servo correction provided by the embodiment of the present disclosure, in the force control mode, obtains the TCP position and TCP posture, calculates the target bone channel position and target bone channel posture in the TCP coordinate system according to the NDI data, calculates according to the TCP position and the TCP posture and the target bone channel position and the target bone channel posture, obtains the position error and posture error between the TCP and the target bone channel, when the target coordinate position error is less than the preset first threshold value, determines the position adjustment data and TCP posture adjustment data of the first direction and the second direction in the TCP position according to the position error, the posture error and the preset visual correction range, determines the position adjustment data of the third direction in the TCP position according to the target direction external force data, controls the TCP according to the position adjustment data and TCP posture adjustment data of each direction of the TCP position to ensure that the force control direction is always consistent with the bone channel direction. By adopting the above technical solution, during the drilling process, the target direction of the robot arm TCP is force controlled to ensure the human-machine collaborative dragging function. In addition, in other directions, visual servoing is combined with real-time correction of the direction and position errors between the robot TCP and the bone channel to improve the system accuracy of drilling, and the range of visual servoing correction during the drilling process is specified in combination with the characteristics of the surgery to ensure surgical safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0023] Figure 1 A schematic flow chart of a force-position hybrid control method based on visual servo correction provided in an embodiment of the present disclosure;
[0024] Figure 2 A flow chart of another force-position hybrid control method based on visual servo correction provided by an embodiment of the present disclosure;
[0025] Figure 3 An example flow chart of a force-position hybrid control based on visual servo correction provided by an embodiment of the present disclosure;
[0026] Figure 4 Another example flow chart of force-position hybrid control based on visual servo correction provided by an embodiment of the present disclosure;
[0027] Figure 5 A schematic diagram of the structure of a force-position hybrid control device based on visual servo correction provided by an embodiment of the present disclosure;
[0028] Figure 6A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] In the surgical preparation stage, the present invention fixes the patient reference frame to the surgical area, and the robotic arm reference frame is fixedly connected to the robotic arm. After the drilling mode is turned on, the robotic arm is in a constrained force control mode, and the force sensor collects force data and obtains real-time external force. The operator can push the robotic arm along the direction of the bone channel to perform drilling operations. At the same time, the robotic arm collects NDI data and calculates the position of the robotic arm TCP in real time. When it reaches the vicinity of the bone surface, it enters the servo correction area, and calculates the direction and position error between the TCP and the planned bone channel in real time. The robotic arm moves in the direction of reducing the error until the error is less than the lower limit of the threshold, and updates the coordinate system required for calculating force control to ensure that the force control direction is always consistent with the direction of the bone channel. In this way, the accuracy of drilling can be improved, and the area where visual servoing occurs can be specified, which is conducive to ensuring safety, controlling the movement speed of the robotic arm, and ensuring drilling safety.
[0036] Figure 1 The present invention provides a flow chart of a force-position hybrid control method based on visual servo correction, which can be performed by a force-position hybrid control device based on visual servo correction, wherein the device can be implemented by software and / or hardware, and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:
[0037] Step 101: In force control mode, obtain the TCP position and TCP posture of the robot tool center point.
[0038] Specifically, after the punching mode is turned on, the robot arm is in a constrained force control mode, and the robot arm TCP position and TCP posture are further obtained. For example, the robot arm flange position and flange posture are collected in the target database, and the robot arm TCP position (x_tcp, y_tcp, z_tcp) and TCP posture (rx_tcp, ry_tcp, rz_tcp) are calculated according to the robot arm flange position and flange posture, that is,
[0039] Step 102: Calculate the target bone channel position and target bone channel posture in the TCP coordinate system according to the NDI data.
[0040] In the embodiment of the present disclosure, when an update of the infrared optical positioning NDI data is detected, the target bone channel position and the target bone channel posture in the TCP coordinate system are calculated based on the NDI data. There are many ways to detect an update of the infrared optical positioning NDI data, such as obtaining the first NDI data at the first moment, obtaining the second NDI data at the second moment, and determining the NDI data update based on the first NDI data and the second NDI data.
[0041] Specifically, when the infrared optical positioning NDI data is detected to be updated, the target bone channel position and target bone channel posture in the TCP coordinate system are calculated according to the NDI data. More specifically, the collection of NDI data includes Among them, robot represents the robot arm reference frame coordinate system, and patient represents the patient reference frame coordinate system. Calculate the position and posture of the bone channel in the robot arm TCP coordinate system, that is, in, is the planning result of the host computer, and is the coordinate of the bone channel in the patient reference frame coordinate system; is the theoretical value.
[0042] Step 103: Calculate according to the TCP position and TCP posture and the target bone channel position and target bone channel posture to obtain the position error and posture error between the TCP and the target bone channel.
[0043] Specifically, after obtaining the target bone channel position and target bone channel posture, the position error and posture error between the TCP and the target bone channel are calculated according to the TCP position and TCP posture and the target bone channel position and target bone channel posture, that is, Where (Δx tcp ,Δy tcp ,Δz tcp ) represents the position error in the TCP coordinate system; The attitude error is calculated by quaternion in TCP coordinate system. is the identity matrix.
[0044] Step 104: When the target coordinate position error is less than a preset first threshold, determine the position adjustment data and TCP attitude adjustment data in the first direction and the second direction of the TCP position according to the position error, the attitude error and the preset visual correction range.
[0045] Among them, the target coordinate position is the position in the Y-axis direction, the first threshold can be selected and set according to the needs of the application scenario, and the visual correction range includes a first error range for posture error judgment and a second error range for position error judgment, which can also be selected and set according to the needs of the application scenario.
[0046] In some embodiments, according to the position error, the attitude error and the preset visual correction range, the position adjustment data of the first direction and the second direction in the TCP position and the TCP attitude adjustment data are determined, including: when the attitude error is within the preset first error range, the TCP attitude adjustment data is determined, and when the position error is within the preset second error range, the position adjustment data of the first direction and the second direction in the TCP position is determined. The first direction and the second direction are usually the x-axis and z-axis directions.
[0047] Specifically, monitor whether the bone surface is reached. When the bone surface is reached, the visual correction function is enabled, i.e., Δy tcp <threshold1, the visual correction function is enabled; where Δy tcp is the target coordinate position error, and threshold1 is the first threshold.
[0048] In some embodiments, when the target coordinate position error is greater than or equal to the first threshold, and the position error or attitude error is not within the visual correction range, external force data is acquired based on the force sensor, and the TCP position is updated according to the external force data.
[0049] That is to say, calculate whether the position error and attitude error exceed the visual correction range. If they exceed, the visual correction function ends, and force control is retained, i.e., or where is the first upper limit value in the first error range; is the second upper limit value in the second error range.
[0050] Specifically, if the attitude error is within the threshold range update the attitude (rx, ry, rz); where is the first lower limit value in the first error range, i.e., where
[0051] is the attitude between the bone tunnel and the robotic arm base.
[0052] Specifically, if the position error of the robotic arm is within the threshold range update the positions in the first direction and the second direction (x_tcp, z_tcp). Where is the second lower limit value in the second error range.
[0053] Since a relatively large position error may trigger the speed protection mechanism of the robotic arm, a maximum step size is set for distributed distribution. In some embodiments, a maximum step size is set, and according to the position error, the maximum step size, and the second error range, a position error update value is determined, and based on the position error update value, the position adjustment data in the first direction and the second direction of the TCP position is determined.
[0054] In some embodiments, the position error update value is determined based on the position error, the maximum step length and the second error range. It can be understood that when the position error is greater than or equal to the second upper limit value, the position error update value is 0, and / or; when the position error is greater than or equal to the sum of the second lower limit value and the maximum step length and is less than the second upper limit value, the position error update value is the maximum step length, and / or; when the position error is greater than or equal to the second lower limit value and is less than the sum of the second lower limit value and the maximum step length, the position error update value is the position error, and / or; when the position error is greater than the negative value of the second lower limit value and is less than the second lower limit value, the position error update value is 0, and / or; when the position error is greater than or equal to the negative value of the maximum step length minus the second lower limit value and is less than or equal to the negative value of the second lower limit value, the position error update value is the negative value of the position error, and / or; when the position error is greater than or equal to the negative value of the second upper limit value and is less than the negative value of the maximum step length minus the second lower limit value, the position error update value is the negative value of the position error, and / or; when the position error is less than the negative value of the second upper limit value, the position error update value is 0.
[0055] In some embodiments, the position error update value is added to the first direction position in the TCP position to obtain the position adjustment data of the second direction in the TCP position; wherein the first direction position in the TCP position is the accumulated error sum value at historical moments, and / or; the position error update value is added to the second direction position in the TCP position to obtain the position adjustment data of the second direction in the TCP position; wherein the second direction position in the TCP position is the accumulated error sum value at historical moments.
[0056] Specifically,
[0057]
[0058]
[0059] in, step maximum step size. If error is and , beyond the visual correction range, no correction is made P error =0.
[0060] If the error is abs(p error )=step, that is, the error at this time is larger than the maximum step size, and the error is divided into n steps and sent down.
[0061] If the error is and abs(P error)=error, that is, the error can be directly sent to the robot arm and will not trigger the underlying speed protection of the robot arm. tcp , Δz tcp}. P(x,y,z) pre It is the cumulative position error and value in the TCP coordinate system at the historical moment.
[0062] Step 105: Determine the position adjustment data of the third direction in the TCP position according to the external force data in the target direction.
[0063] Specifically, force control is calculated to update the third direction, that is, the Y-axis coordinate position. In some embodiments, the position adjustment data of the third direction in the TCP position is determined according to the external force data in the target direction (for example, obtained by an external force sensor, etc.), including: determining the longitudinal axis coordinate position according to the TCP position, and determining the longitudinal axis coordinate travel distance according to the external force data in the target direction; adding the longitudinal axis coordinate position and the longitudinal axis coordinate travel distance to obtain the updated longitudinal axis coordinate position of the TCP.
[0064] Step 106: Control the TCP according to the position adjustment data of the first direction, the second direction, and the third direction of the TCP position and the TCP posture adjustment data.
[0065] Specifically, Converted to the robot base coordinate system The position and posture are sent through the robot arm movement command "servoj".
[0066] That is, send (x base ,y base ,z base ,rx base ,ry base ,rz base ) to control TCP.
[0067] The force-position hybrid control scheme based on visual servo correction provided by the embodiment of the present disclosure, in the force control mode, obtains the TCP position and TCP posture, calculates the target bone channel position and target bone channel posture in the TCP coordinate system according to the NDI data, calculates according to the TCP position and the TCP posture and the target bone channel position and the target bone channel posture, obtains the position error and posture error between the TCP and the target bone channel, when the target coordinate position error is less than the preset first threshold value, determines the position adjustment data and TCP posture adjustment data of the first direction and the second direction in the TCP position according to the position error, the posture error and the preset visual correction range, determines the position adjustment data of the third direction in the TCP position according to the target direction external force data, controls the TCP according to the position adjustment data and TCP posture adjustment data of each direction of the TCP position to ensure that the force control direction is always consistent with the bone channel direction. Using the above technical solution, during the drilling process, the target direction of the robot arm TCP is force controlled to ensure the human-machine collaborative dragging function. In addition, in other directions, the direction and position error of the robot arm TCP and the bone channel are corrected in real time in combination with visual servoing, the system accuracy of drilling is improved, and the range of visual servo correction during the drilling process is specified in combination with the characteristics of the surgery to ensure the safety of the surgery.
[0068] Figure 2 This is a flow chart of another force-position hybrid control method based on visual servo correction provided by an embodiment of the present disclosure. This embodiment further optimizes the force-position hybrid control method based on visual servo correction based on the above embodiment. Figure 2 As shown, the method includes:
[0069] Step 201: In force control mode, obtain the TCP position and TCP posture.
[0070] Step 202: Obtain first NDI data at a first moment, obtain second NDI data at a second moment, and determine NDI data update based on the first NDI data and the second NDI data.
[0071] Step 203: Calculate according to the TCP position and TCP posture and the target bone channel position and target bone channel posture to obtain the position error and posture error between the TCP and the target bone channel.
[0072] Step 204: When the target coordinate position error is less than a preset first threshold value and the attitude error is within a preset first error range, determine the TCP attitude adjustment data; when the position error is within a preset second error range, determine the position adjustment data of the first direction and the second direction in the TCP position.
[0073] Step 205: Determine the position adjustment data of the third direction in the TCP position according to the target direction external force data.
[0074] Step 206: Control the TCP according to the position adjustment data of the first direction, the second direction, and the third direction of the TCP position and the TCP posture adjustment data.
[0075] It should be noted that when the target coordinate position error is greater than or equal to the first threshold and the position error or posture error is not within the visual correction range, the force sensor is used to obtain the target direction external force data, and the position adjustment data in the third direction is updated according to the target direction external force data.
[0076] Specifically, Figure 3 As shown, step 3.1 obtains the robot flange posture and calculates the TCP posture, that is, enters the force control mode, and calculates the robot TCP position and TCP posture (x, y, z, rx, ry, rz); step 3.2 collects NDI data and calculates the position and posture errors between the TCP and the target bone channel; step 3.3 determines whether it has reached the vicinity of the bone surface; if it has reached the vicinity of the bone surface, execute step 3.4 to determine whether the position or posture error is within the visual correction threshold range; if it has not reached the vicinity of the bone surface, execute step 3.7; if the position or posture error is within the visual correction threshold range, execute step 3.5 to move the robot in the direction of reducing the error; step 3.6 determines whether the error is within the lower limit of the threshold; if so, execute step 3.7 to collect force sensor data and obtain external force data; step 3.8 calculates the travel distance of the Y axis; step 3.9 converts the robot base coordinate system to control the movement of the robot.
[0077] As an example scenario, Figure 4 As shown, step 4.1 calculates the TCP position and posture (x, y, z, rx, ry, rz) of the robot arm; step 4.2 determines whether the NDI data is updated; if so, execute step 4.3 to calculate the posture error and position error in the TCP coordinate system; step 4.4 determines whether y_tcp-y_< threshold 1; if yes, execute step 4.5 the posture error and position error exceed the upper threshold limit; if no, execute step 4.6 to determine whether the posture error is within the threshold 2 range; if yes, execute step 4.7 to update the posture rx, ry, rz and corresponding parameters; step 4.8 determines whether the position error is within the threshold range 3; if yes, execute step 4.9 to update the position x and z; step 4.10 calculates the force control y; step 4.11 sends x_base, y_base, z_base, rx_base, ry_base, rz_base. Among them, Figure 4It is also shown that step 4.2 includes step 4.2.1 for collecting the NDI data of the robotic arm and recording ID_pre; step 4.2.1 for collecting the NDI data of the robotic arm and recording ID_new; step 4.2.2 for calculating the absolute value of the difference between ID_pre and ID_new; step 4.2.3 for executing step 4.2.4 to update the NDI data when the absolute value of the difference between ID_pre and ID_new is equal to 0, otherwise step 4.2.5 for the NDI data not being updated.
[0078] Specifically, enter the force control mode, calculate the tcp position and attitude (x, y, z, rx, ry, rz) of the robotic arm; collect the NDI data. Due to the movement speed of the robotic arm at this time, it is necessary to ensure that the collected NDI data is synchronized with the robotic arm data. Determine whether the NDI data is updated by comparing the unique ID of the NDI data; ID(NDI new ) - ID(NDI pre ) = (≠) 0; monitor whether the bone surface is reached. When the bone surface is reached, turn on the vision correction function p tcp -p tunnel < threshold_1; whether the position and attitude error exceeds the range of vision correction.
[0079] If it exceeds, the vision correction function ends and the force control is retained Or Calculate the attitude error of the robotic arm. If the error is within the threshold range, update the attitude (rx, ry, rz); Calculate the position error of the robotic arm. If the error is within the threshold range, update the position (x, z). Since a relatively large position error may trigger the speed protection mechanism of the robotic arm, set the maximum step size for distributed calculation of the force control and update y; p (x,y,z) Convert to the robotic arm base coordinate system to get (x base , y base , z base ), and issue (x base , y base , z base , rx base , rx base , rz base ).
[0080] Therefore, the robotic arm collects NDI data from the optical locator and calculates the position of the robotic arm TCP in real time. When it reaches the vicinity of the bone surface, it enters the servo correction area, and calculates the direction and position error between the TCP and the planned bone channel in real time. The robotic arm moves in the direction in which the error decreases until the error is less than the lower threshold, and updates the coordinate system required for force control to ensure that the force control direction is always consistent with the bone channel direction, thereby improving the system accuracy of drilling and specifying the area where visual servoing occurs, which is beneficial to ensuring safety, as well as controlling the movement speed of the robotic arm to ensure drilling safety.
[0081] Figure 5 This is a schematic diagram of the structure of a force-position hybrid control device based on visual servo correction provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. Figure 5 As shown, the device comprises:
[0082] The first acquisition module 501 is used to acquire the TCP position and TCP posture of the robot arm in the force control mode;
[0083] A first calculation module 502 is used to calculate the target bone channel position and the target bone channel posture in the TCP coordinate system according to the NDI data when the infrared optical positioning NDI data is detected to be updated;
[0084] A second calculation module 503 is used to calculate according to the TCP position and the TCP posture and the target bone tunnel position and the target bone tunnel posture to obtain a position error and a posture error between the TCP and the target bone tunnel;
[0085] A first updating module 504 is used to determine the position adjustment data and TCP attitude adjustment data of the first direction and the second direction of the TCP position according to the position error, the attitude error and a preset visual correction range when the target coordinate position error is less than a preset first threshold;
[0086] A second updating module 505 is used to determine the position adjustment data of the third direction of the TCP position according to the target direction external force data;
[0087] The control module 506 is used to control the TCP according to the position adjustment data of the first direction, the second direction and the third direction of the TCP position and the TCP posture adjustment data.
[0088] Optionally, the device further includes:
[0089] A second acquisition module, used to acquire first NDI data at a first moment;
[0090] A third acquisition module, used to acquire second NDI data at a second moment;
[0091] A determination module is used to determine NDI data update based on the first NDI data and the second NDI data.
[0092] Optionally, the first updating module 504 includes:
[0093] A first determining unit, configured to determine the TCP posture adjustment data when the posture error is within a preset first error range;
[0094] The second determining unit is used to determine the position adjustment data of the first direction and the second direction of the TCP position when the position error is within a preset second error range.
[0095] Optionally, the second determining unit includes:
[0096] Set subunit to set maximum step size;
[0097] A first determining subunit, configured to determine a position error update value according to the position error, the maximum step size and the second error range;
[0098] The second determining subunit is used to determine the position adjustment data of the first direction and the second direction of the TCP position according to the position error update value.
[0099] Optionally, the first determining subunit is specifically configured to:
[0100] When the position error is greater than or equal to a second upper limit value, the position error update value is 0, and / or;
[0101] When the position error is greater than or equal to the sum of the second lower limit value and the maximum step length and is less than the second upper limit value, the position error update value is the maximum step length, and / or;
[0102] When the position error is greater than or equal to the second lower limit value and less than the sum of the second lower limit value and the maximum step length, the position error update value is the position error, and / or;
[0103] When the negative value of the position error greater than the second lower limit value is less than the second lower limit value, the position error update value is 0, and / or;
[0104] When the position error is greater than or equal to the negative value of the maximum step length minus the second lower limit value and less than or equal to the negative value of the second lower limit value, the position error update value is the negative value of the position error, and / or;
[0105] When the position error is greater than or equal to the negative value of the second upper limit value and is less than the negative value of the maximum step length minus the second lower limit value, the position error update value is the negative value of the maximum step length, and / or;
[0106] When the position error is less than the negative value of the second upper limit value, the position error update value is 0.
[0107] Optionally, the second determining subunit is specifically configured to:
[0108] Adding the position error update value to the first direction position in the TCP position to obtain the position adjustment data of the first direction in the TCP position; wherein the first direction position in the TCP position is the cumulative error sum value at a historical moment, and / or;
[0109] The position error update value is added to the second direction position in the TCP position to obtain the position adjustment data of the second direction in the TCP position; wherein the second direction position in the TCP position is the accumulated error sum value at historical moments.
[0110] The force-position hybrid control device based on visual servo correction provided in the embodiments of the present disclosure can execute the force-position hybrid control method based on visual servo correction provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0111] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the force-position hybrid control method based on visual servo correction provided by any embodiment of the present disclosure.
[0112] Figure 6 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 6 , which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The electronic device 600 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0113] like Figure 6As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0114] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0115] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the force-position hybrid control method based on visual servoing correction of the embodiment of the present disclosure are executed.
[0116] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0117] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0118] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0119] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in the force control mode, obtains the TCP position and the TCP posture, calculates the target bone channel position and the target bone channel posture in the TCP coordinate system according to the NDI data, calculates according to the TCP position and the TCP posture and the target bone channel position and the target bone channel posture to obtain the position error and the posture error between the TCP and the target bone channel, and when the target coordinate position error is less than a preset first threshold, determines the position adjustment data and the TCP posture adjustment data in the first direction and the second direction of the TCP position according to the position error, the posture error and the preset visual correction range, determines the position adjustment data in the third direction of the TCP position according to the target direction external force data, and controls the TCP according to the position adjustment data and the TCP posture adjustment data in each direction of the TCP position.
[0120] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0121] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0123] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0124] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0125] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:
[0126] processor;
[0127] a memory for storing instructions executable by the processor;
[0128] The processor is used to read the executable instructions from the memory and execute the instructions to implement any force-position hybrid control method based on visual servo correction as provided in the present disclosure.
[0129] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute any of the force-position hybrid control methods based on visual servo correction provided by the present disclosure.
[0130] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0131] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0132] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A force-position hybrid control device based on visual servo correction, characterized in that: include: The first acquisition module is used to obtain the TCP position and TCP posture of the robot arm in the force control mode; A first calculation module is used to calculate the target bone channel position and target bone channel posture in the TCP coordinate system according to the NDI data; A second calculation module is used to calculate according to the TCP position and the TCP posture and the target bone channel position and the target bone channel posture to obtain a position error and a posture error between the TCP and the target bone channel; A first updating module is used to determine the position adjustment data of the first direction and the second direction of the TCP position and the TCP posture adjustment data according to the position error, the posture error and a preset visual correction range when the target coordinate position error is less than a preset first threshold; A second updating module is used to determine the position adjustment data of the third direction of the TCP position according to the target direction external force data; A control module, used for controlling the TCP according to the position adjustment data of the first direction, the second direction and the third direction of the TCP position and the TCP posture adjustment data; Wherein, the first update module includes: A first determining unit, configured to determine the TCP posture adjustment data when the target coordinate position error is less than a preset first threshold value and the posture error is within a preset first error range, and / or; A second determining unit, configured to determine position adjustment data of a first direction and a second direction in the TCP position when the position error is within a preset second error range; Wherein, the second determining unit includes: Set subunit to set maximum step size; A first determining subunit, configured to determine a position error update value according to the position error, the maximum step size and the second error range; The second determining subunit is used to determine the position adjustment data of the first direction and the second direction of the TCP position according to the position error update value.
2. The force-position hybrid control device based on visual servo correction according to claim 1 is characterized in that: Also includes: A second acquisition module, used to acquire first NDI data at a first moment; A third acquisition module, used to acquire second NDI data at a second moment; A determination module is used to determine NDI data update based on the first NDI data and the second NDI data.
3. The force-position hybrid control device based on visual servo correction according to claim 1 is characterized in that: The first determining subunit is specifically configured to: When the position error is greater than or equal to a second upper limit value, the position error update value is 0, and / or; When the position error is greater than or equal to the sum of the second lower limit value and the maximum step length and is less than the second upper limit value, the position error update value is the maximum step length, and / or; When the position error is greater than or equal to the second lower limit value and less than the sum of the second lower limit value and the maximum step length, the position error update value is the position error, and / or; When the position error is greater than the negative value of the second lower limit value and less than the second lower limit value, the position error update value is 0, and / or; When the position error is greater than or equal to the negative value of the maximum step length minus the second lower limit value, and less than or equal to the negative value of the second lower limit value, the position error update value is the negative value of the position error, and / or; When the position error is greater than or equal to the negative value of the second upper limit value and less than the negative value of the maximum step length minus the second lower limit value, the position error update value is the negative value of the maximum step length, and / or; When the position error is less than the negative value of the second upper limit value, the position error update value is 0.
4. The force-position hybrid control device based on visual servo correction according to claim 1, characterized in that: The second determining subunit is specifically used for: Adding the position error update value to the first direction position in the TCP position to obtain the position adjustment data of the first direction in the TCP position; wherein the first direction position in the TCP position is the cumulative error sum value at a historical moment, and / or; The position error update value is added to the second direction position in the TCP position to obtain the position adjustment data of the second direction in the TCP position; wherein the second direction position in the TCP position is the accumulated error sum value at historical moments.
5. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the force-position hybrid control method based on visual servo correction, including: In force control mode, obtain the TCP position and TCP posture of the robot tool center point; Calculate the target bone tunnel position and target bone tunnel posture in the TCP coordinate system according to the NDI data; Calculate according to the TCP position and the TCP posture and the target bone tunnel position and the target bone tunnel posture to obtain a position error and a posture error between the TCP and the target bone tunnel; When the target coordinate position error is less than a preset first threshold, determining position adjustment data and TCP attitude adjustment data in a first direction and a second direction of the TCP position according to the position error, the attitude error and a preset visual correction range; Determine position adjustment data in a third direction of the TCP position according to the target direction external force data; Controlling the TCP according to the position adjustment data of the first direction, the second direction and the third direction of the TCP position and the TCP posture adjustment data; Wherein, determining the position adjustment data and TCP attitude adjustment data of the first direction and the second direction in the TCP position according to the position error, the attitude error and the preset visual correction range includes: When the posture error is within a preset first error range, determining the TCP posture adjustment data, and / or; When the position error is within a preset second error range, determining position adjustment data of a first direction and a second direction of the TCP position; Wherein, when the position error is within a preset second error range, determining the position adjustment data of the first direction and the second direction of the TCP position includes: Set the maximum step size; Determining a position error update value according to the position error, the maximum step size and the second error range; According to the position error update value, position adjustment data of the first direction and the second direction of the TCP position are determined.
6. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute a force-position hybrid control method based on visual servo correction, including: In force control mode, obtain the TCP position and TCP posture of the robot tool center point; Calculate the target bone tunnel position and target bone tunnel posture in the TCP coordinate system according to the NDI data; Calculate according to the TCP position and the TCP posture and the target bone tunnel position and the target bone tunnel posture to obtain a position error and a posture error between the TCP and the target bone tunnel; When the target coordinate position error is less than a preset first threshold, determining position adjustment data and TCP attitude adjustment data in a first direction and a second direction of the TCP position according to the position error, the attitude error and a preset visual correction range; Determine position adjustment data in a third direction of the TCP position according to the target direction external force data; Controlling the TCP according to the position adjustment data of the first direction, the second direction and the third direction of the TCP position and the TCP posture adjustment data; Wherein, determining the position adjustment data and TCP attitude adjustment data of the first direction and the second direction in the TCP position according to the position error, the attitude error and the preset visual correction range includes: When the posture error is within a preset first error range, determining the TCP posture adjustment data, and / or; When the position error is within a preset second error range, determining position adjustment data of a first direction and a second direction of the TCP position; Wherein, when the position error is within a preset second error range, determining the position adjustment data of the first direction and the second direction of the TCP position includes: Set the maximum step size; Determining a position error update value according to the position error, the maximum step size and the second error range; According to the position error update value, position adjustment data of the first direction and the second direction of the TCP position are determined.
Citation Information
Patent Citations
Mechanical arm calibration method and device
CN114310880A
Position and attitude controlling method using visual servo
JP2003117867A
