Visual3D to OpenSim Demo

From Software Product Documentation
Jump to navigation Jump to search

OpenSim related files that are used in these examples for download.


This example is for a standard OpenSim "gait" model (such as gait2392_simbody.osim or gait2354_simbody.osim).

What Visual3d does is:

Step 1) Scales the model to fit the subject. (The scaling is written to a _ScaleSet.xml file called Visual3d_ScaleSet.xml.)

Step 2) It then computes the center of pressure in the foot coordinate system and stores this in memory.

Step 3) Next does its own Inverse Kinematics so you do not have to use the OpenSim IK.

Step 4) After the inverse kinematics, the center of pressure is transferred back from the foot coordinate system into lab space so the relationship between the center of pressure and the model is maintained. Visual3d should handle the center of pressure data seamlessly.

Step 5) Visual3d then exports the model's degrees of freedom (pelvis motion and joint angles), the ground reaction forces and the center of pressure to a single *.mot file. (File name Visual3d_SIMM_input.mot).

With the process no trc files are need and all the kinematics, ground reaction forces and center of pressure are contained in a single .mot file.


Instruction for Running Visual3d to OpenSim Integration

Part 1 – Creating the motion file for OpenSim

  1. Start Visual3d and create a Visual3d hybrid model containing the following segments: right foot (RFT), right shank (RSK), right thigh (RTH), left foot (LFT), left shank (RSK), left thigh (RTH), pelvis and a trunk (RTA)
  2. If the subject is not walking in the +Y with +Z as vertical create a v3d_lab segment as outlined in the Appenddix
  3. Go to File and select ExportExport OpenSim Motion File. Alternatively the user could export the file using ExportExport OpenSim Motion File without Cleanup. (The only difference between the two method is that if the method without Cleanup is selected then the OpenSim Inverse Kinematics remains applied to the model after export and the resulting position state variables get written to the “DERIVEDInverse Kinematics” folder of Visual3d “Signal and Events” data tree.)
  4. Enter the data range and click the OK button.
  5. Visual3d now needs the required Visual3d_Scale_ScaleSet.xml file and will bring up a File Selection Dialog to help the user make sure that Visual3d will update the correct file.
  6. After selecting the ScaleSet file, Visual3d now applies the Inverse Kinematics process to the gait data. (This can take several minutes.)

Once steps 1-6 are completed, Visual3d will have updated the Visual3d_Scale_ScaleSet.xml file and have created a Visual3d_SIMM_input.mot file which can be loaded into OpenSim.

Part 2 – Scaling and Viewing the motion file for OpenSim

  1. Start OpenSim and load the file openSim model. (This will be either gait2392_simbody.osim or gait2392_simbody.osim)
  2. From the Tools pulldown select Scale Model
  3. In the Scale Tool Dialog select Settings > Load Settings
  4. Open the file Visual3d_Setup_Scale.xml
  5. Uncheck the Adjust Model Markers box
  6. Hit the Run botton to create the scaled model . The model will be called Visual3d in the Navigator window
  7. Left Click on model 3DGaitModel2354 in the navigator Window then right click and select Close.
  8. A dialog will appear – select No so you do not save settings.
  9. Visual3D will now be the only Model
  10. From the File pull-down select Load Motion and load Visual3d_SIMM_input.mot
  11. Hit the play button to Animate (On my computer I set the speed to 0.2)

At this point the users should be ready to run the OpenSim Residual Reduction Algorithm by loading the file: Visual3d_Setup_RRA.xml. OpenSim CMC and Forward Simulation can subsequently be run by using the files Visual3d_Setup_CMC.xml and Visual3d_Setup_Foward.xml.

Retrieved from ""