Page 1 of 1

Converting IMU data to .sto format

Posted: Sun May 09, 2021 11:34 pm
by katie.farris
Hello,

I am running OpenSim 4.2. I am trying to drive motion of my model through IMU data. My data is in the .json format, and includes acceleration (g), orientation (degrees), and rotation (degrees/second). I am trying to convert that input into .sto format to then import it into OpenSim to drive my model. I have converted my data into a .txt document that is tab separated. When I try to run posted codes to convert into .sto files, I get the error:

"java exception occurred:
java.lang.RuntimeException: Table does not have metadata for 'header'.
Thrown at XsensDataReader.cpp:94 in extendRead().
at org.opensim.modeling.opensimCommonJNI.DataAdapter_read(Native Method)
at org.opensim.modeling.DataAdapter.read(DataAdapter.java:48)"
  • Any suggestions on how to convert from .txt to .sto?
  • Is there a better way to go about converting and/or importing my IMU data?
I have been unsuccessful in running the OpenSense example. I hit an error that there is no conversion when trying to create the .sto orientation files.

Thank you!

Best Wishes

Re: Converting IMU data to .sto format

Posted: Mon May 10, 2021 3:26 pm
by tkuchida
The Storage (.sto) file format is described on the "Storage (.sto) Files" page in the User's Guide: https://simtk-confluence.stanford.edu/d ... o%29+Files. Your file should work provided it adheres to the requirements described on that page.

Re: Converting IMU data to .sto format

Posted: Sun May 16, 2021 10:04 pm
by katie.farris
Thank you for your reply! I got the file conversion to work. I do have another question about the data format within the .sto file. I see that in the "Rajagopal_OpenSense" OpenSim example model, the .sto file "walking_orientations.sto" has four columns of data (not including the time) for each time step. Can you explain what data is represented by each of these columns? It seems to me that I would only need to supply the x/y/z orientation data.

Re: Converting IMU data to .sto format

Posted: Wed Dec 15, 2021 10:56 pm
by jordan123
sorry, I still don't understand how to slove this problem (java.lang.RuntimeException: Table does not have metadata for 'header'.). Sould I modify the imu .txt file or somthings that I don't know. thank you for your taking your time.