Converting IMU data to .sto format

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Katie Farris
Posts: 3
Joined: Sun Mar 28, 2021 11:54 am

Converting IMU data to .sto format

Post by Katie Farris » Sun May 09, 2021 11:34 pm

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

Tags:

User avatar
Thomas Uchida
Posts: 1793
Joined: Wed May 16, 2012 11:40 am

Re: Converting IMU data to .sto format

Post by Thomas Uchida » Mon May 10, 2021 3:26 pm

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.

User avatar
Katie Farris
Posts: 3
Joined: Sun Mar 28, 2021 11:54 am

Re: Converting IMU data to .sto format

Post by Katie Farris » Sun May 16, 2021 10:04 pm

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.

User avatar
la dadee
Posts: 1
Joined: Tue May 19, 2020 10:41 pm

Re: Converting IMU data to .sto format

Post by la dadee » Wed Dec 15, 2021 10:56 pm

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.

POST REPLY