Creating .mot file through API
Posted: Wed Aug 16, 2017 11:17 pm
Hi Everyone,
I have a technical question regarding the OpenSim API. I am trying to build a .mot file which I can use to drive an OpenSim model. I have been able to load a previous .mot file through the API :
I am also able to create an empty storage object and add column labels to this storage file :
However in both of these situations I am unable to add rows with data eg. a time stamp and a value for a specific coordinate.
I have tried using both the append and also add functions associated with the Storage class (https://simtk.org/api_docs/opensim/api_ ... orage.html) . However when I print the .mot file their is no data rows , jsut the following text
If anyone has used the API to generate / edit .mot files and has suggestions I would be very grateful
Thanks for any feedback or suggestions.
Best
Bryce Killen
I have a technical question regarding the OpenSim API. I am trying to build a .mot file which I can use to drive an OpenSim model. I have been able to load a previous .mot file through the API :
Code: Select all
dir = ' dir\to\my\mot\file,mot '
mot = Storage(dir)
Code: Select all
mot = Storage()
colHead = ArrayStr()
colhead.setSize(1)
colHead.set(0,'time')
mot.setColumnLabels(colHead)
I have tried using both the append and also add functions associated with the Storage class (https://simtk.org/api_docs/opensim/api_ ... orage.html) . However when I print the .mot file their is no data rows , jsut the following text
Code: Select all
Coordinates
version=1
nRows=97
nColumns=56
inDegrees=yes
endheader
time pelvis_tilt pelvis_list pelvis_rotation pelvis_tx
Thanks for any feedback or suggestions.
Best
Bryce Killen