Opensense - quaternion sto-file information

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Pablo Delgado
Posts: 24
Joined: Tue Feb 11, 2020 3:39 pm

Opensense - quaternion sto-file information

Post by Pablo Delgado » Wed Sep 22, 2021 6:34 am

Greetings,

I am new using Opensen and I followed the tutorials. However, I do not have the xsense sensors but I have the quaternion and the time stamp information of the IMU sensors (Polhemus tracking system) that I am using. I would like to know if there is a tutorial on how to build the sto-file from the given information. I am planning to implement the custom script in MATLAB.

Regards,

Tags:

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

Re: Opensense - quaternion sto-file information

Post by Ayman Habib » Wed Sep 22, 2021 8:40 am

Hi Pablo,

There's no such tutorial that I'm aware of but the format is quite straightforward. Open the quaternions.sto file from the OpenSense example or test cases (e.g. https://github.com/opensim-org/opensim- ... ations.sto) and write your Matlab script to put the data on the same format.

If you believe this imu type is widely used and you'd like to share the script with the community here that would be awesome and would help others as well.

Hope this helps,
-Ayman

User avatar
Pablo Delgado
Posts: 24
Joined: Tue Feb 11, 2020 3:39 pm

Re: Opensense - quaternion sto-file information

Post by Pablo Delgado » Wed Sep 22, 2021 9:12 am

Thank you very much, once I have it and it is ready I will share it!

User avatar
Rodrigo Bini
Posts: 10
Joined: Wed Oct 21, 2015 6:18 am

Re: Opensense - quaternion sto-file information

Post by Rodrigo Bini » Sun Mar 27, 2022 8:43 pm

Hi,
I am probably on a similar boat. I can get the Orientation data from our IMUs into Matlab but I have not managed to get the API to work in the computers that I have access to.
I am struggling to generate the .sto file with the expectation that this file should have a mix of comma and tab separated data. Data for time is tab separated in relation to the pelvis IMU, for example. However, the 4 quaternion data for the pelvis are comma separated.
Is there a line of code that could be used to organise the data accordingly?
Thanks,
Rodrigo

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

Re: Opensense - quaternion sto-file information

Post by Ayman Habib » Mon Mar 28, 2022 10:41 am

Hello,

If you have a DataTable (or a subclass of it) you may call the method "packQuaternion()" to obtain "DataTableQuaternion". Not sure what classes/API methods you're using now but that's based on inspection of the signature of methods exposed to Matlab.

Hope this helps, but if not please post a code snippet to demonstrate so that other forum users can chime in.

Best regards,
-Ayman

POST REPLY