Disclosure of Invention
In view of the above, the embodiments of the present application provide a calibration device, a method and a storage medium for calibrating a tool.
In a first aspect, an embodiment of the present application provides a calibration device, including: a base and a calibration structure; the calibration structure is arranged on the base and is used for accommodating a tool to be calibrated so as to calibrate the tool to be calibrated; the base is also provided with a first mark, the first mark is used for being sensed by the sensor module to obtain pose data indicating the pose of the calibrating device, the pose data comprises position data of the calibrating device and pose data of the calibrating device, and the pose data are used for calibrating the tool to be calibrated in cooperation with the calibrating structure.
Optionally, in a specific embodiment, the calibration structure includes a calibration slot, the calibration slot is disposed on top of the base, and the pose data of the calibration slot relative to the first identifier is known data.
Optionally, in a specific embodiment, the calibration device further comprises a pressure module for applying pressure to the tool to be calibrated to fix the tool to be calibrated in the calibration structure.
Optionally, in a specific embodiment, the calibration device further includes a gland disposed on top of the base for mounting the pressure module.
Optionally, in a specific embodiment, the pressure module comprises an adjusting element, a connecting element and a pressing element;
the connecting element penetrates the gland, the upper end of the connecting element extends out of the top of the gland, the lower end is positioned in the calibration structure;
the pressing element is connected with the lower end of the connecting element and is used for applying pressure to the tool to be calibrated so as to fix the tool to be calibrated;
The adjusting element is connected with the upper end of the connecting element and is used for adjusting the pressure applied by the pressing element to the tool to be calibrated.
Optionally, in a specific embodiment, the calibration structure further includes at least one calibration hole, the calibration hole is disposed on the base, and the calibration hole is located with respect to the pose data of the first marker.
Optionally, in a specific embodiment, the base is provided with a groove dividing the base into a calibration plate and a base body; the calibration hole is positioned on the calibration plate and penetrates through the calibration plate, so that the tool to be calibrated passes through the calibration hole and the groove and abuts against the base body.
Alternatively, in a specific embodiment, the diameter data of each calibration hole is different, and a number for indicating the diameter data of the calibration hole is provided beside the calibration hole.
Optionally, in a specific embodiment, the calibration device includes at least three first marks, where the first marks are disposed on top of the base, and are in a shape of a circle, and the circle is filled with black and white two-color intervals.
Optionally, in a specific embodiment, at least one verification groove is further provided on the base, where the verification groove is used for verifying the calibration precision of the calibration device, and the pose data of the verification groove relative to the first identifier is known data.
Optionally, in a specific embodiment, the bottom of the base is further provided with a hand-held portion for fixing the calibration device by holding.
In a second aspect, an embodiment of the present application provides a calibration system, including: the calibration device according to any one of the first aspects, a sensor module, a tool to be calibrated and a calculation module; the tool to be calibrated is fixed in a calibration structure of the calibration device; the sensor module is in communication connection with the computing module;
The sensor module is used for generating first pose data of the first mark relative to the sensor module according to the first mark sensed on the calibration device, wherein the first pose data comprises position data of the first mark relative to the sensor module and pose data of the first mark relative to the sensor module;
the sensor module is further used for generating second pose data of the second mark relative to the sensor module according to the second mark sensed on the tool to be calibrated, wherein the second pose data comprises position data of the second mark relative to the sensor module and pose data of the second mark relative to the sensor module;
the computing module is used for calibrating the tool to be calibrated according to the first pose data and the second pose data.
In a third aspect, an embodiment of the present application provides a calibration method, including:
generating first pose data of the first mark relative to the sensor module according to the first mark on the calibration device sensed by the sensor module, wherein the first pose data comprises position data of the first mark relative to the sensor module and pose data of the first mark relative to the sensor module;
Generating second pose data of the second mark relative to the sensor module according to the second mark sensed by the sensor module on the tool to be calibrated, wherein the second pose data comprises position data of the second mark relative to the sensor module and pose data of the second mark relative to the sensor module;
and calibrating the tool to be calibrated according to the first pose data and the second pose data.
Optionally, in a specific embodiment, calibrating the tool to be calibrated according to the first pose data and the second pose data includes:
Obtaining third pose data of the first mark relative to the second mark according to the first pose data and the second pose data, wherein the third pose data comprises position data of the first mark relative to the second mark and pose data of the first mark relative to the second mark;
Reading pose data of a calibration hole which is matched with the end diameter of a tool to be calibrated relative to a first mark;
and obtaining the target position and attitude data of the end part of the tool to be calibrated relative to the second mark according to the third position and attitude data of the calibration hole which is matched with the diameter of the end part of the tool to be calibrated relative to the first mark.
Optionally, in a specific embodiment, the second pose data includes initial second pose data and multiple sets of rotation second pose data, the initial second pose data is used for indicating pose data of the second identifier relative to the sensor module when the tool to be calibrated is at the initial position, and the multiple sets of rotation second pose data are used for indicating pose data of the second identifier relative to the sensor module when the tool to be calibrated is rotated at different angles in the calibration slot.
Optionally, in a specific embodiment, calibrating the tool to be calibrated according to the first pose data and the second pose data includes:
Obtaining fourth pose data of the first mark relative to the second mark at the initial position according to the first pose data and the initial second pose data, wherein the fourth pose data comprises position data of the first mark relative to the second mark at the initial position and pose data of the first mark relative to the second mark at the initial position;
reading pose data of the calibration groove relative to the first mark;
Obtaining pose data of the end part of the tool to be calibrated relative to the first mark according to the plurality of sets of rotating second pose data and the pose data of the calibration groove relative to the first mark;
And obtaining the target pose data of the end part of the tool to be calibrated relative to the second mark according to the pose data of the end part of the tool to be calibrated relative to the first mark and the fourth pose data.
Optionally, in a specific embodiment, obtaining pose data of the end of the tool to be calibrated relative to the first identifier according to the sets of rotation second pose data and pose data of the calibration slot relative to the first identifier includes:
fitting the plurality of groups of rotation second pose data through a least square method to obtain pose data of the end part of the tool to be calibrated relative to the sensor module;
and obtaining pose data of the end part of the tool to be calibrated relative to the first mark according to the pose data of the end part of the tool to be calibrated relative to the sensor module and the first pose data.
Optionally, in a specific embodiment, the method further comprises:
Reading pose data of the verification groove relative to the first mark;
Abutting the end part of the tool to be calibrated in the verification groove, acquiring pose data of the first mark relative to the sensor module through the sensor module, and acquiring pose data of the second mark relative to the sensor module;
obtaining pose data of the verification groove relative to the sensor module according to pose data of the verification groove relative to the first mark and pose data of the first mark relative to the sensor module;
Obtaining pose data of the verification groove relative to the second mark according to pose data of the verification groove relative to the sensor module and pose data of the second mark relative to the sensor module;
And determining errors of the calibration pose data according to the pose data of the verification groove relative to the second mark.
In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, which when executed by a processor, implements a method as in any of the third aspects.
The calibration device provided by the embodiment of the application has the advantages of small volume, capability of being fixed by hand, convenience in use, capability of calibrating the relative pose relation between the characteristic points of the fixed positions on various custom surgical tools and the surgical tools, capability of effectively avoiding the introduction of machining errors, deformation errors and the like of the tools into a surgical navigation system, and capability of improving the navigation precision.
Detailed Description
The implementation of the embodiments of the present invention will be further described below with reference to the accompanying drawings.
Example 1
Referring to fig. 1, an embodiment of the present application provides a calibration device, including: a base 10 and a calibration structure 20; the calibration structure 20 is arranged on the base 10, and the calibration structure 20 is used for accommodating a tool to be calibrated so as to calibrate the tool to be calibrated; the base 10 is further provided with a first identifier 101, the first identifier 101 is used for being sensed by the sensor module to obtain pose data indicating the pose of the calibrating device, so as to coordinate the calibrating structure 20 to calibrate the tool to be calibrated, and the pose data comprises position data of the calibrating device and pose data of the calibrating device.
Specifically, the size of the base 10 may be 95mm by 70mm by 48mm, so that the base is convenient to hold by hand, and the calibration process of the calibration tool to be calibrated by using the calibration device is more convenient and quick. The first marks 101 are images that can be identified by a sensor module, such as a camera, etc., preferably, the first marks 101 can be at least 3, referring to fig. 2, 4 first marks 101 are arranged on the top of the base 10 of the calibration device in fig. 2, the first marks 101 are in a circle shape, the circle is equally divided into 4 circles, and two black and white spaces are filled, so that the sensor module can be conveniently identified, although only an exemplary illustration is provided, the first marks 101 can be in other shapes and colors as long as the first marks can be identified by the sensor module, and the application is not limited to this.
The tool to be calibrated is generally needle-shaped, a characteristic point is arranged at a fixed position of the tool to be calibrated, the sensor module can sense the position data and the posture data of the characteristic point, and the calibration of the tool to be calibrated is to determine the position data and the posture data of the end part of the tool to be calibrated relative to the characteristic point, namely the position data and the posture data of the needle point of the tool to be calibrated relative to the characteristic point. Therefore, in the actual operation process, after the position data and the posture data of the characteristic points are obtained through the sensor module, the position data and the posture data of the needle point of the tool to be calibrated can be obtained through calculation, so that the tool to be calibrated can be conveniently navigated.
The sensor module may be a camera, a video camera, an image recording device, a position sensor, an attitude sensor, or the like capable of sensing the position and the attitude of the first mark 101.
Referring to fig. 3, alternatively, in a specific embodiment, the calibration structure 20 includes a calibration slot 201, the calibration slot 201 is disposed on top of the base 10, and the pose data of the calibration slot 201 relative to the first marker 101 is known data.
In detail, when the tool to be calibrated is calibrated through the calibration slot 201, the needle-shaped tool to be calibrated may be placed in the calibration slot 201, the end of the tool to be calibrated abuts against the slot wall of the calibration slot 201, the pose data of the calibration slot 201 relative to the first identifier 101 may be the position data and the pose data of the slot wall relative to the first identifier 101, and after the pose data of the first identifier 101 is obtained through the sensor module, the position data and the pose data of the slot wall may be obtained through calculation.
Optionally, in a specific embodiment, the calibration device further comprises a pressure module 30, the pressure module 30 being adapted to apply pressure to the tool to be calibrated to fix the tool to be calibrated in the calibration structure 20.
Specifically, the pressure module 30 may be used to apply pressure to the tool to be calibrated to fix the tool to be calibrated in the calibration slot 201, so that the tool to be calibrated is relatively fixed with the calibration device during the calibration process, and the calibration accuracy is improved.
Optionally, in a specific embodiment, the calibration device further comprises a gland 40, the gland 40 being arranged on top of the base 10 for mounting the pressure module 30.
Alternatively, in a specific embodiment, the pressure module 30 comprises an adjusting element 301, a connecting element 302 and a pressing element 303;
the connecting element 302 penetrates the gland 40, the upper end of the connecting element extends out of the top of the gland 40, and the lower end of the connecting element is positioned in the calibration structure 20;
A pressing member 303 is connected to a lower end of the connection member 302, the pressing member 303 being configured to apply pressure to the tool to be calibrated to fix the tool to be calibrated;
the adjusting element 301 is connected to the upper end of the connecting element 302, the adjusting element 301 being used to adjust the pressure applied by the pressing element 303 to the tool to be calibrated.
Preferably, the adjusting element 301 may be a handle, the connecting element 302 may be a link, and the pressing element 303 may be a press block; wherein: the connecting rod penetrates through the gland 40, the upper end of the connecting rod extends out of the top end of the gland 40, and the lower end of the connecting rod is positioned in the calibration groove 201; the handle is connected with the upper end of the connecting rod and used for controlling the pressing block to rise or fall; the pressing block is connected with the lower end of the connecting rod and is used for applying pressure to the tool to be calibrated when the tool to be calibrated is lowered so as to fix the tool to be calibrated in the calibration groove 201. In a specific embodiment, the pressing block can be controlled to be raised or lowered by rotating the handle so as to press the tool to be calibrated in the calibration slot 201, for example, the handle can be fixedly connected with the connecting rod, the pressing block is fixedly connected with the connecting rod, and the connecting rod is in threaded connection with the pressing cover 40, so that the pressing block can be raised or lowered correspondingly when the handle is rotated. Of course, the description is illustrative only and is not intended to limit the application thereto.
Optionally, in a specific embodiment, the calibration structure 20 further comprises at least one calibration hole 202, the calibration hole 202 being provided on the base 10, the position of the calibration hole 202 relative to the pose data of the first marker 101 being known.
Referring to fig. 4, optionally, in a specific embodiment, the base 10 is provided with a groove 102 dividing the base 10 into a calibration plate 103 and a base body 104; the calibration hole 202 is located on the calibration plate 103 and penetrates the calibration plate 103 so that the tool to be calibrated passes through the calibration hole 202 and the groove 102 and abuts against the base body 104.
In detail, when the calibration hole 202 is used for calibrating the tool to be calibrated, the needle-shaped tool to be calibrated can be first passed through the calibration hole 202 and the groove 102 and is abutted against the base main body 104, the pose data of the calibration hole 202 relative to the first mark 101 can be the position data and the pose data of the projection of the center of the calibration hole 202 on the base main body 104 relative to the first mark 101, and after the pose data of the first mark 101 and the pose data of the feature point on the tool to be calibrated are obtained through the sensor module, the position data and the pose data of the projection of the feature point on the tool to be calibrated relative to the center of the calibration hole 202 on the base main body 104, namely the position data and the pose data of the feature point on the tool to be calibrated relative to the end of the tool to be calibrated can be obtained through calculation. The division of the base 10 into the calibration plate 103 and the recess 102 of the base body 104 can be used to confirm whether the end of the tool to be calibrated is in abutment against the base body 104, which is advantageous for improving the accuracy of the calibration.
Alternatively, in one specific embodiment, the diameter data of each calibration hole 202 is different, and a number for indicating the diameter data of the calibration hole 202 is provided beside the calibration hole 202.
Specifically, the number and diameter of the calibration holes 202 may be set according to actual needs, and in a specific embodiment, the number of the calibration holes may be set to 14, and the diameter parameters are respectively:
1.0mm,2.0mm,2.5mm,2.7mm,3.0mm,3.2mm,3.5mm,4.0mm,4.5mm,5.0mm,6.0mm,6.5mm,7.5mm,10mm, these diameter parameters are typical of some tools to be calibrated, and are merely illustrative and not meant to limit the application thereto. Thus, the calibration process can be quicker and more accurate.
Optionally, in a specific embodiment, at least one verification groove 105 is further provided on the base 10, where the verification groove 105 is used to verify the calibration accuracy of the calibration device, and the pose data of the verification groove 105 relative to the first identifier 101 is known data.
In detail, the verification groove 105 may be hemispherical or conical, and is used for calculating the calibration precision after calibrating the position data and the posture data of the feature points on the tool to be calibrated relative to the end of the tool to be calibrated, specifically, the end of the tool to be calibrated may be abutted against the groove bottom of the verification groove 105, the posture data of the first identifier 101 and the posture data of the second identifier may be obtained through the sensor module, the position data of the verification groove 105 relative to the first identifier 101 may be the position data of the groove bottom of the verification groove 105 relative to the first identifier 101, so that the position data of the groove bottom of the verification groove 105, that is, the position data of the end of the tool to be calibrated, may be obtained through calculation, and meanwhile, the position data of the end of the tool to be calibrated obtained through calculation of the second identifier may be also obtained through calculation, and the position data of the end of the tool to be calibrated through calculation of the second identifier may be compared with the position data of the end of the tool to be calibrated through calculation of the groove bottom of the verification groove 105, so that the calibration precision may be obtained. Preferably, the comparison result can be divided into a plurality of grades, and different grades correspond to different calibration precision, so that the calibration precision can be clearly represented.
Optionally, in one embodiment of the present application, the bottom of the base 10 is further provided with a hand-held portion 106.
Therefore, the portable handheld device can be conveniently held by a user, and is favorable for improving the use experience of the user.
In the present application, the expression "pose data of a with respect to B" may be defined as follows: and A, pose data in a coordinate system established by taking B as a reference. The rule of the first identifier 101 coordinate system established based on B is known, that is, the pose data of the coordinate system established based on B in the C coordinate system can be obtained through the pose data of B in the C coordinate system, and the pose data of B in the C coordinate system can also be obtained through the pose data of the coordinate system established based on B in the C coordinate system. The application is not limited to the rule of specifically establishing the coordinate system.
Three coordinate systems exist in the calibration process, which are respectively: a coordinate system { C } established with reference to the sensor module, a coordinate system { M1} established with reference to the first identifier 101, and a coordinate system { M2} established with reference to the feature points on the tool to be calibrated, i.e., the second identifier. The calibration process of the tool to be calibrated is a process of confirming pose data of the end part of the tool to be calibrated in a coordinate system { M2} established by taking the second mark as a reference.
Example two
The embodiment of the application provides a calibration system, which comprises: the device comprises a calibration device, a sensor module, a tool to be calibrated and a calculation module; the tool to be calibrated is fixed in the calibration structure 20 of the calibration device; the sensor module is in communication connection with the computing module;
The sensor module is used for generating first pose data of the first mark 101 relative to the sensor module according to the first mark 101 on the sensed calibration device, wherein the first pose data comprise position data of the first mark 101 relative to the sensor module and pose data of the first mark 101 relative to the sensor module;
the sensor module is further used for generating second pose data of the second mark relative to the sensor module according to the second mark sensed on the tool to be calibrated, wherein the second pose data comprises position data of the second mark relative to the sensor module and pose data of the second mark relative to the sensor module;
the computing module is used for calibrating the tool to be calibrated according to the first pose data and the second pose data.
Specifically, the second identifier is the feature point of the tool to be calibrated. The computing module may be a computer, a mobile phone or other computer device, and the sensor module sends the sensed pose data of the first identifier 101 and/or the sensed pose data of the second identifier to the computing module so that the computing module can calibrate the tool to be calibrated, and the specific computing process is referred to in the third embodiment.
Example III
Referring to fig. 5, an embodiment of the present application provides a calibration method, including:
s501: generating first pose data of the first mark 101 relative to the sensor module according to the first mark 101 on the calibration device sensed by the sensor module, wherein the first pose data comprises position data of the first mark 101 relative to the sensor module and pose data of the first mark 101 relative to the sensor module;
Specifically, the first pose data may be pose data of the first identifier 101 in { C }, and the first pose data may be directly obtained through the sensor module.
S502: generating second pose data of the second mark relative to the sensor module according to the second mark sensed by the sensor module on the tool to be calibrated, wherein the second pose data comprises position data of the second mark relative to the sensor module and pose data of the second mark relative to the sensor module;
Specifically, the second pose data may be pose data of the second identifier in { C }, and the second pose data may be directly obtained through the sensor module.
S503: and calibrating the tool to be calibrated according to the first pose data and the second pose data.
For convenience of description, the conversion relations that can define different coordinate systems are represented by the following symbols: the conversion relationship from { M1} to { C } is described asThe conversion relationship from { C } to { M1} is described asThe role of the conversion relation of the known coordinate system is described here: for example, if knownThe pose data of the second identifier in { M1} can be converted into pose data of the second identifier in { C }, and other conversion relationships are similar, and are not described herein.
Knowing the conversion relation of { M1} to { C }The conversion relation of { C } to { M1} can be obtained from the following formula:
Wherein the method comprises the steps of Refers to the conversion relationship from { C } to { M1},Refers to the rotation matrix from { M1} to { C }, CpM1o refers to the translation matrix from { M1} to { C }, and the symbol appearing hereinafter has the same meaning and will not be described again
Optionally, in a specific embodiment, the second pose data includes initial second pose data and multiple sets of rotation second pose data, where the initial second pose data is used to indicate pose data of the second identifier relative to the sensor module when the tool to be calibrated is in the initial position, and the multiple sets of rotation second pose data are used to indicate pose data of the second identifier relative to the sensor module when the tool to be calibrated is rotated in the calibration slot 201 by different angles.
Specifically, the pose data of the second identifier in { C } can be determined as initial second pose data relative to the pose data of the sensor module when the tool to be calibrated is at the initial position, i.e., the pose data of the second identifier in { C } is taken as initial second pose data when the tool to be calibrated is at the initial position; in the calibration process, the tool to be calibrated is rotated in the calibration slot 201 for multiple times, so that the track of the second mark forms a circle, the center of the circle is located on the straight line where the end part of the tool to be calibrated is located, and the pose data of the end part of the tool to be calibrated in { C } or { M1} can be obtained by calculating the pose data of the center in { C } or { M1 }. Because the tool to be calibrated rotates for many times in the calibration process, a plurality of coordinate systems are established by taking the second mark as a reference, and when the tool to be calibrated is at the initial position, the coordinate system established by taking the second mark as the reference is defined as { M2}.
Referring to fig. 6, optionally, in a specific embodiment, calibrating the tool to be calibrated according to the first pose data and the second pose data includes:
S601: obtaining fourth pose data of the first mark 101 relative to the second mark at the initial position according to the first pose data and the initial second pose data, wherein the fourth pose data comprises position data of the first mark 101 relative to the second mark at the initial position and pose data of the first mark 101 relative to the second mark at the initial position;
That is, obtaining pose data of the first identifier 101 in { M2} from pose data of the first identifier 101 in { C } and pose data of the second identifier in { C } includes:
a. converting the position data of the first identity 101 in { C } into position data of the sensor module in { M1 }:
b. Obtaining second pose data marked in { M1} according to the pose data of the sensor module in { M1} and the pose data marked in { C }:
c, obtaining pose data of the first mark 101 in { M2} according to the pose data of the second mark in { M1 }:
S602: reading pose data of the calibration groove 201 relative to the first mark 101;
S603: obtaining pose data of the end part of the tool to be calibrated relative to the first mark 101 according to the plurality of sets of rotating second pose data and the pose data of the calibration groove 201 relative to the first mark 101;
optionally, in a specific embodiment, obtaining the pose data of the end of the tool to be calibrated relative to the first marker 101 according to the sets of rotation second pose data and the pose data of the calibration slot 201 relative to the first marker 101 includes:
fitting the plurality of groups of rotation second pose data through a least square method to obtain pose data of the end part of the tool to be calibrated relative to the sensor module;
specifically, the tool to be calibrated is rotated in the calibration slot 201 for multiple times in the calibration process, so that the track of the second mark forms a circle, the center of the circle falls on a straight line where the end of the tool to be calibrated is located, the plane where the circle is located is perpendicular to the upper end face of the base 10, and an equation of the circle can be fitted on a two-dimensional plane.
Ignoring the change of the position coordinates of the second mark in { C } in the direction perpendicular to the plane in which the circle lies, a plurality of sets of position data are set as (x 1,y1),(x2,y2),…,(xn,yn), where n is a positive integer.
The general equation of a circle is x 2+y2 +ax+by+c=0, and the center coordinates areWherein a, b and c are undetermined parameters, and the error equation can be expressed as the equation of a circle where the position data is located by least square fitting:
Order the I.e.
Is provided with
Then it is possible to obtain:
And (3) solving to obtain:
Substituting the multiple sets of rotation second pose data can calculate the coordinates of the circle center in the two directions { C }.
The center of the circle is mapped to the wall of the calibration slot 201 against which the end of the tool to be calibrated is abutted to obtain the coordinate of the last direction. The coordinate data thus obtained are the position data of the tip of the tool to be calibrated in the camera coordinate system. Specifically, the position data and the position data in { M1} of the groove wall of the calibration groove 201 against which the end of the tool to be calibrated is abutted can be calculatedAnd mapping the circle center of a circle formed by the rotation of the second mark to the groove wall of the calibration groove 201 against which the end part of the tool to be calibrated abuts to obtain the coordinate of the last direction, namely obtaining the pose data of the end part of the tool to be calibrated in { C }, namely the pose data of the end part of the tool to be calibrated relative to the sensor module.
And obtaining the pose data of the end part of the tool to be calibrated relative to the first mark 101 according to the pose data of the end part of the tool to be calibrated relative to the sensor module and the first pose data.
That is, the pose data of the end part of the tool to be calibrated in { M1} is obtained according to the pose data of the end part of the tool to be calibrated in { C } and the pose data of the first mark 101 in { C }. The specific calculation method is the same as the calculation method for obtaining the pose data of the first identifier 101 in { M2} according to the pose data of the first identifier 101 in { C } and the pose data of the second identifier in { C }, and will not be described here again.
It should be noted that: or converting the multiple sets of rotation second pose data into multiple sets of pose data with second marks in { M1}, and calculating the coordinate of the last direction of the end part of the tool to be calibrated by combining the pose data in { M1} of the groove wall of the calibration groove 201 against the end part of the tool to be calibrated.
S604: and obtaining the target pose data of the end part of the tool to be calibrated relative to the second mark according to the pose data and the fourth pose data of the end part of the tool to be calibrated relative to the first mark 101.
The specific calculation method is the same as the calculation method for obtaining the pose data of the second mark in { M1} according to the pose data of the sensor module in { M1} and the pose data of the second mark in { C }, and is not repeated here.
Referring to fig. 7, optionally, in a specific embodiment, calibrating the tool to be calibrated according to the first pose data and the second pose data includes:
s701: obtaining third pose data of the first identifier 101 relative to the second identifier according to the first pose data and the second pose data, wherein the third pose data comprises position data of the first identifier 101 relative to the second identifier and pose data of the first identifier 101 relative to the second identifier;
That is, the pose data of the first marker 101 in { M2} is obtained from the pose data of the first marker 101 in { C } and the pose data of the second marker in { C }.
S702: reading pose data of a calibration hole 202 which is matched with the end diameter of a tool to be calibrated relative to the first mark 101;
Specifically, the pose data of the end diameter of the tool to be calibrated, which is adapted to the end diameter of the calibration hole 202, may be position data and pose data of a projection of the center of the calibration hole 202 on the base body 104, which is projected in { M1} on the base body 104, of the first marker 101, that is, pose data of the end of the tool to be calibrated, which is projected in { M1 }.
S703: and obtaining the target position data of the end part of the tool to be calibrated relative to the second mark according to the third position data and the position data of the calibration hole 202 which is matched with the diameter of the end part of the tool to be calibrated relative to the first mark 101.
Namely, the pose data of the end part of the tool to be calibrated in { M2} is obtained according to the pose data of the first identifier 101 in { M2} and the pose data of the center of the calibration hole 202 in { M1} projected on the base body 104, and the specific calculation method is the same as the calculation method for obtaining the pose data of the second identifier in { M1} according to the pose data of the sensor module in { M1} and the pose data of the second identifier in { C }, and is not repeated here.
Referring to fig. 8, optionally, in a specific embodiment, the method further includes:
s801: reading pose data of the verification groove 105 relative to the first mark 101;
Specifically, the pose data of the verification groove 105 with respect to the first mark 101 may be pose data of the groove bottom of the verification groove 105 with respect to the first mark 101, that is, pose data of the groove bottom of the verification groove 105 in { M1 }.
S802: abutting the end part of the tool to be calibrated in the verification groove 105, acquiring pose data of the first mark 101 relative to the sensor module through the sensor module, and acquiring pose data of the second mark relative to the sensor module;
Namely pose data of the first identifier 101 in { C } and pose data of the second identifier in { C }.
S803: obtaining pose data of the verification groove 105 relative to the sensor module according to the pose data of the verification groove 105 relative to the first identifier 101 and the pose data of the first identifier 101 relative to the sensor module;
Namely, the pose data of the bottom of the verification groove 105 in { C } is obtained according to the pose data of the bottom of the verification groove 105 in { M1} and the pose data of the first identifier 101 in { C }, and the specific calculation method is the same as the calculation method for obtaining the pose data of the second identifier in { M1} according to the pose data of the sensor module in { M1} and the pose data of the second identifier in { C }, and is not repeated here.
S804: obtaining pose data of the verification groove 105 relative to the second identifier according to pose data of the verification groove 105 relative to the sensor module and pose data of the second identifier relative to the sensor module;
Namely, the pose data of the bottom of the verification groove 105 in { M2} is obtained according to the pose data of the bottom of the verification groove 105 in { C } and the pose data of the second identifier in { C }, and the specific calculation method is the same as the calculation method for obtaining the pose data of the first identifier 101 in { M2} according to the pose data of the first identifier 101 in { C } and the pose data of the second identifier in { C }, and is not repeated here.
S805: an error of the pose data is determined from the pose data of the verification recess 105 relative to the second identifier.
Specifically, the pose data of the verification groove 105 relative to the second identifier is pose data of the verification groove 105 in { M2}, that is, pose data of the end of the tool to be calibrated in { M2 }. The difference between the position and posture data of the verification groove 105 relative to the second mark and the calibration position and posture data reflects the calibration precision, the larger the difference is, the worse the calibration precision is, the difference between the position and posture data of the verification groove 105 relative to the second mark and the calibration position and posture data can be quantized, the calibration precision can be graded, and the calibration precision can be visualized on a graphical interface, so that the calibration precision can be visually presented.
Example IV
The embodiment of the application provides a storage medium, on which a computer program is stored, which when executed by a processor, implements the method according to any one of the embodiments.
The storage medium of embodiments of the present application exist in a variety of forms including, but not limited to:
(1) A mobile communication device: such devices are characterized by mobile communication capabilities and are primarily aimed at providing voice, data communications. Such terminals include: smart phones (e.g., iPhone), multimedia phones, functional phones, and low-end phones, etc.
(2) Ultra mobile personal computer device: such devices are in the category of personal computers, having computing and processing functions, and generally also having mobile internet access characteristics. Such terminals include: PDA, MID, and UMPC devices, etc., such as iPad.
(3) Portable entertainment device: such devices may display and play multimedia content. The device comprises: audio, video players (e.g., iPod), palm game consoles, electronic books, and smart toys and portable car navigation devices.
(4) Other electronic devices with data interaction functions.
Thus, particular embodiments of the present subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may be advantageous.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable GATE ARRAY, FPGA)) is an integrated circuit whose logic functions are determined by user programming of the device. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler (logic compiler)" software, which is the same as a software compiler used in program development and writing, and the original code before being compiled is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but HDL is not just one but a plurality of kinds, such as ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language), and VHDL (Very-High-SPEED INTEGRATED Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application SPECIFIC INTEGRATED Circuits (ASICs), programmable logic controllers, and embedded microcontrollers, examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular transactions or implement particular abstract data types. The application may also be practiced in distributed computing environments where transactions are performed by remote processing devices that are connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.