APDM data conversion to .sto file

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Yashvitha Thatigotla
Posts: 6
Joined: Tue May 24, 2022 9:00 am

APDM data conversion to .sto file

Post by Yashvitha Thatigotla » Fri Jun 24, 2022 12:03 pm

Hi, I am trying to create an orientations file from APDM data(.csv file), but I've gotten a couple of errors. I've gotten "invalid stod argument" and "Table does not have metadata for 'header'." I'm using this command in an anaconda command prompt: "opensense -ReadAPDM <file name>.csv exampleAPDM_Settings.xml." I have made changes to the xml file to reflect my data(not sure if that could be where I went wrong), but I don't know how to fix this. Any suggestions?

User avatar
Ayman Habib
Posts: 2236
Joined: Fri Apr 01, 2005 12:24 pm

Re: APDM data conversion to .sto file

Post by Ayman Habib » Fri Jul 08, 2022 9:56 am

Hello,

The error message regarding the header is likely due to extra or missing commas or spaces/tabs in the header lines. The stod error could be due to using non-us decimal point or again spaces/tabs/commas. These file formats are defined by the manufacturers and our parsers were written for a specific version as such our parsers are strict. The best resource is to look into provided example data files and follow the format very strictly.

Alternatively if working in Matlab or python you can do the parsing yourself, create a TimeSeriesTable of Quaternions and use it downstream in opensense.

Hope this helps,
-Ayman

User avatar
Yashvitha Thatigotla
Posts: 6
Joined: Tue May 24, 2022 9:00 am

Re: APDM data conversion to .sto file

Post by Yashvitha Thatigotla » Sun Jul 10, 2022 2:55 pm

Thank you for your reply!
I am now receiving another error: "Expected labels for sensor __ were not found."
Does this also have to do with the commas or spaces/tabs?

User avatar
Ayman Habib
Posts: 2236
Joined: Fri Apr 01, 2005 12:24 pm

Re: APDM data conversion to .sto file

Post by Ayman Habib » Mon Jul 11, 2022 5:51 pm

Hello,

Yes, very likely since the error message suggests the label for the sensor was not found. Could also due to extra tags in the xml file that do not map to labels in the data file.

Hope this helps,
-Ayman

User avatar
Yashvitha Thatigotla
Posts: 6
Joined: Tue May 24, 2022 9:00 am

Re: APDM data conversion to .sto file

Post by Yashvitha Thatigotla » Mon Jul 11, 2022 6:01 pm

I'm comparing my data file to another file that works, and the only difference between the two is the number of headers. Am I supposed to have a certain number of headers for the conversion to work?

User avatar
Yashvitha Thatigotla
Posts: 6
Joined: Tue May 24, 2022 9:00 am

Re: APDM data conversion to .sto file

Post by Yashvitha Thatigotla » Sat Jul 23, 2022 10:03 am

Hello,

I also have another question. In the example APDM data on this website(https://simtk-confluence.stanford.edu:8 ... h+IMU+Data), there's a data column for Orientation/Scalar. Do you know what the scalar means and how to get that value? Is that value something we calculate based on our other data, or something we need to collect during data collection? Also, is the magnetic field column necessary?

POST REPLY