Hello,
I'm new to MoCap Models, and I have some basic questions about using these models.
I'm using the Plug-in-gait_Simple model. Currently, I want to analyze one frame of the C3D file statically. Moreover, the C3D file contains a reaching task from a neutral posture while both feet are on the ground during the task and then returning to the initial posture. However, I only want to analyze a single frame when the subject is in the desired position.
Here are my questions:
Is it enough for the optimization process in the ParameterIdentification study to be run only on a single frame? Or Am I supposed to run the ParameterIdentification study on all the frames and run the InverseDynamics study on the desired frame?
It seems that there is a bias between frame numbers in the C3D file and the AnyBody. First, am I right? If so, how can I choose the start and end frame in AnyBody to analyze (for example) the 500th frame of the C3D file?
I have run the ParameterIdentification and InverseDynamics for a task. Everything went fine without errors, and the body posture in most of the parts was acceptable too. However, there was a problem with the ankles, and they were not normal. Some pictures are attached to illustrate this problem. How can I fix this issue?
Generally, if I find a problem in some parts of the model like the one mentioned above, by what logic should I change the place of the markers in the MarkerProtocol file?
How can I be sure that my model is run well and body posture is as it supposed to be after ParameterIdentification? Is it all by visual checking?
Thank you.
It is enough to runthe ParameterIdentification on one frame, but there are other aspects of the motion capture model that makes it less ideal to only have one frame. For instance the marker filter requires a few frames in each end of the signal to start and stop and you can see this as distortions in the signal at both ends. Your c3d file is also a dynamic motion so you need to try and eliminate the dynamic effects when only looking at one frame. You could export the joint angles to a .anyset file and use those in a static model afterwards. This is actually what happens between the marker tracking and Inverse study so that can give you some inspiration.
You can decide how many frames to use in the simulations by specifying the FirstFrame and LastFrame variables in the TrialSpecificData.any file.
Depending on your experimental setup you can alter the marker protocol and their locations in the MarkerProtocol.any file. You can also choose in which directions they are to be optimized using the OptX=OFF, OptY=OFF, OptZ=ON, arguments.
If your experiment used different landmarks for the markers or excluded/included certain markers, then you should change the MarkerProtocol.any to match that.
After the parameteridentification and marker tracking you can inspect the results of the optimizations in the output. You can inspect both the objective function value, kinematic error of each marker and much more. The same goes for the posture. The model output includes all joint angles for you to inspect.
Here are some additional links to helpfull resources:
Hi Bjørn,
Thank you so much for your reply. I appreciate the time you devoted to answering my general questions. If you don't mind, I'm going to go a little deeper into those questions.
I'm working on the C3D files recorded by VICON cameras with a sampling rate of 120 Hz, I think. How many frames do you recommend me to include before and after my desired frame? As I'm going to model more than 200 tasks, the run time is crucial for me.
I've heard from someone that if you choose the 100th frame as the first frame in TrialSpecificData.any, it is not going to be the 100th frame of your C3D file. I mean, that person said there is a bias between these numbers. Is it correct or not?
My biggest problem is the logic behind choosing which direction of which markers to be optimized when there is a problem like the one that I mentioned. Would you please take a look at my files and help me get rid of this problem in the ankles? I will attach them here.
Link: Training.zip - Google Drive
I'm using Plug-in-gait marker placement, and the number of markers and their placement is as it should be. I explained my problem in question number 3.
Is there any standard threshold kinematic error of markers? Or can you suggest a reasonable number to help me understand the acceptable order of this error?
You only need an extra few frames. I normally include 15-20 extra frames to be on the safe side. When you need to run hundreds of models, have a look at our python library for the AMS. This allows you to run multiple simulations in parallel.
I'm not familliar with this problem. You can specify what frame indices to use in your c3d file or you can specify what tStart and tEnd to use frames for. In the TrialSpecificData.any file you can specify the FirstFrame and LastFrame parameters. These are frame indices and not frame number. so FirstFrame = 100; will select the frame with index 100 not the 100th frame. The indices are inside the c3d file.
This task is tedious yes, but it is up to you to make the decisions. It depends on the experimental setup, motion performed, and marker protocol. If your protocol follows our default entirely, then you might not need to change any directions.
see 3.
You probably need to check similar scientific literature values. It depends on the motion performed and any uncertainties in the marker data.
I had a quick look at you model, so here are some comments.
Please always specify which file to run when sending models
To fix the ankles try and see if you have accounted for any footwear in the experiment or used another definition for the marker landmarks. The ankle inversion/eversion angle is quite difficult to get right. Another solution might be to remove one of the markers and use the default mannequin drivers for that joint angle. You can find the switch in the ExtraDrivers.any file.
When you have a marker in your c3d file with another name than what it is in the markerprotocol.any. The best approach is to map the name from the file to that of the protocol. You changed the LMRA to LMRM but only for the define statement. The marker is not there since it has no CreateMarkerClass. What you want to do is to look in the C3dSettings.any file and use the C3dFileData.SearchAndReplace here you can map the names like so:
Hi Bjørn,
I'm sorry to bother you with lots of questions, and I hope you forgive me.
As I said before, in all of my simulations, the individual is in the standing posture at first, then reaches his hands to a specific point. Finally, he returns to the upright posture. Here are my questions:
I want to know whether it's appropriate to run the ParameterIdentification on the first 100 frames that he's in the upright posture and then run the Analysis on 50 frames around the desired point that I want to analyze statically.
Can I use outputs of the RunParameterIdentification study of a specific task for other tasks of that subject? In other words, When I know that the markers haven't dropped down and are in the same position on the body as the previous task, is it scientific and precise to use previous parameters for the new study?
Generally, what kind of parameters are optimized and found during the RunParameterIdentification study?
You are very welcome to ask as much as you need, I'm sure the posts will benefit others in the future.
1 & 2. It is common to have a trial used for parameter identification. Have a look at our ammr\Application\MocapExamples\Plug-in-gait_MultiTrial_StandingRef model. It uses a standing reference trial for each subject. It is enough to run the parameter identification on a single frame if it is a static pose. If you structure you model like the multitrial example you can use the LoadParametersFrom function in the TrialSpecificData.any file. It probably requires you to split your c3d files, but can lower the number of frames needed to be analyzed, and once the parameter identification is done you dont need to run it each time you want to simulate the actual task.
In the Main.ModelSetup.ParameterIdentification folder you can see which variables are part of the parameter identification study. The individual variables are controlled in the LabSpecificData.any and the MarkerProtocol.any files.