I am working on setting up batch processing of static optimization using MatLab R2018b connected to the OpenSim 4.0 API (windows 7 computer). I am getting close but there is one issue I need to work out.
For each trial that I need to run static optimization on I use files of experimental data exported from Visual 3d. Visual 3d runs inverse dynamics and prints out two OpenSim compatible .mot files.
The first file is a .mot file that has the kinematic data.
The second file is a second .mot file that has kinetic data (e.g. the vGRF).
The way I do it using the OpenSim Static Optimization GUI is I
load my Static Optimization Set Up XML File that has the default set up information.
the next step is, under the Main Settings, tab I update the input file to the kinematic .mot file for each trial
The last step is in the Actuators and External Loads Tab I edit the External Loads specification file and I update the "force data file' with the name of the corresponding second .mot file (e.g. the vGRF file)
My QUESTION:
Is there a way to update the External Loads XML set up file with the name of the new kinetic (vGRF) .mot file in my MatLab Loop for each trial iteration?
The only thing I can think to do is have 10 separate set up XML files each with the name of the second .mot file for each trial hard coded in....but I assume there is a more elegant way to just change the name of the file in the XML set up file on each loop.
thanks