Method and device for planning a path based on skin, surgical robot, electronic device
Patent Information
- Application Number
- CN202611154938.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-08-28
AI Technical Summary
然而基于目前的技术规划得到的导引器的运动路径的合理性低,进而导致导引器的运动过程易发生碰撞,如导引器与障碍物发生碰撞,从而降低安全性和导引器的运动效率
[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application.
Smart Images

Figure CN122643032A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical imaging technology, and in particular to a method and apparatus for skin-based path planning, a surgical robot, and electronic equipment. Background Technology
[0002] In the medical field, robotic arms are commonly used to move guides from an initial position to a target position. However, the motion paths of these guides, planned using current technology, are often not highly efficient, leading to a higher risk of collisions, such as between the guide and obstacles. This reduces safety and efficiency. Therefore, improving the efficiency of guide motion paths is a pressing issue that needs to be addressed. Summary of the Invention
[0003] This application provides a method and apparatus, surgical robot, and electronic device based on skin planning path to improve the rationality of the movement path of the guide.
[0004] Firstly, a skin-based path planning method is provided, the method comprising: Acquire a first three-dimensional computed tomography (CT) image, the first three-dimensional CT image including the skin region of the first object; Based on the first distance and the first contour of the skin region, a second contour is obtained in a first coordinate system; wherein, the first coordinate system is the pixel coordinate system of the first three-dimensional CT image, the second contour does not intersect with the first object, and the distance between the first contour and the second contour is the first distance; Obtain the initial pose of the guide in the first coordinate system and the target pose of the guide in the first coordinate system; Based on the starting position corresponding to the starting pose and the target position corresponding to the target pose, a first vector is obtained, and the first vector passes through the starting position and the target position; When the first vector intersects the second contour, a second vector is obtained, wherein the second vector is perpendicular to the coronal plane of the first object; Based on the first vector and the second vector, a first plane is obtained, the first plane including the first vector and the second vector; Determine the target intersection line between the first plane and the second contour; Based on the target intersection line, a target path is obtained; wherein, when the guide moves based on the target path, the pose of the guide changes from the initial pose to the target pose, and the guide does not collide with the first object during the movement.
[0005] In any embodiment of this application, the first object is in contact with the supporting surface, and the supporting surface is parallel to the ground; the distance from the starting position to the ground and the distance from the target position to the ground are both greater than the distance from the supporting surface to the ground; The process of obtaining the target path based on the target intersection line includes: A first sub-intersection is determined from the target intersection line, the two endpoints of the first sub-intersection line include a first intersection point and a second intersection point, the first intersection point and the second intersection point are the two intersection points of the first vector and the second contour; When a point in the first sub-intersection is located on the same side of the support surface, the target path is obtained based on the first sub-intersection.
[0006] In conjunction with any embodiment of this application, before obtaining the target path based on the first sub-intersection line when the points in the first sub-intersection line are located on the same side of the support surface, the method further includes: A second coordinate system is obtained based on the first plane, the first vector, and the starting position; wherein, the origin of the second coordinate system is determined based on the starting position, and the second coordinate system includes a first horizontal coordinate axis, a first vertical coordinate axis, and a first vertical coordinate axis. The first horizontal coordinate axis is determined based on the first vector, the first vertical coordinate axis is determined based on a third vector, and the first vertical coordinate axis is determined based on the normal vector of the first plane. The third vector is a vector within the first plane, and the third vector is perpendicular to both the first vector and the normal vector of the first plane. Determine the first transformation relationship, which is the transformation relationship between the first coordinate system and the second coordinate system; Based on the first transformation relationship and the coordinates of the points in the first sub-intersection line in the first coordinate system, a first ordinate set is obtained, which includes the coordinates of the points in the first sub-intersection line on the first ordinate axis. Based on the first set of ordinates, determine whether the points in the first sub-intersection line are located on the same side of the support surface.
[0007] In any embodiment of this application, the first coordinate system includes a second horizontal coordinate axis, a second vertical coordinate axis, and a second vertical coordinate axis. The plane defined by the second horizontal coordinate axis and the second vertical coordinate axis is a second plane, and the second plane is parallel to the first plane. Determining the first transformation relationship includes: Based on the starting position and the target position, the position of the first vector in the first coordinate system is obtained; The first transformation relationship is obtained based on the position of the first vector in the first coordinate system, the position of the first horizontal axis in the second coordinate system, the position of the second vertical axis in the first coordinate system, and the position of the normal vector of the first plane in the second coordinate system.
[0008] In any embodiment of this application, the direction of the first ordinate axis is away from the first object, and determining whether a point in the first sub-intersection line is located on the same side of the support surface based on the first ordinate set includes: If there are no coordinates less than 0 in the first ordinate set, it is determined that the points in the first sub-intersection line are located on the same side of the support surface; If there are coordinates less than 0 in the first ordinate set, it is determined that the points in the first sub-intersection line are not located on the same side of the support surface.
[0009] In conjunction with any embodiment of this application, the method further includes: Based on the target path, the first pose sequence of the guide is obtained, and the pose in the first pose sequence is the pose of the guide during the process of moving according to the target path. Based on the first pose sequence, a first collision detection result is obtained, which indicates whether the guide collides with an obstacle during its movement along the target path.
[0010] In any embodiment of this application, the guide is connected to a robotic arm, and the robotic arm is used to drive the guide to move; After obtaining the first pose sequence of the guide based on the target path, the method further includes: Based on the relative positional relationship between the guide and the robotic arm, and the first pose sequence, a second pose sequence of the joints of the robotic arm is obtained. The poses in the second pose sequence are the poses of the joints when the robotic arm drives the guide to move along the target path. If the difference between two adjacent poses in the second pose sequence is greater than or equal to a first threshold, the second pose sequence is interpolated to obtain a third pose sequence. The difference between two adjacent poses in the third pose sequence is less than the first threshold. The third pose sequence is used to control the movement of the robotic arm.
[0011] Secondly, a skin-planning path-based device is provided, the skin-planning path-based device comprising: An acquisition unit is used to acquire a first three-dimensional CT image, wherein the first three-dimensional CT image includes the skin region of a first object; The processing unit is configured to obtain a second contour in a first coordinate system based on a first distance and a first contour of the skin region; wherein the first coordinate system is the pixel coordinate system of the first three-dimensional CT image, the second contour does not intersect with the first object, and the distance between the first contour and the second contour is the first distance; The acquisition unit is further configured to acquire the initial pose of the guide in the first coordinate system and the target pose of the guide in the first coordinate system; The processing unit is further configured to obtain a first vector based on the starting position corresponding to the starting pose and the target position corresponding to the target pose, wherein the first vector passes through the starting position and the target position; The processing unit is further configured to obtain a second vector when the first vector intersects with the second contour, wherein the second vector is perpendicular to the coronal plane of the first object; The processing unit is further configured to obtain a first plane based on the first vector and the second vector, wherein the first plane includes the first vector and the second vector; The processing unit is further configured to determine the target intersection line between the first plane and the second contour; The processing unit is further configured to obtain a target path based on the target intersection line; wherein, when the guide moves based on the target path, the pose of the guide is converted from the initial pose to the target pose, and the guide does not collide with the first object during the movement.
[0012] In any embodiment of this application, the first object is in contact with the supporting surface, and the supporting surface is parallel to the ground; the distance from the starting position to the ground and the distance from the target position to the ground are both greater than the distance from the supporting surface to the ground; The processing unit is used for: A first sub-intersection is determined from the target intersection line, the two endpoints of the first sub-intersection line include a first intersection point and a second intersection point, the first intersection point and the second intersection point are the two intersection points of the first vector and the second contour; When a point in the first sub-intersection is located on the same side of the support surface, the target path is obtained based on the first sub-intersection.
[0013] In conjunction with any embodiment of this application, the processing unit is further configured to: A second coordinate system is obtained based on the first plane, the first vector, and the starting position; wherein, the origin of the second coordinate system is determined based on the starting position, and the second coordinate system includes a first horizontal coordinate axis, a first vertical coordinate axis, and a first vertical coordinate axis. The first horizontal coordinate axis is determined based on the first vector, the first vertical coordinate axis is determined based on a third vector, and the first vertical coordinate axis is determined based on the normal vector of the first plane. The third vector is a vector within the first plane, and the third vector is perpendicular to both the first vector and the normal vector of the first plane. Determine the first transformation relationship, which is the transformation relationship between the first coordinate system and the second coordinate system; Based on the first transformation relationship and the coordinates of the points in the first sub-intersection line in the first coordinate system, a first ordinate set is obtained, which includes the coordinates of the points in the first sub-intersection line on the first ordinate axis. Based on the first set of ordinates, determine whether the points in the first sub-intersection line are located on the same side of the support surface.
[0014] In any embodiment of this application, the first coordinate system includes a second horizontal coordinate axis, a second vertical coordinate axis, and a second vertical coordinate axis. The plane defined by the second horizontal coordinate axis and the second vertical coordinate axis is a second plane, and the second plane is parallel to the first plane. The processing unit is used for: Based on the starting position and the target position, the position of the first vector in the first coordinate system is obtained; The first transformation relationship is obtained based on the position of the first vector in the first coordinate system, the position of the first horizontal axis in the second coordinate system, the position of the second vertical axis in the first coordinate system, and the position of the normal vector of the first plane in the second coordinate system.
[0015] In any embodiment of this application, the direction of the first vertical axis is away from the first object, and the processing unit is used for: If there are no coordinates less than 0 in the first ordinate set, it is determined that the points in the first sub-intersection line are located on the same side of the support surface; If there are coordinates less than 0 in the first ordinate set, it is determined that the points in the first sub-intersection line are not located on the same side of the support surface.
[0016] In conjunction with any embodiment of this application, the processing unit is further configured to: Based on the target path, the first pose sequence of the guide is obtained, and the pose in the first pose sequence is the pose of the guide during the movement according to the target path. Based on the first pose sequence, a first collision detection result is obtained, which indicates whether the guide collides with an obstacle during its movement along the target path.
[0017] In any embodiment of this application, the guide is connected to a robotic arm, and the robotic arm is used to drive the guide to move; The processing unit is further configured to: Based on the relative positional relationship between the guide and the robotic arm, and the first pose sequence, a second pose sequence of the joints of the robotic arm is obtained. The poses in the second pose sequence are the poses of the joints when the robotic arm drives the guide to move along the target path. If the difference between two adjacent poses in the second pose sequence is greater than or equal to a first threshold, the second pose sequence is interpolated to obtain a third pose sequence. The difference between two adjacent poses in the third pose sequence is less than the first threshold. The third pose sequence is used to control the movement of the robotic arm.
[0018] Thirdly, a surgical robot is provided, including a skin-based path planning device as described in the second aspect. In this third aspect, the surgical robot can execute a skin-based path planning method via the skin-based path planning device to achieve the effect of improving the rationality of the planned path.
[0019] Fourthly, an electronic device is provided, comprising: a processor and a memory, the memory for storing computer program code, the computer program code including computer instructions, wherein, when the processor executes the computer instructions, the electronic device performs a method as described in the first aspect above and any possible implementation thereof.
[0020] Fifthly, another electronic device is provided, comprising: a processor, a transmitting device, an input device, an output device, and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein, when the processor executes the computer instructions, the electronic device performs a method as described in the first aspect above and any possible implementation thereof.
[0021] In a sixth aspect, a computer-readable storage medium is provided, wherein a computer program is stored therein, the computer program including program instructions that, when executed by a processor, cause the processor to perform a method as described in the first aspect above and any possible implementation thereof.
[0022] In a seventh aspect, a computer program product is provided, the computer program product comprising a computer program or instructions, wherein, when the computer program or instructions are executed on a computer, the computer performs the method described in the first aspect and any possible implementation thereof.
[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments of this application will be described below.
[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0026] Figure 1 A flowchart illustrating a skin-based path planning method provided in this application embodiment; Figure 2 A schematic diagram illustrating the relationship between a first contour and a second contour provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the relationship between a first object and a guide provided in an embodiment of this application; Figure 4 This application provides a schematic diagram illustrating the relationship between a human body model, a bed, a starting position, and a target position in an embodiment of the present application. Figure 5 A schematic diagram illustrating the relationship between a first object, a guide, a target path, and a reference path, provided for an embodiment of this application; Figure 6 A schematic diagram illustrating the relationship between a starting position, a target position, a first intersection point, a second intersection point, a target intersection line, a first contour, and a supporting surface, provided for an embodiment of this application; Figure 7 A schematic diagram of a second coordinate system provided in an embodiment of this application; Figure 8 A schematic diagram of a skin-based path planning device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] To enable those skilled in the art to better understand 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. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0028] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0029] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. It should be understood that in this application, "at least one" means one or more, "more" means two or more, and "at least two" means two or three or more.
[0030] The execution subject of this application embodiment is a skin-based path planning device (hereinafter referred to as the planning device), wherein the planning device can be any electronic device capable of executing the technical solutions disclosed in the method embodiments of this application. Optionally, the planning device can be one of the following: a computer, a server.
[0031] It should be understood that the method embodiments of this application can also be implemented by a processor executing computer program code. The embodiments of this application are described below with reference to the accompanying drawings. Please refer to... Figure 1 , Figure 1 This is a flowchart illustrating a skin-based path planning method provided in an embodiment of this application.
[0032] 101. The planning device acquires a first three-dimensional CT image, wherein the first three-dimensional CT image includes the skin region of the first object.
[0033] In this embodiment, the first object is a human being, or a human body model. The human body model is a physical model; exemplarily, the materials used in the human body model include at least one of the following: silicone, resin, gel, and polyurethane. The first three-dimensional CT image is a three-dimensional image obtained by performing a CT scan on the first object. The first three-dimensional CT image includes the skin area of the first object. Optionally, the first object also includes multiple tissues within the first object, such as kidneys, lungs, blood vessels, and bones.
[0034] 102. The planning device obtains a second contour in a first coordinate system based on a first distance and a first contour of the skin region, wherein the first coordinate system is the pixel coordinate system of the first three-dimensional CT image, the second contour does not intersect with the first object, and the distance between the first contour and the second contour is the first distance.
[0035] The planning device extends the contour of the skin region outward by a first distance in a direction away from the first object by step 102 to obtain a second contour. In some embodiments, the minimum distance between the first and second contours is the first distance. In other embodiments, the minimum distance from any point in the second contour to the first contour is the first distance.
[0036] In one possible implementation, the planning device determines a first coordinate set, which includes the coordinates of each point in the first contour in a first coordinate system. A second coordinate set is obtained based on a first distance and the first coordinate set, wherein the coordinates in the first coordinate set correspond one-to-one with the coordinates in the second coordinate set, and the direction from the coordinates in the first coordinate set to the corresponding coordinates in the second coordinate set is a direction away from the first object, and the distance between the coordinates in the first coordinate set and the corresponding coordinates in the second coordinate set is the first distance. A second contour is obtained based on the second coordinate set, wherein the coordinates of the points in the second contour are the coordinates in the second coordinate set. This implementation ensures that the distance from each point in the second contour to the corresponding point in the first contour is the first distance; that is, the distance from every point in the second contour to the first contour is the first distance.
[0037] In another possible implementation, the planning device determines a first coordinate set. The first coordinate set is sampled to obtain a third coordinate set, wherein the number of coordinates in the third coordinate set is less than the number of coordinates in the first coordinate set. Optionally, the third coordinate set is obtained by uniformly sampling the first coordinate set. In this case, no two coordinates in the third coordinate set are adjacent. This ensures that the coordinates in the third coordinate set are evenly distributed within the first contour. A fourth coordinate set is obtained based on the first distance and the third coordinate set, wherein the coordinates in the third coordinate set correspond one-to-one with the coordinates in the fourth coordinate set, and the direction from the coordinates in the third coordinate set to the corresponding coordinates in the fourth coordinate set is away from the first object, and the distance between the coordinates in the third coordinate set and the corresponding coordinates in the fourth coordinate set is the first distance. A first point set is determined based on the coordinates in the fourth coordinate set, wherein the coordinates of the points in the first point set are the coordinates in the fourth coordinate set. The points in the first point set are fitted to obtain a second contour. Obtaining the second contour using this implementation method reduces the amount of data processing and improves processing speed.
[0038] For example, Figure 2 This is a schematic diagram illustrating the relationship between a first contour and a second contour, provided as an embodiment of this application. Figure 2 The image shown is a cross-sectional view of the first 3D CT image, illustrating the cross-section of the first object. Figure 2 As shown, the shape of the first contour matches the shape of the second contour, and the first contour and the second contour are separated by a certain distance (i.e., the first distance). Figure 2 Optical markers are also shown, which are affixed to the skin surface of the first object. For example, there are six optical markers. The position of the optical markers in the world coordinate system can be determined based on the optical tracking device. Then, based on the positions of the optical markers in the world coordinate system and the positions of the optical markers in the first coordinate system, a second transformation relationship between the world coordinate system and the first coordinate system can be obtained. Thus, based on the second transformation relationship, the reference path in the first coordinate system can be converted into a transformed path in the world coordinate system, and the robotic arm can be controlled to move the guide based on the transformed path.
[0039] 103. The planning device acquires the initial pose of the guide in the first coordinate system and the target pose of the guide in the first coordinate system.
[0040] In some solutions, the guide is connected to a robotic arm. The guide's pose can be adjusted by controlling the movement of the robotic arm to move the guide. The initial pose is the pose of the guide before it begins to move. The target pose is the pose of the guide when it completes its movement. In other words, the guide changes from the initial pose to the target pose through movement. For example, Figure 3 This is a schematic diagram illustrating the relationship between a first object and a guide, provided in an embodiment of this application. Figure 3The diagram shows a guide in a starting pose and a guide in a target pose, wherein the starting pose is when the guide is horizontally placed on the side of the first object, and the target pose is when the guide is obliquely placed above the first object.
[0041] Optionally, the guide includes a placement hole for placing a second object, and when the second object is placed within the placement hole, the movement path of the second object coincides with the axis of the placement hole. Exemplarily, the second object is a needle. When the guide's pose is a target pose, the axis of the placement hole coincides with a reference path, where the reference path is the path by which the second object moves from a skin region of the first object to a lesion region within the first object. Exemplarily, the needle moves along the reference path, moving from the skin region of the first object to the lesion region. When the guide's pose is the target pose, after placing the second object in the placement hole, the second object can be moved along the reference path by moving the second object.
[0042] In one possible implementation, the planning device determines a reference path based on a first 3D CT image, wherein the reference path passes through the skin region and the lesion region of the first object. The target pose of the guide in a first coordinate system is then determined based on the reference path.
[0043] Optionally, the initial pose is the pose of the guide before the planning device determines the reference path.
[0044] In one possible scenario (hereinafter referred to as the target scenario), the first object is placed on a support device, wherein the support surface of the support device contacts the first object and is parallel to the ground. For example, the first object is a human body model, the support device is a bed, and the support surface is the surface of the bed that contacts the human body model. After controlling the movement of the robotic arm to move the guide, so that the guide's pose changes from the initial pose to the target pose, a second object can be placed in the guide's placement hole. Then, by moving the second object, it can be moved from the skin area of the human body model to the lesion area of the human body model. This allows for the simulation of a puncture surgery.
[0045] Because the bed lies beneath the human body model, the target position corresponding to the target pose is located above the human body model to facilitate the movement of the robotic arm and the second object. Furthermore, to avoid collisions, the robotic arm is typically far from the human body model and the bed before its movement is controlled; therefore, the distance from the starting position corresponding to the initial pose to the human body model is greater than a first distance. For example, Figure 4 This application provides a schematic diagram illustrating the relationship between a human body model, a bed, a starting position, and a target position, as shown in the embodiments of this application. Figure 4As shown, a human body model is placed on a bed, with the supporting surface of the bed that contacts the human body model parallel to the ground, meaning the human body model is placed horizontally. The target position is located above the human body model, and the distance from the starting position to the human body model is relatively far. Optionally, the distance from the starting position to the ground is greater than the distance from the supporting surface to the ground.
[0046] 104. The planning device obtains a first vector based on the starting position corresponding to the initial pose and the target position corresponding to the target pose, wherein the first vector passes through the starting position and the target position.
[0047] 105. When the planning device finds the second vector when the first vector intersects the second contour, the second vector is perpendicular to the coronal plane of the first object.
[0048] 106. The planning device obtains a first plane based on a first vector and a second vector, wherein the first plane includes the first vector and the second vector.
[0049] 107. The planning device determines the target intersection line between the first plane and the second contour.
[0050] 108. The planning device obtains the target path based on the target intersection line.
[0051] In steps 104 to 108, the planning device obtains the target path based on the initial pose, the target pose, and the second contour. When the guide moves based on the target path, the pose of the guide changes from the initial pose to the target pose, and the guide does not collide with the first object during the movement.
[0052] Because the second contour does not intersect with the first object, the planning device plans a path from the initial pose to the target pose based on the second contour, ensuring that the planned path does not intersect with the first object. Please refer to [link / reference]. Figure 5 , Figure 5 This is a schematic diagram illustrating the relationship between a first object, a guide, a target path, and a reference path, provided for an embodiment of this application. Figure 5 As shown, the target path does not intersect with the first object. After the guide moves along the target path, its pose can be transformed from the initial pose to the target pose. Figure 5 A reference path is also shown, extending from outside the first object body into the first object body. The reference path is determined based on the guide when the guide's pose is the target pose.
[0053] In some schemes, the planning device obtains at least one first candidate path based on the initial pose and the target pose. It then determines at least one second candidate path from among the at least one first candidate path that does not intersect with the second contour. Finally, it determines the target path from among the at least one second candidate path whose distance to the first object is greater than a first distance.
[0054] In other schemes, the distance from the starting position to the first object is greater than a first distance. The planning device determines the line connecting the starting position corresponding to the starting pose and the target position corresponding to the target pose. It determines whether the line intersects with the second contour. If there is no intersection, it means the line does not intersect with the first object, so the line can be used as the target path. If there is an intersection, a first sub-path is obtained based on the starting position and the intersection point closest to the starting position. A second sub-path is obtained based on the intersection point of the line and the second contour. A third sub-path is obtained based on the intersection point closest to the target position and the target position. The first, second, and third sub-paths are combined to obtain the target path. For example, the intersection points of the line and the second contour include a first intersection point and a second intersection point, wherein the distance from the first intersection point to the starting position is less than the distance from the first intersection point to the target position, and the distance from the second intersection point to the target position is less than the distance from the second intersection point to the starting position. The first sub-path is the path of the guide from the starting position to the first intersection point. The second sub-path can be a curve in the second contour, and the two endpoints of the second sub-path are the first intersection point and the second intersection point, respectively. That is, the second sub-path is the path of the guide moving from the first intersection point along the second contour to the second intersection point. The third sub-path is the path of the guide from the second intersection point to the target position.
[0055] In some schemes, the first vector is parallel to the cross-section of the first object, where the cross-section is a plane that divides the first object into upper and lower parts.
[0056] The first vector, the line connecting the starting position and the target position are collinear. In some implementations, the first vector is the vector pointing from the starting position to the target position. In other implementations, the first vector is the vector pointing from the target position to the starting position. The coronal plane of the first object is the plane that divides the first object into front and rear parts. In the target scene, the coronal plane of the first object is parallel to the support surface and the ground. The second vector is perpendicular to the coronal plane of the first object. In the target scene, the direction of the second vector is the same as the direction of gravity, or the direction of the second vector is opposite to the direction of gravity, where opposite means that the angle between the direction of the second vector and the direction of gravity is 180 degrees. As mentioned above, when the line connecting the starting position and the target position does not intersect the second contour, the target path can be directly determined based on the starting position and the target position. However, when the line intersects the second contour, the target path needs to be determined based on the second contour. Therefore, when the first vector intersects the second contour, the planning device obtains the second vector so that the target path can be determined subsequently based on the second vector and the second contour.
[0057] Considering that cutting a cross section of the first object along a direction perpendicular to the coronal plane of the first object results in the smallest perimeter, in other words, cutting a cross section of the first object along its cross-section minimizes the perimeter of the first object's cross section. Here, the cross section of the first object includes the cross section of the first contour, and the perimeter of the first object's cross section is the same as the perimeter of the first contour's cross section. Therefore, to reduce the length of the target path, after obtaining the first plane based on the first and second vectors, the planning device first determines the target intersection line between the first plane and the second contour, and then obtains the target path based on the target intersection line. Since the first vector passes through the starting position and the target position, and the first plane includes the first vector, the target intersection line obtained based on the first plane passes through both the starting and target positions. Furthermore, since the second vector is perpendicular to the coronal plane, and the first plane includes the second vector, the first plane is perpendicular to the coronal plane. Therefore, cutting a cross section of the second contour based on the first plane yields the cross section with the smallest perimeter; that is, the target intersection line is the candidate cross section with the smallest perimeter in the second contour, where the candidate cross section passes through the starting and target positions. The planning device then obtains the target path based on the target intersection line, thus reducing the length of the target path.
[0058] exist Figure 1 In the method shown, after acquiring a first 3D CT image including the skin region of the first object, the planning device obtains a second contour based on a first distance and a first contour of the skin region, which can extend the contour of the skin region outward by a first distance away from the first object. This ensures that the second contour does not intersect with the first object. After acquiring the initial pose and target pose of the guide, the planning device obtains a target path based on the initial pose, target pose, and second contour, which can make the target path bypass the first object and reduce its length, thereby improving the rationality of the target path.
[0059] In one optional implementation, the first object contacts a supporting surface, which is parallel to the ground. The distances from the starting position to the ground and the target position to the ground are both greater than the distance from the supporting surface to the ground; that is, the heights of the starting position and the target position are both greater than the height of the supporting surface. For example, in... Figure 4 In this embodiment, the distances from the starting position to the ground and the target position to the ground are both greater than the distance from the supporting surface to the ground. The target path is obtained based on the target intersection line, including the following steps: Based on the starting position and the target position, a first sub-intersection line is determined from the target intersection line, wherein the two endpoints of the first sub-intersection line include a first intersection point and a second intersection point, which are the two intersection points of a first vector and a second contour. When the points in the first sub-intersection line are located on the same side of the supporting surface, the target path is obtained based on the first sub-intersection line.
[0060] The target intersection line is a closed curve, which includes a portion below the support surface and a portion above the support surface. If the portion below the support surface is used as the guide's movement path, the robotic arm needs to move the guide below the support surface, which can easily lead to collisions between the robotic arm and the guide and other obstacles during movement. For example, in... Figure 4 In this system, the target intersection line includes the portion above the bed and the portion below the bed. If the robotic arm drives the guide to move from below the bed, it is easy for the robotic arm and guide to collide with the bed. Therefore, the planning device obtains the target path based on the portion of the target intersection line above the support surface, which can improve the rationality of the target path, that is, reduce the risk of the guide colliding with other obstacles when it moves based on the target path.
[0061] Based on the first and second intersection points, the target intersection line can be divided into two sub-intersection lines, both of which have endpoints including the first and second intersection points. The aforementioned first sub-intersection line is one of these two sub-intersection lines. Please refer to [link / reference]. Figure 6 , Figure 6 This is a schematic diagram illustrating the relationship between a starting position, a target position, a first intersection point, a second intersection point, a target intersection line, a first contour, and a supporting surface, provided for an embodiment of this application. Figure 6 As shown, both the starting position and the target position are located above the support surface, meaning the distances from the starting position to the ground and the target position to the ground are both greater than the distance from the support surface to the ground. The support surface is in contact with the first contour, and there is a distance between the target intersection line and the first contour. The first intersection point and the second intersection point are points on the target intersection line. The distance from the first intersection point to the starting position is less than the distance from the first intersection point to the target position, and the distance from the second intersection point to the target position is less than the distance from the second intersection point to the starting position. Figure 6 As shown, the target intersection line is divided into two parts, namely two sub-intersection lines, by the first intersection point and the second intersection point. All points of one sub-intersection line are located above the supporting surface, while some points of the other sub-intersection line are located below the supporting surface. Based on this, the planning device can determine whether a sub-intersection line includes the portion located below the supporting surface by considering whether the points in the sub-intersection line are located on the same side of the supporting surface. Specifically, if the points in the sub-intersection line are located on the same side of the supporting surface, the sub-intersection line does not include the portion located below the supporting surface; otherwise, the sub-intersection line includes the portion located below the supporting surface. Therefore, in this embodiment, when the points in the first sub-intersection line are located on the same side of the supporting surface, the planning device can obtain the target path based on the first sub-intersection line, which can improve the rationality of the target path. Optionally, obtaining the target path based on the first sub-intersection line includes: using the first sub-intersection line as the second sub-path, and obtaining the target path based on the first sub-path, the second sub-path, and the third sub-path.
[0062] Based on this implementation method, it is possible to determine whether the first sub-intersection line includes the portion located below the support surface without utilizing the position information of the support surface, and to determine the target path based on the sub-intersection line, thereby improving the rationality of the target path.
[0063] In one alternative implementation, if the points in the first sub-intersection are located on the same side of the support surface, the planning device uses the first sub-intersection as the target path.
[0064] In one alternative implementation, if the points in the first sub-intersection are located on the same side of the support surface, the planning device simulates the movement of the robotic arm and guide along the first sub-intersection to obtain a second collision detection result. If the second collision detection result indicates that the robotic arm and guide have not collided with other obstacles, the target path is obtained based on the first sub-intersection.
[0065] If the second collision detection result indicates that the robotic arm and guide have collided with other obstacles, then a target region is determined from the second profile whose distance to the target intersection line is less than or equal to a second threshold. Candidate paths are then determined from the target region. Optionally, points in the candidate paths are located on the same side of the support surface. The movement of the robotic arm and guide along the candidate paths is simulated to obtain a third collision detection result. If the third collision detection result indicates that the robotic arm and guide have not collided with other obstacles, then a target path is obtained based on the candidate paths. If the third collision detection result indicates that the robotic arm and guide have collided with other obstacles, then other paths are searched until the robotic arm and guide do not collide with obstacles.
[0066] In this implementation, if the first sub-intersection line would cause a collision, the planning device re-searches for candidate paths near the target intersection line and re-verifies whether the candidate paths would cause a collision. If it is determined that a collision would not occur, the target path is obtained based on the candidate paths. This improves the rationality of the target path. Furthermore, during the re-search, selecting a target area whose distance to the target intersection line is less than or equal to a second threshold as the search area reduces the amount of search data and improves search efficiency.
[0067] Optionally, the planning device can save the target area, so that when planning the path again, the path can be searched directly based on the saved target area, thereby improving the processing speed.
[0068] In an optional implementation, before executing the step "obtaining the target path based on the first sub-intersection line when the points in the first sub-intersection line are located on the same side of the support surface," the planning device further determines whether the points in the first sub-intersection line are located on the same side of the support surface by performing the following steps: A second coordinate system is obtained based on a first plane, a first vector, and a starting position. The origin of the second coordinate system is determined based on the starting position, and the second coordinate system includes a first horizontal axis, a first vertical axis, and a first vertical axis. The first horizontal axis is determined based on a first vector, the first vertical axis is determined based on a third vector, and the first vertical axis is determined based on the normal vector of the first plane. The third vector is a vector within the first plane, and the third vector is perpendicular to both the first vector and the normal vector. A first transformation relationship is determined, wherein the first transformation relationship is the transformation relationship between the first coordinate system and the second coordinate system. Based on the first transformation relationship and the coordinates of the points in the first sub-intersection line in the first coordinate system, a first set of vertical coordinates is obtained, wherein the first set of vertical coordinates includes the coordinates of the points in the first sub-intersection line on the first vertical axis. Based on the first set of vertical coordinates, it is determined whether the points in the first sub-intersection line are located on the same side of the support surface.
[0069] Please see Figure 7 , Figure 7 This is a schematic diagram of a second coordinate system provided in an embodiment of this application. Figure 7 In this system, the starting position is the origin of the second coordinate system, and the first vector pointing from the starting position to the target position is the first horizontal coordinate axis. The first vertical coordinate axis is perpendicular to the first horizontal coordinate axis and belongs to the first plane. Optionally, the third vector is the first vertical coordinate axis. The first vertical coordinate axis is perpendicular to both the first horizontal and first vertical coordinate axes, that is, the first vertical coordinate axis is perpendicular to the first plane. Optionally, the first vertical coordinate axis is the normal vector of the first plane.
[0070] Figure 7 The first intersection point, the second intersection point, and the target intersection line are also shown. From Figure 7 It can be seen that the coordinates of points on one of the sub-intersection lines on the first vertical axis (hereinafter referred to as vertical coordinates) are all not less than 0, and the vertical coordinates of points on the other sub-intersection line are all not greater than 0. Therefore, the planning device can determine whether a sub-intersection line is located on the same side of the support surface based on the vertical coordinates of the points on the sub-intersection line, that is, whether the sub-intersection line includes the portion located below the support surface. It should be understood that... Figure 7 The direction of the first vertical axis shown is only an example. In practical applications, the direction of the first vertical axis can also be other directions.
[0071] Since the coordinates in the first coordinate system can be determined based on the first 3D CT image, but not in the second coordinate system, the planning device uses a first transformation relationship to transform the coordinates of the points in the first sub-intersection line in the first coordinate system to obtain the coordinates of the points in the first sub-intersection line in the second coordinate system. Then, based on the coordinates of the points in the first sub-intersection line in the second coordinate system, a first set of ordinates can be obtained. Therefore, based on the first set of ordinates, it can be determined whether the points in the first sub-intersection line are located on the same side of the support surface.
[0072] In one optional implementation, the direction of the first vertical axis is away from the first object, that is, the direction of the first coordinate axis is as follows: Figure 7 As shown. At this point, based on the first set of ordinates, determining whether a point in the first sub-intersection line is located on the same side of the support surface includes the following steps: If there are no coordinates less than 0 in the first set of ordinates, determine that the point in the first sub-intersection line is located on the same side of the support surface. If there are coordinates less than 0 in the first set of ordinates, determine that the point in the first sub-intersection line is not located on the same side of the support surface.
[0073] Optionally, the planning device determines the coordinate with the largest absolute value in the first ordinate set as the reference coordinate. If the reference coordinate is greater than 0, it determines whether a point in the first sub-intersection line is located on the same side of the support surface. If the reference coordinate is less than 0, it determines that a point in the first sub-intersection line is not located on the same side of the support surface. This reduces the amount of data processing required to determine whether a point in the first sub-intersection line is located on the same side of the support surface, thus improving processing speed.
[0074] Optionally, since the curvature of the positions corresponding to the reference coordinates in the target intersection line is usually large, the planning device can first filter the coordinates corresponding to the positions with large curvature from the first set of ordinates to obtain the second set of ordinates, and then determine the coordinate with the largest absolute value in the second set of ordinates as the reference coordinate. This can further reduce the amount of data processing and improve the processing speed.
[0075] Optionally, the location with a larger curvature is the location where the curvature is greater than or equal to the third threshold.
[0076] In one optional implementation, the first coordinate system includes a second horizontal coordinate axis, a second vertical coordinate axis, and a second vertical coordinate axis. The plane defined by the second horizontal coordinate axis and the second vertical coordinate axis is a second plane, which is parallel to the first plane.
[0077] Optionally, the direction of the second horizontal axis is from the left side of the first object to the right side of the first object, and the direction of the second vertical axis is vertically downward, i.e., the direction of gravity. The first vector is parallel to the second horizontal axis. The direction of the second vertical axis is vertically downward, i.e., the direction of gravity. At this time, both the first plane and the second plane are perpendicular to the coronal plane of the first object; in other words, both the first plane and the second plane are parallel to the cross-section of the first object.
[0078] The planning device determines the first transformation relationship by performing the following steps: Based on the starting position and the target position, the position of the first vector in the first coordinate system is obtained. Based on the position of the first vector in the first coordinate system, the position of the first horizontal axis in the first coordinate system, the position of the second vertical axis in the first coordinate system, and the position of the normal vector of the first plane in the second coordinate system, the first transformation relationship is obtained.
[0079] Since both the starting position and the target position are in the first coordinate system, and the first horizontal axis is determined based on the starting and target positions, the position of the first horizontal axis in the first coordinate system can be determined based on the starting and target positions; that is, the position of the first vector in the first coordinate system. Furthermore, the position of the first horizontal axis in the second coordinate system can be determined. For example, the position of the first horizontal axis in the second coordinate system can be represented as (1, 0, 0).
[0080] Since the first plane and the second plane are parallel, the normal vectors of the first and second planes are also parallel. The first vertical axis of the second coordinate system is determined based on the normal vector of the first plane, and the normal vector of the second plane can be determined based on the second vertical axis. Therefore, the first and second vertical axes have a corresponding relationship. Thus, the first transformation relationship can be obtained based on the following two correspondences: the correspondence between the position of the first vector axis in the first coordinate system and the position of the first horizontal axis in the second coordinate system, and the correspondence between the first and second vertical axes. Therefore, the planning device can obtain the first transformation relationship based on the positions of the first vector axis, the first horizontal axis, the second vertical axis, and the normal vector of the first plane in the second coordinate system. Specifically, the correspondence between the first and second vertical axes can be obtained based on the positions of the second vertical axis and the normal vector of the first plane in the second coordinate system.
[0081] In one optional implementation, after obtaining the target path, the planning device further performs the following steps: based on the target path, it obtains a first pose sequence of the guide, wherein the pose in the first pose sequence is the pose of the guide during its movement along the target path. Based on the first pose sequence, it obtains a first collision detection result, wherein the first collision detection result indicates whether the guide collides with an obstacle during its movement along the target path.
[0082] In this embodiment, after obtaining the target path, the planning device also detects whether the guide collides with obstacles while moving based on the target path, obtaining a first collision detection result. The first collision detection result can reflect whether the target path is reasonable.
[0083] In some schemes, the planning device uses pose interpolation to obtain the pose of the guide during motion based on the initial pose, target pose, and target path, thereby obtaining the first pose sequence. Optionally, the planning device obtains the first pose sequence based on the quaternion spherical linear interpolation method.
[0084] In other schemes, the planning device inputs the initial pose, target pose, guide structural information, and target path information into a pose prediction model to obtain a first pose sequence. This pose prediction model is used to predict the guide's pose during motion. Optionally, the pose prediction model is a neural network.
[0085] In one optional implementation, the guide is connected to a robotic arm, which drives the guide's movement. After obtaining the guide's first pose sequence based on the target path, the planning device further performs the following steps: based on the relative positional relationship between the guide and the robotic arm, and the first pose sequence, obtains a second pose sequence of the robotic arm's joints, wherein the poses in the second pose sequence are the joint poses of the robotic arm during the process of driving the guide to move along the target path. If the difference between two adjacent poses in the second pose sequence is greater than or equal to a first threshold, the second pose sequence is interpolated to obtain a third pose sequence, wherein the difference between two adjacent poses in the third pose sequence is less than the first threshold, and the third pose sequence is used to control the robotic arm's movement.
[0086] In this implementation, the planning device first uses the first pose sequence and relative positional relationships to infer the pose sequence of the robotic arm's joints during the guide's movement, i.e., the second pose sequence. Then, it verifies whether the second pose sequence is reasonable. Specifically, if the difference between two adjacent poses of a joint is too large, the joint may exhibit at least one of the following: excessive joint movement speed, excessive joint vibration, or excessive joint range of motion. These situations all easily lead to risks; for example, excessive speed and excessive range of motion increase the risk of collision, and excessive vibration causes a large deviation between the guide's actual movement path and the target path. Therefore, if the difference between two adjacent poses in the second pose sequence is too large, it indicates that the second pose sequence is unreasonable. The difference between the two poses includes differences in position and / or posture. Optionally, the pose difference can be obtained by weighted summation of the differences in position and posture.
[0087] The first threshold serves as the criterion for determining whether the pose difference is large or small. Specifically, a pose difference greater than or equal to the first threshold indicates a large pose difference, while a pose difference less than the first threshold indicates a small pose difference. Therefore, when the difference between two adjacent poses in the second pose sequence is greater than or equal to the first threshold, the planning device interpolates the second pose sequence to obtain a third pose sequence, thus reducing the difference between adjacent poses. Controlling the robotic arm's movement based on the third pose sequence can also reduce the risk of the robotic arm during movement and minimize the deviation between the guide's actual movement path and the target path. Optionally, the planning device interpolates between two adjacent poses with a difference greater than or equal to the first threshold to obtain the third pose sequence.
[0088] In one optional implementation, after obtaining the target path, the planning device can simulate the movement of the robotic arm driving the guide along the target path to obtain simulation results. Optionally, the simulation results include at least one of the following: the pose information of the guide during the movement, the pose information of the robotic arm during the movement, and the pose information of the flange of the robotic arm during the movement, wherein the flange is a component of the robotic arm connected to the guide. The simulation results are displayed so that the user can determine whether a collision will occur during the movement of the guide based on the simulation results.
[0089] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0090] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, while using clear signs / information to inform users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, personal information processing may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
[0091] The methods of the embodiments of this application have been described in detail above, and the apparatus of the embodiments of this application is provided below.
[0092] Please see Figure 8 , Figure 8 This is a schematic diagram of a skin path planning device provided in an embodiment of this application. The skin path planning device 1 includes: an acquisition unit 11 and a processing unit 12, wherein: Acquisition unit 11 is used to acquire a first three-dimensional CT image, wherein the first three-dimensional CT image includes the skin region of the first object; Processing unit 12 is used to obtain a second contour in a first coordinate system based on a first distance and a first contour of the skin region; wherein the first coordinate system is the pixel coordinate system of the first three-dimensional CT image, the second contour does not intersect with the first object, and the distance between the first contour and the second contour is the first distance; The acquisition unit 11 is further configured to acquire the initial pose of the guide in the first coordinate system and the target pose of the guide in the first coordinate system. The processing unit 12 is further configured to obtain a first vector based on the starting position corresponding to the starting pose and the target position corresponding to the target pose, wherein the first vector passes through the starting position and the target position; The processing unit 12 is further configured to obtain a second vector when the first vector intersects with the second contour, wherein the second vector is perpendicular to the coronal plane of the first object; The processing unit 12 is further configured to obtain a first plane based on the first vector and the second vector, wherein the first plane includes the first vector and the second vector; The processing unit 12 is further configured to determine the target intersection line between the first plane and the second contour; The processing unit 12 is further configured to obtain a target path based on the target intersection line; wherein, when the guide moves based on the target path, the pose of the guide is converted from the initial pose to the target pose, and the guide does not collide with the first object during the movement.
[0093] In any embodiment of this application, the first object is in contact with the supporting surface, and the supporting surface is parallel to the ground; the distance from the starting position to the ground and the distance from the target position to the ground are both greater than the distance from the supporting surface to the ground; The processing unit 12 is used for: A first sub-intersection is determined from the target intersection line, and the two endpoints of the first sub-intersection line include a first intersection point and a second intersection point, wherein the first intersection point and the second intersection point are the two intersection points of the first vector and the second contour; When a point in the first sub-intersection is located on the same side of the support surface, the target path is obtained based on the first sub-intersection.
[0094] In conjunction with any embodiment of this application, the processing unit 12 is further configured to: A second coordinate system is obtained based on the first plane, the first vector, and the starting position; wherein, the origin of the second coordinate system is determined based on the starting position, and the second coordinate system includes a first horizontal coordinate axis, a first vertical coordinate axis, and a first vertical coordinate axis. The first horizontal coordinate axis is determined based on the first vector, the first vertical coordinate axis is determined based on a third vector, and the first vertical coordinate axis is determined based on the normal vector of the first plane. The third vector is a vector within the first plane, and the third vector is perpendicular to both the first vector and the normal vector of the first plane. Determine the first transformation relationship, which is the transformation relationship between the first coordinate system and the second coordinate system; Based on the first transformation relationship and the coordinates of the points in the first sub-intersection line in the first coordinate system, a first ordinate set is obtained, which includes the coordinates of the points in the first sub-intersection line on the first ordinate axis. Based on the first set of ordinates, determine whether the points in the first sub-intersection line are located on the same side of the support surface.
[0095] In any embodiment of this application, the first coordinate system includes a second horizontal coordinate axis, a second vertical coordinate axis, and a second vertical coordinate axis. The plane defined by the second horizontal coordinate axis and the second vertical coordinate axis is a second plane, which is parallel to the first plane. The processing unit 12 is used for: Based on the starting position and the target position, the position of the first vector in the first coordinate system is obtained; The first transformation relationship is obtained based on the position of the first vector in the first coordinate system, the position of the first horizontal axis in the second coordinate system, the position of the second vertical axis in the first coordinate system, and the position of the normal vector of the first plane in the second coordinate system.
[0096] In any embodiment of this application, the direction of the first vertical axis is away from the first object, and the processing unit 12 is used to: If there are no coordinates less than 0 in the first ordinate set, it is determined that the points in the first sub-intersection line are located on the same side of the support surface; If there are coordinates less than 0 in the first ordinate set, it is determined that the points in the first sub-intersection line are not located on the same side of the support surface.
[0097] In conjunction with any embodiment of this application, the processing unit 12 is further configured to: Based on the target path, the first pose sequence of the guide is obtained, and the pose in the first pose sequence is the pose of the guide during the movement according to the target path. Based on the first pose sequence, a first collision detection result is obtained, which indicates whether the guide collides with an obstacle during its movement along the target path.
[0098] In any embodiment of this application, the guide is connected to a robotic arm, and the robotic arm is used to drive the guide to move; The processing unit 12 is further configured to: Based on the relative positional relationship between the guide and the robotic arm, and the first pose sequence, a second pose sequence of the joints of the robotic arm is obtained. The poses in the second pose sequence are the poses of the joints when the robotic arm drives the guide to move along the target path. If the difference between two adjacent poses in the second pose sequence is greater than or equal to a first threshold, the second pose sequence is interpolated to obtain a third pose sequence. The difference between two adjacent poses in the third pose sequence is less than the first threshold. The third pose sequence is used to control the movement of the robotic arm.
[0099] In this embodiment, after acquiring a first three-dimensional CT image of the skin region including the first object, the planning device obtains a second contour based on a first distance and a first contour of the skin region, thereby expanding the contour of the skin region outward by a first distance away from the first object. This ensures that the second contour does not intersect with the first object. After acquiring the initial pose and target pose of the guide, the planning device obtains a target path based on the initial pose, target pose, and second contour, enabling the target path to bypass the first object and reducing its length, thus improving the rationality of the target path.
[0100] In some embodiments, the functions or modules of the apparatus provided in this application can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0101] Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device 2 includes a processor 21 and a memory 22. Optionally, the electronic device 2 also includes an input device 23 and an output device 24. The processor 21, memory 22, input device 23, and output device 24 are coupled together via connectors, which include various interfaces, transmission lines, or buses, etc., and are not limited in this embodiment. It should be understood that in the various embodiments of this application, coupling refers to mutual connection in a specific way, including direct connection or indirect connection through other devices, such as through various interfaces, transmission lines, buses, etc.
[0102] Processor 21 can be one or more graphics processing units (GPUs). If processor 21 is a GPU, the GPU can be a single-core GPU or a multi-core GPU. Optionally, processor 21 can be a processor group composed of multiple GPUs, with the multiple processors coupled to each other via one or more buses. Optionally, the processor can also be other types of processors, etc., which are not limited in this embodiment.
[0103] The memory 22 can be used to store computer program instructions, as well as various types of computer program code, including program code for executing the scheme 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), which is used for related instructions and data.
[0104] Input device 23 is used to input data and / or signals, and output device 24 is used to output data and / or signals. Input device 23 and output device 24 can be independent devices or an integrated device.
[0105] It is understood that in this embodiment of the application, the memory 22 can be used not only to store related instructions, but also to store related data. For example, the memory 22 can be used to store the first three-dimensional CT image obtained through the input device 23, or the memory 22 can also be used to store the target path obtained through the processor 21, etc. This embodiment of the application does not limit the specific data stored in the memory.
[0106] Understandable Figure 9 This is merely a simplified design of an electronic device. In practical applications, the electronic device may also include other necessary components, 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.
[0107] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0108] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will also readily understand that the various embodiments of this application have different focuses, and for the sake of convenience and brevity, the same or similar parts may not be repeated in different embodiments. Therefore, parts not described or not described in detail in one embodiment can be referred to the descriptions in other embodiments.
[0109] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0110] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0111] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0112] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as 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, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. 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 via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0113] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or RAM, magnetic disks, or optical disks.
Claims
1. A method for skin-based path planning, characterized in that, The method includes: Acquire a first three-dimensional CT image, the first three-dimensional CT image including the skin region of the first object; Based on the first distance and the first contour of the skin region, a second contour is obtained in a first coordinate system; wherein, the first coordinate system is the pixel coordinate system of the first three-dimensional CT image, the second contour does not intersect with the first object, and the distance between the first contour and the second contour is the first distance; Obtain the initial pose of the guide in the first coordinate system and the target pose of the guide in the first coordinate system; Based on the starting position corresponding to the starting pose and the target position corresponding to the target pose, a first vector is obtained, and the first vector passes through the starting position and the target position; When the first vector intersects the second contour, a second vector is obtained, wherein the second vector is perpendicular to the coronal plane of the first object; Based on the first vector and the second vector, a first plane is obtained, the first plane including the first vector and the second vector; Determine the target intersection line between the first plane and the second contour; Based on the target intersection line, a target path is obtained; wherein, when the guide moves based on the target path, the pose of the guide changes from the initial pose to the target pose, and the guide does not collide with the first object during the movement.
2. The method according to claim 1, characterized in that, The first object is in contact with the supporting surface, which is parallel to the ground; the distance from the starting position to the ground and the distance from the target position to the ground are both greater than the distance from the supporting surface to the ground. The process of obtaining the target path based on the target intersection line includes: A first sub-intersection is determined from the target intersection line, the two endpoints of the first sub-intersection line include a first intersection point and a second intersection point, the first intersection point and the second intersection point are the two intersection points of the first vector and the second contour; When a point in the first sub-intersection is located on the same side of the support surface, the target path is obtained based on the first sub-intersection.
3. The method according to claim 2, characterized in that, Before obtaining the target path based on the first sub-intersection line, when the point in the first sub-intersection line is located on the same side of the support surface, the method further includes: A second coordinate system is obtained based on the first plane, the first vector, and the starting position; wherein, the origin of the second coordinate system is determined based on the starting position, and the second coordinate system includes a first horizontal coordinate axis, a first vertical coordinate axis, and a first vertical coordinate axis. The first horizontal coordinate axis is determined based on the first vector, the first vertical coordinate axis is determined based on a third vector, and the first vertical coordinate axis is determined based on the normal vector of the first plane. The third vector is a vector within the first plane, and the third vector is perpendicular to both the first vector and the normal vector of the first plane. Determine the first transformation relationship, which is the transformation relationship between the first coordinate system and the second coordinate system; Based on the first transformation relationship and the coordinates of the points in the first sub-intersection line in the first coordinate system, a first ordinate set is obtained, which includes the coordinates of the points in the first sub-intersection line on the first ordinate axis. Based on the first set of ordinates, determine whether the points in the first sub-intersection line are located on the same side of the support surface.
4. The method according to claim 3, characterized in that, The first coordinate system includes a second horizontal coordinate axis, a second vertical coordinate axis, and a second vertical coordinate axis. The plane defined by the second horizontal coordinate axis and the second vertical coordinate axis is a second plane, which is parallel to the first plane. Determining the first transformation relationship includes: Based on the starting position and the target position, the position of the first vector in the first coordinate system is obtained; The first transformation relationship is obtained based on the position of the first vector in the first coordinate system, the position of the first horizontal axis in the second coordinate system, the position of the second vertical axis in the first coordinate system, and the position of the normal vector of the first plane in the second coordinate system.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Based on the target path, the first pose sequence of the guide is obtained, and the pose in the first pose sequence is the pose of the guide during the movement according to the target path. Based on the first pose sequence, a first collision detection result is obtained, which indicates whether the guide collides with an obstacle during its movement along the target path.
6. The method according to claim 5, characterized in that, The guide is connected to the robotic arm, which is used to drive the guide to move. After obtaining the first pose sequence of the guide based on the target path, the method further includes: Based on the relative positional relationship between the guide and the robotic arm, and the first pose sequence, a second pose sequence of the joints of the robotic arm is obtained. The poses in the second pose sequence are the poses of the joints when the robotic arm drives the guide to move along the target path. If the difference between two adjacent poses in the second pose sequence is greater than or equal to a first threshold, the second pose sequence is interpolated to obtain a third pose sequence. The difference between two adjacent poses in the third pose sequence is less than the first threshold. The third pose sequence is used to control the movement of the robotic arm.
7. A device based on skin path planning, characterized in that, The device includes: An acquisition unit is used to acquire a first three-dimensional CT image, wherein the first three-dimensional CT image includes the skin region of a first object; The processing unit is configured to obtain a second contour in a first coordinate system based on a first distance and a first contour of the skin region; wherein the first coordinate system is the pixel coordinate system of the first three-dimensional CT image, the second contour does not intersect with the first object, and the distance between the first contour and the second contour is the first distance; The acquisition unit is further configured to acquire the initial pose of the guide in the first coordinate system and the target pose of the guide in the first coordinate system; The processing unit is further configured to obtain a first vector based on the starting position corresponding to the starting pose and the target position corresponding to the target pose, wherein the first vector passes through the starting position and the target position; The processing unit is further configured to obtain a second vector when the first vector intersects with the second contour, wherein the second vector is perpendicular to the coronal plane of the first object; The processing unit is further configured to obtain a first plane based on the first vector and the second vector, wherein the first plane includes the first vector and the second vector; The processing unit is further configured to determine the target intersection line between the first plane and the second contour; The processing unit is further configured to obtain a target path based on the target intersection line; wherein, when the guide moves based on the target path, the pose of the guide is converted from the initial pose to the target pose, and the guide does not collide with the first object during the movement.
8. A surgical robot, characterized in that, Includes the skin-based path planning device as described in claim 7.
9. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein, when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1 to 6.