A physical simulation method for complex structure crane arm

By using a quaternion and PBD-based method to simulate the multi-degree-of-freedom of the crane arm, the problem of low crane arm simulation efficiency in the existing technology is solved, and efficient and real-time physical simulation effects are achieved, which is suitable for applications such as virtual reality and augmented reality.

CN114660958BActive Publication Date: 2025-10-10XI AN JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210423049.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2025-10-10
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

Existing crane arm simulation methods are inefficient when simulating software and cannot meet the high real-time requirements of applications such as virtual reality and augmented reality.

Method used

The quaternion-based composite rotation processing method is used to simulate the multi-degree-of-freedom of the boom, the PBD-based procedural mesh generation method is combined to simulate the rigid rope, and the rigid body-based simulation method is used to simulate the object attached to the bottom of the rope.

Benefits of technology

It improves the real-time performance and efficiency of crane arm physical simulation, avoids memory waste of rotation matrix, enhances the realism and adaptability of rope simulation, supports dynamic change of rope length, and handles collision forces of complex mesh objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114660958B_ABST
    Figure CN114660958B_ABST
Patent Text Reader

Abstract

The application discloses a physical simulation method of a complex structure hoisting arm, which comprises the following steps: 1) using a quaternion-based composite rotation processing method to simulate and analogize the multi-degree-of-freedom composite motion of the hoisting arm; 2) the rotation or displacement of the hoisting arm will cause the swing of the rigid rope attached thereto, and a PBD-based and procedural mesh generation method is used to simulate and analogize the rigid rope; and 3) the swing of the rope causes the motion of the object hung by the rope, and a rigid body-based simulation method is used to simulate and analogize the object attached to the bottom of the rope. The application greatly improves the efficiency of the method in time and space on the basis of meeting the requirement of the physical simulation effect, and can meet the real-time requirement of real-time rendering software application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of physical simulation of mechanical structures, and in particular relates to a physical simulation method of a crane arm with a complex structure. Background Art

[0002] In the field of physical simulation, it is more difficult to perform physical simulation on a crane arm system that includes multiple degrees of freedom. It mainly refers to combining computer graphics and physics and other related disciplines to realistically simulate the system's compound motion and the motion of soft bodies such as ropes in the system, and rendering and outputting them in the form of three-dimensional graphics on the target display device. Related application areas mainly include virtual assisted training, education, industrial design, electronic games, etc.

[0003] The rapid development of related application fields has put forward higher demands on virtual simulation technology in terms of authenticity and real-time performance. It is required not only to simulate the real motion trajectory and laws of related objects, but also to improve the real-time performance of the system as much as possible. A typical example is that related applications of virtual reality, augmented reality and mixed reality usually require a screen refresh rate of 90 frames per second or even higher, that is, 90 continuous pictures are drawn per second. Under the condition that the hardware performance does not change, the efficiency of related technologies and algorithms has also become one of the main factors that need to be considered.

[0004] Existing crane arm simulation methods are inefficient when performing physical calculations. This is mainly because traditional physics-based simulation methods require multiple complex traversal operations when simulating software. In large-scale real-time rendering applications, the time spent on the physical simulation part needs to be less to ensure the real-time performance of the application. Therefore, an efficient crane arm physical simulation method is urgently needed. Summary of the Invention

[0005] The purpose of the present invention is to provide a physical simulation method for a complex structure crane arm, which can accurately simulate the physical motion trajectory of the crane arm during engineering operation, and at the same time, the efficient physical simulation scheme also ensures its real-time performance.

[0006] The present invention is achieved by adopting the following technical solutions:

[0007] A physical simulation method for a complex structure crane arm comprises the following steps:

[0008] 1) Use the quaternion-based composite rotation processing method to simulate the multi-degree-of-freedom composite motion of the boom;

[0009] 2) The rotation or displacement of the boom will cause the attached rigid rope to swing. A simulation method based on PBD and procedural mesh generation is used to simulate the rigid rope.

[0010] 3) the swing of the rope causes the movement of the object suspended by the rope, and a rigid body-based simulation method is used to simulate the object attached to the bottom of the rope.

[0011] Further improvements of the present application are that the simulation of the multi-degree-of-freedom compound motion of the crane boom based on quaternions in step 1) comprises:

[0012] Step 1.1) constructing a crane model of the simulation platform according to the physical model of the crane;

[0013] Step 1.2) initializing the position, rotation and scaling information of each boom and its support arm in the world space of the crane model;

[0014] Step 1.3) setting the hierarchical relationship of each part of the boom;

[0015] Step 1.4) reading external input information, for displacement operation input, converting it into a floating-point array type value to represent the moving speed of the operated boom in the simulation environment, for rotation operation input, converting it into a quaternion type value to represent the rotation axis direction and rotation angular velocity of the operated boom in the rotation process;

[0016] Step 1.5) updating the position and rotation of each boom in the world space according to the input value of step 1.4);

[0017] Step 1.6) updating the position and rotation of the support arm in the world space according to the position of the boom.

[0018] Further improvements of the present application are that in step 1.1), the mesh of the boom model is composed of multiple sub-meshes, and the multiple sub-meshes are combined into the overall boom model based on displacement and rotation in different world spaces in the simulation platform.

[0019] Further improvements of the present application are that in step 1.4), the read external input is converted into two data types, i.e. floating-point array type and quaternion type, which are used to represent the moving speed and rotation speed of the boom in the world space, respectively.

[0020] Further improvements of the present application are that in step 1.6), the position of the support arm is updated only after the position of the boom is updated, and the position of the support arm depends entirely on the position of the boom rather than external input and any other control method.

[0021] Further improvements of the present application are that the simulation method of the rigid rope based on PBD and procedural mesh generation in step 2) comprises:

[0022] Step 2.1) determining the starting position of the rope in the world space, and generating a bundle of vertex sets towards the lower direction in the world space;

[0023] Step 2.2) using the PBD-based method to constrain the positions of the vertices contained in the vertex set in 2.1), and taking the distance between adjacent vertices at the initial time as the constraint quantity;

[0024] Step 2.3) taking the vertices in 2.2) as path points and using a catmull-rom curve approximation to obtain a curve;

[0025] Step 2.4) based on the world coordinates, normal and tangent of each point on the curve in 2.3), using a triangle as a basic primitive to process the grid generation, to obtain a generated three-dimensional grid model.

[0026] The further improvement of the present application is that in step 2.2), the PBD-based method only simulates a bundle of vertex sets.

[0027] The further improvement of the present application is that in step 2.3), the catmull-rom spline method is used to fit the point set in step 2.2).

[0028] The further improvement of the present application is that in step 2.4), based on the coordinates and normal and tangent data of each point on the curve in step 2.3), a rope grid model is generated.

[0029] The further improvement of the present application is that the simulation method of the rope bottom attachment object based on the rigid body simulation method in step 3) includes:

[0030] Step 3.1) determining the attachment point of the rope on the rigid object, and always setting the end point of the rope as the coordinates of the attachment point in the world space;

[0031] Step 3.2) performing force analysis on the attached rigid object, and calculating the new velocity and angular velocity of the object through the rigid body simulation method, the force analysis including the elastic force of the rope, its own gravity and the force generated by the collision;

[0032] Step 3.3) updating the object state of the object based on the velocity and angular velocity.

[0033] The present application has at least the following beneficial technical effects:

[0034] 1. Using the quaternion-based method to handle the rotation problem, avoiding the memory waste when using the rotation matrix and the gimbal lock problem when using Euler angles to handle the rotation;

[0035] 2. Simulating rigid ropes uses line segment simulation and procedural mesh generation, focusing the computational effort on faster mesh generation while consuming fewer computing resources for physical simulation. This improves efficiency while ensuring effective physical simulation. Furthermore, procedural rope mesh generation supports dynamic changes in rope length during runtime, making it more suitable for applications such as cranes.

[0036] 3. Use impulse calculation to handle object collisions. This can handle the displacement and rotation of complex mesh objects when they are subjected to collision forces. Compared with the collision detection method based on regular bounding boxes, the effect is more realistic. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a schematic diagram of a crane arm in a three-dimensional space;

[0038] Figure 2 A simplified schematic diagram of the boom model and the motion of the boom, support arm, and support arm in the embodiment;

[0039] Figure 3 It is the change of the supporting arm during a certain rotation operation of the boom;

[0040] Figure 4 To determine the position of the point set of the rigid rope, Figure 4 (a) is a top view. Figure 4 (b) is a front view. Figure 4 (c) is a right side view. Figure 4 (d) is a schematic diagram of the positions of each point after generation;

[0041] Figure 5 Update trends for the positions of particles in a spring system;

[0042] Figure 6 The generated Catmull-Rom spline curve for a certain vertex set is shown in FIG.

[0043] Figure 7 This is a schematic diagram of a rope mesh generated in the embodiment;

[0044] Figure 8 Schematic diagram of the attachment point of the rope on the rigid object in the embodiment;

[0045] Figure 9 It is a schematic diagram of a single spring system;

[0046] Figure 10 To analyze the forces acting on the object to which the rope is attached;

[0047] Figure 11 This is a special force condition used to simulate the motion of a rigid object in the embodiment. DETAILED DESCRIPTION

[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0049] The present invention is a physical simulation method for the motion of a complex structure crane arm. Its specific implementation method is mainly divided into three parts:

[0050] First, use the quaternion-based composite motion simulation method to process the displacement and rotation of the boom and its supporting arm:

[0051] 1) Construct a crane model for the simulation platform based on the crane model, Figure 1 is a schematic diagram of the crane arm of the embodiment in three-dimensional space, Figure 2 A simplified schematic diagram of the boom model and the movements of the various booms in this embodiment is provided. In this embodiment, the various parts of the boom do not share the same mesh, as indicated by the use of discrete material colors. If OpenGL is used as the graphics rendering API for the simulation platform, this means that each part of the boom corresponds to a separate VAO.

[0052] 2) Initialize the position, rotation and scaling information of each arm and its supporting arm in the world space. Use different displacement matrices and rotation matrices to initialize the model position to ensure that the mesh models of the arm and supporting arm have the correct connection relationship after being converted to the world space. If vector Represents the position of mesh i in world space, then the coordinates of each vertex of mesh i are T*v j , where v j is the local coordinate of the jth vertex of mesh i, T is a 3-row 3-column displacement matrix, and its value is The present invention uses quaternion to process the rotation of the model. Represents the grid i around any rotation axis Rotate by θ degrees (in radians), then the coordinates of each vertex of mesh i after rotation are R*v j , R is a rotation matrix with 3 rows and 3 columns, and its value is in, After using quaternions to process rotation, only four floating-point numbers need to be stored when performing physical simulation calculations, that is, the four components of the quaternion. Compared with using a three-dimensional three-column rotation matrix, the storage overhead in the rotation operation is reduced.

[0053] 3) Set the hierarchical relationship of the mesh models of each part of the boom. Figure 2 A schematic diagram of the hierarchical relationship of the boom model in the embodiment is given. In the hierarchical relationship shown in the embodiment, if the local coordinates and rotations of the entire boom, the boom, the jib, the supporting arm boom, and the supporting arm jib are p respectively, i ,q i , i=0,1,2,3,4 (i.e., the position and rotation of a mesh model are represented by a three-dimensional vector and a quaternion respectively), then in the hierarchical relationship of the embodiment, the displacement and rotation of each part of the boom in the world space are

[0054] 4) Read the input signal of the external device and convert it into the displacement increment or rotation increment of each part of the boom. In the boom structure shown in the embodiment, the rotation of the boom and the extension and retraction of the arm are directly operable transformation states. For the rotation input signal of the boom RotateSpeed∈[-1,1], the rotation of the boom is updated. in is the rotation axis of the arm, Δt is the rendering time interval between each two frames, q old is the rotation of the upper arm in the previous frame. For the telescopic displacement input signal of the lower arm, TranslateSpeed∈[-1,1], update the position of the lower arm p new =p old +Δt×TranslateSpeed×Direction, where Direction is the direction of the arm extension and contraction change.

[0055] 5) Update the support arm's rotation according to the arm's rotation. Figure 3 The changes of the support arm in one rotation of the boom are given. Before the rotation, the angle between the support arm boom and the boom chassis is β1, and the angle between the support arm arm and the boom is α1. After the rotation, these two angles are updated to β2 and α2 respectively. The model displacement and rotation in the embodiment are represented by local variables under the hierarchical relationship. Therefore, it is only necessary to analyze the changes in the local rotation of the support arm boom and the arm in this movement. Figure 3 The rotation change shown in the figure shows the local rotation of the support arm. where q old Partial rotation of the front support arm for rotation operation, The rotation axis of the support arm. The local rotation of the support arm where q old Small partial rotation of the front support arm for rotation operation, The new coordinates and rotation values ​​of the support arm in world space can be obtained based on the relationship between the local space coordinates and rotations and the coordinates and rotations in world space in the hierarchical relationship described in 3).

[0056] Second, the rope physics simulation algorithm based on PBD and procedural mesh generation is used to handle the state update of the rigid rope of the crane arm:

[0057] 1) Determine the starting position of the rigid rope, Figure 4 (a) (b) (c) are schematic diagrams of the positions of the starting points p1, p2, p3, and p4 of the rigid rope in the embodiment in the top view, front view, and right view, respectively. With p1, p2, p3, and p4 as the starting points, i points are generated in the downward direction, denoted as Figure 4 (d) gives a schematic diagram of this process;

[0058] 2) Use the PBD method to calculate the point p jk The PBD method proceeds as follows: 1) simulate the motion of each particle in the system as a single particle; 2) constrain all particles in the system using certain constraints; 3) update the positions of all particles in the system. For a rigid rope, the initial distance between adjacent particles can be used as the constraint.

[0059] Here, the PBD method is further explained using a system containing only two particles. Figure 5 The position update trend of the particles in this system is given. When the current distance of the particles is less than the threshold, the PBD method will drive the particles to move in the direction that can make the distance between them larger. When the distance between the particles is greater than the threshold, the particles will be driven to move in the direction that can make the distance between them smaller. Therefore, the constraint used here is The position update function is:

[0060]

[0061] The solution is available The position update functions are:

[0062]

[0063]

[0064] For a system containing multiple particles, it is sufficient to traverse each pair of adjacent particles in the system and update their positions. The pseudo code is described as follows:

[0065]

[0066] Or use the Jacobi method to get a better global solution. The pseudo code is as follows:

[0067]

[0068] So far, the vertex set generated in 1) has a simple rope-like physical simulation effect, but has not yet formed a line segment.

[0069] 3) Perform curve fitting on the vertex set in 2.2). In the embodiment, the Catmull-Rom spline curve method is used for fitting. The Catmull-Rom method ensures that the fitted curve passes through all points between the second control point and the second to last control point. Figure 6 An example of a curve segment obtained by using the Catmull-Rom spline curve method for a certain set of vertices is given.

[0070] 4) Generate the mesh model of the rope according to the curve c obtained in 3). The coordinates of each point on the curve c are The tangent direction of each point is The mesh generation process is as follows: 1) Get the right unit vector in world space 2) For each vertex projection To its normal plane, get the projected unit vector 3) For each projected unit vector Orient it around the tangent Rotate n times, each rotation Degrees (in radians), the vector after each rotation is recorded as This process and the projection operation in 2) will generate n+1 new vectors on the normal plane of each vertex, and these vectors are respectively compared with the normal plane of the corresponding vertex. Adding them together will result in i×(n+1) new vertices in world space, which will serve as vertices of the procedural rope mesh. 4) Using triangles as basic primitives and the coordinates of the vertices generated in 3) as the vertex coordinates of the mesh, the corresponding rope mesh model is generated. The above steps are implemented as follows: First, find an additional vertex set MeshVertices on the normal plane for each vertex on the curve. The vertex set will contain i×(n+1) vertices. The pseudo code is described as follows:

[0071]

[0072] After getting all the vertices of the mesh, the following will set the mesh triangle primitive index set MeshTriangles, which stores the index subscript of the coordinates of each triangle primitive of the mesh in MeshVertices, for example, These are the three vertex coordinates of the first triangle primitive of the mesh. MeshTriangles is set in the following way. For each vertex, two triangular faces will be generated. The pseudo code is as follows:

[0073]

[0074]

[0075] Figure 7 A schematic diagram of a rope mesh generated using the above-mentioned procedural generation method in an embodiment is given.

[0076] Third, perform physical simulation on the movement of the rigid object attached to the bottom of the rope.

[0077] 1) Determine the attachment point of the rope on the rigid object and always set the end point of the rope to the coordinates of the attachment point in world space, Figure 8 A schematic diagram of the attachment points of the rope on the rigid object in an embodiment is given.

[0078] 2) Analyze the force on the attached rigid object. First, the object is affected by its own gravity. Since the bottom vertex of the rope is always set to the position of the attachment point on the rigid object in 1), when the object falls downward under gravity, the rope will be stretched, causing the object to be subjected to spring force. The spring force changes with the length of the rope. Specifically, Figure 9 In the single spring system shown in the figure, the spring forces acting on the two masses are

[0079]

[0080]

[0081] Where k is a constant representing the elastic coefficient of the spring system.

[0082] In an embodiment, the force analysis of a rigid object is as follows: Figure 10 As shown, the object is subject to its own gravity and spring force Of these forces, gravity acts on the object's center of gravity and therefore only affects physical displacement, while spring forces act on the attachment point and will affect the object's rotation.

[0083] First, for the displacement of an object, the net force it receives is

[0084]

[0085] The acceleration of the object is

[0086]

[0087] Where m is the mass of the object. The linear velocity of the object is updated to

[0088]

[0089] Therefore, the displacement p of the object is updated to

[0090]

[0091] For the rotation of an object, the spring force Will cause the object to rotate, and the torque they produce on the object is

[0092]

[0093] τ=∑τ i

[0094] The angular velocity increment generated by the torque τ is

[0095] Δω=ΔtI -1 τ

[0096] Where I is the moment of inertia, which is represented here as a matrix with four rows and four columns, and its value is

[0097]

[0098] I=RI ref R T

[0099] Among them, m i The mass of particle i on the grid, r i is the offset of the position of vertex i relative to the center of mass.

[0100] Therefore, the angular velocity of the object is updated to

[0101] ω=ω+Δω

[0102] After obtaining the new angular velocity, the quaternion used to represent the object's rotation is updated in each frame as follows:

[0103]

[0104] Thus, the motion processing of the rigid object to which the rope is attached is completed in the embodiment. Figure 11This is a special case when simulating the motion of a rigid object in the embodiment, and is used here to demonstrate the simulation effect of the present invention.

[0105] Although the present invention has been described in detail above using general descriptions and specific embodiments, it will be apparent to those skilled in the art that modifications and improvements may be made based on the present invention. Therefore, such modifications and improvements, which do not depart from the spirit of the present invention, are intended to be within the scope of protection claimed herein.

Claims

1. A physical simulation method for a complex structure crane arm, characterized by comprising the following steps: 1) Use the quaternion-based composite rotation processing method to simulate the multi-degree-of-freedom composite motion of the boom, specifically including the following implementation methods: 1.1) The crane model for the simulation platform is constructed based on the physical crane model. The boom model mesh is composed of multiple sub-meshes. These sub-meshes are combined into the overall boom model in the simulation platform based on the displacement and rotation in different world spaces. 1.2) Initialize the position, rotation and scaling information of each arm and support arm in the world space. Use different displacement matrices and rotation matrices to initialize the model position to ensure that the mesh models of the arm and support arm have the correct connection relationship after being converted to the world space. If you use vector Represents the position of mesh i in world space, then the coordinates of each vertex of mesh i are T*v j , where v j is the local coordinate of the jth vertex of mesh i, T is a 3-row 3-column displacement matrix, and its value is Use quaternions to handle the rotation of the model. Represents the grid i around any rotation axis Rotate by θ degrees, then the coordinates of each vertex of mesh i after rotation are R*v j , E is a rotation matrix with 3 rows and 3 columns, and its value is in, After using quaternions to process rotation, four floating-point numbers, i.e. the four components of the quaternion, are stored when performing physical simulation calculations on the rotation. 1.3) Set the hierarchical relationship of the mesh model of each part of the boom, and set the local coordinates and rotations of the entire boom, boom, jib, support arm boom, and support arm jib to be p respectively. i ,q i , i=0,1,2,3,4, then in the hierarchical relationship, the displacement and rotation of each part of the boom in the world space are 1.4) Read the input signal of the external device and convert it into the displacement increment or rotation increment of each part of the boom; for the rotation input signal RotateSpeed∈[-1,1] of the boom, update the rotation of the boom in is the rotation axis of the arm, Δt is the rendering time interval between each two frames, q old is the rotation of the upper arm in the previous frame; for the telescopic displacement input signal of the lower arm, TranslateSpeed∈[-1,1], the position of the lower arm is updated. new =p old +Δt×TranslateSpeed×Direction, where Direction is the direction of the forearm extension and contraction; 1.5) Update the rotation of the support arm according to the rotation of the boom. Before the rotation, the angle between the support arm boom and the boom chassis is β1, and the angle between the support arm arm and the boom is α1. After the rotation, these two angles are updated to β2 and α2 respectively; the local rotation of the support arm boom where q old Partial rotation of the front support arm for rotation operation, The rotation axis of the support arm's upper arm; the local rotation of the support arm's lower arm where q old Small partial rotation of the front support arm for rotation operation, It is the rotation axis of the supporting arm; According to the relationship between the local space coordinates and rotations and the coordinate rotations in the world space in the hierarchical relationship, the new coordinates and rotation values ​​of the support arm in the world space can be obtained; 2) The rotation or displacement of the boom will cause the attached rigid rope to swing. A simulation method based on PBD and procedural mesh generation is used to simulate the rigid rope. The specific implementation method includes the following: 2.1) Determine the starting position of the rope in world space, using p1, p2, p3, and p4 as starting points, and generate i points in the downward direction, denoted as 2.2) Use the PBD method to calculate the point p jk Constraints are made; the PBD method process includes: Simulate the force and motion of each particle in the system as a separate particle; Constrain all particles in the system with certain constraints; Update the positions of all particles in the system; When the current distance between particles is less than the threshold, the PBD method will drive the particles to move in the direction that can make the distance between them larger. When the distance between particles is greater than the threshold, the particles will be driven to move in the direction that can make the distance between them smaller. Therefore, the constraint used here is The position update function is: The solution is available The position update functions are: For a system containing multiple particles, it is sufficient to traverse each pair of adjacent particles in the system and update their positions. The pseudo code is described as follows: fork=0,1,2,…,i foreveryedgee={m,n} Or use the Jacobi method to get a better global solution. The pseudo code is as follows: 2.3) performing curve fitting on the vertex set in 2.2) using the Catmull-Rom spline curve method to obtain a curve; 2.4) performing procedural mesh generation based on the world coordinates, normals, and tangents of each point on the curve in 2.3) using triangles as basic primitives to obtain a generated three-dimensional mesh model; 3) The swing of the rope causes the movement of the object suspended by the rope, and the object attached to the bottom of the rope is simulated using a rigid body-based simulation method.

2. The physical simulation method of a complex structure crane arm according to claim 1, characterized in that: The simulation method of the object attached to the bottom of the rope based on the rigid body simulation method in step 3) includes: Step 3.1) Determine the attachment point of the rope on the rigid object and always set the end point of the rope to the coordinates of the attachment point in world space; Step 3.2) Perform a force analysis on the attached rigid object and calculate the object's new velocity and angular velocity using a rigid body simulation method. The force analysis includes the elastic force of the rope, its own gravity, and the force generated by the collision. Step 3.3) Update the object state of the object based on the velocity and angular velocity.

Citation Information

Patent Citations

  • Flexible rope simulation method

    CN102495752A

  • Container-door-type crane simulation operation panorama simulation system and method thereof

    CN107331235A