A soft robot simulation method, device, electronic device and storage medium

By using implicit time integral method and interpolation function in software robot simulation, combined with backward Euler method, the problem of flexible body-flexible body and flexible body-fluid interaction simulation in the existing technology is solved, and higher simulation accuracy is achieved and flexibility, suitable for simulation of complex scenarios.

CN113591324BActive Publication Date: 2024-10-11SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110925204.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-12
Publication Date
2024-10-11
Estimated Expiration
2041-08-12

AI Technical Summary

Technical Problem

Existing software robot simulation technology is difficult to deal with flexible body-flexible body and flexible body-fluid interactive simulation problems, and additional algorithm design is required when the mesh boundary changes, resulting in insufficient flexibility.

Method used

By setting a small number of marked matter points, using the implicit time integral method and interpolation function, tracking the boundary changes of the software robot, and combining the backward Euler method to solve it, the additional algorithm design for grid boundary changes is avoided, and higher flexibility is achieved and accuracy.

Benefits of technology

Simulation of different objects is completed simultaneously within a unified update framework, which improves simulation accuracy and flexibility, solves the problem of grid boundary changes, and is suitable for flexible body-flexible body and flexible body-fluid interactive simulation in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113591324B_ABST
    Figure CN113591324B_ABST
Patent Text Reader

Abstract

The present invention provides a simulation method, device, electronic device and storage medium for a soft robot, the method comprising: determining a first kinematic parameter of a material point of a soft robot at a first moment; determining a first grid dynamic parameter corresponding to the first kinematic parameter of the material point by an interpolation function; determining a second grid dynamic parameter at a second moment by an implicit time integration method based on the first grid dynamic parameter, the second moment being the next moment of the first moment; determining the second kinematic parameter of the material point corresponding to the second grid dynamic parameter by an interpolation function. The scheme can track the boundary of the soft robot by setting a small number of marked material points, without the need to solve the problem of grid boundary changes between different operation steps by an additional algorithm in PFEM, and has higher flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of robots, and in particular relates to a soft robot simulation method, device, electronic equipment and storage medium. Background Art

[0002] When designing a soft robot, the designer needs to first come up with a design plan, which can be obtained from bionics or simplified model analysis. Then the geometric and material parameters of the design plan are input into the simulation scene, and the numerical solution of the partial differential equation is solved by a discretization method based on the continuous medium assumption (often using the finite element method) to obtain the simulation result. When simulating the flexible body-flexible body interaction situation, the position relationship of the discretized grid needs to be adjusted when contact occurs to prevent grid penetration and deformed grid phenomena. When simulating the flexible body-fluid interaction situation, the flexible body and the fluid need to be updated separately in the same update step. The update of the fluid uses the smooth particle fluid dynamics method, the finite element method, the finite volume method, etc., all of which have the step of converting the fluid from the simulation object to the boundary condition. Therefore, the existing soft robot simulation cannot provide a simple and unified processing method to solve the flexible body-flexible body and flexible body-fluid interaction simulation problems in complex scenes.

[0003] In the prior art, the particle-finite element method (Cremonesi et al., "A State of the Art Review of the Particle Finite Element Method (PFEM)", 2020) is an improved method based on the finite element method. This method treats the vertices of the mesh unit as particles that can move freely. After each unit movement according to the finite element solution result, the unit is re-divided according to the new vertex distribution and used for the next finite element solution.

[0004] The above method solves the problem of grid penetration to a certain extent when simulating soft robots, but the flexible body and fluid still need to be solved asynchronously, and the grid re-division before each solution requires additional algorithm design. Summary of the invention

[0005] The purpose of the embodiments of this specification is to provide a soft robot simulation method, device, electronic device and storage medium. This method can track the soft robot by setting a small number of marked material points, without the need for additional algorithms to solve the problem of grid boundary changes between different operation steps, and has high flexibility.

[0006] To solve the above technical problems, the embodiments of this specification are implemented in the following ways:

[0007] In a first aspect, a soft robot simulation method is provided, the method comprising:

[0008] Determine the first kinematic parameters of the material point of the soft robot at the first moment;

[0009] Determine the first mesh dynamics parameter corresponding to the first kinematic parameter of the material point through an interpolation function;

[0010] Based on the first grid dynamic parameters, determining the second grid dynamic parameters at the second moment by an implicit time integration method, where the second moment is a moment next to the first moment;

[0011] The second kinematic parameters of the material points corresponding to the second grid dynamic parameters are determined by an interpolation function.

[0012] In one embodiment, determining the second grid dynamic parameter at the second moment by an implicit time integration method based on the first grid dynamic parameter includes:

[0013] Based on the first grid dynamic parameters and satisfying the boundary conditions imposed on the grid, the second grid dynamic parameters at the second moment are determined by an implicit time integration method.

[0014] In one embodiment, the boundary condition applied to the mesh includes an applied pressure of a driving source driving the soft robot.

[0015] In one embodiment, determining the applied pressure of the driving source includes:

[0016] Mark the material point where the soft robot is on the initial pressure surface;

[0017] Determine a neighborhood consisting of a number of neighboring material points including the material point;

[0018] Construct an adjacency line between any two material points in the neighborhood;

[0019] Determine the area and normal vector of the neighborhood composed of material points based on the neighboring lines;

[0020] The magnitude and direction of the pressure on the material point are determined based on the area and normal vector of the neighborhood.

[0021] In one embodiment, the first mesh dynamics parameter includes velocity, stress, and mass of the mesh;

[0022] Based on the first grid dynamic parameters, determining the second grid dynamic parameters at the second moment by an implicit time integration method includes:

[0023] According to the velocity and stress of the grid, the equilibrium equation of the force at the grid position is constructed;

[0024] According to the equilibrium method, a nonlinear system of equations is constructed; the nonlinear system of equations includes equilibrium equations of forces at all locations of the grid with mass;

[0025] The quasi-Newton method is used to solve the nonlinear equations and obtain the second grid dynamic parameters.

[0026] In one embodiment, the first kinematic parameter includes at least one of velocity, mass, stress, and angular momentum of the material point.

[0027] In one embodiment, the first moment and the second moment are separated by a preset time step.

[0028] In a second aspect, a soft robot simulation device is provided, the device comprising:

[0029] A first determination module, used to determine a first kinematic parameter of a material point of the soft robot at a first moment;

[0030] A second determination module is used to determine a first grid dynamic parameter corresponding to a first kinematic parameter of a material point through an interpolation function;

[0031] A third determination module is used to determine a second grid dynamic parameter at a second moment based on the first grid dynamic parameter by an implicit time integration method, where the second moment is a moment next to the first moment;

[0032] The fourth determination module is used to determine the second kinematic parameters of the material point corresponding to the second grid dynamic parameters through an interpolation function.

[0033] In a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the soft robot simulation method of the first aspect is implemented.

[0034] In a fourth aspect, a readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the soft robot simulation method as in the first aspect is implemented.

[0035] It can be seen from the technical solutions provided by the above embodiments of this specification that

[0036] (1) The present invention proposes a soft robot simulation method, device, electronic device and storage medium. The solution can track the boundaries of the soft robot by setting a small number of marked material points. There is no need to use additional algorithms in PFEM to solve the problem of mesh boundary changes between different operation steps, which has higher flexibility.

[0037] (2) The present invention can simultaneously complete the simulation of different objects within a unified update framework, and at the same time combine the backward Euler method for solving, thereby ensuring higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0039] Figure 1 A schematic diagram of a flow chart of a soft robot simulation method provided in an embodiment of the present application;

[0040] Figure 2 A schematic diagram of the updating steps of the soft robot simulation method provided in an embodiment of the present application;

[0041] Figure 3 A schematic diagram of preprocessing an input geometric model provided in an embodiment of the present application;

[0042] Figure 4 A schematic diagram of the structure of a soft robot simulation device provided in an embodiment of the present application;

[0043] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant inventions, rather than to limit the inventions. It should also be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0045] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0046] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the application described can be implemented in an order other than those illustrated or described herein.

[0047] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0048] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0049] In the prior art, when simulating soft robots, particle-finite element method is used, which is an improved method based on finite element method. This method regards the vertices of the grid unit as particles that can move freely. After each unit movement according to the finite element solution result, the unit is re-divided according to the new vertex distribution and used for the next finite element solution. This method solves the problem of grid penetration to a certain extent, but the flexible body and fluid still need to be solved asynchronously, and the grid re-division before each solution requires additional algorithm design.

[0050] Based on the above-mentioned defects, an embodiment of the present application proposes a soft robot simulation method, which does not require additional algorithms to solve the problem of grid boundary changes between different operation steps and has higher flexibility.

[0051] Reference Figure 1 , 2 , which shows a flow diagram of a soft robot simulation method applicable to the embodiment of the present application. The soft robot simulation method in the present application can be applied to fluid-driven soft robots, wire-driven soft robots, etc. It can be understood that bioenergy-driven soft robots, chemical reaction-driven soft robots, etc. can be simulated by converting them into force using the simulation method proposed in the embodiment of the present application.

[0052] Note: In the embodiments of the present application, x represents position; v represents velocity; m represents mass; f represents force; V represents volume; F represents deformation gradient; superscript int represents internal force based on stress representation; superscript ext represents external force generated by boundary conditions (such as gravity, electromagnetic force, etc.); subscript i represents grid variable; subscript p represents material point variable; superscript n represents the nth moment, superscript n+1 represents the n+1th moment, and the interval between the nth moment and the n+1th moment is a preset time step Δt.

[0053] like Figure 1 , 2 As shown, a soft robot simulation method may include:

[0054] S110, determining a first kinematic parameter of a material point of the soft robot at a first moment;

[0055] S120, determining a first grid dynamic parameter corresponding to a first kinematic parameter of the material point by using an interpolation function;

[0056] S130, determining a second grid dynamic parameter at a second moment by an implicit time integration method based on the first grid dynamic parameter, where the second moment is a moment next to the first moment;

[0057] S140. Determine the second kinematic parameters of the material points corresponding to the second grid dynamic parameters by using an interpolation function.

[0058] Specifically, in this embodiment, the material area of ​​the soft robot is discretized into a group of material points moving relative to the background grid. Each material point represents a piece of material area and carries the physical information of all materials (i.e., kinematic parameters). Therefore, the set of all material points represents the entire material area of ​​the soft robot. Optionally, the kinematic parameters may include at least one of mass m, velocity v, stress f, strain, angular momentum, deformation gradient F, and volume V. It can be understood that when updating, the mass, volume, etc. of each material point are quantitative, while the velocity, stress, strain, etc. are variables. Among them, stress is used for fluid-driven soft robot simulation. It can be obtained by the material model (the first PK stress tensor form Ψ is the strain energy density function, given by the material model) to calculate the stress:

[0059]

[0060] in,

[0061] The first moment may be any moment. When the first moment is the initial moment, that is, the soft robot is in a stationary state or a balanced state, the first kinematic parameter may be a preset initial value, for example, both the speed and the stress may be 0. It is understandable that the initial speed and stress may not be 0, for example, some boundary conditions are set. When the first moment is not the initial moment, the first kinematic parameter is updated according to the kinematic parameter of the previous moment.

[0062] Among them, the moment before the second moment is the first moment. Optionally, the interval between the first moment (e.g., the nth moment) and the second moment (e.g., the n+1th moment) can be a preset time step Δt, that is, the kinematic parameters of the material point are updated every Δt. It can be understood that the preset time step Δt can be set according to actual needs.

[0063] The grid in soft robots is fixed in space and acts as an integration point to calculate spatial derivatives and solve momentum equations.

[0064] The first grid dynamics parameter refers to the dynamics parameter corresponding to the first kinematic parameter of the material point after being transferred to the grid through the interpolation function.

[0065] Exemplarily, the interpolation function may be:

[0066]

[0067] When transferring mass and momentum, the contribution of material point p to grid i is determined by the weight α ip Find, where α ip for:

[0068]

[0069] Where h is the distance between adjacent grids, and the position of the material point p is x p =(x p ,y p ,z p ), the position of grid i is x i =(x i ,y i ,z i ).

[0070] For example, the mass and momentum of a material point are transferred to the grid as follows:

[0071]

[0072]

[0073] in, is the correction term for the local angular momentum dissipation.

[0074] The second grid dynamics parameter refers to the grid dynamics parameter updated according to the implicit time integration method after the first grid dynamics parameter is preset at the time step Δt.

[0075] The second mesh dynamic parameters are then converted into the second kinematic parameters of the material points through an interpolation function.

[0076] Exemplarily, the grid dynamic parameters of position, velocity, deformation gradient, and affine velocity field C are converted to material points as follows:

[0077]

[0078]

[0079]

[0080]

[0081] in,

[0082] In one embodiment, determining the second grid dynamics parameter at the second moment by an implicit time integration method based on the first grid dynamics parameter may include:

[0083] Based on the first grid dynamic parameters and satisfying the boundary conditions imposed on the grid, the second grid dynamic parameters at the second moment are determined by an implicit time integration method.

[0084] Specifically, the boundary conditions may be first-class boundary conditions, second-class boundary conditions, etc. Exemplarily, the boundary conditions may include the applied pressure of the driving source of the soft robot, and may also include the constraints on the fixed end of the soft robot, the additional speed applied at a certain moment, the external force, and the setting of the initial speed, etc. For example, setting the speed v i and / or external force The superscript ext represents the external force generated by the boundary conditions, and the subscript i represents the grid variable.

[0085] As you can understand, one of the most common types of soft robots uses fluid as a driving source. When in motion, the fluid inside the soft robot provides pressure to force the soft robot to move. Since the soft robot has a large degree of deformation, the shape and position of the pressure surface change over time, making it difficult to give a simple geometric representation method.

[0086] In one embodiment, determining the applied pressure of a driving source driving the soft robot may include:

[0087] Mark the material point where the soft robot is on the initial pressure surface;

[0088] Determine a neighborhood consisting of a number of neighboring material points including the material point;

[0089] Construct an adjacency line between any two material points in the neighborhood;

[0090] Determine the area and normal vector of the neighborhood composed of material points based on the neighboring lines;

[0091] The magnitude and direction of the pressure on the material point are determined based on the area and normal vector of the neighborhood.

[0092] Specifically, it is assumed that a point on the initial pressure surface of the fluid-driven soft robot is always on the pressure surface at any time.

[0093] When initializing the algorithm, Figure 3As shown in the figure, the input geometric model is preprocessed: first, the material points of the soft robot on the initial pressure surface are marked; second, the neighborhood consisting of b neighboring material points including the material point itself is found and the adjacency line is constructed (the adjacency line is constructed between any two material points in the neighborhood). At each update, the area and normal vector of the neighborhood consisting of b+1 points of a material point are calculated through the adjacency line to determine the magnitude and direction of the driving force on the material point. By calculating the magnitude and direction of the driving force on each marked material point, the pressure situation can be approximated.

[0094] It can be understood that the b neighboring material points can be set according to actual needs, such as 3 neighboring material points, 5 neighboring material points, etc.

[0095] At each update, the area and normal vector of the neighborhood consisting of b+1 points of a material point are calculated through the neighboring line to determine the magnitude and direction of the driving force on the material point, which may include:

[0096] Assume that there are q material points marked on the initial pressure surface, temporarily denoted as (x p 1 …x p m …x p n ), m∈[1,q], and perform the following operations:

[0097] Step 1: For the mth marked material point x p m , find its k neighboring material points;

[0098] Step 2: Take the coordinates of the b+1 material points in the first step as column vectors and arrange them into a 3×(b+1) matrix G ’ , find the matrix G ’ The average value of each row of G forms a column vector h. ’ Subtract the column vector h from each row of to complete the zero mean and get the matrix G;

[0099] Step 3: Calculate GG T , where T represents the transpose of the matrix, and we get a 3×3 square matrix L. We do SVD decomposition on the square matrix and get three eigenvalues ​​and three corresponding eigenvectors. Take the smallest eigenvalue vector V ’ The corresponding eigenvector is taken as the straight line where the driving force on the material point is located, and it is normalized to obtain the unit vector V = V ’ / ||V ’ ||,||V ’ || represents vector V ’ Model;

[0100] Step 4: Record W(xp m ,V) represents the following operation: x p m The coordinates of are moved 1 unit in the direction of V, and the mass m of the grid closest to the coordinates after the movement is taken. i ; Complete this operation twice m i 1 =W(x p m ,V),m i 2 =W(x p m ,-V), if m i 1 >m i 2 , then the direction of the driving force on the material point is V, if m i 1 <m i 2 , then the direction of the driving force on the material point is -V;

[0101] The fifth step is to normalize the remaining two eigenvectors to obtain two orthogonal unit vectors to form a unit orthogonal basis. Each vector is used as a row vector to form a 2×3 matrix S, and then right-multiply the coordinates of the k+1 material points to project the three-dimensional coordinates onto the two-dimensional plane to obtain the two-dimensional coordinates of the k+1 material points on the plane.

[0102] The sixth step is to find the convex polygon surrounding the b+1 material points on the plane and calculate the surface area of ​​the convex polygon. Multiply the area by the pressure provided by the driving source at this moment to get the magnitude of the force, which is the x value of the material point. p m The magnitude of the driving force on p ext .

[0103] It is understandable that the force is transferred from the material point to the grid to participate in the dynamic update, which can be achieved by f i ext =Σ p α ip f p ext Finish.

[0104] The explicit time integration of the forward Euler method will cause problems such as unstable operation and low precision. The backward Euler method has the advantages of stable operation and high precision. However, the backward Euler method needs to be combined with the update framework. Due to the large number of material points, the dimension is high when used as an independent variable, while the number of grids is small, and the grid already has dynamic information such as force and velocity through the transfer of physical quantities from material points to grids. Therefore, it is a reasonable choice to use the grid as a variable for implicit time integration.

[0105] In one embodiment, determining the second grid dynamics parameter at the second moment by an implicit time integration method based on the first grid dynamics parameter may include:

[0106] According to the velocity and stress of the grid, the equilibrium equation of the force at the grid position is constructed;

[0107] According to the equilibrium method, a nonlinear system of equations is constructed; the nonlinear system of equations includes equilibrium equations of forces at all locations of the grid with mass;

[0108] The quasi-Newton method is used to solve the nonlinear equations and obtain the second grid dynamic parameters.

[0109] Specifically, the acceleration of the grid a i n+1 Function a that can be converted to grid position i (x i n+1 ), and the force on the grid f i n+1 It is also a function of the grid position f i (x i n+1 ), so the force balance equation m at the position after the grid update can be constructed i a i (x i n +1 )-f i (x i n+1 )=r. Make r=0.

[0110] The speed of the grid is:

[0111]

[0112] The acceleration of the grid can be expressed in terms of the displacement of the grid and the velocity at the current moment:

[0113]

[0114] The acceleration of the grid can be expressed in the form of the resultant force on the grid as:

[0115]

[0116] in, and Both with Δx i About, remember

[0117] but

[0118] when When the value is true, the acceleration of the two expressions should be equal, that is

[0119]

[0120] because It is not the actual displacement of the grid, but an intermediate variable for time integration, which is reset to 0 between each time step. Therefore, the above formula is not solved iteratively. The true value of was not 0 before, that is

[0121]

[0122] Here, The superscript 0 in represents the result of the 0th iteration solution, that is, The initial value of is 0, similarly Represents the result of the kth iteration solution. The ultimate goal is to obtain a Make

[0123] is a The nonlinear equations need to be solved by iteration.

[0124] Due to the large number of grids and complex calculations, The Jacobian matrix It is difficult to calculate, so we consider using the Broyden form of the quasi-Newton method for iterative solution. This method only requires the Jacobian matrix of the initial value of the unknown quantity Let B0 = J0 as the initial estimate of the Jacobian matrix, and then the Jacobian matrix estimate B solved in each iteration k It can be obtained by iteration without consuming a lot of computing resources to calculate J k .

[0125] The specific steps of using the Broyden form of the quasi-Newton method are:

[0126] 1) Construct a system of linear equations (The first iteration is where p kis the unknown quantity of the linear equation system, which is also In the kth increment, solving the linear equations yields p k ;

[0127] 2) Determine the increment p through the line search algorithm k The coefficient α is used to update the unknown quantity

[0128] 3) Calculate update B k+1 Required intermediate variables s k and k ;

[0129] Among them, s k =αp k

[0130] And y k is the increment of r, that is

[0131] 4) Update the estimate B of the Jacobian matrix for the next iteration k+1 :

[0132]

[0133] in For k The transpose of .

[0134] At this point, an iterative solution of the Broyden form of the quasi-Newton method is completed.

[0135] when When the condition is met, that is, when it is less than the set threshold, the iteration is stopped.

[0136] The displacement of the grid is Speed It is then transferred to the material points using the formula for converting mesh dynamics parameters to material points.

[0137] Reference Figure 4 , which shows a schematic diagram of the structure of a soft robot simulation device described according to an embodiment of the present application.

[0138] like Figure 4 As shown, the soft robot simulation device may include:

[0139] A first determination module 410 is used to determine a first kinematic parameter of a material point of the soft robot at a first moment;

[0140] A second determination module 420 is used to determine a first mesh dynamic parameter corresponding to a first kinematic parameter of a material point by using an interpolation function;

[0141] A third determination module 430 is used to determine a second grid dynamic parameter at a second moment based on the first grid dynamic parameter by an implicit time integration method, where the second moment is a moment next to the first moment;

[0142] The fourth determination module 440 is used to determine the second kinematic parameters of the material points corresponding to the second grid dynamic parameters through an interpolation function.

[0143] Optionally, the third determining module 430 is further configured to:

[0144] Based on the first grid dynamic parameters and satisfying the boundary conditions imposed on the grid, the second grid dynamic parameters at the second moment are determined by an implicit time integration method.

[0145] Optionally, the boundary conditions applied to the mesh include applied pressure from a driving source driving the soft robot.

[0146] Optionally, the third determining module 430 is further configured to:

[0147] Mark the material point where the soft robot is on the initial pressure surface;

[0148] Determine a neighborhood consisting of a number of neighboring material points including the material point;

[0149] Construct an adjacency line between any two material points in the neighborhood;

[0150] Determine the area and normal vector of the neighborhood composed of material points based on the neighboring lines;

[0151] The magnitude and direction of the pressure on the material point are determined based on the area and normal vector of the neighborhood.

[0152] Optionally, the first grid dynamics parameter includes velocity, stress, and quality of the grid; the third determination module 430 is further used for:

[0153] According to the velocity and stress of the grid, the equilibrium equation of the force at the grid position is constructed;

[0154] According to the equilibrium method, a nonlinear system of equations is constructed; the nonlinear system of equations includes equilibrium equations of forces at all locations of the grid with mass;

[0155] The quasi-Newton method is used to solve the nonlinear equations and obtain the second grid dynamic parameters.

[0156] Optionally, the first kinematic parameter includes at least one of velocity, mass, stress, and angular momentum of the material point.

[0157] Optionally, the first moment and the second moment are separated by a preset time step.

[0158] The soft robot simulation device provided in this embodiment can execute the embodiment of the above method. Its implementation principle and technical effect are similar and will not be repeated here.

[0159] Figure 5 FIG. 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 5 As shown, a structural schematic diagram of an electronic device 500 suitable for implementing an embodiment of the present application is shown.

[0160] like Figure 5 As shown, the electronic device 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0161] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 506 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0162] In particular, according to the embodiments of the present disclosure, the above reference Figure 1 The described process can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes program code for executing the above-mentioned soft robot simulation method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 509, and / or installed from a removable medium 511.

[0163] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of the code, and the aforementioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0164] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be arranged in a processor. The names of these units or modules do not constitute limitations on the units or modules themselves in certain circumstances.

[0165] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop, a mobile phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0166] As another aspect, the present application further provides a storage medium, which may be the storage medium included in the aforementioned device in the above embodiment; or may be a storage medium that exists independently and is not assembled into the device. The storage medium stores one or more programs, and the aforementioned programs are used by one or more processors to execute the soft robot simulation method described in the present application.

[0167] Storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0168] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0169] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A soft robot simulation method, It is characterized in that The method comprises: Determine a first kinematic parameter of the material point of the soft robot at a first moment; Determine a first mesh dynamic parameter corresponding to a first kinematic parameter of the material point by an interpolation function; Based on the first grid dynamic parameters and satisfying the boundary conditions imposed on the grid, determining the second grid dynamic parameters at a second moment by an implicit time integration method, where the second moment is a moment next to the first moment; Determining the second kinematic parameter of the material point corresponding to the second grid dynamic parameter by an interpolation function; Wherein, the boundary condition includes the applied pressure of a driving source driving the soft robot, and the applied pressure determination step includes: Marking the material point of the soft robot on the initial pressure surface, obtaining a neighborhood consisting of b neighboring material points including the material point itself and constructing an adjacency line; At each update, the area and normal vector of the neighborhood consisting of b+1 points of a material point are calculated through the neighboring line to determine the magnitude of the pressure exerted on the material point. The steps include: Step 1: Corresponding to the mth marked material point , find its b neighboring material points, where the subscript p represents a material point; Step 2: Add the b +1 material point coordinates as column vectors, arranged as 3×( b +1) , find the matrix The average value of each row of h ,Will Subtract the column vector from each row of h , complete the zero mean, and get the matrix ; Step 3: Calculate ,in T Represents the transpose of the matrix, resulting in a 3×3 square matrix L , perform SVD decomposition on the matrix to obtain 3 eigenvalues ​​and 3 corresponding eigenvectors; take the smallest eigenvalue vector The corresponding eigenvector is taken as the straight line where the force is applied to the material point, and it is normalized to obtain the unit vector , Representation vector Model; Step 4: Remember Indicates the following operations: The coordinates of Move 1 unit in the direction of the moving grid, and take the mass of the grid closest to the coordinate after the movement. ; Complete this operation twice , ,like , then the direction of the pressure applied to the material point is V ,like , then the direction of the pressure applied to the material point is - V ; The fifth step is to normalize the remaining two eigenvectors to obtain two orthogonal unit vectors to form a unit orthogonal basis. Each vector is used as a row vector to form a 2×3 matrix. S , and multiply right b+1 The coordinates of the material point are projected onto the two-dimensional plane to obtain this b + 2D coordinates of 1 material point in the plane; Step 6: Find the b +1 material point is enclosed in a convex polygon on the plane, and the surface area of ​​the convex polygon is calculated. The area is multiplied by the pressure provided by the driving source at this moment to obtain the magnitude of a force, which is the value of the material point The magnitude of the pressure applied on the ; transferring the applied pressure from the material point to the grid to participate in dynamics update; Wherein, the second grid dynamics parameter, the determining step comprises: The acceleration of the grid represented by the velocity on the grid is equal to the acceleration of the grid represented by the net force on the grid, resulting in the following nonlinear equations: The Broyden form of the quasi-Newton method is used to solve the above nonlinear equations. As the initial value, it is solved iteratively to obtain the displacement of the grid , and then get the speed of all grids , which are then transferred to the material points through the formula for converting the mesh dynamics parameters to material points; in, Indicates location, Indicates quality, Expressive power, Indicates speed, subscript represents the grid variable, is the preset time step, the superscript Indicates time, , The superscript 0 indicates The superscript int is the initial value of the stress-based internal force, the superscript ext is the applied pressure caused by the boundary conditions, and the superscript sum is the resultant force.

2. The method according to claim 1, It is characterized in that The first kinematic parameter includes at least one of velocity, mass, stress, and angular momentum of the material point.

3. The method according to claim 1, Features: The first moment and the second moment are separated by a preset time step.

4. A soft robot simulation device, It is characterized in that The device comprises: A first determination module, used to determine a first kinematic parameter of a material point of the soft robot at a first moment; A second determination module is used to determine a first grid dynamic parameter corresponding to the first kinematic parameter of the material point through an interpolation function; A third determination module is used to determine a second grid dynamic parameter at a second moment by an implicit time integration method based on the first grid dynamic parameter and satisfying a boundary condition imposed on the grid, where the second moment is a moment next to the first moment; a fourth determination module, configured to determine, by an interpolation function, a second kinematic parameter of the material point corresponding to the second grid dynamic parameter; Wherein, the boundary condition includes the applied pressure of a driving source driving the soft robot, and the applied pressure determination step includes: Marking the material point of the soft robot on the initial pressure surface, obtaining a neighborhood consisting of b neighboring material points including the material point itself and constructing an adjacency line; At each update, the area and normal vector of the neighborhood consisting of b points of a material point are calculated through the neighboring line to determine the magnitude of the pressure exerted on the material point. The steps include: Step 1: Corresponding to the mth marked material point , find its b neighboring material points, where the subscript p represents a material point; Step 2: Add the b +1 material point coordinates as column vectors, arranged as 3×( b +1) , find the matrix The average value of each row of h ,Will Subtract the column vector from each row of h , complete the zero mean, and get the matrix ; Step 3: Calculate ,in T Represents the transpose of the matrix, resulting in a 3×3 square matrix L , perform SVD decomposition on the matrix to obtain 3 eigenvalues ​​and 3 corresponding eigenvectors; take the smallest eigenvalue vector The corresponding eigenvector is taken as the straight line where the force is applied to the material point, and it is normalized to obtain the unit vector , Representation vector Model; Step 4: Remember Indicates the following operations: The coordinates of Move 1 unit in the direction of the moving grid, and take the mass of the grid closest to the coordinate after the movement. ; Complete this operation twice , ,like , then the direction of the pressure applied to the material point is V ,like , then the direction of the pressure applied to the material point is - V ; The fifth step is to normalize the remaining two eigenvectors to obtain two orthogonal unit vectors to form a unit orthogonal basis. Each vector is used as a row vector to form a 2×3 matrix. S , and multiply right b+1 The coordinates of the material point are projected onto the two-dimensional plane to obtain this b + 2D coordinates of 1 material point in the plane; Step 6: Find the b +1 material point is enclosed in a convex polygon on the plane, and the surface area of ​​the convex polygon is calculated. The area is multiplied by the pressure provided by the driving source at this moment to obtain the magnitude of a force, which is the value of the material point The magnitude of the pressure applied on the ; transferring the applied pressure from the material point to the grid to participate in dynamics update; Wherein, the second grid dynamics parameter, the determining step comprises: The acceleration of the grid represented by the velocity on the grid is equal to the acceleration of the grid represented by the net force on the grid, resulting in the following nonlinear equations: The Broyden form of the quasi-Newton method is used to solve the above nonlinear equations. As the initial value, it is solved iteratively to obtain the displacement of the grid , and then get the speed of all grids , which are then transferred to the material points through the formula for converting the mesh dynamics parameters to material points; in, Indicates location, Indicates quality, Expressive power, Indicates speed, subscript represents the grid variable, is the preset time step, the superscript Indicates time, , The superscript 0 indicates The superscript int is the initial value of the stress-based internal force, the superscript ext is the applied pressure caused by the boundary conditions, and the superscript sum is the resultant force.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the soft robot simulation method as described in any one of claims 1-3 is implemented.

6. A readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the soft robot simulation method as described in any one of claims 1-3 is implemented.