I am working on a MoCap Model of the right arm, including the detailed hand. I therefore use the upper body model without the left arm. As I do not have any marker information about the trunk i decided to fix the shoulder with some additional static drivers. My kinematics as well as MotionandParameterOptimization work fine, but the inverse dynamics is not loading. I’ll always get the error: [SIZE=1]
ERROR(OBJ1)[/SIZE] : [SIZE=1]C:/M…e/n…l/M…l/JointsAndDriversOptimized.any(12)[/SIZE] : [SIZE=1]JntDriverTrunk[/SIZE] : Parameter values are not monotonically increasing.
[SIZE=2]I think this might be due to fixing the shoulder to a static angle when the inverse dynamic file expects increasing values for those angles. How can i fix this?[/SIZE]
[SIZE=2]Thanks in advance,[/SIZE]
[SIZE=2]Christin.
[/SIZE]
I can say for sure what is causing the problem. Something is wrong with the file. The error you see is happens when the time (first column in the file) is not monotonically increasing. Thus, I don’t think it is caused by the static drivers on the trunk. But maybe something else is wrong with the setup.
The file is called something with “[trialname]-euler-trunk.txt”.
thanks a lot, you are totally right. It is because of the time column in my txt file. I dont know why but each time step is twice in there which leads to the problem that the column is not monotonically increasing. I need to figure out how to fix this. Any idea?
I just saw that this only happens when i save the joint angle output file after running the MotionandParameterOptimization. If i save it after running the kinematics only the time column is normally increasing with each time step and I don not get the error any more.
Now I think I understand. Tell me, how do you save the joint angle file?
It is not a file you save manually. The joint angles are written to the files while the study ‘Main.Studies.MotionOptimization’ is running.
So you may be doing something which the resets (empties) the joint angle files.
The sequence RunMotionAndParameterOptimizationSequence is the same as doing the following manually:
[ol]
[li]Open operations tab
[/li][li]Click: Main.Studies.ParameterIdentification.ParameterOptimization
[/li][li]Click: Run button
[/li][li]Right click: Main.Studies.ParameterIdentification.ParameterOptimization and select ‘Save design’ (This saves the segment length and marker pos)
[/li][li]Click: Main.Studies.MotionOptimization.Kinematics
[/li][li]Click: Run button (this run kinematics while saving joint angles to files)
[/li][/ol]
Thus, in the cases where you don’t want to run parameter optimization the manual sequence would be:
[ol]
[li]Open operations tab
[/li][li]Right click: Main.Studies.ParameterIdentification.ParameterOptimization and select ‘Load design’
[/li][li]Find the file with marker pos and segment length you want to load.
[/li][li]Click: Main.Studies.MotionOptimization.Kinematics
[/li][li]Click: Run button (this run kinematics while saving joint angles to files)
[/li][/ol]
When you later run inverse dynamics model the procedure becomes:
[ol]
[li]Open operations tab
[/li][li]Right click: Main.Studies.LoadParametersOptimizationResults and select ‘Load design’
[/li][li]Find the file with marker pos and segment length you want to load.
[/li][li]Click: Main.Studies.InverseDynamicStudy.InverseDynamics
[/li][li]Click: Run button (this run inverse dynamics reading the joint angles from the files that belong to this trial.)
[/li][/ol]
You can of course automate all this by creating your own operation sequences in anyscript. Or you can control everything through external batch processing scripts. I have made some programs that makes that very easy. See this tutorial
Thanks Morten, i know what the mistake was.
I included the joint angle output in the kinematic study one or two weeks ago to view them more easy without running the Motion Optimization where this file is normally saved. That is why i got each time step written twice in the file.
if I try to load the inverse dynamics I get this error:
Constructing model tree…
ERROR(SCR.PRS9) : C:/Meine A…odelle/n…l/M…l/ModelOutput.any(26) : ‘EVENT’ : Unresolved object
Model loading skipped
I know that it means it does not find this element: //// Constants
which is not existing in my model tree. There is only EVENTCONTEXT but there is also no TIMES in it.
I can comment it out and it loads fine but as i have no idea what it is for, I wanted to make sure that I do not affect the inverse analysis in some way.
I tried to attache the Code to this post but it’s to big. If you need it for understanding, I can upload it somewhere else.
Hi Christin,
do you need this Event in your model?
If you define an event in Vicon, it will safe it in the C3D if you don’t define it during your recording, it will stay empty. In most C3Ds that I have there os no event.
thanks for your comment. No I think I don’t even have an event in my Vicon data. I just wanted to knoew if this is something important but it seems to be not.
Thanks for the advise.
I do have some other problems now. I can load the inverse dynamics without problems but if I want to run i I get the error that my system is kinematically overconstrainend.
ERROR(OBJ.MCH.KIN2) : C:/Meine …odelle/n…l/M…l/InverseModel.any(38) : InverseDynamicStudy : Model is kinematically over-constrained : Position analysis failed : 9 unsolvable constraint(s) found
Do you have any suggestions how to figure out what the unsolvable contraints are?
No it is not the standard MoCap Model. It is the MoCap Model Morten was working with last spring in Aalborg. It is based on the standard but makes it easier to evaluate a lot of different trials from the same subject. Therefore the folder structure as well as the Code are a bit different to the standard MoCap Model. I can upload it somewhere if that’ll help.