Hi can someone help me debug this model as I’m having a lot of problems with it?
Hi,
Please have a look at the wiki regarding the force plate types: force plate types
Please select the appropriate force plate type files from: \Body\AAUHuman\ToolBox\Mocap\
Regards,
Pavel
Hi Pavel
Thanks for your help. I have now got past that stage but another error has cropped up which I don’t seem to understand:
[SIZE=1]ERROR(OBJ.FILE1)[/SIZE] : [SIZE=1]D:/M…s/A…s/A…1/A…1/A…n/E…s/G…y/JointsAndDriversOptimized.any[/SIZE] : [SIZE=1]JntDriverTrunk.FileName[/SIZE] : Problem with file : [SIZE=1]D:\My Documents\Anyscripts\AMMRV1.4.1\AMMRV1.4.1\Application\Examples\GaitLowerExtremity\Trial01-output-euler-trunk.txt[/SIZE] : The data file does not exist.
Model loading skipped
What does this require me to do?
Thanks in advance
Please re-run the MotionAndParameterOptimization study - these files will be generated.
Regards,
Pavel
Hi Pavel and thanks
I did what you said but I now have a problem with the following error:
ERROR(OBJ.MCH.KIN3) : D:/M…s/A…s/A…1/A…1/A…n/E…s/G…y/GaitLowerExtremity.main.any : MotionOptimization.InitialConditions : Kinematic analysis failed in time step 0
I have been over the tutorial and anyscriptwiki pages but still am not sure how to resolve this problem. I have attached my file and was wondering if you could put me in the right direction
Hi Ammar,
You should do two things:
- in TrialSpecificData.any change AnyVar ThighLength= DesignVar(0.4234534); to be AnyVar ThighLength=0.4324534;
That will allow to load the model, but there will be one more problem - see step 2.
- You should check our wiki for the solution: missing trunk/head markers
Regards,
Pavel
Hello
I have noticed that the file I uploaded last time was the wrong one, it was to do with the LowerExtremityModel rather than the GaitFullBody. Nevertheless, carrying on with this LowerExtremityModel I am assuming that I can’t do point 2 on your list as I am only looking at the lower part of the body and don’t need markers on the upper half? Am I required to put more drivers on the lower half? I have carried put your first point and still get the same error.
Hello Pavel
I have carried out what you said but get the same error? Am I meant to create a new file called ExtraDrivers.any as it was not in the lowerextremitymodel folder but is in the Gaitupperbody folder? I have made a new file and included it in the main file. The two extra drivers from wikiscript have been added but I am still getting the same error
Hi Ammar,
you have not attached the model.
Pavel
Sorry
attached now
You added ExtraDrivers to the InverseDynamics study, but not the MotionAndParameterOptimization one.
Pavel
Hi
Thanks I was able to get the model to work. I am now using a different model GaitUniMiamiTD.main
I got the model to run using my marker data - however I did not chnage the forceplates from type 3 to type 2 as is in my C3D file. I have tried changing many things so that the type 2 force plate will work. However no luck so could you explain to me what I am doing wrong. I am gettin the following error:
[SIZE=1]ERROR(SCR.PRS9)[/SIZE] : [SIZE=1]D:/M…s/A…s/A…1/A…1/A…n/E…s/G…D/EnvironmentAutoDetection.any[/SIZE] : Defined At : [SIZE=1]D:/M…s/A…s/A…1/A…1/Body/A…n/T…x/M…p/ForcePlateType2AutoDetection.any[/SIZE] : ‘PointsScaleFactor’ : Unresolved object
My file is attached
Hi,
I tried to debug your model based on GaitLowerExtremity in AMMR V1.4.
Attached please find the modified model.
Please spend your enough time to understand this model.
After you finish the ‘MotionAndParameterOptimizationModel’ process,
then you can run ‘InverseDynamicModel’ process.
There are some changes in ‘TrialSpecificData.any’ file.
Please look carefully.
And please find the location where ‘ExtraDrivers.any’ file exists.
Also there are some changes in the main file.
Some values such as ‘tStart’, ‘tEnd’ and ‘nStep’ values are applied into the main file. Please try to find them.
After trying to understand this model, then you are welcome to ask us more questions.
Good luck!
Best regards,
Moonki
Thank you Moonki!
Could you explain to me the following:
InitialConditions.SolverType = KinSolOverDeterminate;
Kinematics.SolverType = KinSolOverDeterminate;
Kinematics.PosAnalysisOnlyOnOff=On;
InitialConditions.MaxIteration = 5000;
Kinematics.MaxIteration = 5000;
In the main file. Why have we chosen to use 5000?
Also I am having a muscle recruitment error during the inverse dynamics [SIZE=1]
Muscle recruitment solver : solver aborted due to singular KKT matrix
I have had this problem before but have never solved it. I realise it can be quite hard to find the problem in the code, what would be the best way to locate it?, but other than that thank you for you help!
[/SIZE]
Hi,
These ‘MaxIteration’ values is to set how many times AnyBody Solver can try to find the kinematic solution under certain constraints.
And, I tried to test run the inverse dynamics of the modified model(by me) in AMS V5.1 AND V5.2. It works well without any error.
Which version of AnyBody are you using?
When you run inverse dynamics, you should change some code in the main file like this:
/
/Set this to 1 if you want to run the motion and Parameter Optimization identification
//**************************************************
#define MotionAndParameterOptimizationModel 0
//Set this to 1 if you want to run the inverse dynamic analysis
[b]#define InverseDynamicModel 1[/b]
//Usually only have one of the two switches active so set the inactive analysis to 0
//**************************************************
I hope this may help you.
Best regards,
Moonki
Hi Moonki
I have tried and still get the same result. I am using version 5.2. I couldn’t load up your model onto AnyBody so I made all the changes you suggested into my existing model. I have checked everything and it looks the exact same and everything runs fine apart from the inverse dynamics. I have attached my file but it should be exactly the same as yours. Thank you for your kind help.
Ammar
Hi,
- First, you should run MotionAndPameterOptimizationModel first like this:
//Set this to 1 if you want to run the motion and Parameter Optimization identification
//**************************************************
#define MotionAndParameterOptimizationModel 1
//Set this to 1 if you want to run the inverse dynamic analysis
#define InverseDynamicModel 0
//Usually only have one of the two switches active so set the inactive analysis to 0
//**************************************************
Then you can see that there are several files created in your model folder.
Trial03-OptimizedParameters.txt
Trial03-output-euler-trunk.txt
Trial03-output-euler-rightlegtd.txt
Trial03-output-euler-leftlegtd.txt
Without these files, you can’t run inverse dynamics.
Best regards,
Moonki
Hi Moonki,
Thanks for your quick reply. I have been doing what you suggested and still an error:
[SIZE=1]ERROR(OBJ.MCH.MUS4)[/SIZE] : [SIZE=1]D:/M…s/A…s/A…1/A…1/A…n/E…s/G…y/GaitLowerExtremity.main.any[/SIZE] : [SIZE=1]KinematicStudyForParameterIdentification.InverseDynamics[/SIZE] : Muscle recruitment solver : solver aborted due to singular KKT matrix
I have got them files you listed before in my folder but the inverse dynamics just does not work.
Hi,
As you can see the attached capture file,
just click ‘RunMotionAndParameterOptimizationSequence’ and run!
In inverse dynamics model,
just click ‘InverseDynamicAnalysisSequence’ and run!
Best regards,
Moonki
Hi Moonki
Thank you for your help, my AnyBody kept on crashing whenever I did what you said but I have now got it to work after reinstalling! I just had a quick question regarding markers:
In a C3D file that I have, there are 64 markers whose names do not match those in the modelsetup file. Am I meant to add all the new markers, or am I meant to change the names of some of the markers in the modelsetup file to match the C3D file? If I have to change the names, how am I meant to tell which markers correspond to each other.
Thanks