OpenSense

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
john pope
Posts: 3
Joined: Thu Sep 02, 2021 2:12 pm

OpenSense

Post by john pope » Mon Apr 15, 2024 7:23 pm

I am trying to use Raw IMU data with the Opensense workflow.
- data collected via Xsens IMU's (I am not using Xsens proprietary $$$ software to export processed data)
- filtered data using Madgwick filter, transforming data into Quaternions
- I have put the data into OpenSense format, using the appropriate headers

DataRate=100.000000
DataType=Quaternion
version=3
OpenSimVersion=4.5
endheader
time segments_IMU...........

I am running into issues with the IMU placer tool. I believe it is because of a formatting issue in my <orientation_file_for_calibration>.

I open the file in a text editor and save in a .sto format, duplicating the format of the placment_orientations.sto file that is provided in the example (UTF-8). any suggestions!?!?
I tried the "IMU to OpenSim toolbox", that has a ".sto file generator". This would seem to be what I am looking for but I can not get it to work and there is no documentation.

Any and all help is welcome.

Tags:

User avatar
Kevin Sommler
Posts: 4
Joined: Tue Apr 30, 2024 6:22 am

Re: OpenSense

Post by Kevin Sommler » Tue Apr 30, 2024 7:24 am

I am using the XSense MTw Awinda IMUs (also without the $$$ software) to collect quaternion data and realized a simple data recorder and .sto file generator just recently. If you're saying that you're facing an formatting issue, maybe you could post the output file you are generating to see where the issue is?

The .sto file should have this format in the end:

Code: Select all

DataRate=100.000000
DataType=Quaternion
version=3
OpenSimVersion=4.5
endheader
time	segment1_imu	segment2_imu	segment3_imu		...
0.00	w,x,y,z		w,x,y,z		w,x,y,z			...
0.01	w,x,y,z		w,x,y,z		w,x,y,z			...
...	...		...		...			...
I could also send you some code if necessary, though its developed for a framework called ROS2.

Regards

User avatar
john pope
Posts: 3
Joined: Thu Sep 02, 2021 2:12 pm

Re: OpenSense

Post by john pope » Tue Jun 11, 2024 6:54 am

Hey Kevin,
Thank you for the response and sorry for the delay on my end. It is very possible that it is a formatting issue. I am also considering that it is a sensor to segment (S2S) calibration issue. While open OpenSense provides a heading correction in the workflow I do not think S2S calibration is included and is possibly something I need to troubleshoot prior to the formatting. Below is my OpenSense Output format.

Code: Select all

DataRate=100.000000
DataType=Quaternion
version=3
OpenSimVersion=4.5
endheader
time	torso_imu	femur_r_imu	pelvis_imu	tibia_r_imu	tibia_l_imu	calcn_r_imu	calcn_l_imu	femur_l_imu
0	-0.999357,0.005534,0.005993,-0.034903	0.998488,-0.009466,-0.010277,-0.053169	-0.999779,-0.007258,0.018664,-0.006438	-0.993391,-0.000312,-0.011899,0.114158	-0.999772,0.008693,0.018143,-0.007216	-0.998516,0.000697,0.001395,0.054438	0.999769,-0.019858,0.003772,-0.0073	-0.998913,0.005129,0.017969,0.042715
0.01	-0.999347,0.005351,0.006048,-0.035205	0.99849,-0.009415,-0.010284,-0.053139	-0.999779,-0.007254,0.018633,-0.006514	-0.9934,-0.000295,-0.011856,0.114089	-0.99977,0.008721,0.018153,-0.007362	-0.998515,0.000712,0.00139,0.054449	0.999769,-0.019861,0.003817,-0.007306	-0.998909,0.005234,0.018013,0.042756
0.02	-0.999338,0.005137,0.006001,-0.0355	0.998494,-0.009356,-0.010288,-0.053063	-0.999779,-0.007237,0.018593,-0.006575	-0.993406,-0.000265,-0.011823,0.114037	-0.999768,0.008738,0.018186,-0.007497	-0.998517,0.000727,0.001378,0.054425	0.999769,-0.019856,0.003856,-0.007285	-0.998915,0.005342,0.018039,0.042597

User avatar
Kevin Sommler
Posts: 4
Joined: Tue Apr 30, 2024 6:22 am

Re: OpenSense

Post by Kevin Sommler » Thu Jul 25, 2024 5:28 am

Hey John,

I don't see a formatting issue in the file you posted.

And yes you are right, a S2S calibration needs to be done if you are recording your data yourself and don't use a third party software like the one from Xsens (which like you mentioned before costs a lot of $$$) for example which does that for you.

I just picked up this topic again to finish my work on it. I recommend you to check out the QMT tool or generally the work of Daniel Laidig. Also if you keep going with this project, make sure to check out VQF (Versatile Quaternion-based Filter for IMU Orientation Estimation) if you like accurate Quaternions. ;)
I'll keep an eye on this thread from time to time if there are any news. :)


Regards
Kevin

POST REPLY