Method and related product for navigation based on two objects
By using the first vector and the transformation relationship based on the two object navigation method, the complexity of determining the transformation relationship between the two coordinate systems is reduced, and the accuracy and success rate of the operation are improved.
Patent Information
- Application Number
- CN202510660815.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-05-22
AI Technical Summary
In the prior art, it is difficult to determine that the conversion relationship between two coordinate systems is complex and precise operation is difficult.
By using the first vector and the conversion relationship based on the two object navigation method, the conversion relationship is determined, including obtaining the first vector, determining the second conversion relationship, converting it into a third coordinate system, determining the third conversion relationship, and finally determining the first conversion relationship.
Reduces the complexity of determining the conversion relationship between two coordinate systems, and improves the accuracy and success rate of the operation.
Smart Images

Figure CN120190830B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of medical devices, and particularly to a method and related products for navigation based on two objects. Background Art
[0002] In many fields involving spatial positioning and measurement, such as industrial manufacturing, robot operation, and computer vision, accurately determining the transformation relationship between two coordinate systems is the key to achieving precise operation. For example, in an industrial automation production line, the transformation between the robot coordinate system and the workpiece coordinate system affects the precise grasping and placement of parts; in computer vision applications, the transformation between the camera coordinate system and the world coordinate system directly affects the accuracy of target recognition and positioning.
[0003] However, the complexity of determining the transformation relationship between two coordinate systems through traditional methods is high. Summary of the Invention
[0004] This application provides a method and related products for navigation based on two objects to reduce the complexity of determining the first transformation relationship.
[0005] In a first aspect, a method for navigation based on two objects is provided. The method is used to determine a first transformation relationship between a first coordinate system and a second coordinate system based on a first object and a second object. The first coordinate system includes a first coordinate axis and a second coordinate axis. The coordinate axis corresponding to the first coordinate axis in the second coordinate system is a third coordinate axis, and the coordinate axis corresponding to the second coordinate axis in the second coordinate system is a fourth coordinate axis. The method includes:
[0006] Obtain a first vector, where the first vector represents the third coordinate axis in the first coordinate system, and the first vector is determined based on a first position of the first object in the first coordinate system and a second position of the second object in the first coordinate system;
[0007] Based on the first coordinate axis and the first vector, determine a second transformation relationship, where the second transformation relationship is used to align the first coordinate axis with the third coordinate axis;
[0008] Based on the second transformation relationship, convert the first coordinate system into a third coordinate system, where the third coordinate system includes a fifth coordinate axis, and the fifth coordinate axis is obtained by transforming the second coordinate axis;
[0009] Based on the fifth coordinate axis and a second vector, determine a third transformation relationship, where the second vector represents the fourth coordinate axis in the third coordinate system, and the third transformation relationship is used to align the fifth coordinate axis with the fourth coordinate axis;
[0010] Determine the first conversion relationship based on the second conversion relationship and the third conversion relationship.
[0011] Combined with any implementation manner of the present application, the first coordinate system is the coordinate system of the tracking device, both the first object and the second object are objects that can be tracked by the tracking device, and the second coordinate system is constructed based on the first object;
[0012] The method further includes:
[0013] Determine the fourth conversion relationship between the first coordinate system and the fourth coordinate system based on the first conversion relationship and the first relative position relationship, where the first relative position relationship is the relative position relationship between the first object and the end of the target guide rail, and the fourth coordinate system is a coordinate system constructed based on the end;
[0014] Obtain the target path and the third vector in the first coordinate system, where the third vector represents the target guide rail in the first coordinate system;
[0015] Determine the first pose of the end based on the fourth conversion relationship, the target path, and the third vector. When the pose of the end is the first pose, the target guide rail coincides with the target path.
[0016] Combined with any implementation manner of the present application, the target guide rail is connected to the first structure of the robotic arm, and the method further includes:
[0017] Determine the second pose of the first structure based on the first pose and the second relative position relationship, where the second relative position relationship is the relative position relationship between the first structure and the end. When the pose of the first structure is the second pose, the pose of the end is the first pose;
[0018] Send a control instruction to the robotic arm, where the control instruction is used to instruct the robotic arm to control the pose of the first structure to be the second pose.
[0019] Combined with any implementation manner of the present application, the third coordinate axis passes through the first object and the second object. The obtaining of the first vector includes:
[0020] Determine the vector passing through the first object and the second object based on the first position and the second position;
[0021] Determine the first vector based on the vector passing through the first object and the second object.
[0022] Combined with any implementation manner of the present application, the determining of the second conversion relationship based on the first coordinate axis and the first vector includes:
[0023] Determine a first rotation matrix based on the first coordinate axis and the first vector, where the first rotation matrix is used to align the first coordinate axis with the third coordinate axis;
[0024] Determine the first transformation relationship based on the first rotation matrix and the first translation amount, where the first translation amount is the translation amount between the first coordinate system and the second coordinate system.
[0025] Combined with any implementation manner of the present application, the second coordinate system is constructed based on the first object, and the first translation amount is determined based on the first position.
[0026] In a second aspect, a device for navigation based on two objects is provided. The device for navigation based on two objects is used to determine the first transformation relationship between the first coordinate system and the second coordinate system based on the first object and the second object. The first coordinate system includes a first coordinate axis and a second coordinate axis. The coordinate axis corresponding to the first coordinate axis in the second coordinate system is the third coordinate axis, and the coordinate axis corresponding to the second coordinate axis in the second coordinate system is the fourth coordinate axis. The device for navigation based on two objects includes:
[0027] An acquisition unit, configured to acquire a first vector, where the first vector represents the third coordinate axis in the first coordinate system, and the first vector is determined based on the first position of the first object in the first coordinate system and the second position of the second object in the first coordinate system;
[0028] A determination unit, configured to determine a second transformation relationship based on the first coordinate axis and the first vector, where the second transformation relationship is used to align the first coordinate axis with the third coordinate axis;
[0029] A conversion unit, configured to convert the first coordinate system into a third coordinate system based on the second transformation relationship. The third coordinate system includes a fifth coordinate axis, and the fifth coordinate axis is obtained by converting the second coordinate axis;
[0030] The determination unit is further configured to determine a third transformation relationship based on the fifth coordinate axis and a second vector, where the second vector represents the fourth coordinate axis in the third coordinate system, and the third transformation relationship is used to align the fourth coordinate axis with the fifth coordinate axis;
[0031] The determination unit is further configured to determine the first transformation relationship based on the second transformation relationship and the third transformation relationship.
[0032] In combination with any embodiment of the present application, the first coordinate system is the coordinate system of the tracking device, both the first object and the second object are objects that can be tracked by the tracking device, and the second coordinate system is constructed based on the first object;
[0033] The determining unit is further configured to determine a fourth transformation relationship between the first coordinate system and a fourth coordinate system based on the first transformation relationship and a first relative position relationship, where the first relative position relationship is the relative position relationship between the first object and the end of the target guide rail, and the fourth coordinate system is a coordinate system constructed based on the end;
[0034] The obtaining unit is further configured to obtain a target path and a third vector in the first coordinate system, where the third vector represents the target guide rail in the first coordinate system;
[0035] The determining unit is further configured to determine a first pose of the end based on the fourth transformation relationship, the target path, and the third vector. When the pose of the end is the first pose, the target guide rail coincides with the target path.
[0036] In combination with any embodiment of the present application, the target guide rail is connected to a first structure of the robotic arm. The determining unit is further configured to determine a second pose of the first structure based on the first pose and a second relative position relationship, where the second relative position relationship is the relative position relationship between the first structure and the end. When the pose of the first structure is the second pose, the pose of the end is the first pose;
[0037] The device for navigation based on two objects further includes: a sending unit configured to send a control instruction to the robotic arm, where the control instruction is used to instruct the robotic arm to control the pose of the first structure to be the second pose.
[0038] In combination with any embodiment of the present application, the third coordinate axis passes through the first object and the second object. The obtaining unit is further configured to:
[0039] Determine a vector passing through the first object and the second object based on the first position and the second position;
[0040] Determine the first vector based on the vector passing through the first object and the second object.
[0041] In combination with any embodiment of the present application, the determining unit is further configured to:
[0042] Determine a first rotation matrix based on the first coordinate axis and the first vector, where the first rotation matrix is used to align the first coordinate axis with the third coordinate axis;
[0043] Determine the first conversion relationship based on the first rotation matrix and the first translation amount, where the first translation amount is the translation amount between the first coordinate system and the second coordinate system.
[0044] Combined with any implementation manner of the present application, the second coordinate system is constructed based on the first object, and the first translation amount is determined based on the first position.
[0045] In a third aspect, an electronic device is provided, including: a processor and a memory, where the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method according to the first aspect and any possible implementation manner thereof as described above.
[0046] In a fourth aspect, another electronic device is provided, including: a processor, a sending device, an input device, an output device, and a memory, where the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method according to the first aspect and any possible implementation manner thereof as described above.
[0047] In a fifth aspect, a computer-readable storage medium is provided, where a computer program is stored in the computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the method according to the first aspect and any possible implementation manner thereof as described above.
[0048] In a sixth aspect, a computer program product is provided, where the computer program product includes a computer program or instructions. When the computer program or instructions run on a computer, the computer is caused to execute the method according to the first aspect and any possible implementation manner thereof as described above.
[0049] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present application.
[0050] In the embodiments of the present application, the first vector represents the third coordinate axis in the first coordinate system, where the first vector is determined based on the first position of the first object in the first coordinate system and the second position of the second object in the first coordinate system. After the navigation device obtains the first vector, based on the first coordinate axis and the first vector, a second conversion relationship is determined, where the second conversion relationship is used to align the first coordinate axis with the third coordinate axis. Then, based on the second conversion relationship, the first coordinate system is converted into a third coordinate system, where the third coordinate system includes a fifth coordinate axis, and the fifth coordinate axis is obtained by converting the second coordinate axis. Then, based on the fifth coordinate axis and the second vector, a third conversion relationship is determined, where the second vector represents the fourth coordinate axis in the third coordinate system, and the third conversion relationship is used to align the fifth coordinate axis with the fourth coordinate axis. Finally, based on the second conversion relationship and the third conversion relationship, the first conversion relationship can be determined.
[0051] Generally speaking, the first vector is the input data for the navigation device to determine the first conversion relationship, and the navigation device can determine the first conversion relationship based on this input data. Since the first vector is determined based on the first position of the first object and the second position of the second object, the navigation device can determine the first conversion relationship between the first coordinate system and the second coordinate system based on the first object and the second object, that is, the navigation device can determine the first conversion relationship between the first coordinate system and the second coordinate system based on two objects, thereby reducing the complexity of determining the first conversion relationship. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background art, the following will describe the drawings required to be used in the embodiments of the present application or the background art.
[0053] The drawings herein are incorporated into the specification and form a part of this specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to explain the technical solutions of the present application.
[0054] Figure 1 It is a schematic flowchart of a method for navigation based on two objects provided by an embodiment of the present application;
[0055] Figure 2 It is a schematic diagram for aligning the corresponding coordinate axes in the first coordinate system and the second coordinate system based on the second conversion relationship and the third conversion relationship provided by an embodiment of the present application;
[0056] Figure 3a It is a schematic diagram of a structure for fixing the first object and the second object provided by an embodiment of the present application;
[0057] Figure 3b It is provided by an embodiment of the present application for a second coordinate system and Figure 3a A schematic diagram of the relationship between the shown structure;
[0058] Figure 4a A schematic diagram showing the relationship between the structure shown in and the guide and the target rail provided by an embodiment of the present application Figure 3a ;
[0059] Figure 4b A schematic diagram showing the relationship between a second coordinate system and the structure shown in provided by an embodiment of the present application Figure 4a ;
[0060] Figure 5 A schematic diagram of a scenario for navigation based on two objects provided by an embodiment of the present application
[0061] Figure 6 A schematic diagram of the structure of a device for navigation based on two objects provided by an embodiment of the present application
[0062] Figure 7 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application Detailed implementation manners
[0063] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application
[0064] The terms "first", "second", etc. in the specification and claims of the present application and the above accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices
[0065] The "and / or" in the present application is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. These three situations, where A and B may be singular or plural
[0066] References to "embodiments" in this specification mean that specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments. It should be understood that in the present application, "at least one (item)" means one or more, "a plurality" means two or more, and "at least two (items)" means two, three, or more.
[0067] Before introducing the technical solutions of the embodiments of the present application, some technical terms in the embodiments of the present application will be introduced first.
[0068] The coordinate system refers to a three-dimensional coordinate system. Optionally, the coordinate system is a Cartesian rectangular coordinate system.
[0069] The conversion relationship between two coordinate systems refers to the conversion relationship of the coordinates under the two coordinate systems, that is, based on the conversion relationship, the coordinates under one coordinate system can be converted into the coordinates under another coordinate system. The conversion relationship may include rotation and / or translation, that is, by rotating and / or translating one coordinate system, the coordinate system can be aligned with another coordinate system, where alignment means that the origins and corresponding coordinate axes of the two coordinate systems coincide.
[0070] The corresponding coordinate axes in different coordinate systems refer to the coordinate axes representing the same direction in different coordinate systems. For example, the coordinate system a1 includes a horizontal coordinate axis b1, a vertical coordinate axis c1, and a vertical coordinate axis d1. The coordinate system a2 includes a horizontal coordinate axis b2, a vertical coordinate axis c2, and a vertical coordinate axis d2. Among them, the horizontal coordinate axis b1 and the horizontal coordinate axis b2 are both coordinate axes representing the horizontal direction, the vertical coordinate axis c1 and the vertical coordinate axis c2 are both coordinate axes representing the vertical direction, and the vertical coordinate axis d1 and the vertical coordinate axis d2 are both coordinate axes representing the vertical direction. Therefore, the horizontal coordinate axis b1 and the horizontal coordinate axis b2 are corresponding coordinate axes, the vertical coordinate axis c1 and the vertical coordinate axis c2 are corresponding coordinate axes, and the vertical coordinate axis d1 and the vertical coordinate axis d2 are corresponding coordinate axes.
[0071] The x-axis refers to the horizontal coordinate axis in the coordinate system. The y-axis refers to the vertical coordinate axis in the coordinate system. The z-axis refers to the vertical coordinate axis in the coordinate system.
[0072] The object can be any object. Optionally, the object is a point. Optionally, the object is an object.
[0073] In many fields involving spatial positioning and measurement, such as industrial manufacturing, robot operation, and computer vision, accurately determining the transformation relationship between two coordinate systems is the key to achieving precise operations. For example, in an industrial automation production line, the correct transformation between the robot coordinate system and the workpiece coordinate system is required to ensure the precise grasping and placement of components; in computer vision applications, the accurate transformation between the camera coordinate system and the world coordinate system directly affects the accuracy of target recognition and positioning.
[0074] In actual operations, the traditional method for determining the transformation relationship between two coordinate systems is widely used. Specifically, the traditional method includes: obtaining at least three sets of coordinate point pairs of at least three objects in different coordinate systems, where one object corresponds to one set of coordinate point pairs, and one set of coordinate point pairs includes the coordinates of an object in two coordinate systems. Then, based on at least three sets of coordinate point pairs, the transformation relationship between the two coordinate systems is calculated. Specifically, a system of equations is constructed based on at least three sets of coordinate point pairs, and the transformation parameters in the system of equations are solved to determine the transformation parameters, and then the transformation relationship can be determined based on the transformation parameters.
[0075] However, since at least three points are required to determine the transformation relationship between two coordinate systems by the traditional method, the complexity of determining the transformation relationship between two coordinate systems is high. Based on this, the embodiments of the present application provide a method for navigation based on two objects. By this method, the transformation relationship between two coordinate systems can be determined based on two objects, and thus the complexity of determining the transformation relationship between two coordinate systems can be reduced.
[0076] Specifically, this method can determine the first transformation relationship between the first coordinate system and the second coordinate system based on the first object and the second object, where the first coordinate system includes a first coordinate axis and a second coordinate axis, the coordinate axis corresponding to the first coordinate axis in the second coordinate system is the third coordinate axis, and the coordinate axis corresponding to the second coordinate axis in the second coordinate system is the fourth coordinate axis. For example, the first coordinate axis is the z-axis of the first coordinate system, the second coordinate axis is the y-axis of the first coordinate system, the third coordinate axis is the y-axis of the second coordinate system, and the fourth coordinate axis is the y-axis of the second coordinate system. Since the first transformation relationship between the first coordinate system and the second coordinate system can be determined by these two objects, the first object and the second object, the number of objects required to determine the first transformation relationship can be reduced, and thus the complexity of determining the first transformation relationship between the first coordinate system and the second coordinate system can be reduced.
[0077] The execution subject of the embodiments of the present application is a device for navigation based on two objects (hereinafter referred to as the navigation device for short), where the navigation device can be any electronic device that can execute the technical solutions disclosed in the method embodiments of the present application. Optionally, the navigation device can be one of the following: a computer, a server.
[0078] It should be understood that the method embodiments of the present application can also be implemented by a processor executing computer program code. The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a method for object-based navigation provided by an embodiment of the present application.
[0079] 101. Obtain a first vector, where the first vector represents the third coordinate axis in a first coordinate system, and the first vector is determined based on the first position of a first object in the first coordinate system and the second position of a second object in the first coordinate system.
[0080] In the embodiments of the present application, the first vector is obtained by converting the third coordinate axis to the first coordinate system. The first vector is the coordinate of the third coordinate axis in the first coordinate system. Based on the first vector, the direction of the third coordinate axis in the first coordinate system can be determined. For example, if the first vector is (0, 1, 3), then the coordinate of the third coordinate axis in the first coordinate system is (0, 1, 3).
[0081] In the embodiments of the present application, the position of the first object in the first coordinate system is the first position, and the position of the second object in the first coordinate system is the second position. The first vector is determined based on the first position and the second position. In a possible implementation manner, the third coordinate axis passes through the first object and the second object, and the first vector is a vector determined based on the first position and the second position.
[0082] Optionally, based on the first position and the second position, a vector passing through the first object and the second object is determined. Based on the vector passing through the first object and the second object, the first vector is determined. For example, the vector pointing from the first position to the second position is determined as the first vector. Or the vector pointing from the second position to the first position is determined as the first vector.
[0083] 102. Determine a second conversion relationship based on the first coordinate axis and the first vector, where the second conversion relationship is used to align the first coordinate axis with the third coordinate axis.
[0084] Based on the second conversion relationship, the first coordinate axis of the first coordinate system can be aligned with the third coordinate axis of the second coordinate system. Here, aligning the first coordinate axis of the first coordinate system with the third coordinate axis of the second coordinate system means that the coordinates of the first coordinate axis of the first coordinate system are the same as the coordinates of the third coordinate axis of the second coordinate system. For example, both the first coordinate axis and the third coordinate axis are the z-axis. If the coordinate of the z-axis is called the vertical coordinate, then the coordinate of the first coordinate axis is the vertical coordinate in the first coordinate system, and the coordinate of the third coordinate axis is the vertical coordinate in the second coordinate system. Based on the second conversion relationship, the vertical coordinate in the first coordinate system can be converted into the vertical coordinate in the second coordinate system, or the vertical coordinate in the second coordinate system can be converted into the vertical coordinate in the first coordinate system.
[0085] In a possible implementation manner, based on the first included angle between the first coordinate axis and the first vector, rotating the first coordinate axis or the first vector can align the first coordinate axis and the first vector, that is, align the first coordinate axis and the third coordinate axis. Therefore, the navigation device can determine the second conversion relationship based on the first included angle between the first coordinate axis and the first vector. Optionally, the unit of the first included angle is radian.
[0086] Optionally, the navigation device determines the first normal vector of the first coordinate axis and the first vector, and determines the second conversion relationship based on the axis-angle method, the first included angle, and the first normal vector.
[0087] In another possible implementation manner, based on the first coordinate axis and the first vector, a first rotation matrix is determined, where the first rotation matrix is used to align the first coordinate axis with the third coordinate axis. Based on the first rotation matrix and the first translation amount, the second conversion relationship is determined, where the first translation amount is the translation amount between the first coordinate system and the second coordinate system. In this implementation manner, moving the first coordinate system or the second coordinate system based on the first translation amount can make the origin of the first coordinate system and the origin of the second coordinate system coincide.
[0088] Optionally, represents the first rotation matrix, represents the first translation amount, represents the second conversion relationship, then .
[0089] Optionally, the origin of the second coordinate system is the first object. Correspondingly, the position of the origin of the second coordinate system in the first coordinate system is the first position. At this time, the distance from the origin of the second coordinate system to the origin of the first coordinate system is the same as the distance from the first position to the origin of the first coordinate system. Therefore, the first translation amount can be determined based on the first position, thereby reducing the data processing amount for determining the first translation amount.
[0090] 103. Based on the second conversion relationship, the first coordinate system is converted into a third coordinate system, where the third coordinate system includes a fifth coordinate axis, and the fifth coordinate axis is obtained by converting the second coordinate axis.
[0091] As described in step 102, the second conversion relationship is used to align the first coordinate axis of the first coordinate system with the third coordinate axis of the second coordinate system. Therefore, based on the second conversion relationship, the navigation device can align the first coordinate axis of the first coordinate system with the third coordinate axis of the second coordinate system when converting the first coordinate system.
[0092] In step 103, the navigation device converts the first coordinate system into a third coordinate system based on the second conversion relationship. If the coordinate axis corresponding to the first coordinate axis in the third coordinate system is called the sixth coordinate axis, then the sixth coordinate axis is aligned with the third coordinate axis, where the sixth coordinate axis is the coordinate axis obtained by converting the first coordinate axis.
[0093] In the embodiment of the present application, the fifth coordinate axis further includes a fifth coordinate axis, where the fifth coordinate axis is obtained by converting the second coordinate axis, that is, the fifth coordinate axis corresponds to the second coordinate axis.
[0094] 104. Determine a third conversion relationship based on the fifth coordinate axis and the second vector, where the second vector represents the fourth coordinate axis in the third coordinate system, and the third conversion relationship is used to align the fifth coordinate axis with the fourth coordinate axis.
[0095] In the embodiment of the present application, the second vector is the coordinate of the fourth coordinate axis in the third coordinate system. Based on the second vector, the direction of the fourth coordinate axis in the third coordinate system can be determined. For example, if the second vector is (3, 7, 6), then the coordinate of the fourth coordinate axis in the third coordinate system is (3, 7, 6).
[0096] Optionally, the navigation device obtains the coordinate of the fourth coordinate axis in the first coordinate system. Based on the first rotation matrix, the coordinate of the fourth coordinate axis in the first coordinate system is converted into the coordinate in the third coordinate system to obtain the second vector. For example, use to represent the first rotation matrix, use V1 to represent the coordinate of the fourth coordinate axis in the first coordinate system, and use V2 to represent the second vector. Then V2 = V1 × , where represents the inverse matrix of.
[0097] Based on the third conversion relationship, the fifth coordinate axis of the third coordinate system can be aligned with the fourth coordinate axis of the second coordinate system. Among them, the alignment of the fifth coordinate axis of the third coordinate system with the fourth coordinate axis of the second coordinate system means that the coordinates of the fifth coordinate axis of the third coordinate system are the same as the coordinates of the fourth coordinate axis of the second coordinate system. For example, if both the fourth coordinate axis and the fifth coordinate axis are the y-axis, and if the coordinate of the y-axis is called the ordinate, then the coordinate of the fourth coordinate axis is the ordinate in the second coordinate system, and the coordinate of the fifth coordinate axis is the ordinate in the third coordinate system. Based on the third conversion relationship, the ordinate in the second coordinate system can be converted into the ordinate in the third coordinate system, or the ordinate in the third coordinate system can be converted into the ordinate in the second coordinate system.
[0098] In a possible implementation manner, based on the second angle between the fifth coordinate axis and the second vector, rotating the fifth coordinate axis or the second vector can align the fifth coordinate axis and the second vector, that is, align the fifth coordinate axis and the fourth coordinate axis. Therefore, the navigation device can determine the third conversion relationship based on the second angle between the fifth coordinate axis and the second vector. Optionally, the unit of the second angle is radians.
[0099] Optionally, the navigation device determines the second normal vector of the fifth coordinate axis and the second vector, and determines the third conversion relationship based on the axis-angle method, the second angle, and the second normal vector.
[0100] In another possible implementation manner, based on the fifth coordinate axis and the second vector, a second rotation matrix is determined, where the second rotation matrix is used to align the fifth coordinate axis with the fourth coordinate axis. Based on the second rotation matrix and the second translation amount, the third conversion relationship is determined, where the second translation amount is the translation amount between the third coordinate system and the second coordinate system. In this implementation manner, moving the second coordinate system or the third coordinate system based on the second translation amount can make the origin of the second coordinate system and the origin of the third coordinate system coincide.
[0101] Optionally, when the second conversion relationship includes the first translation amount, based on the second conversion relationship, converting the first coordinate system into the third coordinate system can make the origin of the third coordinate system coincide with the origin of the second coordinate system. At this time, the translation amount between the second coordinate system and the third coordinate system is 0, that is, the second translation amount is 0.
[0102] Optionally, when the second translation amount is 0, use to represent the first rotation matrix, use to represent the third conversion relationship, then .
[0103] Optionally, when the second translation amount is 0, use to represent the second angle, use to represent the third conversion relationship, then , where represents cosine function value of, represents sine function value of.
[0104] 105. Determine the first conversion relationship based on the second conversion relationship and the third conversion relationship.
[0105] In the embodiments of the present application, the first conversion relationship is the conversion relationship between the first coordinate system and the second coordinate system. That is, based on the first conversion relationship, the corresponding coordinate axes in the first coordinate system and the second coordinate system can be aligned. In other words, the coordinates in the first coordinate system can be converted into the coordinates in the second coordinate system. Since both the first coordinate system and the second coordinate system are three-dimensional coordinate systems and both include three coordinate axes, aligning the corresponding coordinate axes in the first coordinate system and the second coordinate system means aligning the three coordinate axes in the first coordinate system with the corresponding coordinate axes in the second coordinate system. Also, since both the first coordinate system and the second coordinate system are Cartesian coordinate systems, any one of the three coordinate axes is perpendicular to the other two coordinate axes. Therefore, by aligning any two coordinate axes in the first coordinate system with the corresponding coordinate axes in the second coordinate system, the three coordinate axes in the first coordinate system can be aligned with the corresponding coordinate axes in the second coordinate system, and thus the first conversion relationship can be determined.
[0106] As described above, based on the second conversion relationship, the first coordinate axis of the first coordinate system can be aligned with the third coordinate axis of the second coordinate system, and based on the third conversion relationship, the fifth coordinate axis of the third coordinate system can be aligned with the fourth coordinate axis of the second coordinate system. Since the fifth coordinate axis of the third coordinate system is obtained by converting the second coordinate axis of the first coordinate system based on the second conversion relationship, when the first coordinate system is successively converted based on the second conversion relationship and the third conversion relationship, the second coordinate axis of the first coordinate system can be aligned with the fourth coordinate axis of the second coordinate system. In other words, for the alignment of the second coordinate axis of the first coordinate system and the fourth coordinate axis of the second coordinate system, the first coordinate system can be first converted into the third coordinate system based on the second conversion relationship, and then the third coordinate system can be converted based on the third conversion relationship. Therefore, based on the second conversion relationship and the third conversion relationship, the navigation device can not only align the first coordinate axis of the first coordinate system with the third coordinate axis of the second coordinate system, but also align the second coordinate axis of the first coordinate system with the fourth coordinate axis of the second coordinate system. Specifically, the first coordinate system is first converted into the third coordinate system based on the second conversion relationship to align the first coordinate axis of the first coordinate system with the third coordinate axis of the second coordinate system, and then the third coordinate system is converted based on the third conversion relationship to align the second coordinate axis of the first coordinate system with the fourth coordinate axis of the second coordinate system. Thus, based on the second conversion relationship and the third conversion relationship, the navigation device can determine the first conversion relationship.
[0107] Optionally, Figure 2 is a schematic diagram for aligning the corresponding coordinate axes in the first coordinate system and the second coordinate system based on the second conversion relationship and the third conversion relationship provided in the embodiments of the present application. In Figure 2Among them, the three coordinate axes of the first coordinate system are respectively: x1, y1, z1, and the three coordinate axes of the second coordinate system are respectively: x2, y2, z2. Among them, the z1 axis is the first coordinate axis, and the z2 axis is the third coordinate axis. is the second conversion relationship, is the third conversion relationship. As Figure 2 shown, first, based on rotate the first coordinate system so that the z1 axis of the first coordinate system is aligned with the z2 axis of the second coordinate system, obtaining the third coordinate system. Among them, the three coordinate axes of the third coordinate system are respectively: x3, y3, z2. Among them, x3 is obtained by rotating x1 based on , and y3 is obtained by rotating y1 based on . Then, based on rotate the third coordinate system around the z2 axis so that the y3 axis of the third coordinate system is aligned with the y2 axis of the second coordinate system. Correspondingly, the x3 axis of the third coordinate system will also be aligned with the x3 axis of the second coordinate system.
[0108] In a possible implementation manner, the first conversion relationship is the product of the second conversion relationship and the inverse matrix of the third conversion relationship. Optionally, use to represent the second conversion relationship, use to represent the third conversion relationship, use to represent the first conversion relationship. Then , where represents the inverse matrix of the third conversion relationship.
[0109] In the embodiments of the present application, the first vector is obtained by converting the third coordinate axis to the first coordinate system. Among them, the first vector is determined based on the first position of the first object in the first coordinate system and the second position of the second object in the first coordinate system. After the navigation device obtains the first vector, based on the first coordinate axis and the first vector, it determines the second conversion relationship, where the second conversion relationship is used to align the first coordinate axis with the third coordinate axis. Then, based on the second conversion relationship, it converts the first coordinate system to the third coordinate system, where the third coordinate system includes a fifth coordinate axis, and the fifth coordinate axis is obtained by converting the second coordinate axis. Then, based on the fifth coordinate axis and the second vector, it determines the third conversion relationship, where the second vector represents the fourth coordinate axis in the third coordinate system, and the third conversion relationship is used to align the fifth coordinate axis with the fourth coordinate axis. Finally, based on the second conversion relationship and the third conversion relationship, the first conversion relationship can be determined.
[0110] Generally speaking, the first vector is the input data for the navigation device to determine the first conversion relationship. Based on this input data, the navigation device can determine the first conversion relationship. Since the first vector is determined based on the first position of the first object and the second position of the second object, the navigation device can determine the first conversion relationship between the first coordinate system and the second coordinate system based on the first object and the second object, that is, the navigation device can determine the first conversion relationship between the first coordinate system and the second coordinate system based on two objects, thereby reducing the complexity of determining the first conversion relationship.
[0111] In a possible implementation scenario,
[0112] it is necessary to make the axis of the target guide rail fixed on the robotic arm coincide with the target path. In order to make the axis of the target guide rail fixed on the robotic arm coincide with the target path, the first pose of the end of the target guide rail can be determined based on the target path. Wherein, when the pose of the end of the target guide rail is the first pose, the target guide rail coincides with the target path. Since the movement of the target guide rail is realized by controlling the movement of the robotic arm, it is necessary to convert the first pose into the pose in the coordinate system established based on the robotic arm, so that the robotic arm can recognize the converted pose, and then the pose of the target guide rail can be made the first pose by controlling the movement of the robotic arm. Wherein, the coordinate system established based on the robotic arm includes the base coordinate system of the robotic arm or the coordinate system established based on the structure of the robotic arm. This involves converting the pose in one coordinate system into the pose in another coordinate system. Specifically, it is necessary to use the conversion relationship between different coordinate systems to convert the pose in one coordinate system into the pose in another coordinate system.
[0113] In addition, considering that the planned target path is usually not the path in the coordinate system established based on the robotic arm. For example, when the target path is determined based on a computed tomography (CT) image, the target path is the target path in the image coordinate system of the CT image. Therefore, to determine the first pose based on the target path, it is necessary to convert the target path into the path in the coordinate system established based on the robotic arm. This will involve converting the target path in one coordinate system into the target path in another coordinate system. Specifically, it is necessary to use the conversion relationship between different coordinate systems to convert the target path in one coordinate system into the target path in another coordinate system. And based on the method for navigation based on two objects provided in the embodiments of the present application, the conversion relationship between any two coordinate systems can be determined, and then the target path can be converted based on this conversion relationship.
[0114] In the traditional method, generally, at least three optical markers are fixed on a guide on the end of a robotic arm. By tracking at least three optical markers, the poses of at least three optical markers are determined. Furthermore, based on the poses of at least three optical markers, the conversion relationship between different coordinate systems can be determined. Thus, based on the conversion relationship between different coordinate systems, the pose in one coordinate system can be converted into the pose in another coordinate system, and the target path can be converted. Thereby, the target guide rail can be navigated to coincide with the target path.
[0115] However, during the movement of the robotic arm driving the guide, there is occlusion between different optical markers, which further causes the optical tracking device to be unable to determine the pose of the occluded optical marker, and further leads to a low success rate of navigating the target guide rail to coincide with the target path.
[0116] Based on the technical solution provided in the embodiments of the present application, the conversion relationship between different coordinate systems can be determined based on two objects (for example, the objects are optical markers). Furthermore, the target guide rail can be navigated to coincide with the target path. Since the probability of occlusion between different optical markers is lower for two objects compared to at least three optical markers, based on the technical solution provided in the embodiments of the present application, navigating the target guide rail to coincide with the target path can improve the success rate of navigation.
[0117] Optionally, considering that during the movement of the robotic arm driving the guide, the structure on the traditional guide for fixing at least three optical markers may also occlude the optical markers, which further leads to a low success rate of navigating the target guide rail to coincide with the target path. The present application also provides a structure for fixing a first object and a second object. This structure is simple, can reduce the probability of occluding the first object and the second object, and further can improve the success rate of navigation. For example, Figure 3a is a schematic diagram of a structure for fixing a first object and a second object provided in the embodiments of the present application. As Figure 3a shown, this structure includes a first object and a second object. Among them, the first object and the second object are connected by a rod. Since the volume of the rod is small, the probability of the first object and / or the second object being occluded by the rod is small.
[0118] Figure 3b is a schematic diagram of the relationship between a second coordinate system and the Figure 3a structure shown in the embodiments of the present application. As Figure 3b shown, the three coordinate axes of the second coordinate system are respectively: x2, y2, z2. The intersection point of these three coordinate axes is the first object, that is, the origin of the second coordinate system is the first object, and the second coordinate system is constructed based on the first object.
[0119] Optionally, Figure 4a is a structure provided in the embodiments of the present application for Figure 3aSchematic diagram of the relationship between the shown structure, the guide, and the target rail. As Figure 4a shown, by connecting the Figure 3a shown structure to the target rail of the guide. In this way, based on the first object and the second object, navigation of the target rail of the guide can be achieved.
[0120] Figure 4b Schematic diagram of the relationship between a second coordinate system and the Figure 4a shown structure provided by an embodiment of the present application. As Figure 4b shown, the three coordinate axes of the second coordinate system are respectively: x2, y2, z2, and the intersection point of these three coordinate axes is the first object, that is, the origin of the second coordinate system is the first object, and the second coordinate system is constructed based on the first object.
[0121] As an optional implementation manner, the first coordinate system is the coordinate system of the tracking device, that is, all the information determined by the tracking device through tracking is the information in the first coordinate system. Among them, the information determined by the tracking device through tracking includes: position, attitude, and pose. Optionally, the first coordinate system is constructed with the geometric center of the tracking device as the origin. Optionally, the tracking device includes one of an optical tracking device and an electromagnetic tracking device. Optionally, the optical tracking device includes a binocular camera. Optionally, the optical tracking device includes Northern Digital (northen digital inc, NDI). Optionally, the first coordinate system is the world coordinate system.
[0122] Both the first object and the second object are objects that can be tracked by the tracking device, that is, the tracking device can determine at least one of the following information by tracking the first object: the position of the first object, the attitude of the first object, the pose of the first object, and the tracking device can also determine at least one of the following information by tracking the second object: the position of the second object, the attitude of the second object, the pose of the second object.
[0123] Optionally, both the first object and the second object are optical markers. For example, both the first object and the second object are infrared light reflectors.
[0124] The second coordinate system is constructed based on the first object. Optionally, the origin of the second coordinate system is the first object.
[0125] In this implementation manner, the navigation device also performs the following steps:
[0126] 201. Determine the fourth transformation relationship between the first coordinate system and the fourth coordinate system based on the first transformation relationship and the first relative position relationship, where the first relative position relationship is the relative position relationship between the first object and the end of the target rail, and the fourth coordinate system is a coordinate system constructed based on the end.
[0127] In the embodiments of the present application, the fourth conversion relationship is the conversion relationship between the first coordinate system and the fourth coordinate system. That is, based on the fourth conversion relationship, the coordinates in the first coordinate system can be converted into the coordinates in the fourth coordinate system, or the coordinates in the fourth coordinate system can be converted into the coordinates in the first coordinate system. Since the second coordinate system is constructed based on the first object, the fourth coordinate system is a coordinate system constructed based on the end, and the first relative position relationship is the relative position relationship between the first object and the end of the target guide rail, based on the first relative position relationship, the conversion relationship between the second coordinate system and the fourth coordinate system can be determined. Furthermore, in combination with the first conversion relationship, the fourth conversion relationship between the first coordinate system and the fourth coordinate system can be determined.
[0128] Optionally, the origin of the fourth coordinate system is the end, the seventh coordinate axis in the fourth coordinate system corresponds to the third coordinate axis, and the seventh coordinate axis coincides with the axis of the target guide rail. For example, if the third coordinate axis is the z-axis, then the seventh coordinate axis is the z-axis in the fourth coordinate system. At this time, the z-axis of the fourth coordinate system coincides with the axis of the target guide rail.
[0129] Optionally, is used to represent the first conversion relationship, and T1 is used to represent the conversion relationship between the second coordinate system and the fourth coordinate system. is used to represent the fourth conversion relationship, then ×T1.
[0130] Optionally, , where represents the rotation matrix between the first coordinate system and the fourth coordinate system, represents the translation amount between the first coordinate system and the fourth coordinate system.
[0131] 202. Obtain the target path and the third vector in the first coordinate system, where the third vector represents the target guide rail in the first coordinate system.
[0132] In an implementation manner of obtaining the target path in the first coordinate system, after the navigation device obtains the target path in the image coordinate system of the CT image, based on the target path in the image coordinate system and the conversion relationship between the image coordinate system and the first coordinate system, the target path in the first coordinate system is determined.
[0133] Optionally, the two endpoints of the target path include a starting point and an ending point. The navigation device obtains the third position of the starting point in the image coordinate system and the fourth position of the ending point in the image coordinate system. Based on the conversion relationship between the image coordinate system and the first coordinate system, the third position is converted into the fifth position, and the fourth position is converted into the sixth position, where the fifth position is the position of the starting point in the first coordinate system, and the sixth position is the position of the ending point in the first coordinate system. Based on the fifth position and the sixth position, the target path in the first coordinate system can be determined.
[0134] In the embodiments of the present application, the third vector is the coordinate of the target guide rail in the first coordinate system. Based on the third vector, the direction of the target guide rail in the first coordinate system can be determined. Optionally, based on the third vector, the direction of the axis of the target guide rail in the first coordinate system can be determined. For example, if the third vector is (4, 9, 2), then the coordinate of the target guide rail in the first coordinate system is (4, 9, 2).
[0135] 203. Determine the first pose of the end based on the fourth conversion relationship, the target path, and the third vector, where when the pose of the end is the first pose, the target guide rail coincides with the target path.
[0136] In the embodiments of the present application, the first pose is the pose in the fourth coordinate system. Since both the target path and the third vector are information in the first coordinate system, the pose of the end of the target guide rail in the first coordinate system can be determined based on the target path and the third vector when the target guide rail coincides with the target path. Then, based on the fourth conversion relationship, the first pose of the end of the target guide rail in the fourth coordinate system can be determined when the target guide rail coincides with the target path.
[0137] Optionally, when the target guide rail coincides with the target path, the end of the target guide rail coincides with the termination point of the target path.
[0138] In a possible implementation manner, the navigation device determines the third included angle between the target path and the third vector, and the third normal vector of the target path and the third vector in the first coordinate system. The third normal vector of the target path and the third vector in the first coordinate system is converted into the fourth normal vector of the target path and the third vector in the fourth coordinate system based on the fourth conversion relationship. The first pose is determined based on the axis-angle method, the third included angle, and the fourth normal vector.
[0139] Optionally, use V3 to represent the target path in the first coordinate system, use V4 to represent the third vector, use V5 to represent the third normal vector, and use V6 to represent the fourth normal vector. Then V5 is the normal vector of V3 and V4, and V6 = V5 × , where represents the inverse matrix of represents the rotation matrix between the first coordinate system and the fourth coordinate system. Based on the axis-angle method, the third included angle, and the fourth normal vector, the rotation matrix between the target path and the target guide rail can be determined. Then, based on the rotation matrix
[0140] and the third translation amount between the target path and the target guide rail, the first pose can be determined. Obtained by conversion to the fourth coordinate system , then = V7 × . Among them, is the third translation amount.
[0141] Optionally, the coordinate system constructed based on the target path is called the fifth coordinate system. Among them, the origin of the fifth coordinate system is the termination point of the target path, and the coordinate axis corresponding to the third coordinate axis in the fifth coordinate system is the eighth coordinate axis, and the eighth coordinate axis coincides with the target path. Then the conversion relationship between the fifth coordinate system and the fourth coordinate system is: T4 = .
[0142] In this implementation manner, the navigation device can determine the first pose of the end based on the first conversion relationship by executing steps 201 to 203.
[0143] As an optional implementation manner, the target guide rail is connected to the first structure of the robotic arm, and the navigation device further executes the following steps: 301. Determine the second pose of the first structure based on the first pose and the second relative position relationship, where the second relative position relationship is the relative position relationship between the first structure and the end. When the pose of the first structure is the second pose, the pose of the end is the first pose.
[0144] In the embodiments of the present application, the first structure is the structure of the robotic arm. The target guide rail is connected to the first structure, and the robotic arm can drive the target guide rail to move by controlling the movement of the first structure. Optionally, the first structure is a flange.
[0145] Optionally, the target guide rail is connected to the first structure through a second structure. For example, the second structure is a guide.
[0146] The relative position relationship between the first structure and the target guide rail is the second relative position relationship. Optionally, the relative position relationship between the target guide rail and the first structure is fixed. When the pose of the first result is the second pose, the pose of the target guide rail is the first pose.
[0147] In a possible implementation manner, the coordinate system constructed based on the first structure is the sixth coordinate system, and the conversion relationship between the second coordinate system and the sixth coordinate system is the fifth conversion relationship. Based on the fifth conversion relationship and the first relative position relationship, the second relative position relationship can be determined.
[0148] Optionally, the coordinate axis corresponding to the fourth coordinate axis in the sixth coordinate system is the ninth coordinate axis, and the directions of the fourth coordinate axis and the ninth coordinate axis are the same. For example, both the fourth coordinate axis and the ninth coordinate axis are the y-axis. Then the ninth coordinate axis is the y-axis of the sixth coordinate system. Then the second vector can be determined by determining the direction of the ninth coordinate axis in the first coordinate system.
[0149] Since the robotic arm can recognize the sixth coordinate system, the first structure can be controlled to move along the ninth coordinate axis of the sixth coordinate system. If both the first object and the second object are connected to the first structure, then by controlling the movement of the first structure, the robotic arm can drive the first object and the second object to move along the ninth coordinate axis.
[0150] Moreover, since both the first object and the second object are objects that can be tracked by the tracking device, the tracking device can determine the starting position and the ending position of the first object or the second object moving along the ninth coordinate axis by tracking the first object or the second object, and further can determine the direction of the ninth coordinate axis in the first coordinate system based on the starting position and the ending position, and further can determine the second vector.
[0151] For example, if the starting position of the first object moving along the ninth coordinate axis is w1 and the ending position of the first object moving along the ninth coordinate axis is w2, then the second vector V2 = w2 - w1.
[0152] In this way, based on the first object and the second object, both the first vector and the second vector can be determined. Combining with the scheme for determining the first conversion relationship between the first coordinate system and the second coordinate system in the previous text, the first conversion relationship can be determined, and thus the first conversion relationship between the first coordinate system and the second coordinate system can be determined based on two objects.
[0153] Optionally, the first relative position relationship includes the conversion relationship between the second coordinate system and the fourth coordinate system, and the second relative position relationship includes the conversion relationship between the fourth coordinate system and the sixth coordinate system. Use to represent the conversion relationship between the second coordinate system and the fourth coordinate system, use T2 to represent the fifth conversion relationship, and use T3 to represent the conversion relationship between the fourth coordinate system and the sixth coordinate system. Then T3 = T1 × T2.
[0154] Optionally, use T0 to represent the conversion relationship between the sixth coordinate system and the base coordinate system, where the base coordinate system is a coordinate system constructed based on the base of the robotic arm. Use T3 to represent the conversion relationship between the fourth coordinate system and the sixth coordinate system, and use T4 to represent the conversion relationship between the fifth coordinate system and the fourth coordinate system. Then based on T0, T3, and T4, the third pose of the end of the target guide rail in the base coordinate system can be determined, where when the pose of the end of the target guide rail in the base coordinate system is the third pose, the target guide rail coincides with the target path.
[0155] Optionally, on the one hand, considering that the termination point is usually on the surface of the target object, if the end of the target guide rail coincides with the termination point, it may cause the target guide rail to contact the target object, thereby increasing the probability of collision between the target object and the target guide rail. Therefore, in order to reduce the probability of collision between the target object and the target guide rail, the target guide rail can be translated along the target path in a direction away from the termination point. On the other hand, considering that when the target guide rail coincides with the target path, the attitude of each joint of the robotic arm can be adjusted by rotating the target guide rail around the target path, so that the rotation angles of each joint of the robotic arm are within a suitable range. Therefore, considering the above two aspects, when the pose of the end of the target guide rail in the base coordinate system is the third pose, the target guide rail can be translated along the target path in a direction away from the termination point and rotated around the target path according to actual needs.
[0156] Let T5 = represent the translation of the target guide rail along the target path when the pose of the end of the target guide rail in the base coordinate system is the third pose, where -d represents the translation amount of translation in a direction away from the termination point along the target path.
[0157] Let T6 = represent the rotation of the target guide rail around the target path when the pose of the end of the target guide rail in the base coordinate system is the third pose, where represents the angle of rotation of the target guide rail around the target path.
[0158] Then, when the pose of the end of the target guide rail in the base coordinate system is the third pose, after translating the target guide rail along the target path in a direction away from the termination point and rotating the target guide rail around the target path, the pose of the end of the target guide rail in the base coordinate system (hereinafter referred to as the fourth pose) is: T0 × T3 × T4 × T7, where T7 = T5 × T6.
[0159] Optionally, since the robotic arm needs to drive the target guide rail to move by controlling the movement of the first structure, it is necessary to convert the fourth pose into the pose of the first structure in the base coordinate system (i.e., the second pose). In this way, the robotic arm can control the movement of the first structure to make the pose of the first structure the second pose, and then make the pose of the end of the target guide rail the first pose. Since T3 represents the conversion relationship between the fourth coordinate system and the sixth coordinate system, by multiplying the fourth pose by the inverse matrix of T3, the second pose of the first structure in the base coordinate system can be obtained. If T represents the second pose, then T = T0 × T3 × T4 × T7 × T3 -1 , where, T3 -1 represents the inverse matrix of T3.
[0160] In a possible implementation manner, Figure 5A schematic diagram of a scenario for two-object-based navigation provided by an embodiment of this application. As Figure 5 shown, this scenario includes a robotic arm, a flange of the robotic arm, a guide, a first object, a second object, a target rail of the guide, a target object, a target object's reference point, an optical marker, and a tracking device. Among them, the guide is fixedly connected to the flange, the target object coincides with the axis of the target rail, the reference point is collinear with the target path, and the optical marker is attached to the surface of the target object. The tracking device can determine the pose of the optical marker on the surface of the target object by tracking the optical marker on the surface of the target object, and then can determine the pose of the target object based on the pose of the optical marker on the surface of the target object.
[0161] In Figure 5 the coordinate system built based on the base of the robotic arm is the base coordinate system. The coordinate system built based on the tracking device is the first coordinate system. The coordinate system built based on the first object is the second coordinate system. Optionally, the relationships between the second coordinate system and the first object, the second object, the guide, and the target rail can be seen in Figure 4b . The coordinate system built based on the end of the target rail is the fourth coordinate system. The coordinate system built based on the target path is the fifth coordinate system, where the target path passes through the reference point. The coordinate system built based on the flange is the sixth coordinate system. T0 represents the transformation relationship between the sixth coordinate system and the base coordinate system, T1 represents the transformation relationship between the second coordinate system and the fourth coordinate system, T2 represents the fifth transformation relationship, T3 represents the transformation relationship between the fourth coordinate system and the sixth coordinate system, and T4 represents the transformation relationship between the fifth coordinate system and the fourth coordinate system. represents the first transformation relationship.
[0162] In Figure 5 the scenario shown, the navigation device can obtain based on (see the description of step 201 for details), and then can determine T4 based on in (see the description of step 203 for details). Then, after determining T1 and T2, T3 can be determined based on T1 and T2. After obtaining T0 and T5, the second pose (i.e., T) can be determined based on the formula T = T0 × T3 × T4 × T7 × T3 -1 . The navigation device then sends a control instruction to the robotic arm. Among them, the control instruction is used to instruct the robotic arm to control the pose of the flange to be the second pose, so that the robotic arm can move to make the pose of the flange be the second pose, and further make the axis of the target rail coincide with the target path. In this way, by moving the target object along the axis of the target rail, the target object can be moved along the target path.
[0163] Among them, the flange coordinate system is the sixth coordinate system mentioned above, the tracker coordinate system is the second coordinate system mentioned above, the guide rail coordinate system is the fourth coordinate system mentioned above, the optical coordinate system is the first coordinate system mentioned above, and the path coordinate system is the fifth coordinate system mentioned above.
[0164] 302. Send a control instruction to the robotic arm, wherein the control instruction is used to instruct the robotic arm to control the posture of the first structure to a second posture.
[0165] The navigation device sends a control instruction to the robotic arm, which can instruct the robotic arm to move the first structure so that the posture of the first structure is the second posture, and then the posture of the target guide rail is the first posture, so that the target guide rail and the target path coincide with each other.
[0166] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0167] If the technical solution of this application involves personal information, the product that applies the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing personal information. If the technical solution of this application involves sensitive personal information, the product that applies the technical solution of this application has obtained the individual's separate consent before processing sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, a clear and prominent sign is set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that they agree to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload their personal information; among which, personal information processing may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0168] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0169] See also Figure 6 , Figure 6A structural schematic diagram of a device for navigation based on two objects provided by an embodiment of the present application. The device 1 for navigation based on two objects is used to determine a first conversion relationship between a first coordinate system and a second coordinate system based on a first object and a second object. The first coordinate system includes a first coordinate axis and a second coordinate axis. The coordinate axis corresponding to the first coordinate axis in the second coordinate system is a third coordinate axis, and the coordinate axis corresponding to the second coordinate axis in the second coordinate system is a fourth coordinate axis.
[0170] The device 1 for navigation based on two objects includes: an acquisition unit 11, a determination unit 12, and a conversion unit 13. Optionally, the device 1 for navigation based on two objects further includes a sending unit 14, where:
[0171] The acquisition unit 11 is configured to acquire a first vector, where the first vector represents the third coordinate axis in the first coordinate system, and the first vector is determined based on a first position of the first object in the first coordinate system and a second position of the second object in the first coordinate system;
[0172] The determination unit 12 is configured to determine a second conversion relationship based on the first coordinate axis and the first vector, where the second conversion relationship is used to align the first coordinate axis with the third coordinate axis;
[0173] The conversion unit 13 is configured to convert the first coordinate system into a third coordinate system based on the second conversion relationship. The third coordinate system includes a fifth coordinate axis, and the fifth coordinate axis is obtained by converting the second coordinate axis;
[0174] The determination unit 12 is further configured to determine a third conversion relationship based on the fifth coordinate axis and a second vector, where the second vector represents the fourth coordinate axis in the third coordinate system, and the third conversion relationship is used to align the fourth coordinate axis with the fifth coordinate axis;
[0175] The determination unit 12 is further configured to determine the first conversion relationship based on the second conversion relationship and the third conversion relationship.
[0176] Combined with any implementation manner of the present application, the first coordinate system is the coordinate system of a tracking device, the first object and the second object are both objects that can be tracked by the tracking device, and the second coordinate system is constructed based on the first object;
[0177] The determination unit 12 is further configured to determine a fourth conversion relationship between the first coordinate system and a fourth coordinate system based on the first conversion relationship and a first relative position relationship. The first relative position relationship is the relative position relationship between the first object and the end of a target guide rail, and the fourth coordinate system is a coordinate system constructed based on the end;
[0178] The obtaining unit 11 is further configured to obtain a target path and a third vector in the first coordinate system, where the third vector represents the target guide rail in the first coordinate system.
[0179] The determining unit 12 is further configured to determine a first pose of the end based on the fourth conversion relationship, the target path, and the third vector. When the pose of the end is the first pose, the target guide rail coincides with the target path.
[0180] Combined with any implementation manner of the present application, the target guide rail is connected to a first structure of the robotic arm. The determining unit 12 is further configured to determine a second pose of the first structure based on the first pose and a second relative position relationship, where the second relative position relationship is the relative position relationship between the first structure and the end. When the pose of the first structure is the second pose, the pose of the end is the first pose.
[0181] The apparatus for navigating based on two objects further includes: a sending unit 14, configured to send a control instruction to the robotic arm, where the control instruction is used to instruct the robotic arm to control the pose of the first structure to be the second pose.
[0182] Combined with any implementation manner of the present application, the third coordinate axis passes through the first object and the second object. The obtaining unit 11 is further configured to:
[0183] Determine a vector passing through the first object and the second object based on the first position and the second position;
[0184] Determine the first vector based on the vector passing through the first object and the second object.
[0185] Combined with any implementation manner of the present application, the determining unit 12 is further configured to:
[0186] Determine a first rotation matrix based on the first coordinate axis and the first vector, where the first rotation matrix is used to align the first coordinate axis with the third coordinate axis;
[0187] Determine the first conversion relationship based on the first rotation matrix and a first translation amount, where the first translation amount is the translation amount between the first coordinate system and the second coordinate system.
[0188] Combined with any implementation manner of the present application, the second coordinate system is constructed based on the first object, and the first translation amount is determined based on the first position.
[0189] In the embodiments of the present application, the first vector represents the third coordinate axis in the first coordinate system, where the first vector is determined based on the first position of the first object in the first coordinate system and the second position of the second object in the first coordinate system. After obtaining the first vector, the navigation device determines a second conversion relationship based on the first coordinate axis and the first vector, where the second conversion relationship is used to align the first coordinate axis with the third coordinate axis. Then, based on the second conversion relationship, the first coordinate system is converted into a third coordinate system, where the third coordinate system includes a fifth coordinate axis, and the fifth coordinate axis is obtained by converting the second coordinate axis. Then, based on the fifth coordinate axis and the second vector, a third conversion relationship is determined, where the second vector represents the fourth coordinate axis in the third coordinate system, and the third conversion relationship is used to align the fifth coordinate axis with the fourth coordinate axis. Finally, based on the second conversion relationship and the third conversion relationship, the first conversion relationship can be determined.
[0190] Generally speaking, the first vector is the input data for the navigation device to determine the first conversion relationship, and the navigation device can determine the first conversion relationship based on this input data. Since the first vector is determined based on the first position of the first object and the second position of the second object, the navigation device can determine the first conversion relationship between the first coordinate system and the second coordinate system based on the first object and the second object, that is, the navigation device can determine the first conversion relationship between the first coordinate system and the second coordinate system based on two objects, thereby reducing the complexity of determining the first conversion relationship.
[0191] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the methods described in the method embodiments above. The specific implementation can refer to the description of the method embodiments above. For the sake of brevity, it will not be repeated here.
[0192] Figure 7 It is a schematic diagram of the hardware structure of an electronic device provided in the embodiments of the present application. The electronic device 2 includes a processor 21 and a memory 22. Optionally, the electronic device 2 further includes an input device 23 and an output device 24. The processor 21, the memory 22, the input device 23, and the output device 24 are coupled through a connector, and the connector includes various interfaces, transmission lines, or buses, etc. The embodiments of the present application do not limit this. It should be understood that in various embodiments of the present application, coupling means being interconnected in a specific manner, including being directly connected or indirectly connected through other devices. For example, they can be connected through various interfaces, transmission lines, buses, etc.
[0193] The memory 22 can be used to store computer program instructions and various computer program codes including the program codes for implementing the solutions of this application. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM), and this memory is used for relevant instructions and data.
[0194] The input device 23 is used to input data and / or signals, and the output device 24 is used to output data and / or signals. The input device 23 and the output device 24 can be independent devices or an integrated device.
[0195] It can be understood that in the embodiments of this application, the memory 22 can be used not only to store relevant instructions but also to store relevant data, and the embodiments of this application do not limit the specific data stored in this memory.
[0196] It can be understood that Figure 7 Only a simplified design of an electronic device is shown. In practical applications, the electronic device may also separately include other necessary elements, including but not limited to any number of input / output devices, processors, memories, etc., and all electronic devices that can implement the embodiments of this application are within the protection scope of this application.
[0197] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0198] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be repeated here. Those skilled in the art can also clearly understand that each embodiment of this application has different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, the parts not described or not described in detail in a certain embodiment can be referred to the descriptions of other embodiments.
[0199] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0200] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0201] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0202] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
[0203] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by relevant hardware instructed by a computer program. This program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The foregoing storage medium includes various media that can store program codes, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
Claims
1. A method for navigation based on two objects, characterized in that, The method is used to determine a first transformation relationship between a first coordinate system and a second coordinate system based on a first object and a second object. The first coordinate system includes a first coordinate axis and a second coordinate axis. The coordinate axis corresponding to the first coordinate axis in the second coordinate system is a third coordinate axis, and the coordinate axis corresponding to the second coordinate axis in the second coordinate system is a fourth coordinate axis. The method includes: Obtain a first vector, where the first vector represents the third coordinate axis in the first coordinate system, and the first vector is determined based on a first position of the first object in the first coordinate system and a second position of the second object in the first coordinate system; Based on the first coordinate axis and the first vector, determine a second transformation relationship, where the second transformation relationship is used to align the first coordinate axis with the third coordinate axis; Based on the second transformation relationship, convert the first coordinate system into a third coordinate system, where the third coordinate system includes a fifth coordinate axis, and the fifth coordinate axis is obtained by transforming the second coordinate axis; Based on the fifth coordinate axis and a second vector, determine a third transformation relationship, where the second vector represents the fourth coordinate axis in the third coordinate system, and the third transformation relationship is used to align the fifth coordinate axis with the fourth coordinate axis; the second vector is determined based on a starting position and an ending position of the first object moving along a ninth coordinate axis, or the second vector is determined based on a starting position and an ending position of the second object moving along the ninth coordinate axis; the ninth coordinate axis is the coordinate axis corresponding to the fourth coordinate axis in a sixth coordinate system, and the sixth coordinate system is a coordinate system constructed based on a first structure of a robotic arm, and both the first object and the second object are connected to the first structure; Based on the second transformation relationship and the third transformation relationship, determine the first transformation relationship.
2. The method according to claim 1, characterized in that: The first coordinate system is the coordinate system of a tracking device, both the first object and the second object are objects that can be tracked by the tracking device, and the second coordinate system is constructed based on the first object; The method further includes: Based on the first transformation relationship and a first relative position relationship, determine a fourth transformation relationship between the first coordinate system and a fourth coordinate system, where the first relative position relationship is the relative position relationship between the first object and the end of a target guide rail, and the fourth coordinate system is a coordinate system constructed based on the end; Obtain a target path and a third vector in the first coordinate system, where the third vector represents the target guide rail in the first coordinate system; Based on the fourth transformation relationship, the target path, and the third vector, determine a first pose of the end. When the pose of the end is the first pose, the target guide rail coincides with the target path.
3. The method according to claim 2, characterized in that The target guide rail is connected to the first structure of the robotic arm, and the method further includes: Determining a second posture of the first structure based on the first posture and a second relative position relationship, where the second relative position relationship is a relative position relationship between the first structure and the terminal, and when the posture of the first structure is the second posture, the posture of the terminal is the first posture; A control instruction is sent to the robotic arm, where the control instruction is used to instruct the robotic arm to control the posture of the first structure to the second posture.
4. The method according to any one of claims 1 to 3, characterized in that, The third coordinate axis passes through the first object and the second object, and obtaining the first vector includes: determining a vector passing through the first object and the second object based on the first position and the second position; The first vector is determined based on a vector passing through the first object and the second object.
5. The method according to any one of claims 1 to 3, characterized in that The determining a second conversion relationship based on the first coordinate axis and the first vector includes: determining a first rotation matrix based on the first coordinate axis and the first vector, wherein the first rotation matrix is used to align the first coordinate axis with the third coordinate axis; The first conversion relationship is determined based on the first rotation matrix and a first translation amount, where the first translation amount is a translation amount between the first coordinate system and the second coordinate system.
6. The method according to claim 5, wherein The second coordinate system is constructed based on the first object, and the first translation amount is determined based on the first position.
7. A device based on the navigation between two objects, characterized in that, The apparatus for two-object navigation is used to determine a first conversion relationship between a first coordinate system and a second coordinate system based on a first object and a second object, wherein the first coordinate system includes a first coordinate axis and a second coordinate axis, a coordinate axis corresponding to the first coordinate axis in the second coordinate system is a third coordinate axis, and a coordinate axis corresponding to the second coordinate axis in the second coordinate system is a fourth coordinate axis, and the apparatus for two-object navigation includes: an acquiring unit, configured to acquire a first vector, where the first vector represents the third coordinate axis in the first coordinate system, and the first vector is determined based on a first position of the first object in the first coordinate system and a second position of the second object in the first coordinate system; a determining unit, configured to determine a second transformation relationship based on the first coordinate axis and the first vector, wherein the second transformation relationship is used to align the first coordinate axis with the third coordinate axis; a conversion unit, configured to convert the first coordinate system into a third coordinate system based on the second conversion relationship, wherein the third coordinate system includes a fifth coordinate axis obtained by converting the second coordinate axis; The determining unit is further configured to determine a third transformation relationship based on the fifth coordinate axis and the second vector, the second vector representing the fourth coordinate axis in the third coordinate system, and the third transformation relationship being used to align the fourth coordinate axis with the fifth coordinate axis; the second vector representation is determined based on a starting position and an ending position of the first object moving along the ninth coordinate axis, and the second vector representation is determined based on a starting position and an ending position of the second object moving along the ninth coordinate axis; the ninth coordinate axis is a coordinate axis corresponding to the fourth coordinate axis in the sixth coordinate system, the sixth coordinate system is a coordinate system constructed based on the first structure of the robotic arm, and the first object and the second object are both connected to the first structure; The determining unit is further configured to determine the first conversion relationship based on the second conversion relationship and the third conversion relationship.
8. An electronic device, characterized in that, include: A processor and a memory, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product comprises a computer program; when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Kalman filtering visual tracking stabilization method based on motion state estimation
CN112465877A
Surgical navigation method and device, electronic equipment and storage medium
CN114159159A