Collision detection method and device, computer device and storage medium
By constructing a discretized three-dimensional model of the propeller and the motion equations of the spherical flying object, it is possible to determine whether the propeller collides with the spherical flying object. This solves the problem of large detection errors in existing technologies, achieves more accurate collision detection, and improves the safety of aircraft design.
Patent Information
- Application Number
- CN202111669120.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In existing technologies, collision detection between propellers and spherical flying objects does not take into account the actual physical structure of the propeller and the flight attitude angle of the spherical flying object, resulting in a large error between the detection results and the actual situation.
By acquiring multiple scan data points of the propeller, a discretized three-dimensional model is constructed. Combining the motion equation and radius of the spherical flying object, the motion trajectory equation of the center of the spherical flying object relative to the propeller is determined. The spatial position of the scan data points on the propeller surface is used to determine whether a collision has occurred.
It enables precise detection of collisions between propellers and spherical flying objects, improving the safety and accuracy of aircraft design.
Smart Images

Figure CN114329997B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of object collision, and in particular to a collision detection method and device, computer equipment and a storage medium. BACKGROUND
[0002] With the development of aerospace technology and the popularization of aircraft, people pay more and more attention to the safety of aircraft. When the aircraft flies at low altitude and high speed, it is easy to collide with other spherical flying objects in the air, causing damage to the aircraft and threatening the flight safety of the aircraft. The collision between other spherical flying objects and the aircraft mainly reflects the collision with the propeller of the aircraft. Therefore, how to determine whether other spherical flying objects will collide with the propeller of the aircraft is a problem to be solved at present.
[0003] In the traditional technology, an equivalent mathematical model of the propeller is constructed based on the chord line of the blade of the propeller, and it is assumed that the spherical flying object vertically hits the propeller to determine whether the spherical flying object will collide with the propeller.
[0004] However, the method of the traditional technology does not consider the thickness and specific shape of the propeller, nor the flight attitude angle of the spherical flying object, so that the collision detection result is greatly different from the actual situation. SUMMARY
[0005] Therefore, it is necessary to provide a collision detection method, device, computer equipment and storage medium capable of determining whether the propeller will collide with the spherical flying object according to the actual physical structure of the propeller, in view of the above technical problems.
[0006] A collision detection method, the method comprising: acquiring a plurality of scanning data points of a propeller, and determining a discretized three-dimensional model according to the plurality of scanning data points; acquiring a motion equation of a spherical flying object; determining a motion trajectory equation of a center of mass of the spherical flying object relative to the propeller according to a model parameter of the discretized three-dimensional model, the motion equation and a radius of the spherical flying object; determining a spatial position of each scanning data point on the surface of the propeller according to the discretized three-dimensional model; and determining whether the propeller collides with the spherical flying object according to the motion trajectory equation and the spatial position of each scanning data point on the surface of the propeller.
[0007] In one of the embodiments, the method for obtaining the motion equation of the spherical flying object comprises: obtaining an initial position of the spherical flying object in an original coordinate system and a motion trajectory direction vector of a center of mass of the spherical flying object in the original coordinate system; performing coordinate transformation on the original coordinate system according to the motion trajectory direction vector to obtain a target coordinate system, wherein the motion trajectory direction vector is parallel to an XOY plane in the target coordinate system; and determining the motion equation of the spherical flying object in the target coordinate system according to transformation information between the original coordinate system and the target coordinate system.
[0008] In one of the embodiments, the motion trajectory direction vector comprises an X-axis direction vector, a Y-axis direction vector and a Z-axis direction vector of a motion trajectory of the spherical flying object in the original coordinate system, and the method for performing coordinate transformation on the original coordinate system according to the motion trajectory direction vector to obtain a target coordinate system comprises: determining a rotation angle according to the Y-axis direction vector and the Z-axis direction vector; and rotating the original coordinate system around an X-axis of the original coordinate system according to the rotation angle to obtain the target coordinate system.
[0009] In one of the embodiments, the method for determining the motion equation of the spherical flying object in the target coordinate system according to the transformation information between the original coordinate system and the target coordinate system comprises: obtaining an acute angle between the motion trajectory direction vector and an X-axis of the original coordinate system; determining the transformation information between the original coordinate system and the target coordinate system according to the acute angle and the rotation angle; and constructing the motion equation of the spherical flying object in the target coordinate system according to the transformation information and the initial position.
[0010] In one of the embodiments, the method for determining the motion trajectory equation of the center of mass of the spherical flying object relative to the propeller according to the model parameters of the discretized three-dimensional model, the motion equation and the radius of the spherical flying object comprises: obtaining a height of the discretized three-dimensional model along a rotation axis direction of the propeller; and determining the motion trajectory equation in the target coordinate system according to the height of the discretized three-dimensional model, the radius of the spherical flying object and the motion equation.
[0011] In one of the embodiments, the variation range of the motion trajectory equation is determined according to a distance between adjacent scanning data points, the height of the discretized three-dimensional model, the radius of the spherical flying object and the motion trajectory direction vector.
[0012] In one of the embodiments, the determining the spatial position of each of the scanning data points on the surface of the propeller according to the discretized three-dimensional model comprises: obtaining an angular velocity of the rotation of the propeller, a modulus and a first argument of a complex triangle formed by the coordinates of each of the scanning data points on the Y-axis and the Z-axis of the target coordinate system; determining a second argument corresponding to each of the scanning data points according to the first argument, the angular velocity, a radius of the spherical flying object, a speed of the spherical flying object relative to the propeller, and the direction vector of the motion trajectory; and determining the spatial position of each of the scanning data points on the surface of the propeller according to the modulus and the second argument corresponding to each of the scanning data points.
[0013] In one of the embodiments, the determining whether the propeller collides with the spherical flying object according to the motion trajectory equation and the spatial position of each of the scanning data points on the surface of the propeller comprises: obtaining, under a preset condition, relative position information between the spatial position of each of the scanning data points and the center of mass of the spherical flying object according to the motion trajectory equation, the relative position information comprising a first relative difference in the X-axis direction, a second relative difference in the Y-axis direction, and a third relative difference in the Z-axis direction in the target coordinate system; and determining whether the propeller collides with the spherical flying object according to the relative position information.
[0014] In one of the embodiments, the determining whether the propeller collides with the spherical flying object according to the relative position information comprises: if at least one of the first relative difference, the second relative difference, and the third relative difference corresponding to each of the scanning data points is greater than the radius of the spherical flying object, determining that the propeller does not collide with the spherical flying object.
[0015] In one of the embodiments, the determining whether the propeller collides with the spherical flying object according to the relative position information further comprises: if the first relative difference, the second relative difference, and the third relative difference corresponding to each of the scanning data points are all less than or equal to the radius of the spherical flying object, determining the distance between each of the scanning data points and the center of mass of the spherical flying object according to the first relative difference, the second relative difference, and the third relative difference corresponding to each of the scanning data points; if the distance between each of the scanning data points and the center of mass of the spherical flying object is greater than the radius of the spherical flying object, determining that the propeller does not collide with the spherical flying object; and if at least one of the distance between each of the scanning data points and the center of mass of the spherical flying object is less than or equal to the radius of the spherical flying object, determining that the propeller collides with the spherical flying object.
[0016] A collision detection device, comprising: a model acquisition module, configured to acquire a plurality of scanning data points of a propeller, and determine a discretized three-dimensional model according to the plurality of scanning data points; a motion equation acquisition module, configured to acquire a motion equation of a spherical flying object; a trajectory determination module, configured to determine a motion trajectory equation of a center of mass of the spherical flying object relative to the propeller according to a model parameter of the discretized three-dimensional model, the motion equation, and a radius of the spherical flying object; a position determination module, configured to determine a spatial position of each scanning data point on a surface of the propeller according to the discretized three-dimensional model; and a collision judgment module, configured to determine whether the propeller collides with the spherical flying object according to the motion trajectory equation and the spatial position of each scanning data point on the surface of the propeller.
[0017] A computer device, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program: acquiring a plurality of scanning data points of a propeller, and determining a discretized three-dimensional model according to the plurality of scanning data points; acquiring a motion equation of a spherical flying object; determining a motion trajectory equation of a center of mass of the spherical flying object relative to the propeller according to a model parameter of the discretized three-dimensional model, the motion equation, and a radius of the spherical flying object; determining a spatial position of each scanning data point on a surface of the propeller according to the discretized three-dimensional model; and determining whether the propeller collides with the spherical flying object according to the motion trajectory equation and the spatial position of each scanning data point on the surface of the propeller.
[0018] A computer readable storage medium, storing a computer program, the computer program being executed by a processor to implement the following steps: acquiring a plurality of scanning data points of a propeller, and determining a discretized three-dimensional model according to the plurality of scanning data points; acquiring a motion equation of a spherical flying object; determining a motion trajectory equation of a center of mass of the spherical flying object relative to the propeller according to a model parameter of the discretized three-dimensional model, the motion equation, and a radius of the spherical flying object; determining a spatial position of each scanning data point on a surface of the propeller according to the discretized three-dimensional model; and determining whether the propeller collides with the spherical flying object according to the motion trajectory equation and the spatial position of each scanning data point on the surface of the propeller.
[0019] The collision detection method, device, computer device and storage medium, by array scanning the propeller, obtain a plurality of scanning data points of the propeller, thereby constructing a discretized three-dimensional model capable of representing the actual physical structure of the propeller. By obtaining the motion equation of the spherical flying object, and according to the model parameters of the discretized three-dimensional model and the radius of the spherical flying object, the motion trajectory equation of the center of mass of the spherical flying object relative to the propeller is determined. According to the discretized three-dimensional model, the spatial positions of the scanning data points on the surface of the propeller are determined. According to the motion trajectory equation of the center of mass of the spherical flying object relative to the propeller and the spatial positions of the scanning data points on the surface of the propeller, whether the propeller and the spherical flying object will collide is judged. The propeller model constructed by the present application considers the physical structure of the propeller, thereby being more close to the actual propeller. By combining the motion trajectory equation of the center of mass of the spherical flying object, the radius of the spherical flying object, the parameters of the propeller model and the spatial positions of the scanning data points on the surface of the propeller, whether the propeller and the spherical flying object will collide is comprehensively judged, so that the actual motion trajectory and the actual physical structure of the spherical flying object and the propeller are considered, the result of judging whether to collide is more close to the actual situation, and the accurate detection of whether the propeller and the spherical flying object collide is realized. Therefore, researchers obtain more accurate detection data, and when the aircraft propeller is designed, the aircraft can be designed more accurately, and the safety of the designed aircraft is greatly improved. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0021] Figure 1 A flowchart of a collision detection method in an embodiment;
[0022] Figure 2 A structural schematic diagram of a propeller three-dimensional model in an embodiment;
[0023] Figure 3 A flowchart of a method for determining a motion equation in an embodiment;
[0024] Figure 4 A flowchart of a method for determining a target coordinate system in an embodiment;
[0025] Figure 5 A flowchart of a method for determining a motion equation in another embodiment;
[0026] Figure 6A schematic diagram of coordinate system rotation in one embodiment;
[0027] Figure 7 A schematic diagram of a method of determining a motion trajectory equation in one embodiment;
[0028] Figure 8 A schematic diagram of a method of determining a spatial position of a scan data point in one embodiment;
[0029] Figure 9 A schematic diagram of a method of collision detection determination in one embodiment;
[0030] Figure 10 A schematic diagram of a method of collision detection determination in another embodiment;
[0031] Figure 11 A structural diagram of a collision detection device in one embodiment;
[0032] Figure 12 An internal structural diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0033] In order to facilitate the understanding of the present application, a more complete understanding of the present application can be had by reference to the following description in conjunction with the associated drawings. The figures included in the application are intended to highlight certain aspects of the application and are not limiting of certain embodiments of the application. In fact, the application can be practiced without one or more of these details. Additionally, the inclusion of the figures is not meant to limit the scope of the application to the figures themselves that are included but every different aspect, use, object, and the like is intended to be implicitly included as possible embodiments.
[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the application.
[0035] It should be understood that the terms "first", "second", etc. can be used herein to describe various elements, but these elements should not be limited by these terms. These terms are only used to distinguish one element from another.
[0036] As used herein, the singular forms "a", "an" and "the" include plural referents unless the context clearly dictates otherwise. It should be understood that the term "comprises / comprising" or "has / having" specifies the presence of stated features, integers, steps, operations, components, parts, or combinations thereof, but does not preclude the presence or addition of one or more other features, integers, steps, operations, components, parts, or combinations thereof.
[0037] As described in the background, the collision detection of the propeller and the spherical flying object in the prior art has a problem of large error between the detection result and the actual situation. The inventor found that the reason for this problem is that the actual physical structure of the propeller and the flight trajectory of the spherical flying object are not considered in the prior art.
[0038] Based on the above reasons, the present application provides a collision detection method, device, computer equipment and storage medium capable of determining whether the propeller will collide with the spherical flying object according to the actual physical structure of the propeller.
[0039] In one embodiment, as shown in Figure 1 a collision detection method is provided, the method comprising:
[0040] Step S100, obtaining a plurality of scanning data points of the propeller, and determining a discretized three-dimensional model according to the plurality of scanning data points.
[0041] Specifically, the interval between each scanning data point is preset, the preset physical propeller is scanned by array scanning to obtain a plurality of scanning data points on the surface of the propeller, and a discretized three-dimensional model of the propeller is constructed according to the plurality of scanning data points.
[0042] Exemplarily, the three-dimensional model of the propeller is as shown in Figure 2 .
[0043] Step S110, obtaining a motion equation of the spherical flying object.
[0044] Specifically, the spherical flying object is a regular and uniform sphere, and the flying objects such as hail or sandstone in reality can be equivalent to a sphere.
[0045] Exemplarily, the initial position and the initial direction of the spherical flying object are obtained by a scanning instrument, such as a laser radar, and a motion equation of the spherical flying object is constructed based on the initial position and the initial direction.
[0046] Step S120, determining a motion trajectory equation of the center of mass of the spherical flying object relative to the propeller according to the model parameters of the discretized three-dimensional model, the motion equation and the radius of the spherical flying object.
[0047] Specifically, the model parameters of the discretized three-dimensional model include the distance between adjacent scanning data points and the height of the discretized three-dimensional model along the rotation axis of the propeller, and the motion trajectory equation of the spherical flying object relative to the propeller can be constructed by combining the model parameters of the discretized three-dimensional model, the motion equation of the center of mass of the spherical flying object and the radius of the spherical flying object, which combines the physical structure of the propeller model and the spherical flying object.
[0048] Step S130: Determine the spatial position of each scan data point on the propeller surface based on the discretized three-dimensional model.
[0049] For example, such as Figure 2 As shown, since the propeller rotates around its rotation axis, let the rotation axis of the propeller be the X-axis to construct a spatial coordinate system. Then, the X-axis coordinates of each scanned data point on the propeller surface are fixed. Therefore, the Y-axis and Z-axis data in the spatial coordinate system can be mapped to the complex number expression of y + zi. Thus, the coordinates of each scanned data point can be represented as {x k ,y k +z k The form is i}, where k represents the k-th scan data point and i is the imaginary unit.
[0050] Step S140: Based on the motion trajectory equation and the spatial position of each data scanning point on the propeller surface, determine whether the propeller collides with the spherical flying object.
[0051] Specifically, the position of the center of gravity of the sphere can be determined based on the equation of motion trajectory. Then, based on the position of the center of gravity of the sphere, the radius of the sphere, and the spatial position of each scan data point, it can be determined whether the propeller collides with the sphere.
[0052] In this embodiment, an array scan of the propeller is performed to acquire multiple scan data points, thereby constructing a discretized three-dimensional model that represents the actual physical structure of the propeller. The motion equations of the spherical flying object are obtained, and based on the model parameters of the discretized three-dimensional model and the radius of the spherical flying object, the trajectory equation of the spherical flying object's center of mass relative to the propeller is determined. Then, based on the discretized three-dimensional model, the spatial positions of each scan data point on the propeller surface are determined. Finally, based on the trajectory equation of the spherical flying object's center of mass relative to the propeller and the spatial positions of each scan data point on the propeller surface, it is determined whether a collision will occur between the propeller and the spherical flying object. The propeller model constructed in this application considers the physical structure of a propeller, thus more closely resembling an actual propeller. By combining the trajectory equations of the center of motion of the spherical flying object, the radius of the spherical flying object, the parameters of the propeller model, and the spatial positions of various scanned data points on the propeller surface, a comprehensive judgment is made regarding whether a collision will occur between the propeller and the spherical flying object. This approach considers the actual trajectories and physical structures of both the spherical flying object and the propeller, making the collision prediction results closer to reality. This achieves accurate detection of whether a collision occurs between the propeller and the spherical flying object. Consequently, researchers obtain more precise detection data, enabling more accurate design of aircraft propellers and significantly improving the safety of the designed aircraft.
[0053] In one embodiment, such as Figure 3As shown, step S110 includes:
[0054] Step S300, obtaining the initial position of the spherical flying object in the original coordinate system and the motion trajectory direction vector of the centroid of the spherical flying object in the original coordinate system.
[0055] Step S320, performing coordinate conversion on the original coordinate system according to the motion trajectory direction vector to obtain a target coordinate system, wherein the motion trajectory direction vector is parallel to the XOY plane in the target coordinate system.
[0056] Specifically, since the initial phase of the propeller is random, the coordinate system does not affect the subsequent analysis results. Therefore, by coordinate conversion, the original coordinate system is converted into a target coordinate system in which the XOY plane is parallel to the motion trajectory direction vector of the spherical flying object, so as to simplify the motion equation of the spherical flying object and facilitate calculation.
[0057] Step S340, determining the motion equation of the spherical flying object in the target coordinate system according to the conversion information between the original coordinate system and the target coordinate system.
[0058] Specifically, according to the conversion information between the original coordinate system and the target coordinate system, the coordinates in the motion equation of the spherical flying object in the original coordinate system are correspondingly converted, so as to obtain the motion equation of the spherical flying object in the target coordinate system.
[0059] In this embodiment, the initial position and the initial motion trajectory direction vector of the spherical flying object are obtained, and the coordinate system is adjusted according to the motion trajectory direction vector, so that the XOY plane in the coordinate system is parallel to the motion trajectory direction vector, thereby converting the motion direction of the spherical flying object from an arbitrary direction to a motion direction parallel to the XOY plane, simplifying the motion equation of the spherical flying object and facilitating calculation.
[0060] In one embodiment, the motion trajectory direction vector includes an X-axis direction vector, a Y-axis direction vector and a Z-axis direction vector of the motion trajectory of the spherical flying object in the original coordinate system, as shown in Figure 4 As shown, step S320 includes:
[0061] Step S400, determining the rotation angle according to the Y-axis direction vector and the Z-axis direction vector.
[0062] Exemplarily, assuming that the motion trajectory direction vector is (fx, fy, fz), wherein fx is the initial motion trajectory direction vector of the spherical flying object in the X-axis direction of the original spatial coordinate system, fy is the initial motion trajectory direction vector of the spherical flying object in the Y-axis direction of the original spatial coordinate system, and fz is the initial motion trajectory direction vector of the spherical flying object in the Z-axis direction of the original spatial coordinate system. Then, the rotation angle is
[0063] Step S420, according to the rotation angle, rotating the original coordinate system around the X axis of the original coordinate system to obtain the target coordinate system.
[0064] Specifically, the motion trajectory direction vector of the spherical flying object is parallel to the XOY plane in the target coordinate system.
[0065] In this embodiment, according to the Y axis direction vector and the Z axis direction vector, the required rotation angle when the original coordinate system is converted into the target coordinate system is calculated, and the original coordinate system is rotated around the X axis according to the rotation angle to obtain the target coordinate system. The XOY plane in the target coordinate system is parallel to the motion trajectory direction vector, thereby simplifying the motion equation of the spherical flying object and facilitating calculation.
[0066] In one embodiment, as shown in FIG. 4, step S340 includes: Figure 5
[0067] Step S500, obtaining the acute angle between the motion trajectory direction vector and the X axis of the original coordinate system.
[0068] Exemplarily, the acute angle between the motion trajectory direction vector and the X axis of the original coordinate system is determined by the following formula:
[0069]
[0070] wherein fx is the initial motion trajectory direction vector of the spherical flying object in the X axis direction of the original space coordinate system, fy is the initial motion trajectory direction vector of the spherical flying object in the Y axis direction of the original space coordinate system, and fz is the initial motion trajectory direction vector of the spherical flying object in the Z axis direction of the original space coordinate system.
[0071] Step S520, determining the conversion information between the original coordinate system and the target coordinate system according to the acute angle and the rotation angle.
[0072] Exemplarily, assuming that the initial position coordinates of the spherical flying object in the original coordinate system are (x1, y1, z1), and the initial direction vector is (fx, fy, fz), the acute angle between the centroid of the spherical flying object and the X axis of the original coordinate system is Rotating the original space coordinate system around the X axis until the motion trajectory of the spherical flying object is parallel to the XOY plane in the original coordinate system to obtain the target coordinate system, the rotation angle is
[0073] At this time, assuming that the coordinates of the centroid of the spherical flying object in the target coordinate system are (x1, y0, z0), wherein y0=y1*cosβ+z1*sinβ, and z0=z1*cosβ-y1*sinβ.
[0074] Since the trajectory of the spherical object is parallel to the XOY plane in the target coordinate system, the coordinates of the intersection point of the trajectory of the spherical object and the YOZ plane in the target coordinate system are (0, y0', z0), where y0' = y0 - x1 * tanθ.
[0075] Step S540: Based on the transformation information and initial position, construct the motion equations of the spherical flying object in the target coordinate system.
[0076] For example, the equation of motion of the spherical flying object in the target coordinate system is:
[0077] y=x*tanθ+y1*cosβ+z1*sinβ-x1*tanθ
[0078] z = z1*cosβ - y1*sinβ
[0079] Where y is the coordinate of the center of mass of the sphere in flight on the Y-axis in the target coordinate system, x is the coordinate of the center of mass of the sphere in flight on the X-axis in the target coordinate system, z is the coordinate of the center of mass of the sphere in flight on the Z-axis in the target coordinate system, y1 is the initial coordinate of the center of mass of the sphere in flight on the Y-axis in the original coordinate system, x1 is the initial coordinate of the center of mass of the sphere in flight on the X-axis in the original coordinate system, z1 is the initial coordinate of the center of mass of the sphere in flight on the Z-axis in the original coordinate system, and θ is the acute angle between the initial trajectory of the sphere and the X-axis in the original coordinate system. β is the angle by which the original coordinate system needs to be rotated around the X-axis to make the trajectory of the spherical flying object parallel to the XOY plane in the target coordinate system. Where fx is the initial trajectory direction vector of the spherical flying object in the X-axis direction of the original spatial coordinate system, fy is the initial trajectory direction vector of the spherical flying object in the Y-axis direction of the original spatial coordinate system, and fz is the initial trajectory direction vector of the spherical flying object in the Z-axis direction of the original spatial coordinate system.
[0080] For example, such as Figure 6 As shown, firstly, the original coordinate system is translated according to the motion trajectory direction vector, so that the motion trajectory direction vector passes through the origin of the coordinate system. Then, the translated coordinate system is rotated by a rotation angle so that the motion trajectory direction vector is parallel to the XOY plane. Finally, the coordinate system is translated back with the opposite translation direction and distance to obtain the target coordinate system. The motion trajectory direction vector of the spherical flying object is parallel to the XOY plane in the target coordinate system.
[0081] In the embodiment, the conversion information between the original coordinate system and the target coordinate system is determined through the direction of the movement track of the spherical flying object and the initial position coordinates, and a movement equation of the spherical flying object in the target coordinate system is further constructed. The movement equation is relatively simple due to the fact that the movement track of the spherical flying object is parallel to the XOY plane in the target coordinate system, and is convenient for calculation.
[0082] In one embodiment, as shown in FIG. 1, step S120 includes: Figure 7
[0083] Step S700, acquiring the height of the discretized three-dimensional model along the direction of the rotation axis of the propeller.
[0084] Specifically, the height of the discretized three-dimensional model along the direction of the rotation axis of the propeller is the height of the fairing of the propeller.
[0085] Step S720, determining a movement track equation in the target coordinate system according to the height of the discretized three-dimensional model, the radius of the spherical flying object, and the movement equation.
[0086] Specifically, the variation range of the movement track equation is determined according to the distance between adjacent scanning data points, the height of the discretized three-dimensional model, the radius of the spherical flying object, and the direction vector of the movement track.
[0087] Exemplarily, the movement track equation is as follows:
[0088]
[0089] where Δl is a preset spatial step, Δl = λr, where 0 < λ < cosθ, θ is the acute angle between the initial movement track of the spherical flying object and the X axis in the original coordinate system, r is the radius of the spherical flying object, x n is the coordinate of the spherical center of the spherical flying object on the X axis in the target coordinate system at the nth spatial step, y n is the coordinate of the spherical center of the spherical flying object on the Y axis in the target coordinate system at the nth spatial step, and z n is the coordinate of the spherical center of the spherical flying object on the Z axis in the target coordinate system at the nth spatial step, x max is the height of the discretized three-dimensional model of the propeller, t ≤ [(x max + 2r) / Δl], and β is the angle of rotation of the original coordinate system around the X axis required to make the movement track of the spherical flying object parallel to the XOY plane in the target coordinate system, y1 is the initial coordinate of the ball center of the spherical flying object on the Y axis in the original coordinate system, x1 is the initial coordinate of the ball center of the spherical flying object on the X axis in the original coordinate system, z1 is the initial coordinate of the ball center of the spherical flying object on the Z axis in the original coordinate system, fx is the initial motion trajectory direction vector of the spherical flying object on the X axis in the original space coordinate system, fy is the initial motion trajectory direction vector of the spherical flying object on the Y axis in the original space coordinate system, and fz is the initial motion trajectory direction vector of the spherical flying object on the Z axis in the original space coordinate system.
[0090] Since the maximum value of the coefficient n therein is t+1, and t≤[(x max +2r) / Δl], the variation range of the motion equation is limited.
[0091] In the embodiment, by combining the motion equation of the centroid of the spherical flying object with the physical structure of the spherical flying object and the physical structure of the propeller, the motion trajectory equation of the centroid of the spherical flying object relative to the propeller is obtained. Since the motion trajectory equation takes into account the actual physical structure of the spherical flying object and the propeller, it is closer to the actual situation.
[0092] In one embodiment, as shown in FIG. 1, step S130 includes: Figure 8
[0093] Step S800, acquiring the angular velocity of the rotation of the propeller, the modulus of the complex triangle composed of the coordinates of each scanning data point on the Y axis and the Z axis of the target coordinate system, and the first argument.
[0094] Exemplarily, the coordinates of the scanning data points on the surface of the propeller can be represented as (x k ,y k +z k i), where x k is the coordinate of the kth scanning data point on the X axis of the target coordinate system, y k is the coordinate of the kth scanning data point on the Y axis of the target coordinate system, z k is the coordinate of the kth scanning data point on the Z axis of the target coordinate system, i is the imaginary unit, the modulus of the complex triangle composed of the Y axis coordinates and the Z axis coordinates of each scanning data point is |y k +z k i|, and the argument is
[0095] Step S820, determining the second argument corresponding to each scanning data point according to the first argument, the angular velocity, the radius of the spherical flying object, the speed of the spherical flying object relative to the propeller, and the motion trajectory direction vector.
[0096] Exemplarily, the second argument corresponding to each scanning data point is determined by the following formula:
[0097] A kn = A k0 + nωΔt (n = 1, 2, …, t + 1)
[0098] wherein A kn is the second argument of the kth scanning data point at the nth time step, A k0 is the first argument of the kth scanning data point, ω is the angular velocity of the propeller rotation, and Δt is the preset time step, wherein Δl is the preset space step, Δl = λr, wherein 0 < λ < cosθ, r is the radius of the spherical flying object, and v0 is the speed of the spherical flying object relative to the propeller. Since the maximum value of the coefficient n therein is t + 1, and t ≤ [(x max + 2r) / Δl], x max is the height of the discretized three-dimensional model of the propeller, thus, the variation range of the second argument is limited.
[0099] Step S840, determining the spatial position of each scanning data point on the surface of the propeller according to the module corresponding to each scanning data point and the second argument.
[0100] Exemplarily, the spatial position of each scanning data point on the surface of the propeller is as follows:
[0101]
[0102] wherein x kb is the coordinate of the kth scanning data point of the propeller on the X-axis in the target coordinate system at the nth time step, y kn is the coordinate of the kth scanning data point of the propeller on the Y-axis in the target coordinate system at the nth time step, z kn is the coordinate of the kth scanning data point of the propeller on the Z-axis in the target coordinate system at the nth time step, x k is the coordinate of the kth scanning data point of the propeller on the X-axis in the target coordinate system, M k0 is the module of the complex triangle between the kth scanning data point and the origin of the target coordinate system and the X-axis of the target coordinate system, M k0 = |y k +z k i|, y k is the coordinate of the kth scanning data point of the propeller on the Y-axis in the target coordinate system, z k is the coordinate of the kth scanning data point of the propeller on the Z-axis in the target coordinate system, and i is the imaginary unit, A kn is the second argument corresponding to the kth scanning data point, A kn = Ak0 + nωΔt (n = 1, 2…, t + 1), wherein ω is the angular velocity of the propeller rotation, and Δt is a preset time step, wherein Δl is a preset time step, and v0 is the speed of the spherical flying object relative to the propeller.
[0103] In this embodiment, according to the rotation speed of the propeller, the position coordinates of each scanning data point on the surface of the propeller, the position of each scanning data point in the target coordinate system at each time step is determined, thereby facilitating collision detection.
[0104] In one embodiment, as shown in Figure 9 step S140 includes:
[0105] Step S900, under a preset condition, obtaining the relative position information between the center of mass of the spherical flying object and each scanning data point according to the motion trajectory equation, the relative position information including a first relative difference in the X-axis direction, a second relative difference in the Y-axis direction, and a third relative difference in the Z-axis direction in the target coordinate system.
[0106] Specifically, the preset condition is that the current space step in the motion trajectory equation and the current time step in the spatial position of each scanning data point correspond to the same number of steps.
[0107] Exemplarily, the three relative differences are determined by the following formula:
[0108]
[0109] wherein Δx n is the first relative difference, Δy n is the second relative difference, Δz n is the third relative difference, x n is the coordinate of the center of mass of the spherical flying object on the X-axis in the target coordinate system at the nth space step, y n is the coordinate of the center of the spherical flying object on the Y-axis in the target coordinate system at the nth space step, z n is the coordinate of the center of the spherical flying object on the Z-axis in the target coordinate system at the nth space step, x kn is the coordinate of the kth scanning data point of the propeller on the X-axis in the target coordinate system at the nth time step, y kn is the coordinate of the kth scanning data point of the propeller on the Y-axis in the target coordinate system at the nth time step, z kn is the coordinate of the kth scanning data point of the propeller on the Z-axis in the target coordinate system at the nth time step.
[0110] Step S920, determining whether the propeller collides with the spherical flying object according to the relative position information.
[0111] Specifically, if at least one of the first relative difference, the second relative difference and the third relative difference corresponding to each scanning data point is greater than the radius of the spherical flying object, it is determined that the propeller does not collide with the spherical flying object.
[0112] For example, Δx n >r or Δy n >r or Δz n >r, where r is the radius of the spherical flying object, Δx n is the first relative difference, Δy n is the second relative difference, and Δz n is the third relative difference, it is determined that the propeller does not collide with the spherical flying object.
[0113] For example, if at least one of the first relative difference, the second relative difference and the third relative difference corresponding to each scanning data point is greater than the radius of the spherical flying object, it is determined that the propeller does not collide with the spherical flying object, and the scanning data points whose first relative difference, second relative difference and third relative difference are less than or equal to the radius of the spherical flying object are recorded as the first scanning data point set.
[0114] In this embodiment, whether the spherical flying object collides with the propeller is determined by the relative position of the coordinates of the center of mass of the spherical flying object and the coordinates of each scanning data point at the same time and the radius of the spherical flying object. Since the center of mass of the spherical flying object is compared with the positions of each scanning data point on the surface of the propeller in the determination process, it is determined whether the collision occurs according to the actual physical structure of the propeller and the actual physical structure (radius) of the spherical flying object. The determination result is closer to the real situation and more accurate.
[0115] In one embodiment, as shown in Figure 10 , step S920 further includes:
[0116] Step S1000, if the first relative difference, the second relative difference and the third relative difference corresponding to each scanning data point are less than or equal to the radius of the spherical flying object, the distance between the scanning data point corresponding to each scanning data point and the center of mass of the spherical flying object is determined according to the first relative difference, the second relative difference and the third relative difference corresponding to each scanning data point.
[0117] For example, the distance between each scanning data point and the center of mass of the spherical flying object is where Δx n is the first relative difference, Δy n is the second relative difference, and Δz nThis is the third relative difference.
[0118] Specifically, the distance between the scanned data point and the center of matter of the sphere is the maximum distance between each scanned data point and the center of matter of the sphere.
[0119] For example, the distance between each scan data point in the first set of scan data points and the center of mass of the sphere in flight is determined.
[0120] Step S1020: If the distance between each scan data point and the center of the spherical object is greater than the radius of the spherical object, then it is determined that the propeller and the spherical object did not collide.
[0121] For example, if Therefore, it is determined that the propeller and the spherical flying object did not collide. Where r is the radius of the spherical flying object, and Δx... n The first relative difference, Δy n The second relative difference, Δz n This is the third relative difference.
[0122] For example, if the distance between the scan data points in the first set of scan data points and the center of the spherical object is greater than the radius of the spherical object, it is determined that the propeller and the spherical object did not collide.
[0123] Step S1040: If at least one of the distances between each scanned data point and the center of the spherical object is less than or equal to the radius of the spherical object, then it is determined that the propeller has collided with the spherical object.
[0124] For example, Then it is determined that the propeller collided with the spherical flying object. Where r is the radius of the spherical flying object, and Δx... n The first relative difference, Δy n The second relative difference, Δz n This is the third relative difference.
[0125] For example, if at least one of the distances between the scan data points in the first set of scan data points and the center of the spherical object is less than or equal to the radius of the spherical object, then it is determined that the propeller has collided with the spherical object.
[0126] Specifically, by filtering scan data points, scan data points that do not need further judgment can be filtered out in each judgment process. Only scan data points that cannot be judged as having a collision can be further judged. As the judgment progresses, the number of scan data points that need to be judged decreases, thereby greatly reducing the amount of computation and improving the speed and efficiency of judgment.
[0127] In the embodiment, further determination is made on whether the propeller collides with the spherical flying object. The maximum distance between each scanning data point and the center of mass of the spherical flying object is compared with the radius of the spherical flying object to more accurately determine whether the spherical flying object collides with the propeller, and more accurate collision detection is achieved.
[0128] It should be understood that, although Figure 1 , Figures 3-5 , Figures 7-10 the steps in the flowcharts are displayed in sequence according to the arrows, these steps are not necessarily executed in sequence according to the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, Figure 1 , Figure 5 , Figures 7-10 at least part of the steps in the flowcharts can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.
[0129] In one embodiment, as shown in Figure 11 , a collision detection device is provided, comprising: a model acquisition module 901, a motion equation acquisition module 902, a trajectory determination module 903, a position determination module 904, and a collision determination module 905, wherein:
[0130] The model acquisition module 901 is configured to acquire a plurality of scanning data points of the propeller, and determine a discretized three-dimensional model according to the plurality of scanning data points.
[0131] The motion equation acquisition module 902 is configured to acquire a motion equation of the spherical flying object.
[0132] The trajectory determination module 903 is configured to determine a motion trajectory equation of the center of mass of the spherical flying object relative to the propeller according to the model parameters of the discretized three-dimensional model, the motion equation, and the radius of the spherical flying object.
[0133] The position determination module 904 is configured to determine the spatial position of each scanning data point on the surface of the propeller according to the discretized three-dimensional model.
[0134] The collision determination module 905 is configured to determine whether the propeller collides with the spherical flying object according to the motion trajectory equation and the spatial position of each scanning data point on the surface of the propeller.
[0135] The specific limitation of the collision detection apparatus can refer to the limitation of the collision detection method in the foregoing, and will not be described herein. Each module in the collision detection apparatus can be implemented by software, hardware, and a combination thereof, in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical function division. In actual implementation, another division manner can be used.
[0136] In an embodiment, a computer device is provided, and an internal structure diagram of the computer device can be as shown in Figure 12 The computer device includes a processor, a memory, and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a collision detection method.
[0137] Those skilled in the art can understand that Figure 12 The structure shown in the foregoing
[0138] In an embodiment, a computer device is provided, and includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the steps in each method embodiment.
[0139] In an embodiment, a computer readable storage medium is provided, and stores a computer program. The computer program is executed by a processor to implement the steps in each method embodiment.
[0140] In an embodiment, a computer program product is provided, and includes a computer program. The computer program is executed by a processor to implement the steps in each method embodiment.
[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in each embodiment provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0142] In the description of the present specification, the description of the terms "some embodiments", "other embodiments", "ideal embodiments" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiments or examples are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example.
[0143] The technical features of the above embodiments can be combined in any way. In order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0144] The above embodiments only express several embodiments of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the scope of protection of the patent of the present application should be subject to the appended claims.
Claims
1. A collision detection method characterized by, The method comprises: acquiring a plurality of scanning data points of the propeller and determining a discretized three-dimensional model according to the plurality of scanning data points; the discretized three-dimensional model is obtained by scanning a preset propeller physical object in an array scanning manner to obtain a plurality of scanning data points of a propeller surface and is constructed according to the plurality of scanning data points; acquiring a motion equation of the spherical flying object; determining a motion trajectory equation of the center of mass of the spherical flying object relative to the propeller according to model parameters of the discretized three-dimensional model, the motion equation and a radius of the spherical flying object; determining spatial positions of the scanning data points of the propeller surface according to the discretized three-dimensional model; determining whether the propeller and the spherical flying object collide according to the motion trajectory equation and the spatial positions of the scanning data points of the propeller surface; the acquiring of the motion equation of the spherical flying object comprises: acquiring an initial position of the spherical flying object in an original coordinate system and a motion trajectory direction vector of the center of mass of the spherical flying object in the original coordinate system; performing coordinate conversion on the original coordinate system according to the motion trajectory direction vector to obtain a target coordinate system, wherein the motion trajectory direction vector is parallel to an XOY plane in the target coordinate system; determining the motion equation of the spherical flying object in the target coordinate system according to conversion information between the original coordinate system and the target coordinate system.
2. The method of claim 1, wherein, The motion trajectory direction vector comprises an X-axis direction vector, a Y-axis direction vector and a Z-axis direction vector of a motion trajectory of the spherical flying object in the original coordinate system, and the performing of the coordinate conversion on the original coordinate system according to the motion trajectory direction vector to obtain the target coordinate system comprises: determining a rotation angle according to the Y-axis direction vector and the Z-axis direction vector; rotating the original coordinate system around the X-axis of the original coordinate system according to the rotation angle to obtain the target coordinate system.
3. The method of claim 2, wherein, The determining of the motion equation of the spherical flying object in the target coordinate system according to the conversion information between the original coordinate system and the target coordinate system comprises: acquiring an acute angle included angle between the motion trajectory direction vector and the X-axis of the original coordinate system; determining the conversion information between the original coordinate system and the target coordinate system according to the acute angle included angle and the rotation angle; constructing the motion equation of the spherical flying object in the target coordinate system according to the conversion information and the initial position.
4. The method according to any one of claims 1 to 3, characterized in that, The determining of the motion trajectory equation of the center of mass of the spherical flying object relative to the propeller according to the model parameters of the discretized three-dimensional model, the motion equation and the radius of the spherical flying object comprises: acquiring a height of the discretized three-dimensional model along a rotation axis direction of the propeller; determining the motion trajectory equation in the target coordinate system according to the height of the discretized three-dimensional model, the radius of the spherical flying object and the motion equation.
5. The method of claim 4, wherein, The variation range of the motion trajectory equation is determined according to the distance between adjacent scanning data points, the height of the discretized three-dimensional model, the radius of the spherical flying object, and the motion trajectory direction vector.
6. The method according to any one of claims 1 to 3, characterized in that, The method further includes: obtaining an angular velocity of the propeller rotation, a modulus and a first argument of a complex triangle formed by coordinates of each scanning data point on the Y-axis and the Z-axis of the target coordinate system; determining a second argument corresponding to each scanning data point according to the first argument, the angular velocity, the radius of the spherical flying object, a velocity of the spherical flying object relative to the propeller, and the motion trajectory direction vector; determining the spatial position of each scanning data point on the surface of the propeller according to the modulus and the second argument corresponding to each scanning data point.
7. The method according to any one of claims 1 to 3, characterized in that, The method further includes: under a preset condition, obtaining relative position information between the spatial position of each scanning data point and the center of mass of the spherical flying object according to the motion trajectory equation, the relative position information including a first relative difference in the X-axis direction, a second relative difference in the Y-axis direction, and a third relative difference in the Z-axis direction in the target coordinate system; determining whether the propeller collides with the spherical flying object according to the relative position information.
8. The method of claim 7, wherein, The method further includes: if at least one of the first relative difference, the second relative difference, and the third relative difference corresponding to each scanning data point is greater than the radius of the spherical flying object, it is determined that the propeller does not collide with the spherical flying object.
9. The method of claim 8, wherein, The method further includes: if the first relative difference, the second relative difference, and the third relative difference corresponding to each scanning data point are all less than or equal to the radius of the spherical flying object, determining the distance between each scanning data point and the center of mass of the spherical flying object according to the first relative difference, the second relative difference, and the third relative difference corresponding to each scanning data point; if the distance between each scanning data point and the center of mass of the spherical flying object is greater than the radius of the spherical flying object, it is determined that the propeller does not collide with the spherical flying object; if at least one of the distances between the scanning data points and the center of mass of the spherical flying object is less than or equal to the radius of the spherical flying object, it is determined that the propeller collides with the spherical flying object.
10. A collision detection apparatus characterized by comprising: The device includes: The model obtaining module is configured to obtain a plurality of scanning data points of the propeller and determine a discretized three-dimensional model according to the plurality of scanning data points; the discretized three-dimensional model is obtained by scanning a preset propeller physical object in an array scanning manner to obtain a plurality of scanning data points of a propeller surface and constructed according to the plurality of scanning data points; The motion equation obtaining module is configured to obtain a motion equation of the spherical flying object; The trajectory determining module is configured to determine a motion trajectory equation of a center of mass of the spherical flying object relative to the propeller according to a model parameter of the discretized three-dimensional model, the motion equation, and a radius of the spherical flying object; The position determining module is configured to determine a spatial position of each scanning data point on the propeller surface according to the discretized three-dimensional model; The collision determining module is configured to determine whether the propeller and the spherical flying object collide according to the motion trajectory equation and the spatial position of each scanning data point on the propeller surface; The motion equation obtaining module is configured to: obtain an initial position of the spherical flying object in an original coordinate system and a motion trajectory direction vector of a center of mass of the spherical flying object in the original coordinate system; perform coordinate conversion on the original coordinate system to obtain a target coordinate system according to the motion trajectory direction vector, wherein the motion trajectory direction vector is parallel to an XOY plane in the target coordinate system; determine the motion equation of the spherical flying object in the target coordinate system according to conversion information between the original coordinate system and the target coordinate system. 11.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-10 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 9.
12. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 9.
Citation Information
Patent Citations
Method for establishing rigid body model based on three-dimensional model in digital home entertainment
CN102663808A
Collision-free path planning method and system suitable for unmanned aerial vehicle and medium
CN112504279A