- Pel_OTG_file.png (19.04 KiB) Viewed 1619 times
Orientation Tracking Setup
- Nicholas Vandenberg
- Posts: 71
- Joined: Wed Jan 20, 2021 12:47 pm
Re: Orientation Tracking Setup
I thought I was doing that like this?
Tried with the basic 'packQuaternion' with these names, then tried it with the suffixes sample code you shared. I'm still getting the previous error I shared.- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Orientation Tracking Setup
I think the issue is that there's an empty row between "endheader" and the column labels row. Remove that and give it a try again.
- Nicholas Vandenberg
- Posts: 71
- Joined: Wed Jan 20, 2021 12:47 pm
Re: Orientation Tracking Setup
Still not working, unfortunately. I opened up the TimeSeriesTable that I'm trying to 'pack'
Could it be having some issue with that first column that's being created without any label?
Could it be having some issue with that first column that's being created without any label?
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Orientation Tracking Setup
I think that first column is just visualizing the row indexes, I don't think it's an actual column.
I'm still a little stumped. Can you load the data as-is into a TimeSeriesTable and then save it again to a new file to see if the formatting changes?
I'm still a little stumped. Can you load the data as-is into a TimeSeriesTable and then save it again to a new file to see if the formatting changes?
- Nicholas Vandenberg
- Posts: 71
- Joined: Wed Jan 20, 2021 12:47 pm
Re: Orientation Tracking Setup
Figured that wasn't it but I'm pretty stumped as well. I saved the TimeSeriesTable as an .sto that I can't upload, but re-saved that as an excel workbook (attached). I can't see anything in it unless some of the header info is 'unexpected'?
- Attachments
-
- PelvisTable.xlsx
- (68.16 KiB) Downloaded 90 times
Re: Orientation Tracking Setup
I am tracking IMUs with Moco and have attached a example file which might be helpful for comparison. (It is normally a .sto but changed to a .txt to attach. )
The header is:
DataRate=2000
DataType=Quaternion
version=3
OpenSimVersion=4.4
endheader
time /bodyset/torso/torso_imu_offset /bodyset/pelvis/pelvis_imu_offset .... etc
The header is:
DataRate=2000
DataType=Quaternion
version=3
OpenSimVersion=4.4
endheader
time /bodyset/torso/torso_imu_offset /bodyset/pelvis/pelvis_imu_offset .... etc
- Attachments
-
- orientations_Quaternions.txt
- (471.64 KiB) Downloaded 115 times
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Orientation Tracking Setup
Thanks Grace!
I'm wondering if OpenSim is not handling the older SIMM-style header correctly. Try updating the format Grace posted and see if that works.
I'm wondering if OpenSim is not handling the older SIMM-style header correctly. Try updating the format Grace posted and see if that works.
- Nicholas Vandenberg
- Posts: 71
- Joined: Wed Jan 20, 2021 12:47 pm
Re: Orientation Tracking Setup
Thanks for sharing Grace! I tried updating my header, unfortunately I'm still getting an error where it doesn't like the 'DataType=Quaternion'
Error using IMU_TD_Walk (line 141)
Java exception occurred:
java.lang.RuntimeException: expected = double received = Quaternion
Thrown at DelimFileAdapter.h:355 in extendRead().
at
org.opensim.modeling.opensimCommonJNI.new_TimeSeriesTable__SWIG_5(Native
Method)
at
org.opensim.modeling.TimeSeriesTable.<init>(TimeSeriesTable.java:61)
Not sure if this now comes down to how I create the file or what's going on?
Error using IMU_TD_Walk (line 141)
Java exception occurred:
java.lang.RuntimeException: expected = double received = Quaternion
Thrown at DelimFileAdapter.h:355 in extendRead().
at
org.opensim.modeling.opensimCommonJNI.new_TimeSeriesTable__SWIG_5(Native
Method)
at
org.opensim.modeling.TimeSeriesTable.<init>(TimeSeriesTable.java:61)
Not sure if this now comes down to how I create the file or what's going on?
- Nicholas Vandenberg
- Posts: 71
- Joined: Wed Jan 20, 2021 12:47 pm
Re: Orientation Tracking Setup
I tried altering my conversion code so that it will print the new header as opposed to the previous header, as well as printing separate files for the joint angles (DataType=double) and pelvis orientations (DataType=quaternion). I am now unable to load these into my Moco problem, even the joint angles come back with:
Error using IMU_TD_Walk (line 91)
Java exception occurred:
java.lang.RuntimeException: expected = double received = double
Thrown at DelimFileAdapter.h:355 in extendRead().
at org.opensim.modeling.opensimMocoJNI.MocoTrack_initialize(Native Method)
at org.opensim.modeling.MocoTrack.initialize(MocoTrack.java:549)
I'm at a loss here
Error using IMU_TD_Walk (line 91)
Java exception occurred:
java.lang.RuntimeException: expected = double received = double
Thrown at DelimFileAdapter.h:355 in extendRead().
at org.opensim.modeling.opensimMocoJNI.MocoTrack_initialize(Native Method)
at org.opensim.modeling.MocoTrack.initialize(MocoTrack.java:549)
I'm at a loss here
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Orientation Tracking Setup
Editing STO files by hand can be very error prone (as you are now discovering). It would be better to start over and use the API as much as possible.
Is it possible to load the existing data into a regular TimeSeriesTable? From there we should be able to save it to a new file which would be in the proper format. From there we can use the API for pack operations, or create a TimeSeriesTableQuaternion. If it comes to the latter approach, I can write a code snippet for that.
Is it possible to load the existing data into a regular TimeSeriesTable? From there we should be able to save it to a new file which would be in the proper format. From there we can use the API for pack operations, or create a TimeSeriesTableQuaternion. If it comes to the latter approach, I can write a code snippet for that.