Collision avoidance method and system of radiotherapy equipment, and electronic equipment
By simplifying the components of the radiotherapy equipment into multiple collision bodies and using spatial geometric algorithms to judge collisions, the collision risks existing in the radiotherapy equipment during movement are solved, and effective collision avoidance and equipment safety protection are achieved.
Patent Information
- Application Number
- CN202411980824.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-21
AI Technical Summary
During the treatment and commissioning process, radiotherapy equipment has a risk of collision due to the intersection of the range of motion of the rack and the treatment bed, and it is difficult for the prior art to effectively avoid collisions.
By simplifying the components of the treatment head and treatment bed into multiple collision bodies, the spatial geometry algorithm is used to calculate the motion trajectory of the collision body, determine whether there is a possibility of collision, and output an alarm signal and stop movement when a collision risk occurs.
It effectively avoids collisions of radiotherapy equipment during exercise, protects equipment and patients, and improves the intelligence, safety and reliability of collision avoidance.
Smart Images

Figure CN119656488A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of collision avoidance scheme design for radiotherapy equipment, and in particular to a collision avoidance method and system for radiotherapy equipment, and electronic equipment. Background Art
[0002] During radiotherapy, the irradiation angle of the radiation is adjusted by the rotation of the gantry around the isocenter; the patient's position is adjusted by rotating the treatment bed forward, backward, left, right, up and down, and around the isocenter. These two movements work together to accurately irradiate the radiation on tumor cells. However, since the motion range of the gantry and the treatment bed overlap, there is a risk of collision between the gantry and the treatment bed during treatment and debugging. Based on the above situation, it is necessary to design an algorithm to detect the impending collision on the predetermined motion trajectory of the mechanism, stop the motion mechanism in advance, avoid the occurrence of collision, and protect the equipment and patients.
[0003] Therefore, the prior art needs to be further developed. Summary of the invention
[0004] The purpose of the present invention is to overcome the above technical deficiencies and provide a collision avoidance method and system for radiotherapy equipment, and electronic equipment to solve the problems existing in the prior art.
[0005] To achieve the above technical objectives, according to a first aspect of the present invention, the present invention provides a collision avoidance method for radiotherapy equipment, the method comprising:
[0006] S100, simplifying the outer contours of the components of the treatment head and the treatment bed into a plurality of collision bodies according to whether the components of the treatment head and the treatment bed can be independently controlled to move;
[0007] S200, setting the space where the multiple collision bodies are located as a coordinate system, calculating the initial coordinates of the preset points of the multiple collision bodies, determining the relationship between the initial coordinates of the preset points of the multiple collision bodies and the motion axis of the collision bodies according to the initial coordinates of the preset points of the multiple collision bodies, obtaining the control instruction data of the motion axis, and then calculating the expected coordinates of the preset points of each collision body after the collision body moves according to the motion control instruction data of the corresponding motion axis according to the motion control instruction data of the motion axis;
[0008] S300, judging whether there is a possibility of collision between the collision bodies according to the expected coordinates of the preset points of the collision bodies, and judging whether to output an alarm signal regarding a possible collision of the radiotherapy equipment according to the judgment result.
[0009] Specifically, the method includes:
[0010] The outer contours of the components of the treatment head and the treatment bed are simplified into a plurality of cuboids, spheres or cylinders.
[0011] Specifically, judging whether there is a possibility of collision between the collision bodies according to the expected coordinates of the preset points of the collision bodies, and judging whether to output an alarm signal about the possible collision of the radiotherapy equipment according to the judgment result, includes:
[0012] Determine whether any point on any edge of a collision body is inside another collision body;
[0013] If so, determine that there is a possibility of collision between the collision bodies, output an alarm signal about the possible collision of the radiotherapy equipment, and control the components of the treatment head and the treatment bed to stop moving;
[0014] If not, it is determined that there is no possibility of collision between the collision bodies, no alarm signal regarding possible collision of the radiotherapy equipment is output, and the components of the treatment head and the treatment bed are not controlled to stop moving.
[0015] Specifically, the method further includes:
[0016] Whether a collision is likely to occur is determined based on the expected coordinates of each preset point of the treatment head at the next moment and the position of the treatment bed at the current moment.
[0017] Specifically, according to whether the components of the treatment head and the treatment bed can independently control the movement, the outer contours of the components of the treatment head and the treatment bed are simplified into multiple collision bodies, including:
[0018] The outer contours of the components that can be independently controlled to move are simplified to form a plurality of collision bodies, and the outer contours of the components that can be independently controlled to move are located inside each collision body.
[0019] Specifically, according to whether the components of the treatment head and the treatment bed can independently control the movement, the outer contours of the components of the treatment head and the treatment bed are simplified into multiple collision bodies, including:
[0020] The outer contour of the component that can only perform synchronously controlled motion is simplified into a collision body, and the outer contour of the component that can only perform synchronously controlled motion is simultaneously located inside the collision body.
[0021] Specifically, the radiotherapy equipment includes a treatment head, a mechanical arm, a frame and a treatment bed, and the treatment bed includes a forward and backward motion component, a left and right motion component and an up and down motion component that can independently control the movement, so the treatment head is installed on the mechanical arm, and the mechanical arm is installed on the frame. According to whether the components of the treatment head and the treatment bed can independently control the movement, the outer contours of the components of the treatment head and the treatment bed are simplified into multiple collision bodies, including:
[0022] The outer contours of the treatment head and the robotic arm are simplified into a collision body, recorded as the first collision body to be detected, and the treatment bed is simplified into three collision bodies according to the front and rear moving parts, left and right moving parts, and up and down moving parts that can independently control the movement, recorded as the second collision body to be detected, the third collision body to be detected, and the fourth collision body to be detected.
[0023] According to a second aspect of the present invention, there is provided a collision avoidance system for radiotherapy equipment, comprising:
[0024] An acquisition module is used to acquire control instruction data of the motion axis;
[0025] The control module is used to simplify the outer contours of the components of the treatment head and the treatment bed into multiple collision bodies according to whether the components of the treatment head and the treatment bed can independently control movement; to set the space where the multiple collision bodies are located as a coordinate system, calculate the initial coordinates of the preset points of the multiple collision bodies, determine the relationship between the initial coordinates of the preset points of the multiple collision bodies and the motion axis of the collision bodies according to the initial coordinates of the preset points of the multiple collision bodies, and then calculate the expected coordinates of the preset points of the collision bodies after the collision bodies move according to the motion control instruction data of the corresponding motion axis according to the motion control instruction data of the motion axis; and to judge whether there is a possibility of collision between the collision bodies according to the expected coordinates of the preset points of the collision bodies, and determine whether to output an alarm signal about the possible collision of the radiotherapy equipment according to the judgment result.
[0026] According to a third aspect of the present invention, there is provided an electronic device, comprising: a memory; and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the collision avoidance method for the radiotherapy equipment described above is implemented.
[0027] Beneficial effects:
[0028] The present invention simplifies the treatment head and the treatment bed into collision bodies, and uses a spatial geometry algorithm to calculate whether any collision body will have an intersection with other collision bodies in space in the direction of movement. The existence of an intersection is a collision, and the movement of the treatment head and the treatment bed is stopped in advance before the collision, thereby effectively avoiding the occurrence of a collision, protecting medical equipment and patients, and greatly improving the intelligence, safety and reliability of collision avoidance of radiotherapy equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a flow chart of a collision avoidance method for radiotherapy equipment provided in a specific embodiment of the present invention;
[0030] Figure 2 is a schematic diagram of the system composition of a collision avoidance system for radiotherapy equipment provided in a specific embodiment of the present invention;
[0031] Figure 3is a schematic diagram of a coordinate system provided in a specific embodiment of the present invention;
[0032] Figure 4 is a schematic diagram of the rack rotation angle provided in a specific embodiment of the present invention;
[0033] Figure 5 is a schematic diagram for determining whether point P is located between parallel planes of a collision body provided in a specific embodiment of the present invention;
[0034] Figure 6 It is a schematic diagram of simplifying the outer contours of the components of the treatment head and the treatment bed into multiple collision bodies provided in a specific embodiment of the present invention;
[0035] Figure 7 It is a schematic diagram of a state in which the treatment head is simplified into a cylinder provided in a specific embodiment of the present invention;
[0036] Figure 8 It is a schematic diagram of a state in which the treatment head is simplified into a sphere provided in a specific embodiment of the present invention;
[0037] Fig. 9 is a schematic diagram of determining whether a point is inside a sphere provided in a specific embodiment of the present invention;
[0038] Fig.10 It is a schematic diagram of determining whether a point is inside a cylinder provided in a specific embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is clearly and completely described below in conjunction with the accompanying drawings of the present invention. Based on the embodiments in this application, other similar embodiments obtained by ordinary technicians in this field without making creative work should all fall within the scope of protection of this application. In addition, the directional words mentioned in the following embodiments, such as "up", "down", "left", "right", etc., are only reference to the directions of the accompanying drawings. Therefore, the directional words used are used to illustrate rather than limit the invention.
[0040] The present invention will be further described below in conjunction with the accompanying drawings and preferred embodiments.
[0041] See also Figure 1-Figure 10 The present invention provides a collision avoidance method for radiotherapy equipment, comprising:
[0042] S100: Simplify the outer contours of the components of the treatment head and the treatment bed into a plurality of collision bodies according to whether the components of the treatment head and the treatment bed can be independently controlled to move.
[0043] Specifically, according to whether the components of the treatment head and the treatment bed can independently control the movement, the outer contours of the components of the treatment head and the treatment bed are simplified into multiple collision bodies, including:
[0044] The outer contours of the components that can be independently controlled to move are simplified to form a plurality of collision bodies, and the outer contours of the components that can be independently controlled to move are located inside each collision body.
[0045] Specifically, according to whether the components of the treatment head and the treatment bed can independently control the movement, the outer contours of the components of the treatment head and the treatment bed are simplified into multiple collision bodies, including:
[0046] The outer contour of the component that can only perform synchronously controlled motion is simplified into a collision body, and the outer contour of the component that can only perform synchronously controlled motion is simultaneously located inside the collision body.
[0047] Specifically, the radiotherapy equipment includes a treatment head, a mechanical arm, a frame and a treatment bed, the treatment bed includes a forward and backward motion component, a left and right motion component and an up and down motion component that can independently control the movement, the treatment head is mounted on the mechanical arm, and the mechanical arm is mounted on the frame, and according to whether the components of the treatment head and the treatment bed can independently control the movement, the outer contours of the components of the treatment head and the treatment bed are simplified into multiple collision bodies, including:
[0048] The outer contours of the treatment head and the robotic arm are simplified into a collision body, recorded as the first collision body to be detected P1, and the treatment bed is simplified into three collision bodies according to the forward and backward moving parts, the left and right moving parts, and the up and down moving parts that can independently control the movement, recorded as the second collision body to be detected P2, the third collision body to be detected P3, and the fourth collision body to be detected P4.
[0049] It can be understood that the shape into which the outer contours of the various components of the treatment head and the treatment couch are simplified depends on the outer contours of the various components of the treatment head and the treatment couch.
[0050] S200, setting the space where the multiple collision bodies are located as a coordinate system, calculating the initial coordinates of the preset points of the multiple collision bodies, determining the relationship between the initial coordinates of the preset points of the multiple collision bodies and the motion axis of the collision bodies according to the initial coordinates of the preset points of the multiple collision bodies, obtaining the control instruction data of the motion axis, and then calculating the expected coordinates of the preset points of each collision body after the collision body moves according to the motion control instruction data of the corresponding motion axis according to the motion control instruction data of the motion axis.
[0051] It can be understood that the preset point can be selected according to the actual needs of the user of the present invention. Preferably, the preset point is the vertex of each collision body or any point or multiple points on the surface of each collision body.
[0052] Specifically, the method further includes: judging whether a collision is likely to occur according to the expected coordinates of each preset point of the treatment head at the next moment and the position of the treatment bed at the current moment.
[0053] Specifically, the method further includes:
[0054] Based on the expected coordinates of each preset point of the collision body corresponding to the treatment head, it is determined whether there is a possibility of collision, and the maximum rotatable angle of the treatment head is calculated.
[0055] For details, please refer to Figure 3 The coordinate system takes the isocenter as the origin (0,0,0). When facing the rack, the right direction is the X-axis direction, the forward direction is the Y-axis direction, and the upward direction is the Z-axis direction.
[0056] See also Figure 6 , simplify the irregular treatment head and C-arm into a collision body P1, and the treatment head and C-arm need to be completely contained in P1. Similarly, simplify the treatment bed into three collision bodies P2, P3, and P4 from bottom to top according to the parts that can move independently.
[0057] The shape of the collision body P1 may be a cuboid, a sphere or a cylinder and a combination thereof, for example, the robotic arm is a cuboid and the treatment head is a sphere, the robotic arm is a cylinder and the treatment head is a cuboid, which can be adjusted according to the actual situation of the robotic arm and the treatment head.
[0058] The volume of the collision body after the treatment head conformal model is closer to the actual treatment head, and it can more accurately determine whether the treatment head and the treatment bed collide.
[0059] According to the spatial geometric relationship, the relationship between the spatial coordinates of the 8 vertices of each collision body and the corresponding motion axis position of the collision body can be calculated, and the relationship between the spatial coordinates of the starting points of the line segments corresponding to the 12 edges of the collision body and the corresponding motion axis position of the collision body can be obtained.
[0060] Specifically, the P1 vertex space coordinates are calculated:
[0061] Assuming that the rack rotation angle is α, the angle α can be obtained through the encoder inside the radiotherapy equipment. Similarly, the vertex coordinates of the collision bodies P2, P3, and P4 can be calculated through the encoder and the known dimensions of the treatment head and the bracket. The length, width, and height of p1 are obtained based on the actual dimensions of the maximum outer contour of the treatment head and the rack. Figure 4In the preferred embodiment of the present invention, the gantry rotation angle is understood as the angle between the vertical line and the perpendicular line from the isocenter to the treatment head. The length, width and height of P1 are P1 l, P1w, P1h respectively. The distance between the ABCD surface of P1 and the isocenter XOZ surface is u, and the distance between the ABEF surface of P1 and the isocenter XOY surface is b. Then the spatial coordinates of the vertices of P1 are as follows:
[0062] The expression of the X coordinate of point A is
[0063] The expression of the Y coordinate of point A is -u;
[0064] The expression of the Z coordinate of point A is
[0065] The expression for the X coordinate of point B is
[0066] The expression of the Y coordinate of point B is -u;
[0067] The expression of the Z coordinate of point B is
[0068] The expression of the X coordinate of point C is
[0069] The expression of the Y coordinate of point C is -u;
[0070] The expression of the Z coordinate of point C is
[0071]
[0072] The expression of the X coordinate of point D is
[0073] The expression of the Y coordinate of point D is -u;
[0074] The expression of the Z coordinate of point D is
[0075]
[0076] The expression of the X coordinate of point E is
[0077] The expression of the Y coordinate of point E is T lu;
[0078] The expression of the Z coordinate of point E is
[0079] The expression of the X coordinate of point F is
[0080] The expression of the Y coordinate of point F is T lu;
[0081] The expression of the Z coordinate of point F is
[0082] The expression of the X coordinate of point G is
[0083]
[0084] The expression of the Y coordinate of point G is T lu;
[0085] The expression of the Z coordinate of point G is:
[0086]
[0087] The expression of the X coordinate of point H is X:
[0088]
[0089] The expression of the Y coordinate of point H is T lu;
[0090] The expression of the Z coordinate of point H is
[0091]
[0092] The calculation method of the remaining collision body vertices is similar to P1.
[0093] According to the above relationship, the spatial coordinate value of the collision body ahead of a certain distance on its motion trajectory can be calculated.
[0094] S300, judging whether there is a possibility of collision between the collision bodies according to the expected coordinates of the preset points of the collision bodies, and judging whether to output an alarm signal regarding a possible collision of the radiotherapy equipment according to the judgment result.
[0095] It is understandable that each collision body has at least the following collision possibilities:
[0096] The collision body P1 collides with any one of the collision bodies P2, P3, and P4.
[0097] Specifically, judging whether there is a possibility of collision between the collision bodies according to the expected coordinates of the preset points of the collision bodies, and judging whether to output an alarm signal about the possible collision of the radiotherapy equipment according to the judgment result, includes:
[0098] Determine whether any point on any edge of a collision body is inside another collision body;
[0099] Here, any edge refers to any line on the outer contour of any regular shape collision body. For example, in a rectangular parallelepiped, any edge refers to the ridge line of the rectangular parallelepiped, and in a cylinder, it refers to the generatrix or the bottom circumference line.
[0100] It should be noted that the present invention performs collision judgment based on points, which can fully detect all parts of the outer contour of the collision body and ensure the accuracy of collision detection. At the same time, through accurate point collision judgment, it can ensure that the angle threshold of the treatment head rotation can be accurately predicted during treatment and debugging.
[0101] If so, determine that there is a possibility of collision between the collision bodies, output an alarm signal about the possible collision of the radiotherapy equipment, and control the components of the treatment head and the treatment bed to stop moving;
[0102] If not, it is determined that there is no possibility of collision between the collision bodies, no alarm signal regarding possible collision of the radiotherapy equipment is output, and the components of the treatment head and the treatment bed are not controlled to stop moving.
[0103] Specifically, the determining whether any point on any edge of a collision body is located inside another collision body includes:
[0104] S310, arbitrarily select a collision body, record it as the first collision body, select any point on any edge of the collision body, record it as point P, arbitrarily select another collision body, record it as the second collision body, select any two parallel planes of the second collision body, record them as the first parallel plane and the second parallel plane, establish the target normal of the two parallel planes, the intersection point of the target normal line with the first parallel plane is recorded as the first intersection point, the intersection point of the target normal line with the second parallel plane is recorded as the second intersection point, calculate the angle between the line segment formed by the first intersection point and point P and the target normal line, record it as the first angle, calculate the angle between the line segment formed by the second intersection point and point P and the target normal line, record it as the second angle, and judge whether point P is located between the first parallel plane and the second parallel plane according to the first angle and the second angle;
[0105] S320, using the same method to determine whether point P is located between the remaining two sets of parallel planes of the second collision body, and determining whether point P is located inside the second collision body according to the determination result;
[0106] S330 , judging whether any point on any edge of a collision body is located inside another collision body according to the methods of S310 and S320 .
[0107] Specifically, judging whether the point P is located between the first parallel plane and the second parallel plane according to the first angle and the second angle includes:
[0108] If there is an obtuse angle between the first angle and the second angle, it is determined that point P is located between the first parallel plane and the second parallel plane;
[0109] If there is no obtuse angle between the first included angle and the second included angle, it is determined that the point P is not located between the first parallel plane and the second parallel plane.
[0110] Specifically, judging whether point P is located between the remaining two sets of parallel planes of the second collision body in the same way, and judging whether point P is located inside the second collision body according to the judging result, includes:
[0111] If point P is located between three sets of parallel planes of another collision body at the same time, point P is determined to be inside the second collision body;
[0112] If point P is not simultaneously located between the three sets of parallel planes of another collision body, it is determined that point P is not located inside the second collision body.
[0113] Specifically, whether two collision bodies in space collide is determined by determining whether one or more points on the 12 edges of one of the collision bodies are inside the other collision body. If so, it indicates that the two collision bodies collide.
[0114] Whether a point in space is inside a solid can be determined by whether the point is simultaneously between three sets of parallel planes of the solid, that is, the point is simultaneously between the front and back faces, between the left and right faces, and between the top and bottom faces of the solid. If the angle between the point and the normals of two parallel planes is one acute angle (the vector dot product is greater than 0) and the other is an obtuse angle (the vector dot product is less than 0), then the point is between parallel planes.
[0115] See also Figure 5 , the specific algorithm is as follows:
[0116] Calculate whether a point in the space is inside the solid space. Assume that the point to be calculated is P, and the vertex coordinates of the collision body P1 are A, B, C, D, E, F, G, and H respectively.
[0117] 1. Determine whether point P is between surface AEGC and surface BFHD
[0118]
[0119] if Then point P is between surface AEGC and surface BFHD.
[0120] 2. Determine whether point P is between surface ABFE and surface CDHG.
[0121]
[0122] if Then point P is between the surfaces ABFE and CDHG.
[0123] 3. Determine whether point P is between planes ABDC and EFHG.
[0124]
[0125] if Then point P is between the planes ABDC and EFHG.
[0126] In summary, if and and Then point P in space is inside the cube.
[0127] In fact, during the entire treatment and debugging process, the treatment bed and the treatment head will move relative to each other. The coordinates of the desired point on the outer contour of the treatment head can be regarded as the coordinates of point P. Point P is any point on the outer contour of the treatment head. P2 is an independently moving collision body on the treatment bed. For the collision body P2, the current position of P2 can be read in real time through the encoder. The vector product It can be regarded as a function of the rotation angle α of the treatment head, denoted as G(α). It can be denoted as H(α), It can be recorded as F(α). The deflection angle of the treatment head at the current moment is α2. Now we only need to calculate the value of the corresponding vector product at the next moment. Take 1 degree as the movement step of the treatment head from the current moment to the next moment, and gradually calculate the vector product at the next moment. If G(α2)>0 or H(α2)>0 or F(α2)>0; G(α2+1)<0 and H(α2+1)<0 and F(α2+1)<0, α2 is the maximum rotation angle of the treatment head. At this time, the position of the treatment head when the deflection angle is α2 is the extreme position that the treatment head can rotate to.
[0128] Of course, it is also possible to determine whether the treatment head and the treatment bed collide based on the current position of the treatment head and the expected coordinates of the treatment bed at the next moment.
[0129] The present invention performs judgment and detection in advance by calculating the expected coordinates of the treatment head or treatment bed at a certain time in advance and the positions of the treatment bed and treatment head at the current time. The position of the treatment bed or treatment head at the current time can be read in real time, thereby avoiding the risk of collision in advance. At the same time, the position of the treatment bed or treatment head at the current time can be read in real time, which can greatly simplify the amount of calculation.
[0130] In a preferred embodiment, the step of determining whether any point on any edge of a collision body is located inside another collision body includes:
[0131] S311. Arbitrarily select a collision body, recorded as the first collision body, select any point on any edge of the collision body, recorded as point P, assume that the coordinates of point P are P(x, y, z), arbitrarily select another collision body, recorded as the second collision body, select the second collision body, and arbitrarily select three mutually perpendicular rectangular parallelepiped sides AB, AD and AE with common vertices of the second collision body.
[0132] S312, determining whether the components of vector AP in the directions of vectors AB, AD, and AE are all between 0 and the length of the corresponding vector;
[0133] S312. If the components of vector AP in the directions of vectors AB, AD and AE are all between 0 and the length of the corresponding vectors, it is determined that point P is located inside the second collision volume; if the components of vector AP in the directions of vectors AB, AD and AE are not all between 0 and the length of the corresponding vectors, it is determined that point P is not located inside the second collision volume.
[0134] Specifically, the step of determining whether the components of the vector AP in the directions of the vectors AB, AD, and AE are all between 0 and the length of the corresponding vectors includes:
[0135] Use the following formula to calculate the side vectors of the cuboid:
[0136] AB=BA=(x2-x1,y1-y1,z1-z1)=(dx,0,0);
[0137] AD=DA=(x1-x1,y2-y1,z1-z1)=(0,dy,0);
[0138] AE=EA=(x1-x1,y1-y1,z2-z1)=(0,0,dz);
[0139] Calculate vector AP, that is, AP = PA = (x-x1, y-y1, z-z1);
[0140] For the component of vector AP in the AB direction, determine whether the following relationship exists:
[0141] 0≤(AP·AB / AB)≤|AB|, where |AB| represents the modulus of vector AB;
[0142] For the component of vector AP in the AD direction, determine whether the following relationship exists:
[0143] 0≤(AP·AD / AD)≤|AD|, where |AD| represents the modulus of vector AD;
[0144] For the component of vector AP in the AE direction, determine whether the following relationship exists:
[0145] 0≤(AP·AE / AE)≤|AE|, where |AE| represents the modulus of vector AE;
[0146] Concrete the above relationship and determine whether the following inequality holds:
[0147] 0≤(x-x1) / dx≤1;
[0148] 0≤(y-y1) / dy≤1;
[0149] 0≤(Z-Z1) / dz≤1;
[0150] If all the above inequalities hold, then point P is inside the second collision volume;
[0151] If all the above inequalities do not hold, then point P is not inside the second collision volume.
[0152] Through the above steps, if it is detected that a collision body of the rack or treatment bed that is a certain distance ahead in its moving direction collides with another collision body, the controller can avoid the collision by stopping the mechanical movement.
[0153] It is understood that in a preferred embodiment, see Figure 8 If the treatment head is simplified as a sphere, it is necessary to determine whether the point is inside the sphere. The specific determination method is:
[0154] Determine whether the point is inside the sphere. If the point is inside the sphere, the distance from the point to the center of the sphere is less than or equal to the radius of the sphere.
[0155] Assume the coordinates of the center of the sphere are O(x,y,z), the radius is r, and the coordinates of point P are P(x,y,z)
[0156] The distance from point P to point O Then point P is inside the sphere.
[0157] It is understood that in a preferred embodiment, see Figure 7 If the treatment head is simplified into a cylinder, it is necessary to determine whether the point is inside the cylinder. The specific determination method is:
[0158] Determine whether the point is inside the cylinder. If the point is inside the cylinder, then the point is between the two end faces of the cylinder, and the distance from the point to the cylinder axis line is less than or equal to the radius of the cylinder.
[0159] Assume that the centers of the two end faces of the cylinder are O1(x,y,z) and O2(x,y,z), the radius of the cylinder is r, and the coordinates of point P are P(x,y,z)
[0160] Determine whether point P is between the two end faces of the cylinder
[0161]
[0162] if Then point P is between the two end faces of the cylinder.
[0163] The distance from point P to the axis of the cylinder =
[0164]
[0165] If the point P is between the two end faces of the cylinder and the distance from the point P to the axis of the cylinder is less than or equal to the radius of the cylinder, then it can be concluded that the point is inside the cylinder.
[0166] It can be understood that the present invention simplifies the treatment head and the treatment bed into collision bodies, and uses a spatial geometry algorithm to calculate whether any collision body will have an intersection with other collision bodies in space in the direction of movement. The existence of an intersection is a collision, and the movement of the treatment head and the treatment bed is stopped in advance before the collision, thereby effectively avoiding the occurrence of a collision, protecting medical equipment and patients, and greatly improving the intelligence, safety and reliability of collision avoidance of radiotherapy equipment.
[0167] See also Figure 2 The present invention provides another embodiment, which provides a collision avoidance system for radiotherapy equipment, wherein the collision avoidance system for radiotherapy equipment comprises:
[0168] An acquisition module 100 is used to acquire control instruction data of a motion axis;
[0169] The control module 200 is used to simplify the outer contours of the components of the treatment head and the treatment bed into multiple collision bodies according to whether the components of the treatment head and the treatment bed can independently control movement; to set the space where the multiple collision bodies are located as a coordinate system, calculate the initial coordinates of the preset points of the multiple collision bodies, determine the relationship between the initial coordinates of the preset points of the multiple collision bodies and the motion axis of the collision bodies according to the initial coordinates of the preset points of the multiple collision bodies, and then calculate the expected coordinates of the preset points of the collision bodies after the collision bodies move according to the motion control instruction data of the corresponding motion axis according to the motion control instruction data of the motion axis; and to judge whether there is a possibility of collision between the collision bodies according to the expected coordinates of the preset points of the collision bodies, and determine whether to output an alarm signal regarding the possible collision of the radiotherapy equipment according to the judgment result.
[0170] It should be noted here that the present invention simplifies the treatment head and the treatment bed into collision bodies, and uses a spatial geometry algorithm to calculate whether any collision body will have an intersection with other collision bodies in space in the direction of movement. The existence of an intersection is a collision, and the movement of the treatment head and the treatment bed is stopped in advance before the collision, thereby effectively avoiding the occurrence of a collision, protecting medical equipment and patients, and greatly improving the intelligence, safety and reliability of collision avoidance of radiotherapy equipment.
[0171] In a preferred embodiment, the present application further provides an electronic device, the electronic device comprising:
[0172] A memory; and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the collision avoidance method of the radiotherapy device is implemented. The computer device can be broadly a server, a terminal, or any other electronic device with necessary computing and / or processing capabilities. In one embodiment, the computer device may include a processor, a memory, a network interface, a communication interface, etc. connected via a system bus. The processor of the computer device can be used to provide necessary computing, processing and / or control capabilities. The memory of the computer device may include a non-volatile storage medium and an internal memory. An operating system, a computer program, etc. may be stored in or on the non-volatile storage medium. The internal memory can provide an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface and the communication interface of the computer device can be used to connect and communicate with external devices via a network. When the computer program is executed by the processor, the steps of the method of the present invention are performed.
[0173] The present invention may be implemented as a computer-readable storage medium having a computer program stored thereon, which causes the steps of the method of an embodiment of the present invention to be executed when executed by a processor. In one embodiment, the computer program is distributed on a plurality of computer devices or processors coupled to a network so that the computer program is stored, accessed and executed in a distributed manner by one or more computer devices or processors. A single method step / operation, or two or more method steps / operations, may be performed by a single computer device or processor or by two or more computer devices or processors. One or more method steps / operations may be performed by one or more computer devices or processors, and one or more other method steps / operations may be performed by one or more other computer devices or processors. One or more computer devices or processors may perform a single method step / operation, or perform two or more method steps / operations.
[0174] It will be appreciated by those skilled in the art that the method steps of the present invention may be performed by instructing related hardware such as a computer device or a processor through a computer program, and the computer program may be stored in a non-temporary computer-readable storage medium, which causes the steps of the present invention to be performed when the computer program is executed. Depending on the circumstances, any reference to memory, storage, database, or other media herein may include non-volatile and / or volatile memory. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, etc. Examples of volatile memory include random access memory (RAM), external cache memory, etc.
[0175] It can be understood that the present invention simplifies the treatment head and the treatment bed into collision bodies, and uses a spatial geometry algorithm to calculate whether any collision body will have an intersection with other collision bodies in space in the direction of movement. The existence of an intersection is a collision, and the movement of the treatment head and the treatment bed is stopped in advance before the collision, thereby effectively avoiding the occurrence of a collision, protecting medical equipment and patients, and greatly improving the intelligence, safety and reliability of collision avoidance of radiotherapy equipment.
[0176] The various technical features described above can be combined arbitrarily. Although all possible combinations of these technical features are not described, any combination of these technical features should be considered to be covered by this specification as long as there is no contradiction in such combination.
[0177] The specific implementation of the present invention described above does not constitute a limitation on the protection scope of the present invention. Any other corresponding changes and modifications made based on the technical concept of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A collision avoidance method for radiotherapy equipment, characterized in that: The method comprises: S100, simplifying the outer contours of the components of the treatment head and the treatment bed into a plurality of collision bodies according to whether the components of the treatment head and the treatment bed can be independently controlled to move; S200, setting the space where the multiple collision bodies are located as a coordinate system, calculating the initial coordinates of the preset points of the multiple collision bodies, determining the relationship between the initial coordinates of the preset points of the multiple collision bodies and the motion axis of the collision bodies according to the initial coordinates of the preset points of the multiple collision bodies, obtaining the control instruction data of the motion axis, and then calculating the expected coordinates of the preset points of each collision body after the collision body moves according to the motion control instruction data of the corresponding motion axis according to the motion control instruction data of the motion axis; S300, judging whether there is a possibility of collision between the collision bodies according to the expected coordinates of the preset points of the collision bodies, and judging whether to output an alarm signal regarding a possible collision of the radiotherapy equipment according to the judgment result.
2. The collision avoidance method for radiotherapy equipment according to claim 1, characterized in that: The method comprises: The outer contours of the components of the treatment head and the treatment bed are simplified into a plurality of cuboids, spheres or cylinders.
3. The collision avoidance method for radiotherapy equipment according to claim 1, characterized in that: The method of judging whether there is a possibility of collision between the collision bodies according to the expected coordinates of the preset points of the collision bodies, and judging whether to output an alarm signal about the possible collision of the radiotherapy equipment according to the judgment result, includes: Determine whether any point on any edge of a collision body is inside another collision body; If so, determine that there is a possibility of collision between the collision bodies, output an alarm signal about the possible collision of the radiotherapy equipment, and control the components of the treatment head and the treatment bed to stop moving; If not, it is determined that there is no possibility of collision between the collision bodies, no alarm signal regarding possible collision of the radiotherapy equipment is output, and the components of the treatment head and the treatment bed are not controlled to stop moving.
4. The collision avoidance method for radiotherapy equipment according to claim 1, characterized in that: The method further comprises: Whether a collision is likely to occur is determined based on the expected coordinates of each preset point of the treatment head at the next moment and the position of the treatment bed at the current moment.
5. The collision avoidance method for radiotherapy equipment according to claim 1, characterized in that: According to whether the components of the treatment head and the treatment bed can be independently controlled to move, the outer contours of the components of the treatment head and the treatment bed are simplified into multiple collision bodies, including: The outer contours of the components that can be independently controlled to move are simplified to form a plurality of collision bodies, and the outer contours of the components that can be independently controlled to move are located inside each collision body.
6. The collision avoidance method for radiotherapy equipment according to claim 1, characterized in that: According to whether the components of the treatment head and the treatment bed can be independently controlled to move, the outer contours of the components of the treatment head and the treatment bed are simplified into multiple collision bodies, including: The outer contour of the component that can only perform synchronously controlled motion is simplified into a collision body, and the outer contour of the component that can only perform synchronously controlled motion is simultaneously located inside the collision body.
7. The collision avoidance method for radiotherapy equipment according to claim 1, characterized in that: The radiotherapy equipment comprises a treatment head, a mechanical arm, a frame and a treatment bed, wherein the treatment bed comprises a forward and backward motion component, a left and right motion component and an up and down motion component capable of independently controlling the motion, so the treatment head is mounted on the mechanical arm, and the mechanical arm is mounted on the frame. According to whether the components of the treatment head and the treatment bed can independently control the motion, the outer contours of the components of the treatment head and the treatment bed are simplified into multiple collision bodies, including: The outer contours of the treatment head and the robotic arm are simplified into a collision body, recorded as the first collision body to be detected, and the treatment bed is simplified into three collision bodies according to the front and rear moving parts, left and right moving parts, and up and down moving parts that can independently control the movement, recorded as the second collision body to be detected, the third collision body to be detected, and the fourth collision body to be detected.
8. A collision avoidance system for radiotherapy equipment, characterized in that: include: An acquisition module is used to acquire control instruction data of the motion axis; A control module, used to simplify the outer contours of the components of the treatment head and the treatment bed into a plurality of collision bodies according to whether the components of the treatment head and the treatment bed can be independently controlled to move; It is used to set the space where multiple collision bodies are located as a coordinate system, calculate the initial coordinates of the preset points of the multiple collision bodies, determine the relationship between the initial coordinates of the preset points of the multiple collision bodies and the motion axis of the collision bodies according to the initial coordinates of the preset points of the multiple collision bodies, and then calculate the expected coordinates of the preset points of each collision body after the collision body moves according to the motion control instruction data of the corresponding motion axis according to the motion control instruction data of the motion axis; it is used to judge whether there is a possibility of collision between the collision bodies according to the expected coordinates of the preset points of each collision body, and determine whether to output an alarm signal regarding the possible collision of the radiotherapy equipment according to the judgment result.
9. An electronic device, characterized in that: include: Memory; and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the collision avoidance method for radiotherapy equipment according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Anti-collision control method and system of radiotherapy system, and electronic equipment
CN120079051A
Anti-collision control method and system of a radiotherapy system, and electronic device
CN120079051B