Extra columns with no headers in CMC generated outputs file

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Vishal R
Posts: 47
Joined: Wed Oct 29, 2014 4:20 pm

Extra columns with no headers in CMC generated outputs file

Post by Vishal R » Tue Mar 30, 2021 6:15 am

Hi,

I was performing CMC on one of the models that I am developing in OpenSim. The RRA and CMC were computed without errors. While analyzing the data using MATLAB, I got the following error while executing osimTableToStruct(cmc_actuator_file_name).

Code: Select all

Unexpected number of columns in line 24. Expected = 87. Received = 95.
	Thrown at DelimFileAdapter.h:441 in extendRead().

	at org.opensim.modeling.opensimCommonJNI.new_TimeSeriesTable__SWIG_5(Native Method)

	at org.opensim.modeling.TimeSeriesTable.<init>(TimeSeriesTable.java:61)
When I opened up the actuation_force.sto file that is generated as a result of CMC, there were 8 extra columns with no header but only 0 in it. I think that was the reason for the error shown above.

These extra columns are generated for actuation_force, actuation_power, actuation_speed. (For some of these files it has a default value of 1000, but the values are the same throughout the file.)

It would be good to know how to fix these 8 extra columns. I could manually delete them but I have a lot of trials to process.

Thanks,
Vishal

Tags:

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

Re: Extra columns with no headers in CMC generated outputs file

Post by Ayman Habib » Tue Mar 30, 2021 10:41 am

Hi Vishal,

Since you're building/modifying models, the likely scenario is that you added state variables that have blank names or some other state variables that contain spaces in them and that causes the problem downstream. I would try to fix the problem with the names rather than the downstream issue of parsing files with missing or extra headers.

Please let us know if that's not the case or if you can reproduce using one of our distributed models.

Best regards,
-Ayman

User avatar
Vishal R
Posts: 47
Joined: Wed Oct 29, 2014 4:20 pm

Re: Extra columns with no headers in CMC generated outputs file

Post by Vishal R » Wed Mar 31, 2021 6:26 am

Hi Ayman,
aymanh wrote:
Tue Mar 30, 2021 10:41 am
Hi Vishal,

Since you're building/modifying models, the likely scenario is that you added state variables that have blank names or some other state variables that contain spaces in them and that causes the problem downstream. I would try to fix the problem with the names rather than the downstream issue of parsing files with missing or extra headers.

Please let us know if that's not the case or if you can reproduce using one of our distributed models.

Best regards,
-Ayman
Thanks a lot for the pointers. I did re-check my model to see if there are any blank names or variables that contain spaces. But unfortunately, the problem was not in those directions.

The reason for 8 columns without any headers but the values that are either 0 or 1000 is because there were 8 muscles that were disabled (on purpose) in the model by using the tags

Code: Select all

<appliesForce>false</appliesForce>
Therefore there were 8 extra columns in the actuator_speed, actuator_force, and actuator_power files that were generated. However, the CMC_states.sto didn't have that issue. It was caused in the output members of the "Actuation" analysis set.

Further, as per your suggestion, I tried to reproduce the problem using one of the distributed models. I took the example directory of Gait2392_Simbody.
In that, I performed Scaling->IK->RRA. After that using the RRA adjusted model I performed CMC by disabling one of the muscle "semiten_r" and tried performing the CMC. This resulted in the same problem that I posted.

I would like to attach the RRA adjusted osim file that is used to reproduce this error.

Please let me know if you could also reproduce this error.

Thanks a lot!

Best,
Vishal
Attachments
subject01_simbody_adjusted.osim
(612.45 KiB) Downloaded 47 times

User avatar
Carmichael Ong
Posts: 381
Joined: Fri Feb 24, 2012 11:50 am

Re: Extra columns with no headers in CMC generated outputs file

Post by Carmichael Ong » Sun Apr 04, 2021 3:09 pm

Thanks for reporting. I was able to reproduce with gait10dof18 files from the distribution.

In the mean time, it seems like you could do a post-processing step to fix the error (either by adding back the column names for the missing headers and disabled muscles, or by removing the extra columns and fixing the "nColumns" count number in the metadata up top).

POST REPLY