MocoAccelerationTrackingGoal & MocoAngularVelocityTrackingGoal Failing to Transfer Reference DataTable to Solver
Posted: Tue Sep 27, 2022 11:22 am
Hi,
My name is Owen. I hope you are all doing well!
I have been messing around with tracking some higher order terms through the MATLAB scripting environment with MOCO's API, and haven't been able to find a file type/format or TimeSeriesTableVec3 that either the MocoAccelerationTrackingGoal or the MocoAngularVelocityTrackingGoal can load without running into the following error:
Java exception occurred:
java.lang.RuntimeException: Invalid Argument. DataTable 'that' has zero
rows/columns.
Thrown at DataTable.h:178 in DataTable_().
I have tried using the SetAccelerationReferenceFile with .trc files formatted to read properly as a TimeSeriesTableVec3, as well as .sto files that are formatted other ways. I have also tried to manually create a TimeSeriesTableVec3 to make sure that the column labels are correct and there isn't any issue on the file reading side.
In both circumstances (loading the .trc and loading the manual TimeSeriesTableVec3), somewhere in the transition the solver drops the ball on transferring the references and they end up empty. Could you possibly provide an example file or .sto for which the formatting of the acceleration and angular velocity references can load properly via MATLAB? I also find that the documentation on these goals is quite vague, since I haven't seen another context besides marker files where a file is read directly into a vec3 table. The documentation also doesn't specifically say it has to be able to do that either, or whether there can be one column per 3 entries, etc. More details on the formatting will probably be necessary here so users can implement those methods properly.
Let me know if you need more info or if you have a sufficient understanding of the predicament.
Thanks so much for the help
Owen
Code snippet just so people understand what I am describing above:
accelTracking = org.opensim.modeling.MocoAccelerationTrackingGoal('accel_tracking');
accelTracking.setAccelerationReference(accelTimeSeriesTableVec3);
accelTracking.setWeight(10);
problem.addGoal(accelTracking);
angVelTracking = org.opensim.modeling.MocoAngularVelocityTrackingGoal('angvel_tracking');
angVelTracking.setAngularVelocityReference(angvelTimeSeriesTableVec3);
angVelTracking.setWeight(10);
problem.addGoal(angVelTracking);
My name is Owen. I hope you are all doing well!
I have been messing around with tracking some higher order terms through the MATLAB scripting environment with MOCO's API, and haven't been able to find a file type/format or TimeSeriesTableVec3 that either the MocoAccelerationTrackingGoal or the MocoAngularVelocityTrackingGoal can load without running into the following error:
Java exception occurred:
java.lang.RuntimeException: Invalid Argument. DataTable 'that' has zero
rows/columns.
Thrown at DataTable.h:178 in DataTable_().
I have tried using the SetAccelerationReferenceFile with .trc files formatted to read properly as a TimeSeriesTableVec3, as well as .sto files that are formatted other ways. I have also tried to manually create a TimeSeriesTableVec3 to make sure that the column labels are correct and there isn't any issue on the file reading side.
In both circumstances (loading the .trc and loading the manual TimeSeriesTableVec3), somewhere in the transition the solver drops the ball on transferring the references and they end up empty. Could you possibly provide an example file or .sto for which the formatting of the acceleration and angular velocity references can load properly via MATLAB? I also find that the documentation on these goals is quite vague, since I haven't seen another context besides marker files where a file is read directly into a vec3 table. The documentation also doesn't specifically say it has to be able to do that either, or whether there can be one column per 3 entries, etc. More details on the formatting will probably be necessary here so users can implement those methods properly.
Let me know if you need more info or if you have a sufficient understanding of the predicament.
Thanks so much for the help
Owen
Code snippet just so people understand what I am describing above:
accelTracking = org.opensim.modeling.MocoAccelerationTrackingGoal('accel_tracking');
accelTracking.setAccelerationReference(accelTimeSeriesTableVec3);
accelTracking.setWeight(10);
problem.addGoal(accelTracking);
angVelTracking = org.opensim.modeling.MocoAngularVelocityTrackingGoal('angvel_tracking');
angVelTracking.setAngularVelocityReference(angvelTimeSeriesTableVec3);
angVelTracking.setWeight(10);
problem.addGoal(angVelTracking);