I am trying to adapt the full body mocap to fit my c3d file and I have some problem doing so.
I made sure that my C3D files have the same marker name has the Markers.any.
1- I changed the name of the file (in TrialSpecificData.any) for my own file.
2- I commented out the include for the ForcePlates (in Environment.any) since I do not have any force plate data in my C3D file.
3- I compiled and got the following error: ModelSetup.any(13) : C3DFileData.Filter.W : The normalized cutoff frequency must be between 0.0 and 1.0
4- I removed the filter (Filter and the analogue filter) from the C3DSettings.any and changed the AnalogFilterIndex from 1 to 0.
5- I compiled again, and got this error: ModelSetup.any(13) : C3DFileData.Filter : The default filter cutoff frequency is too high for the sample frequency in the C3D file. Please change it using Fc
From there I am a bit lost and I am not sure how to modify the scripts anymore.
Am I in the right track with my modifications or should I be doing something else to test my file?
It is good to follow the namings in standard marker protocols. But in general, you shouldnāt have to change your data to make it work with AnyBody. You can change anything you need in the model. So just adapt it to your need.
I took a look at your data file, and it looks really weird. The file has over 2500 frames, and a frame-rate of only 1 Hz. Only a few markers have movement. But they only move around 0.3 mmā¦ What software did you use to create this file?
You can make it work, of course. So here what you need to change i c3dsettings.any:
Set the following to disable filter for analog data:
AnalogFilterIndex =-1;
Change the cut-off frequency to match your low framerate:
Filter = {
N = 2;
Fc = {0.1};
Type = LowPass;
};
Set the point scale factor to make it work with your wrong units in the file:
PointsScaleFactor = 1;
There is still more work to make it work. You probably need to rotate the model to get a better starting guess for the kinematic solver. But I am sure that you can do it.
I am writing a converter myself. This explains some of the properties like the frame-rate.
As for the data, The mannequin is suppose to be straight with one arm moving.
After applying your suggestions, I had the following error:
ERROR(OBJ1) : C:/Uā¦s/aroy/Aā¦a/Rā¦g/Aā¦y/Aā¦x/Aā¦o/Aā¦n/Eā¦s/Mā¦l/Mā¦l/JointsAndDriversOptimized.any(12) : JntDriverTrunk : Time, ātā, has an invalid value for this interpolation
So I commented out the all the drivers in JointsAndDriversOptimized.any. Is this a good approch?
I turned the position of the markers to fit the mannequin (see attachment). Now I have some constraint errors.
Are those related to the data I am using?
I noticed there are some blue and red sphere with a line between them. Are those supposed to be on the same spot?
I see what you mean. However, your maker positions do not correspond to the default marker locations in the model. If you are doing something custom, you also need to customize the marker positions in the model.
Let me give you an example. The distance from your Head markers in your dataset to the pelvis markers are around 1.55 meters while the distance from the right ankle marker to the pelvis markers is around 32 cm. A tall guy with short legs
There is no way the basic model is going to fit into that setup. You may be able to make something work with your marker setup, but you need to change the marker positions in the model.
Blue spheres in the model are the c3d markers, and the red spheres are the model markers. The line between them represents the error that is what the kinematic solver will try to minimize.
What is the purpose of importing this data into anybody? Maybe then I can better advise youā¦
Sorry for the delay.
The data is only test movement that I am using to implement my converter.
I was able to minimize the error from the marker position. After applying the optimization, most of the spheres are aligned.
If I am correct, the last step of the optimization is the animation using the whole file. For some frames the animation looks fine but at some point it āstopsā applying the data.
The shoulder is supposed to do an extension and then comes back.
Only the first extension is ādoneā and then the arm holds the position until the end.
Since there is no error in the console, I am not sure how to resolve this.
Is there a way to output the marker position for a specific frame into the console?
I have tried to look at the model but it seems to contain only the c3d file, please provide a complete model to be able to test.
Some comments:
[ul]
[li]there should be no difference between console and the AMS version
[/li][li]The last sequence of the analysis is to run the a complete analysis using all frames of the trial, in the optimization the data is down sampled.
[/li][li] You write that the shoulder do one extenstion and then it stops moving, do you see the recorded markers moving ? and the body not following ?
[/li][li] Did you alter the kinematic tolerance? by making it too largeā¦ this could explain behavior.
[/li][li] You can make an AnyOutputFile to save markers positions in a file
[/li][/ul]
I am using the AMS version, I refered to the textbox at the bottom (that output messages to the user) as the āconsoleā.
For the movement, the shoulder was doing an extension and then it stops moving even if the data from the C3D was doing a pendulum like movement.
After some testing, I noticed that doing a movement slower fixes the problem.
I have attached the complete mocap folder containing two files to show you this.
The first one, left_leg.c3d, contains the data to make a 90 degrees flexion of the left leg in about 10 seconds.
The second one, left_leg_fast.c3d, does the same thing but in 3 seconds.
When you play the first file, the movement looks fine.
But with the second file, the leg āstopsā at about 1/3 of the movement.
Doing the movement slower fixed the problem but I would like to understand why since doing the movement slower might not always be possible.
We have taken a look at the model and found the problem.
The problem relates to the cutoff frequency used for the maker data you have used a cutoff frequency of 0.1 by changing this to 5 it solves the problem, this is done in the file C3DSettings.any
If you looked at the raw data of the maker in ModelTree at Main.ModelSetup.C3DFileData.Points.Markers.LTOE.Pos and compared this with
Main.ModelSetup.C3DFileData.Points.Markers.LTOE.PosInterpol then you can see a very differenceā¦ caused by the low cutoff frequency you applied.