Page 1 of 1

Opensense - quaternion sto-file information

Posted: Wed Sep 22, 2021 6:34 am
by pablo_delgado
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,

Re: Opensense - quaternion sto-file information

Posted: Wed Sep 22, 2021 8:40 am
by aymanh
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

Re: Opensense - quaternion sto-file information

Posted: Wed Sep 22, 2021 9:12 am
by pablo_delgado
Thank you very much, once I have it and it is ready I will share it!

Re: Opensense - quaternion sto-file information

Posted: Sun Mar 27, 2022 8:43 pm
by rodrigobini
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

Re: Opensense - quaternion sto-file information

Posted: Mon Mar 28, 2022 10:41 am
by aymanh
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