lower body c3d file into GaitLowerExtremity

Hi,

Currently, I have the c3d file about gait. These files only have markers on the lowerbody (legs, pelvis and foot). I want to use these c3d files in AnyBody.

In AnyBody, I guess the most similiar situation is GaitLowerExtremity. But GaitLowerExtremity.any has the head and thorax (Segments Thorax). So I guess it requires the markers attached to the upper body to drive these segments. Unfortunately, my c3d files do not have these markers.

I tried to exclude the upper body segments by commenting out “#include SegmentsThorax.any” in …\AAUHuman\TrunkNoMuscles.root.any, and then commenting out the upper body marker definitions in ModelSetup.any. However, it is not working. I always got error messages when uploading the model.

Also, I tried to simply comment out the upper body markers in ModelSetup.any. In this way, I can upload the model but cannot run RunMotionAndParameterOptimization… I think this is caused by the unconstrained upper body segments which do not have markers to dirve.

Is there any way I can use my c3d file to run a gait analysis? Is GaitLowerExtremity.any a good way to try or some other examples are better in running my model?

Any help will be appreciated. Thanks in advance.

Regards,
Jerry

Hi Jerry

You can’t simply exclude the trunk part from the model as some hip flexors have insertions points on the lower spine.

However, it is possible to use the model without having markers on the thorax, if you let the thorax follow the motion of the pelvis instead. You do so by binding the three degree of freedom between the pelvis and thorax.

In the GaitLowerExtremity model, this can for example be accomplished by adding a driver setting the three degrees of freedom to zero. Try adding the following to ‘Drivers’ folder (around line 190):

AnyKinEqSimpleDriver ExtraThoraxDriver = {
AnyKinMeasure &ref1 = …HumanModel.BodyModel.Interface.Trunk.PelvisThoraxExtension;
AnyKinMeasure &ref2 = …HumanModel.BodyModel.Interface.Trunk.PelvisThoraxLateralBending;
AnyKinMeasure &ref3 = …HumanModel.BodyModel.Interface.Trunk.PelvisThoraxRotation;
DriverPos = {0,0,0}*pi/180;
DriverVel = {0,0,0};
};

Hope it works.
/Morten Lund

Hi,

Thanks for your kind reply.

I did insert the script above but the same error message still appears when I run the optimization.
If I remove the two markers on the front or the back of the skull, I can run the optimization but the skull is not positioned in the right place. If I remove both the front and the back markers from the skull, the model cannot run optimization. I think the reason is the same, i.e. the skull is not constrained.

Do I need to freeze the rotation of the neck joint and the other joints of the trunk? Appearantly, only binding the thorax and the pelvis is not enough to make the trunk fully constrained.

I tried to find the drivers of the neck joint and the other joints of the trunk but have no idea of where they are located.

Another question: if I bind the trunk and the pelvis, how is the mass allocated for the model? If the mass of the upper body is distributed evenly along the trunk rather than right on the pelvis, would it be possible that abnormal results will appear because of the swing of the trunk caused by the swing of pelvis?

Any help will be appreciated.

Cheers,
Jerry

Hi Jerry

I forgot about the head. You are right. You also need to put a driver on this degree of freedom.

AnyKinEqSimpleDriver ExtraNeckDriver = {
AnyKinMeasure &ref1 = …HumanModel.BodyModel.Interface.Trunk.NeckJoint;
DriverPos = {0}*pi/180;
DriverVel = {0};
};

Regarding you other question. The mass distribution, and any forces generated by the upper body will not be a problem, since the model is an Inverse dynamic model, and you measure the ground reaction forces. The fact that the arms are missing and the trunk does not move realistically will of cause mean that the forces do not add up at the pelvis, but any residual force is carried by the pelvis driver (it has reaction forces turned ‘On’). This often refereed to as ‘the hand of god’.

If the upper body had been modeled correct. That is right mass properties and motions, then the residual force at the pelvis would be very small. But since you are only interested in the lower extremities, it is not a problem for you.

Hope you get it working.
/Morten

Hi,

Thanks for your kind reply.
Now, the model can “move” without the markers on the upper body.

Is there a way to see the c3d file type (force platform) in AnyBody? Because if so, it will be very convenient for me to load different c3d (from different labs) without the need to decide which system which lab uses. I tried to load my c3d file in LowerBodyExtremity but I still cannot load the model because of different messages.

From former threads, I know that the c3d force platform type can be seen from Main.ModelSetup.C3DFileData.Groups.FORCE_PLATFORM. TYPE.Data. I think if I can load my model, I can see this information form the model class, and then use my c3d file in AnyBody. Can I load the model even if I do not know the type of my c3d file? If it is possible, what should I do?

Another question: how can I determine which type of force plate of the c3d file from Main.ModelSetup.C3DFileData.Groups.FORCE_PLATFORM? As for the c3d file from AnyBody, the corresponding information is Data={4,4,4}; Value type: AnyInt[3]; Symbolic: const=NoExpression. What is the difference of this information for different force platform types?

Thanks in advance.

Regards,
Jerry

Hi Jerry

It is good that it works now.

I am not sure I can answer your other questions. Maybe it is a job for the supporters at AnyBody.

However, I do have some suggestions. Maybe you could take a look at the C3DProject example model in the newest model repository (AMMRV1.4.1).

I haven’t used it myself, but it may be useful to you in this case. It splits up the model into several sub-models, each one bringing you one step closer to a full working model. Thus, the first task (sub-model) will load the c3d file by it self. Thus, this will always work, no matter what type of c3d file you use. That will allow you to look in folder at see what type of force plate and what markers are included.

An other trick which I often use, when I have different types of C3D files, is to create a ‘TrialSpcificData.any’ file for each of my c3d files. I usually name them: ‘TrialSpecificData_<name of c3d file>.any’.

Thus, when I want to load an other c3d file I just include that specific file. The nice thing about this approach is that you can put all kind of define statements inside the TrialSpecifcData file. Thus if you have different lab setups you could define the following in the TrialSpecificData file:
#define LAB_SETUP “Lab1”

In the Environment.any you could then do the following:

#if LAB_SETUP == “Lab1”
[ Create force plates for lab 1]
#endif

#if LAB_SETUP == “Lab2”
[ Create force plates for lab 2]
#endif

I hope this gives you some ideas. Else, to get hold of some of the AnyBodyTech supporters.

Thanks,
Morten