force platform problem in GaitFullBody model

Hi AnyBody support,

I have a Softball model, using full body markers to drive it,
and also use the force platform.
So I consult the model in repository “GaitFullBody” like this

I had already drove the model with markers,
but now I want to put the force platform in and have some problems

  1. I had put the right C3DFileData in ModelSetup
  2. Do I need to change the Limb1、Limb2
  3. Do I need to change the force platform’s number
  4. How can I set the shape of my force platform

And the other side, like this picture(the code is in the “GaitFullBody” in the example)

it has “CAL_MATRIX” in the FORCE_PLATFORM

But my model(c3d file) doesn’t have “CAL-MATRIX” like the picture

Can you tell me how can I drive the force platform?
Thanks first, :slight_smile:
Best regards,
Yeh

Hi Yeh,

  1. First, you have to check the correct force plate type of your C3D file.

  2. If you use the correct type of the force plate class template, then you don’t need to change ‘Limb1’ and ‘Limb2’

  3. The ‘No’ property depends how many force plates are there in your C3D file.

  4. If you want to modify the force plate shape then you have to modify your force plate class template by yourself.

  5. If you have some problem because of this ‘CAL-MATRIX’, then I guess that your force plate type is not 4.

If you can’t solve your problem,
then I would suggest you to upload your model here.

Best regards,
Moonki

Hi AnyBody support,

The Attached Files is my model and c3d file,
in “Softball_ChaoFP”, I had already done MotionOptimization.
The picture is the environment of the experiment, there’s only one force plateform

In “model setup”, I had comment out something for filter.
In “EnvironmentAutoDetection”, I comment out the three force plateform.
Because I can’t find “CAL_MATRIX”, so I don’t know if I can still use ForcePlateType4AutoDetection to put in the force plateform.

Thanks again,
Best regards,
Yeh

Hi Yeh,

you are using a force platform of type 2:

There is no CAL_Matrix there in this case.

This code might work for your EnvironmentDetection:
ForcePlateType2AutoDetection Plate1 (
PlateName = Plate1,
Folder =Main.ModelSetup.C3DFileData,
Limb1= .BodyModelRef.Right.Leg.Seg.Foot,
Limb2= .BodyModelRef.Left.Leg.Seg.Foot,
No=0,
VerticalDirection =“Z”,
HeightTolerance=0.07,
VelThreshold=2.2,
Fx=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fx1,
Fy=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fy1,
Fz=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fz1,
Mx=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Mx1,
My=Main.ModelSetup.C3DFileData.Analog.DataFiltered.My1,
Mz=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Mz1,
FootPresent=HumanModelPresent)={};

Best regards

Patrick

Hi Yeh,

Patrick’s comment is right.

Attached please find a modified version of your model which is ready for inverse dynamics.

Best regards,
Moonki

P.S) From the next time, please let us know the version of your AMS and AMMR.

Hi Patrick,

Thanks for helping, but after I modify the type to 2, it still doesn’t work.
The error is like the following code :
ERROR(SCR.PRS11) : C:/U…s/i…o/D…x/A…3/A…n/M…l/S…P/EnvironmentAutoDetection.any : ‘(’ unexpected

Hi Moonki,

Thanks for helping, the force plate form in the model still have the problems.
By the way, sorry that I forgot to write the version of my AMS and AMMR.
My version is AMS 5.0.0, AMMRV1.3

Best regards,
Yeh

Hi Yeh,

Force plate shape is always a scaled box.
The related AnyScript code is defined in the ‘ForcePlateType2AutoDetection.any’ file.

Attached please find the snapshot of your model.

And could you let us know what the problem of your force plate shape is?

Best regards,
Moonki

The force plateform in our laboratory is “Kistler”,
and the shape is 90*60 CM.
Because I couldn’t load it yet, so I can not take the snapshot of my model.

Thanks for helping
Best regards,
Yeh

Could you copy and paste the error message here?

Hi Moonki,

Sure, the message is like the following.

Thank you.
Best regards,
Yeh

You should delete the following line

FootPresent=HumanModelPresent

By the way, in the modified model that I uploaded, I changed this part.

So it is strange to see why this line still exists in your code.

Did you download my modified model correctly?

Best regards,
Moonki

Hi Moonki,

Oh my god, I’m really sorry that I had download your modified model correctly,
but I had open the wrong model after I download it :frowning:
By the way, it’s really happy and appreciate for the help, and really sorry for
putting the correctly model there several days.

I had just load the model, then I have a question now that why there’s two
vector in the same time like the picture.

Or it’s because I can not have two legs on the force platform in the same time?

Best regards,
Yeh

Hi Yeh,

One vector is acting on the center of force plate, which just shows the amount of force from the force plate.

The other vector is acting on the COP(Center of Pressure).

So there is no problem. They are just for visualization.

Best regards,
Moonki

Hi Moonki,

Thanks for the detailed explaining.
I’ll observe my model clearly tomorrow, and I’ll trouble you if there’s
other problems.
Thanks for the help today :slight_smile:

Best regards,
Yeh

Hi, Moonki

Thanks for the help last week, the force plate is appear now.
But the unit of my force plate data is Newton, not like the exmaple’s
unit is kilogram.
So in the model view, the vector of my model is that big just like the pictures.

I know that just a visualization. But if I can make the vector smaller, visually will be more better to see.
This attached file name is “Softball_ChaoForcePlate”.

The next question is now I want to use a conditional contact.
Morten had taught me when I was in Aalborg University four months before.
But now I use the same code but there’s some error.

The attached file name is “Softball_ChaoConditional Contact”.
I had made some node in “PedalContactNode”.
And I write the conditional contact at “JointsAndDriversOptimized”.

My version is AMS 5.0.0, AMMRV1.3
Thank you
Best regards,
Yeh

Hi,

  1. Let’s see a piece of code in ‘ForcePlateType2AutoDetection.any’ file.
AnyFolder CenterOfPressure =
{    
      AnyDrawLine Line = 
      {
         p0 = -{.vector.Vx,.vector.Vy,.vector.Vz};
         p1 = p0+[b]0.01[/b]*{..Force.Flocal[0],..Force.Flocal[1],..Force.Flocal[2]};
      
         AnyRefFrame &ref = ..ForcePlate;
           
         Line.RGB ={0,0,1};
         Line.Thickness = 0.01;
         Line.End.Thickness = 2*0.01;
         Line.End.Length = 4*0.01;
         GlobalCoord=Off;
    };
    ...
}

Here, if you change the coefficient(0.01), then you can make the length of the vector shorter.

  1. If you want to use ‘ConditionalContactClass’ class template, then you should include this file in your main file:
    #include “…/…/…/Body/AAUHuman/ToolBox/FrictionContactMuscles/ConditionalContactClass.any”

I hope this may help you.

Best regards,
Moonki

Hi, Moonki

It helps me a lot,
thank you very much. :slight_smile:

Best regards,
Yeh

Hi, Moonki

Now, I have a conditional contact.
But I don’t know which one is the value of the force between foot and conditional contact in the ChartFX 2D.

Can you tell me?

Thank you,
Yeh

Hi Yeh,
For instance, in ‘FootBall1MidSupport’ element, you can refer to these two values.

Normal force: Main.Studies.InverseDynamicStudy.ModelEnvironmentConnection.ConditionalContact.FootBall1MidSupport.Push.NormalForceScalar

Friction force:Main.Studies.InverseDynamicStudy.ModelEnvironmentConnection.ConditionalContact.FootBall1MidSupport.Push.FrictionForceScalar

Best regards,
Moonki

When I had an issue with the CAL_MATRIX, it was an issue of calculating the force data in the motion capture software before exporting as .c3d