Simulator and method for generating simulation data
The simulator addresses the limitations of conventional techniques by using a fully parallel dynamics solver on a GPU to simulate soft and rigid bodies, achieving real-time, accurate bidirectional dynamics and improved haptic feedback in complex scenarios like surgical simulations.
Patent Information
- Application Number
- PCT/JP2024/001566
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-03
- Filing Date
- 2024-01-22
- Publication Date
- 2024-09-12
AI Technical Summary
Conventional simulation techniques are limited in their ability to perform bidirectional dynamics simulation of both soft and rigid bodies, particularly in complex scenarios like surgical simulations, and struggle with parallel processing, leading to inefficiencies and inaccuracies in collision detection and haptic feedback.
A simulator and simulation data generation method that models soft bodies using particles and rigid bodies with collision shapes, employing a fully parallel dynamics solver on a GPU to calculate changes in position and orientation, incorporating XPBD and FEM-based constraints for accurate and efficient simulation of both soft and rigid body interactions.
Enables real-time, accurate bidirectional dynamics simulation of soft and rigid bodies, improving haptic feedback and allowing for complex surgical scenarios to be simulated realistically, with enhanced computational efficiency and accuracy.
Smart Images

Figure JP2024001566_12092024_PF_FP_ABST
Abstract
Description
Simulator and simulation data generation method
[0001] The present disclosure relates to a simulator and a method for generating simulation data.
[0002] Various techniques have been proposed for simulating the dynamics of an object. For example, Patent Document 1 proposes a method for dividing a 3D scene for parallel computation in a 3D scene simulation using a group of computing resources operating in parallel.
[0003] Japanese Patent Application Laid-Open No. 2018-92607
[0004] For example, in a surgical simulation, a bidirectional dynamics simulation of soft bodies such as organs and rigid bodies such as surgical tools is required, but no specific consideration is given to this point in Patent Document 1.
[0005] One aspect of the present disclosure enables bidirectional dynamics simulation of soft and rigid bodies.
[0006] A simulator according to one aspect of the present disclosure is a simulator equipped with a processing unit including at least one processor, wherein the processing unit models a soft-body object using a plurality of particles and models a rigid-body object using a rigid body having a collision shape, and calculates changes in the positions of the particles of the soft-body object, changes in the position of the rigid body, and changes in the orientation of the rigid body caused by collisions between the modeled objects so as to satisfy given constraints.
[0007] A simulation data generation method according to one aspect of the present disclosure includes modeling a soft body object using a plurality of particles and modeling a rigid body object using a rigid body having a collision shape, and generating simulation data that describes information about the modeled soft body object and rigid body object in an array.
[0008] 1 is a diagram showing an example of a schematic configuration of a simulation system 100 according to an embodiment. FIG. 1 is a diagram showing an example of functional blocks of a simulator 1. FIG. 2 is a diagram showing an example of roles of a CPU 61 and a GPU 62 in a processing unit 6. FIG. 2 is a diagram showing an example of particles 20 and rigid bodies 30. FIG. 3 is a diagram showing an example of constraints. FIG. 4 is a diagram showing an example of constraints. FIG. 5 is a flowchart showing an example of processing (simulation method) executed in the simulator 1. FIG. 6 is a flowchart showing a detailed example of step S210. FIG. 7 is a diagram showing an example of collision pair detection. FIG. 8 is a flowchart showing a detailed example of steps S220 and S230. FIG. 9 is a diagram showing an example of constraint solving. FIG. 10 is a flowchart showing a detailed example of processing of step S240. FIG. 11 is a flowchart showing a detailed example of steps S250 and S260. FIG. 12 is a flowchart showing a detailed example of step S270. FIG. 13 is a diagram schematically showing overlap confirmation. FIG. 14 is a diagram showing a modified example. FIG. 15 is a diagram showing a modified example. FIG. 16 is a diagram showing an example of the hardware configuration of the device.
[0009] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. In the following embodiments, the same elements will be designated by the same reference numerals, and redundant description may be omitted.
[0010] The present disclosure will be described in the following order: 0. Introduction 1. Embodiment 2. Modification 3. Example of Hardware Configuration 4. Conclusion
[0011] 0. Introduction Conventional simulation techniques have focused on either rigid body or soft body dynamics. Compared to the conventional techniques, the disclosed technique has novel features, such as the following:
[0012] <Bidirectional dynamics of rigid and soft bodies> We provide a simulation technology (rigid and soft body dynamics solver) that can handle both rigid and soft bodies. This enables complex simulations that include calculations of collisions between soft and rigid bodies and the resulting interactions. For example, using the XPBD (extended position-based dynamics) method, the bidirectional dynamics of particle-based soft bodies and rigid bodies can be simulated within the same framework.
[0013] Fully Parallel Dynamics Solver: This technology enables the implementation of a fully parallel dynamics solver based on a general-purpose graphics processing unit (GPU) architecture. Complex scenarios can be simulated in real time. For example, all simulation processes, including collision detection, are executed in parallel on the GPU. In one embodiment, a Jacobi solver is implemented to solve XPBD constraints in parallel. The Jacobi solver processes constraints individually, accumulates the resulting position and orientation changes through atomic operations, and averages them after all constraints have been processed. Conventional dynamics solvers have only been implemented on a central processing unit (CPU) or a combination of CPU and GPU implementations. This is because conventional simulation methods are inherently time-series or difficult to parallelize.
[0014] <FEM-based soft-body simulation> FEM (Finite Element Method) is used to simulate physically accurate deformations and take into account the properties of the actual materials used. For example, to model soft-body objects, particles connected with constraints based on 2D FEM and 3D FEM are used for polyhedral elements (e.g., trihedral elements, tetrahedral elements) are used. Distance constraints are implemented in spring models, and volume preservation constraints are implemented in closed triangle meshes. Conventional simulators mainly use mass-spring models or existing position-based dynamics with distance constraints or shape matching. However, these methods have challenges, such as difficult tuning.
[0015] <Comparison with Patent Document 1> For example, Patent Document 1 discloses in detail a technique for dividing a 3D scene for parallel computation in a 3D scene simulation using a group of computing resources operating in parallel. However, Patent Document 1 does not mention the specific algorithm for the simulation. As will be described in detail later, the disclosed technique provides a parallel algorithm that supports the dynamics of both soft and rigid bodies. It is also possible to calculate contact forces to obtain the tactile sensation required in, for example, surgical training. Patent Document 1 also does not specifically mention the handling of tactile sensations, etc.
[0016] 1. Embodiment Fig. 1 is a diagram showing an example of a schematic configuration of a simulation system 100 according to an embodiment. The simulation system 100 includes a simulator 1, a haptic device 8, and a display 9. A user of the simulation system 100 is referred to as a user U. In Fig. 1, only the hand portion of the user U is schematically shown.
[0017] The simulator 1 executes a simulation according to a simulation scenario 10. One example of a simulation is a surgical simulation, which is illustrated in FIG. 1. The simulation scenario 10 includes several virtual objects related to the surgery. The objects illustrated in FIG. 1 include a soft-body object 2, a rigid-body object 3, a robot arm 4, and a camera 5. When there is no need to distinguish between them, they may simply be referred to as objects.
[0018] In the example shown in Figure 1, the soft object 2 is an organ having soft tissue, and the rigid object 3 is a surgical tool such as forceps. The robot arm 4 is a surgical robot arm that supports the camera 5. The camera 5 is a surgical camera that captures an image of the surgical field including the soft object 2 and the rigid object 3. The field of view of the camera 5 is illustrated as field of view 5f. Note that the term "image" may be interpreted to include video, and these terms may be interpreted interchangeably as appropriate within the scope of no contradiction.
[0019] The user U operates the haptic device 8 (tactile device) by touching it with their hands, for example, to move the rigid object 3. When the user U operates the haptic device 8 to move the rigid object 3, the rigid object 3 pinches or cuts the soft object 2, and the surgery simulation progresses. When objects collide (contact) with each other, the simulation shows that the object's position and orientation change. The force (which can also be called a contact force or a reaction force) generated by this interaction is reflected in the operation of the haptic device 8 and is fed back to the user U. Note that the terms collision and contact may be interpreted as appropriate within the scope of no contradiction.
[0020] The display 9 displays an image within the field of view 5f of the camera 5, i.e., an image including at least a portion of the soft object 2 and the rigid object 3. The user U operates the haptic device 8 while viewing the image displayed on the display 9. The position, angle, etc. of the camera 5 may also be controlled by the user U. The operation unit for the camera 5 may be incorporated into the haptic device 8 or may be provided separately from the haptic device 8. The operation of the camera 5 may be performed automatically. For example, the function of a control unit that automatically operates the camera 5 may be included in the simulation scenario 10.
[0021] 2 is a diagram showing an example of functional blocks of the simulator 1. The simulator 1 includes a processing unit 6 and a storage unit 7.
[0022] The processing unit 6 includes at least one processor. In FIG. 2, a CPU 61 and a GPU 62 are illustrated as examples of the processor.
[0023] The storage unit 7 stores information used by the simulator 1. An example of information stored in the storage unit 7 is a program 70. The program 70 is a simulation program (software, application program) for causing a computer to function as the simulator 1. The storage unit 7 also includes a CPU memory 71 and a GPU memory 72. The CPU memory 71 is memory used by the CPU 61 when executing various processes. The GPU memory 72 is memory used by the GPU 62 when executing various processes.
[0024] Motion is input to the processing unit 6 via the haptic device 8. The motion is information such as position, posture, and force. The processing unit 6 makes the motion of the rigid object 3 correspond to the motion input via the haptic device 8. The user U operates the rigid object 3 via the haptic device 8. The processing unit 6 also calculates the contact force generated by the collision between the soft object 2 and the rigid object 3. The contact force is sent from the processing unit 6 to the haptic device 8 and fed back to the user U via the haptic device 8.
[0025] As explained above, the simulation scenario 10 includes the camera 5, and the captured image is displayed on the display 9. The image captured by the camera 5 is sent from the processing unit 6 to the display 9 and displayed thereon.
[0026] FIG. 3 is a diagram showing an example of the roles of the CPU 61 and the GPU 62 in the processing unit 6.
[0027] The CPU 61 models a soft body object 2 and a rigid body object 3 according to a simulation scenario 10. As will be described in detail later, the soft body object 2 is modeled using a plurality of particles 20. The rigid body object 3 is modeled using rigid bodies 30 having zero or more collision shapes 31. The rigid body object 3 may include a plurality of rigid bodies 30, and in this case, the rigid bodies 30 may be connected to each other by kinematic joints J. FIG. 3 illustrates, as examples of the kinematic joints J, a rotational joint that connects the rigid bodies 30 having the collision shapes 31 to each other, and a 6-DOF (Degree Of Freedom) joint that connects the rigid bodies 30 without the collision shapes 31.
[0028] Various data (simulation data) relating to the soft body object 2 and rigid body object 3 modeled by the CPU 61 is copied (transferred) from the CPU 61 to the GPU 62, more specifically from the CPU memory 71 to the GPU memory 72. This simulation data can be written in the form of an array, as will be described later.
[0029] The GPU 62 calculates the changes in the positions of the particles 20, the changes in the positions of the rigid bodies 30, and the changes in the orientation of the rigid bodies 30 caused by collisions between modeled objects so as to satisfy the given constraints. A solver for solving the constraints is implemented on the GPU 62.
[0030] Although details will be described later, the solver performs various calculations using data related to the particles 20, constraints, rigid bodies 30, collision shapes 31, kinematic joints J, etc. as input data. As a result, various data such as the particles 20, rigid bodies 30, kinematic joints J, and trigger shapes (described later) are output as output data. The output data is copied back from the GPU 62 to the CPU 61, more specifically, from the GPU memory 72 to the CPU memory 71.
[0031] A specific simulation procedure will now be described. The simulation is carried out based on the XPBD method. First, the CPU 61 models a soft-body object 2 using a plurality of particles 20, and models a rigid-body object 3 using rigid bodies 30 having zero or more collision shapes 31. The particles 20 and rigid bodies 30 will be described with reference to FIGS. 4 and 5.
[0032] 4 is a diagram showing an example of a particle 20 and a rigid body 30. Coordinates common to the particle 20 and the rigid body 30 (and more specifically, the soft body object 2 and the rigid body object 3 that include them) are referred to as global coordinates C global It is called.
[0033] For ease of understanding, the particle 20 is illustrated schematically as a sphere having a constant radius r. The particle 20 may also be a point particle. The particle 20 is described using various physical quantities (physical properties). As physical quantities that describe the particle 20, mass m, position p, and velocity v are exemplified in FIG. 4 .
[0034] The rigid body 30 is also described using various physical quantities. Examples of physical quantities that describe the rigid body 30 include mass m, position p, orientation q, velocity v, angular velocity ω, and inertia I, as shown in FIG. 4 . The position and velocity of the rigid body 30 may be the central position and central velocity of the rigid body 30.
[0035] If the particles 20 and the rigid body 30 are treated as static, their masses may be set to zero. Also, if the rotation of the rigid body 30 is fixed, the inertia I of the rigid body 30 may be set to zero.
[0036] Particles 20 may collide with each other, and rigid bodies 30 may also collide with each other. Furthermore, particles 20 and rigid bodies 30 may collide with each other. In a collision involving a rigid body 30, the collision shape 31 possessed by the rigid body 30 is taken into consideration. Zero or more collision shapes 31 are attached to the rigid body 30. By combining multiple collision shapes 31, a variety of collision shapes can be attached to the rigid body 30 as a whole.
[0037] When the rigid body 30 has a plurality of collision shapes 31, each collision shape 31 may have a different basic shape (geometric shape), size, orientation, etc. The orientation of the collision shape 31 is expressed in, for example, the global coordinate system C global Alternatively, the relative posture (relative position and orientation) may be defined in local coordinates based on the center of mass of the rigid body 30.
[0038] 4 illustrates three types of collision shapes 31 having different basic shapes. To distinguish between the collision shapes 31, they are referred to as collision shape 31-1, collision shape 31-2, and collision shape 31-3. When no particular distinction is made between them, they are simply referred to as collision shapes 31.
[0039] The basic shape of the collision shape 31-1 is a sphere. The collision shape 31 having a spherical shape is also simply called a "sphere."
[0040] The basic shape of the collision shape 31-2 is a capsule shape, which can be said to be a cylindrical shape with hemispheres on both ends, an elliptical shape, etc. The collision shape 31 having a capsule shape is also simply called a "capsule."
[0041] The basic shape of the collision shape 31-3 is a box shape, or in other words, a rectangular parallelepiped shape, etc. The collision shape 31 having a box shape is also simply called a "box."
[0042] For example, the shape of the rigid body 30 in relation to a collision is formed by attaching a collision shape 31 having various basic shapes as described above to the rigid body 30. The collision shape 31 of the rigid body 30 may collide with the collision shape 31 of another rigid body 30 or with a particle 20. Note that a rigid body 30 that does not have a collision shape 31 does not collide with another rigid body 30, but the movement and momentum of such a collision shape 31 caused by an external force are also calculated.
[0043] The particles 20 and rigid bodies 30 are described using individual arrays for each physical quantity (each characteristic), and are stored in the storage unit 7, more specifically, the CPU memory 71. For example, quaternions are used for rotation representation, and the particles 20 and rigid bodies 30 are stored as vectors of four elements qa={qa_w, qa_x, qa_y, qa_z} (qa_w is the real part). The collision shape 31 is stored in association with a list of indices (indicators for identifying the rigid bodies 30) indicating which rigid bodies 30 the collision shape 31 is attached to, a list of flags indicating the type of basic shape, a list of vectors indicating the size of the collision shape 31, etc.
[0044] For example, a complex soft-body object 2 such as an organ, or an articulated rigid-body object 3 such as a surgical instrument, is modeled by combining particles 20 and rigid bodies 30 under given constraints. The constraints are objective functions assigned to the positions of the particles 20 and the positions and orientations (postures) of the rigid bodies 30, and in simulations, the positions of the particles 20 and the positions and orientations of the rigid bodies 30 are modified to minimize these errors. The constraints are given flexibility by setting a compliance parameter, and the constraints are made very (infinitely) stiff by setting the flexibility to zero (setting rigidity). The constraints may include constraints in XPBD (extended position-based dynamics). Some examples of constraints will be described with reference to FIGS. 5 and 6 .
[0045] 5 and 6 are diagrams showing examples of constraints. The constraints shown in FIG. 5 are inter-particle constraints that limit the relative movement of particles 20. The movement of each particle 20 in a particle group is limited, and the whole is maintained to have a constant structure. As inter-particle constraints, distance constraints, FEM2D (two-dimensional) constraints, FEM3D (three-dimensional) constraints, and volume maintenance constraints are schematically shown in FIGS. 5A to 5D.
[0046] 5A, the distance constraint is a constraint on two particles 20. The distance constraint functions, for example, as a linear spring that maintains the distance between the particles 20 to some extent.
[0047] 5B, the FEM2D constraint is a constraint on three particles 20, each of which is located at a vertex and forms a triangular element, and is defined as the plane strain tensor of the triangular element. For example, the FEM2D constraint is constructed (meshed) along a 3D triangular mesh topology and is used to model thin, soft structures such as membranes.
[0048] 5C, the FEM3D constraint is a constraint on four particles 20 that are located at vertices and form a tetrahedral element, and is defined as the strain tensor of the tetrahedral element. The FEM3D constraint is constructed, for example, along an input tetrahedral mesh and is used to model a soft-body object 2 having a volume such as an organ.
[0049] 5D, the volume preservation constraint is a constraint on a plurality of particles 20 that make up a closed triangle mesh, each of which is located at a vertex, and maintains the volume of the mesh constant. The volume preservation constraint is used, for example, to model a balloon-like soft-bodied object 2, such as a gallbladder, which is an elastic membrane filled with an incompressible fluid.
[0050] 6 are inter-rigid body constraints that restrict the relative movement between the rigid bodies 30, and inter-rigid particle constraints that restrict the relative movement between the rigid bodies 30 and the particles 20. For simplicity, the rigid bodies 30 are depicted as cubes, and their collision shapes 31 are not shown.
[0051] Like kinematic constraints, rigid body constraints limit the relative movement between rigid bodies 30. As rigid body constraints, fixed joint constraints, distance joint constraints, hinge or revolute joint constraints, slider or prismatic joint constraints, cylindrical joint constraints, spherical joint constraints, and 6DOF joint constraints are shown schematically in Figures 6A to 6G.
[0052] 6A, a fixed joint constraint maintains the relative pose of rigid bodies 30. A fixed joint constraint is used, for example, to connect two rigid bodies 30 so that they behave as one rigid body.
[0053] As shown in Figure 6B, a distance joint constraint maintains the distance between the attachment points of rigid bodies 30. The two rigid bodies 30 move as if connected by a linear spring. A distance joint constraint is used, for example, to elastically attach two rigid bodies 30.
[0054] As shown in Figure 6C, the rotational joint constraint limits the rigid body 30 to one rotational degree of freedom (1 DOF). The rigid body 30 cannot translate, but can rotate about an axis. The rotational joint is driven according to a target angle and acts as a 1 DOF rotational spring. The rotational joint constraint is used, for example, to model joints in robotic mechanisms or to model the opening and closing of the grip of forceps (e.g., rigid body object 3 in Figures 1 and 3).
[0055] As shown in Figure 6D, the slider joint constraint limits the rigid body 30 to one linear DOF. The rigid body 30 cannot rotate, but can slide along one axis. The slider joint is driven according to a target linear displacement and acts as a linear spring. The slider joint constraint is used, for example, to simulate a linear actuator in a mechanism.
[0056] As shown in Figure 6E, a cylindrical joint constraint is a combination of a revolute joint constraint and a slider joint constraint. The rigid body 30 can slide and rotate about an axis. The cylindrical joint constraint is used, for example, to model mechanisms that are more complex than a revolute joint or a slider joint alone.
[0057] As shown in Figure 6F, the spherical joint constraint restricts the linear motion of the rigid body 30 to the attachment point. The rigid body 30 can rotate with three degrees of freedom (3 DOF). The spherical joint is driven according to the desired orientation and acts as a 3 DOF rotational spring. The spherical joint constraint is used to model joints such as the shoulder.
[0058] As shown in Fig. 6G, the 6DOF joint constraint is a combination of a linear spring and a ramp spring. The 6DOF joint acts as an elastic 6DOF attachment between the rigid bodies 30. The 6DOF joint constraint is used, for example, to attach to a static rigid body 30 that does not have a collision shape 31, to make the rigid body 30 follow a target pose. For example, as described above, the virtual tool (rigid object 3) can be moved by a movement input from the haptic device 8.
[0059] 6H is a special kinematic joint constraint used to connect a rigid body 30 to one or more particles 20. Rigid body-particle joint constraints are used, for example, to maintain the relative positions of a particle 20 and an attached rigid body 30, and to combine a rigid body 30 with a soft body made up of particles 20.
[0060] The various constraints described above are also described using, for example, individual arrays for each physical quantity to be constrained, and are stored in the storage unit 7, more specifically, the CPU memory 71. For example, to represent the distance between particles 20, a list of pairs of indices indicating connected particles 20, a list of static distances, a list of flexibility values, etc. are defined. These may differ depending on the constraint. For example, in a 2D FEM constraint, three particle 20 indices are used for each constraint, and in a 3D FEM constraint, four particle 20 indices are used.
[0061] 1 , the simulation proceeds based on simulation data including information on the modeled particles 20, rigid bodies 30, constraints, etc., as described above. One of the purposes of the simulation is to calculate the changes in the positions of the particles 20, the changes in the positions of the rigid bodies 30, and the changes in the orientation of the rigid bodies 30 caused by collisions between modeled objects, so as to satisfy the given constraints.
[0062] Conventional XPBD uses a sequential iterative solver to process constraints sequentially, updating the position and orientation immediately after each constraint is processed. However, this approach suffers from the problem that processing slows as the number of constraints increases. Other dynamics engines are based on heterogeneous computing architectures, for example. That is, the portion of the solver that is essentially time-series is implemented on the CPU, and the parallelizable algorithm is implemented on the GPU. In contrast, in this embodiment, fully parallel solvers for both particles 20 and rigid bodies 30 are implemented on the GPU 62. This will be described with reference to Figure 7 and subsequent figures.
[0063] 7 is a flowchart showing an example of processing (simulation method) executed in the simulator 1. Simulation data such as that shown on the left side of FIG.
[0064] In step S100, the processing unit 6 copies (transfers) data from the CPU memory 71 to the GPU memory 72. This data is simulation data including data on the soft-body object 2 and the rigid-body object 3 modeled in the CPU memory 71, data on constraints, and the like, as described above, and serves as input data to the GPU 62. Examples of input data are as follows, and are shown before step S100 in FIG. 7 : Data on the particles 20, such as data indicating the particles 20 and their positions, masses, and velocities; Data on constraints, such as the content of the constraint, the index of the particle 20 subject to the constraint (an index for identifying the particle 20), and data indicating the rigidity provided by the constraint; Data on the rigid body 30, such as data indicating the rigid body 30 and its attitude, velocity, angular velocity, mass, and inertia; Data on the collision shape 31, such as data indicating the index of the rigid body 30 to which the collision shape 31 is attached, the relative position, relative orientation, type of basic shape, and size of the collision shape 31. Data relating to kinematic joints, such as data indicating the index of the rigid bodies 30 connected by the kinematic joints, the relative attitudes of the rigid bodies 30, the target attitude, type, stiffness, and damping.
[0065] The data may be described as an array (for example, a two-dimensional array (plain array)), which allows the data to be efficiently copied without reformatting, thereby contributing to efficient processing.
[0066] In step S200, the solver implemented on the GPU 62 executes various internal processes required for the simulation. This internal process corresponds to the processing for one time step Δt in the simulation. Data indicating the results obtained by the solver's processing is stored in the GPU memory 72.
[0067] In step S300, data is copied from the GPU memory 72 to the CPU memory 71. This data can also be considered output data of the GPU 62. Examples of output data are as follows, and are shown after step S300 in FIG. 7 : Data related to the particles 20, for example, data indicating the particles 20 and their positions and velocities. Data related to the rigid bodies 30, for example, data indicating the rigid bodies 30 and their attitudes (positions, orientations), velocities, angular velocities, and reaction forces. Data related to kinematic joints, for example, data indicating kinematic joints and their reaction forces. Data related to trigger collision shape pairs (described below), for example, data indicating the trigger collision shape pair and the index of that shape pair (an index for identifying that trigger collision shape pair).
[0068] The above-described processing of steps S100, S200, and S300 is repeatedly executed for each time step Δt to progress the simulation. The processing by the solver on the GPU 62 in step S200 will be further described. The solver on the GPU 62 may also be simply referred to as the solver. Within the scope of no contradiction, the solver may be appropriately interpreted as the GPU 62.
[0069] In FIG. 7, the process of step S200 is further divided into steps S210 to S270 and step S270.
[0070] In step S210, the solver finds collision pairs, as will be explained with reference to Figures 8 and 9.
[0071] 8 is a flowchart showing a detailed example of step S210. In steps S211 to S214, the solver finds overlapping pairs of particles 20, overlapping pairs of collision shapes 31, and overlapping and potentially overlapping pairs of particles 20 and collision shapes 31. To this end, an axis-aligned bounding box (AABB) is calculated. Note that, unless otherwise specified, the AABB is assumed to be the AABB in global coordinates.
[0072] Specifically, the solver calculates the AABB of the particle 20 and the AABB of the collision shape 31 in parallel. The AABB of the particle 20 is calculated based on data such as the position, velocity, and diameter of the particle 20 (steps S211 and S212). The AABB of the collision shape 31 is calculated based on the position, velocity, and index of the rigid body 30, the relative orientation of the collision shape 31, and the AABB in local coordinates (steps S213 and S214). This will be described with reference to FIG. 9 as well.
[0073] 9 is a diagram showing an example of detecting a collision pair, in which the velocity vectors of two collision shapes 31 are schematically shown by arrows.
[0074] In the example shown in Figure 9A, two collision shapes 31 are predicted to overlap during time step Δt, as shown virtually by the dashed-dotted lines. AABB is extruded a distance (= vΔt) calculated by multiplying the velocity of the collision shape 31 by the time step Δt, where v is the velocity of the collision shape 31. If the movement of the collision shape 31 is a small rotation within the time step Δt, the velocity of the collision shape 31 is the same as the velocity of the rigid body 30 to which the collision shape 31 is attached. As shown in Figure 9B, by extruding AABB using a velocity vector, it is possible to predict the overlap between the collision shapes 31 and further predict collisions that will occur within one time step Δt.
[0075] In one embodiment, there may be special collision shapes 31 that do not respond to collisions. Such collision shapes 31 may optionally be tagged with a "trigger" flag. An overlap may also be predicted for this collision shape 31, and the result may be signaled at the end of time step Δt. This functionality is useful for event implementation of trigger shape tests, as described below.
[0076] Returning to FIG. 8 , in steps S215 to S217, the solver finds possible collision pairs between particles 20, collision pairs between collision shapes 31, and collision pairs between particles 20 and collision shapes 31 for the actual overlaps. In step S215, all possible AABB pairs of particles 20 are tested, resulting in a list of collision pairs between particles 20. In step S216, all possible AABB pairs of collision shapes 31 are tested. In step S217, all possible pairs of particles 20 and collision shapes 31 are tested. These three processes, steps S215 to S217, are executed in parallel. That is, the solver finds collision pairs by testing overlaps between particles 20, overlaps between collision shapes 31, and overlaps between particles 20 and collision shapes 31 in parallel.
[0077] In the above-described steps S216 and S217, collision pairs including the collision shape 31 are discovered. In the subsequent steps S218 and S219, the solver filters and classifies all collision pairs (collision pairs before filtering) discovered in steps S216 and S217 according to the basic shape of the collision shape 31 and further according to the presence or absence of a trigger flag, and lists them.
[0078] Specifically, collision pairs between collision shapes 31 among collision pairs without a trigger flag are filtered, and are classified and listed as collision pairs between spheres, collision pairs between a sphere and a capsule, collision pairs between a sphere and a box, collision pairs between capsules, collision pairs between a capsule and a box, or collision pairs between boxes.
[0079] Also, collision pairs of particles 20 and collision shapes 31 are filtered, and they are classified and listed as collision pairs of particles 20 and spheres, collision pairs of particles 20 and capsules, or collision pairs of particles 20 and boxes.
[0080] Also, collision pairs with trigger flags (collision pairs between collision shapes 31) are filtered and classified and listed as trigger pairs between spheres, trigger pairs between spheres and capsules, trigger pairs between spheres and boxes, trigger pairs between capsules, trigger pairs between capsules and boxes, or trigger pairs between boxes.
[0081] The above-described listing is effective for efficient parallel processing, for example, when collisions occur between the same type of collision shapes 31 (for example, between spheres). The two processes of step S218 and step S219 are also executed in parallel. As a result of the processes of step S216 to step S219, lists of collision pairs between collision shapes 31, trigger pairs between collision shapes 31, and collision pairs between particles 20 and collision shapes 31 are obtained.
[0082] The change in position of the particle 20 included in the collision pair found here, the change in position of the rigid body 30, and the change in orientation of the rigid body 30 are calculated later by the solver.
[0083] 7, the processes of steps S220 to S260 are executed as an inner loop in which one time step Δt in the simulation is divided into n substeps (sub-time step h=Δt / n). The processes of steps S220 to S260 are repeatedly executed a predetermined number of times (n times).
[0084] In steps S220 and S230, the solver predicts the position and orientation and generates contact points. The contact points are constraints between the particles 20 and the rigid body 30, and move them so that they do not interpenetrate. This will also be explained with reference to FIG. 10.
[0085] FIG. 10 is a flowchart showing a detailed example of step S220 and step S230.
[0086] In step S221, the solver predicts (calculates) the next position of the particle 20 based on the position, mass, velocity, gravity, etc. of the particle 20. In this calculation, for example, the current velocity of the particle 20, (the influence of) gravity over the sub-time step h, etc. are integrated. Note that the position of the particle 20 before prediction is temporarily stored as a backup, for example, in the GPU memory 72, so that it can be used for subsequent velocity calculation of the particle 20.
[0087] In step S222, the solver predicts the next position and orientation (posture) of the rigid body 30 based on the position, orientation, mass, inertia, velocity, angular velocity, weight, etc. of the rigid body 30. In this calculation, for example, the current angular velocity of the particle 20, gravity over the sub-time step h, etc. are integrated. The next position and orientation of the rigid body 30 before the prediction is backed up so that it can be used for subsequent velocity calculation of the rigid body 30.
[0088] In step S223, the solver updates the orientation of the collision shape 31. The orientation of the collision shape 31 of the rigid body 30 is updated so that the rigid body 30 has the position, orientation, etc. calculated in the previous step S222. The updated global orientation of the collision shape 31 is obtained.
[0089] After the particle 20 moves to the next position and the collision shape 31 moves to the next posture as described above, in steps S231 to S233, the solver checks whether an actual collision between the particle 20 and the collision shape 31 will occur, and generates contact points. Contact points are special constraints that are generated separately from collisions, and are generated in each substep for moving the particle 20 and the rigid body 30. Note that the expected collision pairs have already been discovered in the previous step S210 (FIGS. 7 and 8), and for efficiency, collisions are checked only for the discovered collision pairs.
[0090] In step S231, the solver identifies actual collisions of particles 20. The solver also generates contact points of particles 20 for the identified collisions.
[0091] In steps S232 and S233, the solver checks for collisions involving the collision shape 31 and generates contact points. In step S232, the solver checks for actual collisions of the collision shape 31 and generates contact points for the collision shape 31 for the confirmed collisions. In step S233, the solver checks for actual collisions of the particles 20 and the collision shape 31 and generates contact points for the confirmed collisions of the particles 20 and the collision shape 31. In this example, in both steps S232 and S233, the solver checks for actual collisions in parallel for each basic shape of the collision shape 31 (sphere, capsule, box).
[0092] The changes in the positions of the particles 20, the positions of the rigid bodies 30, and the orientations of the rigid bodies 30 involved in the collisions confirmed (discovered) here are calculated later by a solver.
[0093] The contact force (reaction force) that occurs due to contact between objects is also calculated. For example, in the case of contact between a soft-body object 2 and a rigid-body object 3, the forces acting on all particles 20 that collide with the collision shape 31 of the rigid-body object 3 are calculated in step S240, which solves the constraints described below, and these forces are accumulated as contact forces within the rigid body 30. The sum of the contact forces of each rigid body 30 becomes the overall contact force of the rigid object 3.
[0094] Returning to FIG. 7 , in step S240, the solver solves the given constraints. The solver calculates changes in the positions of the particles 20, the positions of the rigid bodies 30, the orientation of the rigid bodies 30, etc. so as to satisfy the constraints. The changes calculated here may be changes caused by collisions between objects (soft body object 2, rigid body object 3). The solver corrects the positions of the particles 20 and the positions and orientations of the rigid bodies 30 based on the calculated changes in the positions of the particles 20, the positions and orientations of the rigid bodies 30, etc.
[0095] A constraint affects a number of particles 20 or rigid bodies 30 determined depending on the type of constraint. When multiple constraints are given, for calculation efficiency, the constraints may be grouped into constraints of the same type, such as constraints on the positions of the particles 20, constraints on the positions of the rigid bodies 30, and constraints on the orientation of the rigid bodies 30, and solved in parallel. The solver calculates in parallel the changes in the positions of the particles 20, the changes in the positions of the rigid bodies 30, the changes in the orientation of the rigid bodies 30, etc., for each constraint of the same type, so as to satisfy the multiple given constraints.
[0096] Unless otherwise specified, the Jacobi method is used for the constraint solving method, which is advantageous for parallel processing. The following description will be made with reference to FIGS. 11 and 12.
[0097] 11 is a diagram showing an example of a constraint solving method. Constraint C 1 , constraint C 2 and constraint C 3 These are all position constraints. 1 is the position p 1 and position p 2 is a constraint on C 1 (p 1 , p 2 ) Constraint C 2 is the position p 1 , position p 2 and position p 3 is a constraint on C 2 (p 1 , p 2 , p 3 ) Constraint C 3 is the position p 2 , position p 3 , position p 4 and position p 5 is a constraint on C 3 (p 2 , p 3 , p 4 , p 5 )
[0098] The position p calculated to satisfy each constraint 1 ~Position p 5 The change in position Δp 1 ~Position change Δp5 The solver calculates the position change Δp 1 ~Position change Δp 5 The solver accumulates these in separate buffers and tracks the number of constraints that affected each one. Specifically, the solver initializes the buffers to zero and then uses atomic addition to sum the position changes for the same position calculated to satisfy each different constraint. The solver also counts the number of position changes, or in other words, the number of constraints used in calculating that position change (count c). The solver averages the summed positions by the count and adds it to the current position to calculate the latest (modified) position.
[0099] The above is an example of a method for calculating the position of the particle 20 or the rigid body 30, and a similar method can also be used to calculate the orientation (or rotation) of the rigid body 30. Note that if the constraint is a kinematic joint constraint of the rigid body 30 or a contact point of the collision shape 31, the constraint force or contact force obtained by the calculation result may also be stored in a buffer.
[0100] FIG. 12 is a flowchart showing a detailed example of the process of step S240.
[0101] In step S241, the solver solves the constraints of the particle 20 based on the constraints (e.g., FEM-based constraints, contact, etc.) given to the particle 20 and the predicted particle position. As described above with reference to FIG. 11, the sum of the position changes of the particle 20, the count number, is obtained.
[0102] In step S242, the solver solves the constraints of the rigid body 30 (or the particle 20 and the rigid body 30) based on the constraints (e.g., kinematic joint constraints, contact, etc.) given to the rigid body 30 (or the particle 20 and the rigid body 30) and the predicted position and orientation of the rigid body. The total value of the position change and orientation change of the rigid body 30, the count number, and the contact force are obtained. Constraint forces are also obtained.
[0103] In step S243, the solver averages the position changes of the particles 20. As previously described with reference to FIG. 11 , the sum of the position changes of the particles 20 is averaged by the count number. The solver calculates the corrected (next) position of the particle 20 by adding the averaged position change of the particle 20 to the current position of the particle 20.
[0104] In step S244, the solver averages the positional changes and orientation changes of the rigid body 30. The sum of the positional changes and orientation changes of the rigid body 30 is averaged by the count number. The solver calculates the corrected (next) position and orientation of the rigid body 30 by adding the averaged positional changes and orientation changes of the rigid body 30 to the current position and orientation of the rigid body 30.
[0105] Since a correct solution cannot always be obtained by performing the above averaging only once, the processes of steps S241 to S244 are repeated a fixed number of times (position "iterations").
[0106] Returning to Fig. 7, in steps S250 and S260, the solver updates the velocities and solves the updated velocities. For example, the next velocities of the particles 20 and the rigid bodies 30 are calculated in parallel, and the velocities are modified to satisfy the velocity constraints. In the case of the rigid bodies 30, the angular velocity is also calculated and modified. See also Fig. 13 for an explanation.
[0107] FIG. 13 is a flowchart showing a detailed example of step S250 and step S260.
[0108] In step S251, the solver updates the velocity of the particle 20 based on the corrected position of the particle 20 and the previous position of the particle 20. The corrected position of the particle 20 here is the position of the particle 20 after correction in the previous step 240, and corresponds to the latest position of the particle 20. The previous position of the particle 20 is the position of the particle 20 backed up in the previous step S220.
[0109] In step S252, the solver updates the velocity and angular velocity of the rigid body 30 based on the corrected position and orientation of the rigid body 30 and the previous position and orientation of the rigid body 30. The corrected position and orientation of the rigid body 30 here refers to the position and orientation of the rigid body 30 after correction in the previous step S240, and corresponds to the latest position and orientation of the rigid body 30. The previous position and orientation of the rigid body 30 refers to the position and orientation of the rigid body 30 backed up in the previous step S220.
[0110] In step S261, the solver solves the velocity constraints of the particles 20 based on the velocities of the particles 20 and the velocity constraints of the particles 20. The velocity constraints are constraints on the velocity due to, for example, friction (static friction, kinetic friction), contact, damping at kinematic joints, etc. The velocity constraints are used to model, for example, friction and rebound (elasticity) of the collision shape 31 and to add damping to kinematic joints. The constraint solving method is similar to that described above and includes calculations such as summing and counting the velocity changes of the particles 20.
[0111] In step S262, the solver solves the velocity constraints of the rigid body 30 (or of the particles 20 and the rigid body 30) based on the velocity and angular velocity of the rigid body 30 and the velocity constraints of the rigid body 30 (or of the particles 20 and the rigid body 30). The constraint solving method is similar to that described above and includes calculations such as summing and counting the velocity changes and angular velocity changes of the rigid body 30 (or the particles 20 and the rigid body 30).
[0112] In step S263, the solver averages the velocity changes of the particles 20. The solver also calculates the corrected (next) velocity of the particle 20 by adding the averaged velocity change of the particle 20 to the current velocity of the particle 20.
[0113] In step S264, the solver averages the velocity changes and angular velocity changes of the rigid body 30. The solver also calculates the corrected (next) velocity and angular velocity of the rigid body 30 by adding the averaged velocity changes and angular velocity changes of the rigid body 30 to the current velocity and angular velocity of the rigid body 30.
[0114] Since a correct solution is not necessarily obtained by performing the above averaging only once, the processes of steps S251 to S264 are repeated a fixed number of times (rate: iterations).
[0115] Returning to FIG. 7, after the processes of steps S220 to S260 are repeatedly executed n times as one sub-step process, the process proceeds to step S270.
[0116] In step S270, the solver tests the trigger shapes (described below), including a trigger shape overlap test, as described with reference to Figures 14 and 15.
[0117] FIG. 14 is a flowchart showing a detailed example of step S270.
[0118] In step S271, the solver updates the orientation of the collision shape 31 based on the position and orientation of the rigid body 30 and the relative orientation of the collision shape 31. The global orientation of the collision shape 31 is obtained.
[0119] In step S272, the solver checks for overlap of the collision shape 31 based on the global orientation of the collision shape 31 and the trigger pair for each basic shape of the collision shape 31 (for example, finds a collision shape trigger pair, which will be described later). The trigger pair is obtained in step S210, which was previously described, and therefore the description will not be repeated. The overlap check will be described with reference to FIG. 15 as well.
[0120] FIG. 15 is a diagram illustrating overlap checking. The illustrated collision shape 31 is a capsule. A shape that may overlap the collision shape 31 is referred to as a trigger shape 32 and is illustrated. If a trigger shape 32 actually overlaps the collision shape 31, the solver discovers the pair of collision shapes 31 as a collision shape trigger pair. In the example shown in FIG. 15A, the trigger shape 32 of one collision shape 31 does not overlap the other collision shape 31, and no collision shape trigger pair is discovered. In the example shown in FIG. 15B, the trigger shape 32 of one collision shape 31 overlaps the other collision shape 31, and the collision shapes 31 are discovered as a collision shape trigger pair.
[0121] 14, in step S262 illustrated, the solver checks for overlap in parallel for each combination of basic shapes of the collision shape 31. The indexes (indexes for identifying collision trigger pairs) of the confirmed (discovered) collision shape trigger pairs are added to a list.
[0122] 7, after the process of step S200, i.e., the series of processes by the solver on the GPU 62, is completed, data indicating the results is copied back from the GPU memory 72 to the CPU memory 71, as described above. This result data includes the new positions of the particles 20, the new positions, orientations (postures) and contact forces of the rigid bodies 30, the kinematic joint constraints, the trigger shape pairs, etc.
[0123] The position, deformation, etc. of the soft body object 2 are updated based on the new position, etc. of the particles 20. The position, orientation, deformation, etc. of the rigid body object 3 are updated based on the new position, orientation, etc. of the rigid body 30. Images of these are displayed on the display 9. In addition, the contact force is fed back to the user U via the haptic device 8 (tactile feedback). A series of processes is repeated to progress the simulation. Bidirectional dynamics simulation of the soft body object 2 and the rigid body object 3 is possible.
[0124] The use of a fully parallel dynamics solver implemented on the GPU 62 improves the real-time performance of simulation and haptic feedback. In addition, the accuracy of calculations of deformation of the soft body object 2 using FEM-based constraints, haptic forces, etc. is improved, making it possible to provide real-time simulations of more complex surgical scenarios, etc.
[0125] Based on the XPBD method, interactive simulation (based on two-way interaction) of soft body object 2 and rigid body object 3 is possible (unified dynamics solver). A rigid body object 3 can affect another rigid body object 3 or soft body object 2, enabling a more realistic interactive surgical simulation.
[0126] Collision detection and the like can also be processed in parallel by a solver implemented on the GPU 62, making it possible to process calculations regarding a very large number (e.g., thousands) of particles 20 and rigid bodies 30, as well as constraints, in real time.
[0127] The contact force obtained by the solver from the interaction between the soft body object 2 and the rigid body object 3 is consistent with the mass, rigidity, and other properties of the virtual objects, such as the soft body object 2 and the rigid body object 3. Stable and accurate haptic feedback can be obtained.
[0128] 2. Modifications The disclosed technology is not limited to the above-described embodiment. Some modifications will be described.
[0129] The simulation described so far may be applied to a surgical robot simulation. In the surgical robot simulation, the user U operates a robot arm that supports a surgical tool via the haptic device 8. Since the contact force is fed back to the user U, it is also possible to evaluate whether the robot arm is being operated with an appropriate operating force. This allows for more effective training than when there is no feedback of the contact force.
[0130] In one embodiment, the simulation may be incorporated into a master-slave system, as described with reference to FIG.
[0131] 16 is a diagram showing a modified example. The simulation system 100 includes a leader device 40 and a follower device 50.
[0132] The leader device 40 includes the haptic device 8 described above, a display 9, a processing unit 6, and a storage unit 7. The leader device 40 is configured to be able to communicate with the follower device 50. A command value for controlling the haptic device 8 is sent from the processing unit 6 to the haptic device 8.
[0133] The follower device 50 includes a processing unit 51, a camera 52, and a robotic arm 53. The processing unit 51 observes the slave environment, including the patient's condition, based on the image captured by the camera 52. The slave environment may also include non-visual information such as the patient's blood pressure and heart rate. The processing unit 51 also controls the robotic arm 53 in response to the operation of the haptic device 8 on the reader device 40. The control is performed by sending a command value from the processing unit 51 to the robotic arm 53.
[0134] The leader device 40 and the follower device 50 function as a master device and a slave device capable of bilateral control. The haptic device 8 is operated by the user U to control the robot arm 53 of the follower device 50, which supports a surgical tool, in a master-slave manner. The image from the camera 52 of the follower device 50 is transmitted from the follower device 50 to the leader device 40 and displayed on the display 9 of the leader device 40. Other information about the slave environment is also transmitted from the follower device 50 to the leader device 40 and presented. The motion (information on position, posture, force, etc.) from the haptic device 8 of the leader device 40 is transmitted from the leader device 40 to the follower device 50 and reflected in the control of the robot arm 53. The motion from the robot arm 53 is transmitted from the follower device 50 to the leader device 40 and fed back to the user via the haptic device 8 of the leader device 40.
[0135] The reader device 40 calculates the collision, deformation (positional changes of the particles 20, positional and orientation changes of the rigid bodies 30, etc.), contact force, etc. between the soft object 2 and the rigid object 3 as described above. In the simulation system 100 shown in Fig. 16, the calculation results of the reader device 40 are reflected in the control of the robot arm 53. For example, when a motion from the haptic device 8 of the reader device 40 is transmitted to the follower device 50, the control of the robot arm 53 is limited to ensure safety.
[0136] Specifically, the processing unit 6 of the leader device 40 executes a safety determination process based on the calculation results of the simulation model. For example, the processing unit 6 determines whether or not operation of the robot arm 53 of the follower device 50 via the leader device 40 is dangerous. If it is determined to be dangerous, the processing unit 6 intervenes in the operation of the follower device 50 by the leader device 40. For example, the processing unit 6 modifies the motion transmitted from the leader device 40 to the follower device 50 so as to limit the amount of movement or the operating force of the robot arm 53. The modified motion is transmitted from the leader device 40 to the follower device 50. In addition, the determination results and control results by the processing unit 6 are notified to the leader device 40 and the follower device 50.
[0137] In one embodiment, the functions of the simulator 1 may be distributed. This will be described with reference to FIG.
[0138] 17 is a diagram showing a modified example. The simulator 1 includes an edge device 1e and a cloud device 1c. The edge device 1e and the cloud device 1c are a first information processing device and a second information processing device that cooperate with each other to configure the simulator 1. The edge device 1e and the cloud device 1c are connected via a network N and transmit and receive (share) data related to the simulation with each other.
[0139] In one embodiment, the network N may be an all-optical communication network. In this case, the connection between the cloud device 1c and the edge device 1e via the network N means that all communication between at least the endpoint routers is established using optical communication. Note that communication after the endpoint router may be electrical communication after photoelectric conversion. By using a broadband all-optical communication network, the cloud device 1c and the edge device 1e are connected with low latency. This is particularly useful for real-time simulations, etc.
[0140] The edge device 1e is placed in an edge area including a haptic device 8 and a display 9. The cloud device 1c is placed in a cloud area located on the opposite side of the network N from the edge area. The location of the cloud area may be distant from the edge area or close to the edge area (for example, in the same building or the same room).
[0141] The cloud device 1c is located in a cloud area CF. The cloud area CF is an area located on the opposite side of the network N from the edge area EF, and is, for example, an area distant from the edge area EF.
[0142] Any of the functions of the simulator 1 described so far may be distributed and allocated to the edge device 1e and the cloud device 1c. As an example, the CPU 61 and the CPU memory 71 may be allocated to the edge device 1e, and the GPU 62 and the GPU memory 72 may be allocated to the cloud device 1c. For example, the portion of the program 70 corresponding to the edge device 1e may be allocated to the edge device 1e, and the portion corresponding to the cloud device 1c may be allocated to the cloud device 1c.
[0143] According to the above-described simulator 1, for example, a high-performance information processing device located in a cloud area can be used as the cloud device 1c. This increases the possibility that the simulator 1 can be used as a haptic surgery simulator capable of large-scale calculations. For example, it can be used for training and preoperative planning for surgeries that handle soft tissues (soft organs, etc.), such as laparoscopic surgery, thoracic surgery, and neurosurgery. Training while feeling the deformation of soft tissues and realistic reaction forces allows for more accurate preoperative experiences, which is expected to improve skills and surgical outcomes.
[0144] 18 is a diagram showing an example of the hardware configuration of the simulator 1. The simulator 1 is realized by, for example, a computer 1000 shown in FIG.
[0145] The computer 1000 includes a CPU / GPU 1100, a RAM 1200, a ROM (Read Only Memory) 1300, a HDD (Hard Disk Drive) 1400, a communication interface 1500, and an input / output interface 1600. The components of the computer 1000 are connected by a bus 1050.
[0146] The CPU / GPU 1100 operates based on programs stored in the ROM 1300 or the HDD 1400 and controls each component. For example, the CPU / GPU 1100 loads the programs stored in the ROM 1300 or the HDD 1400 into the RAM 1200 and executes processing corresponding to the various programs. An example of a program is the program 70 described above with reference to FIG. 2.
[0147] The ROM 1300 stores boot programs such as a basic input output system (BIOS) executed by the CPU / GPU 1100 when the computer 1000 starts up, and programs that depend on the hardware of the computer 1000 .
[0148] The HDD 1400 is a computer-readable recording medium that non-temporarily records programs executed by the CPU / GPU 1100 and data used by such programs. Specifically, the HDD 1400 is a recording medium that records a program for the information processing method according to the present disclosure, which is an example of program data 1450.
[0149] The communication interface 1500 is an interface for connecting the computer 1000 to an external network 1550 (e.g., the Internet). For example, the CPU / GPU 1100 receives data from other devices and transmits data generated by the CPU / GPU 1100 to other devices via the communication interface 1500.
[0150] The input / output interface 1600 is an interface for connecting the input / output device 1650 and the computer 1000. For example, the CPU / GPU 1100 receives data from input devices such as a keyboard or a mouse via the input / output interface 1600. The CPU / GPU 1100 also transmits data to output devices such as a display, a speaker, or a printer via the input / output interface 1600. For example, the CPU / GPU 1100 receives motion data from the haptic device 8 or transmits simulated contact forces to the haptic device 8 via the input / output interface 1600. The input / output interface 1600 may also function as a media interface for reading programs and the like recorded on a predetermined computer-readable recording medium. Examples of media include optical recording media such as DVDs (Digital Versatile Discs) and PDs (Phase Change Rewritable Discs), magneto-optical recording media such as MOs (Magneto-Optical Discs), tape media, magnetic recording media, and semiconductor memories.
[0151] When the computer 1000 functions as the simulator 1 described above, the CPU / GPU 1100 of the computer 1000 executes a program loaded onto the RAM 1200 to realize the functions of the processing unit 6. The program may be stored in the HDD 1400. The CPU / GPU 1100 reads and executes program data 1450 from the HDD 1400, but as another example, the CPU / GPU 1100 may obtain the program from another device via an external network 1550.
[0152] Each of the above components may be configured using general-purpose materials or may be configured using hardware specialized for the function of each component. Such configurations may be changed as appropriate depending on the technical level at the time of implementation.
[0153] 4. Summary The techniques described above can be specified, for example, as follows. One of the disclosed techniques is a simulator 1. As described with reference to FIGS. 1 to 15 , the simulator 1 includes a processing unit 6 including at least one processor (e.g., a CPU 61, a GPU 62). The processing unit 6 models a soft-body object 2 using a plurality of particles 20, and models a rigid-body object 3 using a rigid body 30 having a collision shape 31, and calculates changes in the positions of the particles 20, the position of the rigid body 30, and the orientation of the rigid body 30 caused by a collision between the modeled objects, so as to satisfy given constraints (e.g., including constraints in XPBD). Such a simulator 1 enables bidirectional dynamics simulation of the soft-body object 2 and the rigid-body object 3.
[0154] As described with reference to Fig. 5 etc., the constraints include inter-particle constraints that limit the relative movement between the particles 20, and the inter-particle constraints may include at least one of a distance constraint, a FEM2D constraint, a FEM3D constraint, and a volume preservation constraint. Also, as described with reference to Fig. 6 etc., the constraints include inter-rigid body constraints that limit the relative movement between the rigid bodies 30, and the inter-rigid body constraints may include at least one of a fixed joint constraint, a distance joint constraint, a rotational joint constraint, a slider joint constraint, a cylindrical joint constraint, a spherical joint constraint, and a 6DOF joint constraint. For example, by using such various constraints, it is possible to model the soft body object 2 and the rigid body object 3 and simulate their dynamics.
[0155] As described with reference to FIG. 7 and FIGS. 10 to 12 , the processing unit 6 may confirm actual collisions between particles 20, actual collisions between collision shapes 31, and actual collisions between particles 20 and collision shapes 31, and calculate changes in the positions of the particles 20, the positions of the rigid bodies 30, and the orientations of the rigid bodies 30 involved in the confirmed collisions. For example, in this manner, changes in position and orientation caused by the collisions can be calculated. As described with reference to FIG. 4 and other figures, the collision shapes 31 have basic shapes (e.g., spherical, capsule, and box shapes), and the processing unit 60 may confirm collisions involving the collision shapes 31 for each basic shape in parallel. This allows for effective parallel processing and improved processing efficiency.
[0156] 11 and 12, the processing unit 6 may calculate the changes in the positions of the particles 20, the changes in the positions of the rigid bodies 30, and the changes in the orientations of the rigid bodies 30 in parallel for each of the same types of constraints so as to satisfy a plurality of given constraints (Jacobi solver). For example, by using the Jacobi method as a constraint solving method in this way, parallel processing can be effectively performed, and processing efficiency can be improved.
[0157] As described with reference to Figures 7 to 9, 11, and 12, the processing unit 6 may find collision pairs between particles 20, collision pairs between collision shapes 31, and collision pairs between particles 20 and collision shapes 31, and calculate the changes in position of the particles 20, the changes in position of the rigid bodies 30, and the changes in orientation of the rigid bodies 30 included in the found collision pairs. For example, in this manner, changes in position and orientation caused by collisions can be calculated. The processing unit 6 may find collision pairs by testing, in parallel, the overlap between particles 20, the overlap between collision shapes 31, and the overlap between particles 20 and collision shapes 31. This enables effective parallel processing and improved processing efficiency. The processing unit 6 may classify and list collision pairs including collision shapes 31 among the found collision pairs by the basic shape of the collision shape 31. This allows efficient parallel processing, for example, when collisions occur between collision shapes 31 of the same type.
[0158] As described with reference to Figures 2, 3, 7, 11, 12, etc., at least one processor may include a CPU 61 and a GPU 62, where the CPU 61 may model the soft body object 2 and the rigid body object 3, and the GPU 62 may calculate changes in the positions of the particles 20, the positions of the rigid bodies 30, and the orientations of the rigid bodies 30. For example, various calculations may be completed by a solver implemented on the GPU 62 (fully parallel dynamics solver). The CPU 61 may generate simulation data describing information about the modeled soft body object 2 and rigid body object 3 using arrays, transfer the generated simulation data to the GPU 62 (e.g., copy it from the CPU memory 71 to the GPU memory 72), and the GPU 62 may use the simulation data transferred from the CPU 61 to calculate the changes in the positions and orientations described above. Because the data is described using arrays, it can be efficiently copied without reformatting the data, improving processing efficiency.
[0159] 1 and the like, the soft body object 2 may include an organ, and the rigid body object 3 may include a surgical tool. For example, the simulator 1 may be used for a surgery simulation including such a soft body object 2 and a rigid body object 3.
[0160] The simulation data generation method described with reference to Figures 1 to 15 is also one of the disclosed techniques. The simulation data generation method includes modeling a soft-body object 2 using a plurality of particles 20 and modeling a rigid-body object 3 using a rigid body 30 having a collision shape 31, and generating simulation data that describes information about the modeled soft-body object 2 and rigid-body object 3 in the form of arrays. For example, the simulation data may be used to calculate changes in the positions of the particles 20 of the soft-body object 2, changes in the position of the rigid body 30, and changes in the orientation of the rigid body 30 that occur due to a collision between the modeled objects, so as to satisfy given constraints. Generating such simulation data enables a bidirectional dynamics simulation of the soft-body object 2 and the rigid-body object 3, as described above.
[0161] The effects described in this disclosure are merely examples and are not limited to the disclosed contents. Other effects may also be obtained.
[0162] Although the embodiments of the present disclosure have been described above, the technical scope of the present disclosure is not limited to the above-described embodiments, and various modifications are possible within the scope of the gist of the present disclosure. Furthermore, components of different embodiments and modifications may be combined as appropriate.
[0163] Note that the present technology can also be configured as follows. (1) A simulator including a processing unit including at least one processor, wherein the processing unit models a soft-body object using a plurality of particles and a rigid-body object using a rigid body having a collision shape, and calculates changes in positions of the particles, changes in positions of the rigid body, and changes in orientation of the rigid body caused by a collision between the modeled objects so as to satisfy given constraints. (2) The simulator according to (1), wherein the constraints include constraints in XPBD (extended position-based dynamics). (3) The simulator according to (1) or (2), wherein the constraints include inter-particle constraints that limit relative movements between particles, and the inter-particle constraints include at least one of a distance constraint, a finite element method two-dimensional (FEM2D) constraint, a finite element method three-dimensional (FEM3D) constraint, and a volume preservation constraint. (4) The simulator according to any one of (1) to (3), wherein the constraints include inter-rigid body constraints that limit relative movement between the rigid bodies, and the inter-rigid body constraints include at least one of a fixed joint constraint, a distance joint constraint, a rotational joint constraint, a slider joint constraint, a cylindrical joint constraint, a spherical joint constraint, and a 6 DOF (Degree Of Freedom) joint constraint. (5) The simulator according to any one of (1) to (4), wherein the processing unit checks actual collisions between the particles, actual collisions between the collision shapes, and actual collisions between the particles and the collision shapes, and calculates changes in position of the particles, changes in position of the rigid bodies, and changes in orientation of the rigid bodies involved in the checked collisions. (6) The simulator according to (5), wherein the collision shapes have basic shapes, and the processing unit checks collisions involving the collision shapes in parallel for each of the basic shapes. (7) The simulator according to (6), wherein the basic shapes include at least one of a spherical shape, a capsule shape, and a box shape.(8) The simulator according to any one of (1) to (7), wherein the processing unit calculates changes in particle position, changes in rigid body position, and changes in rigid body orientation in parallel for each of the same type of constraints so as to satisfy a plurality of given constraints. (9) The simulator according to any one of (1) to (8), wherein the processing unit finds collision pairs between the particles, collision pairs between the collision shapes, and collision pairs of the particle and the collision shape, and calculates changes in particle position, changes in rigid body position, and changes in rigid body orientation included in the found collision pairs. (10) The simulator according to (9), wherein the processing unit finds collision pairs by testing overlap between the particles, overlap between the collision shapes, and overlap between the particle and the collision shape in parallel. (11) The simulator according to (10), wherein the processing unit classifies and lists collision pairs including the collision shape among the found collision pairs by basic shape of the collision shape. (12) The simulator according to any one of (1) to (11), wherein the at least one processor includes a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit), the CPU models the soft body object and the rigid body object, and the GPU calculates changes in position of the particles, changes in position of the rigid body, and changes in orientation of the rigid body. (13) The simulator according to (12), wherein the CPU generates simulation data describing information about the modeled soft body object and the rigid body object in the form of an array, transfers the generated simulation data to the GPU, and the GPU calculates the changes using the simulation data transferred from the CPU. (14) The simulator according to any one of (1) to (13), wherein the soft body object includes an organ, and the rigid body object includes a surgical tool.(15) A simulation data generation method comprising: modeling a soft body object using a plurality of particles and modeling a rigid body object using a rigid body having a collision shape; and generating simulation data describing information about the modeled soft body object and rigid body object in the form of an array. (16) The simulation data generation method according to (15), wherein the simulation data is used to calculate changes in position of the particles of the soft body object, changes in position of the rigid body, and changes in orientation of the rigid body caused by a collision between the modeled objects so as to satisfy given constraints.
[0164] REFERENCE SIGNS LIST 1 Simulator 1e Edge device 1c Cloud device 2 Soft object 20 Particle 3 Rigid object 30 Rigid body 31 Collision shape 4 Robot arm 5 Camera 6 Processing unit 61 CPU 62 GPU 7 Storage unit 70 Program 71 CPU memory 72 GPU memory 8 Haptic device 9 Display 10 Simulation scenario 100 Simulation system 1000 Computer 1050 Bus 1100 CPU / GPU 1200 RAM 1300 ROM 1400 HDD 1500 Communication interface 1600 Input / output interface N Network
Claims
1. A simulator having a processing unit including at least one processor, the processing unit: models a soft body object using a plurality of particles, and models a rigid body object using a rigid body having a collision shape; and calculates changes in position of the particles, changes in position of the rigid body, and changes in orientation of the rigid body caused by collision between the modeled objects so as to satisfy given constraints.
2. The simulator of claim 1, wherein the constraints include constraints in XPBD (Extended Position-Based Dynamics).
3. The simulator of claim 1, wherein the constraints include inter-particle constraints that limit relative movement between particles, and the inter-particle constraints include at least one of: distance constraints, FEM2D (Finite Element Method two-dimensional) constraints, FEM3D (Finite Element Method three-dimensional) constraints, and volume preservation constraints.
4. The simulator of claim 1, wherein the constraints include rigid body constraints that limit relative movement between rigid bodies, and the rigid body constraints include at least one of: fixed joint constraints, distance joint constraints, rotational joint constraints, slider joint constraints, cylindrical joint constraints, spherical joint constraints, and 6DOF (Degree Of Freedom) joint constraints.
5. The simulator of claim 1, wherein the processing unit confirms actual collisions between the particles, actual collisions between the collision shapes, and actual collisions between the particles and the collision shapes, and calculates changes in position of the particles, changes in position of the rigid bodies, and changes in orientation of the rigid bodies involved in the confirmed collisions.
6. The simulator according to claim 5, wherein the collision shape has basic shapes, and the processing unit checks collisions including the collision shape in parallel for each of the basic shapes.
7. The simulator of claim 6, wherein the basic shapes include at least one of a sphere, a capsule, and a box.
8. The simulator according to claim 1, wherein the processing unit calculates in parallel changes in particle positions, rigid body positions, and rigid body orientations for each of the same type of constraints so as to satisfy a plurality of given constraints.
9. The simulator of claim 1, wherein the processing unit finds collision pairs between the particles, collision pairs between the collision shapes, and collision pairs of the particle and the collision shape, and calculates changes in position of the particle, changes in position of the rigid body, and changes in orientation of the rigid body included in the found collision pairs.
10. The simulator of claim 9, wherein the processing unit finds collision pairs by testing in parallel the overlap between the particles, the overlap between the collision shapes, and the overlap between the particles and the collision shapes.
11. The simulator according to claim 10, wherein the processing unit classifies and lists, among the discovered collision pairs, collision pairs including the collision shape according to the basic shapes that the collision shape has.
12. The simulator of claim 1, wherein the at least one processor includes a central processing unit (CPU) and a graphics processing unit (GPU), the CPU models the soft body objects and the rigid body objects, and the GPU calculates changes in position of the particles, changes in position of the rigid bodies, and changes in orientation of the rigid bodies.
13. The simulator according to claim 12, wherein the CPU generates simulation data describing information about the modeled soft body object and the modeled rigid body object in the form of an array, transfers the generated simulation data to the GPU, and the GPU calculates the changes using the simulation data transferred from the CPU.
14. The simulator of claim 1, wherein the soft object includes an organ, and the rigid object includes a surgical tool.
15. A method for generating simulation data comprising: modeling a soft body object using a plurality of particles and modeling a rigid body object using a rigid body having a collision shape; and generating simulation data describing information about the modeled soft body object and rigid body object in an array.
16. The method of generating simulation data according to claim 15, wherein the simulation data is used to calculate changes in position of particles of the soft body object, changes in position of the rigid bodies, and changes in orientation of the rigid bodies caused by collisions between modeled objects so as to satisfy given constraints.
Citation Information
Patent Citations
Virtual hand model construction method and system based on VR environment
CN113703570A
Virtual character simulation and live broadcast method and device, equipment and storage medium
CN114565705A
Graphic representation generation method in computer
JP2008251044A
Ultrasound simulation
WO2023283695A1
Cited By
Soft body deformation method and related apparatus
WO2026218930A1
