This workflow provides an alternative to the Positioning module to position a human body model. For some reason, the Positioning module can lead to skin artifacts or bone collisions. This workflow consists in positioning the human body model using a finite-element simulation. Three strategies have been developed and implemented through three customizable Python scripts. Basically, these scripts use the solutions provided by the Positioning module to write the inputs for positioning a human body model using FEM simulation.
The nodal coordinates of the bones of both models (baseline and positioned) are used to compute displacement vectors. Then, beams (zero length) are defined at the same location as one over ten nodes of the bones. One extremity of the beams is coincident with the node of the bone whereas motion estimated is prescribed to the other extremity. A CNRB option can be added and consists in defining two beams linked by a constrained nodal rigid body. Although this option attempts to prevent bone fractures, it must be noticed that some stability issues may appear when this option is enabled.
Fig. 1: Principles of the method.
This first strategy can be used for low range of motion.
- Import your human body model and go into the module Positioning (Pre).
- Using controllers (e.g. joint controller), put your model in the desired position. For this example, let’s consider an extension (20°) of the left knee of the child model.
- Once your model is positioned, check the box “All nodes” and update the model in the History by clicking on the button “Update”. Choose the name of your updated model (e.g. model_new) and press OK.
- Click on the button Scripting and select the script Positioning_FE_2_model_CNRB. At the bottom of the window you can put the arguments of the scripts:
- The folder to which you want the files are exported (e.g. Y:/my_dir/)
- The name of the model you imported (initial state, here: imported_model)
- The name of the model you updated (here: model_new)
- The CNRB option (1:on, 0, off)
When you click on Open, the inputs of the FE simulation are written in the folder you specified. Before launching your simulation, make sure that your model is correctly called in the file main_pos.dyn
For some reason, you may need to use an intermediate position of your model (between the initial and the final position of your model). For motion such as rotation, a linear interpolation between initial and final state may be problematic (not rigid motion, interference). This strategy is very similar to the previous one but it uses a manually-defined intermediate position.
Let’s consider the same example as the one used for the strategy 1 but with a higher angle of extension (e.g. 75°). In order to prevent any fracture of the tibia, we are going to use an intermediate position of the model at the half range of motion, i.e. about 38°.
- Run a first Positioning simulation with the half range of motion (38°) and save the model in the History
- Run a second Positioning simulation with the full range of motion (75°) and save the model in the History.
- Call the script Positioning_FE_3_models_CNRB.py in the module Scripting. The arguments are the same as the ones of the previous strategy. You just have to add the name of your model you saved after the 1st simulation (intermediate state).
The strategy 3 is similar to the previous one but saves automatically the model at different intermediate positions in the History of Piper. Let’s consider an extension of the left knee, an extension of the right femur and a vertical displacement of the right hand.
- Fix the pelvis and the left femur
- Add a first joint controller that will perform the extension of the knee: Left_knee (target ry=-75°)
- Add a frame controller to the right femur (frame: Pelvic_frame, target ry=45°)
- Add a landmark controller on the right hand (Styloid_of_right_radius, target z=200mm)
- Make sure that the simulation behaves well (e.g.no major instabilities etc.)
- Once you are satisfied of the behavior of your simulation, reset it and keep active the controllers you used (windows open).
- Enable the option All nodes as well as the option that runs the most recent Python script at each time step of the simulation.
- Open the scripting dialog and pick the script Positioning_FE_auto.py. For this script, the arguments are:
- The folder to which you want the input files to be exported (e.g. Y:/my_dir/)
- The name of the model you imported (default: import_model)
- The name of the controllers (e.g. Left_knee). Important: you may have to add the degrees of freedom in the name (e.g. gebod_stylion_right_xyz). In general, write the name of the controller the same way it appears in the window of the controller
- The DoF of each controller (e.g. [‘nan’,-75,’nan’])
- The number of intermediate positions desired.
- Press Open (nothing is expected) and close the scripting window
- Now, click on Positioning. Intermediate targets have been defined and the simulation is running until these intermediate targets are reached. The intermediate targets are updated if 1) the target value is reached and 2) if the Cartesian velocity is close to zero (no equilibrium researched). Also, minor instabilities may occur. Therefore, if the target is not reached within 20 seconds, it is automatically updated to the next step.
- At the end of your simulation, the input files are written and exported to the specified folder.
- Run you FE simulation