Contact force direction

Hi,

I have a question about the definition of the contact force direction. Attached is a part of the pipetting model. The model can run by loading “Main.any”. This is a small independent model. I run it on v3.1, it also works on v5.1.

The thumb is pressed on the pipette button. The contact force should be normal to the Center-of-Pressure of the button; however, it seems always in the direction the global system. I have tried to change “F” to “Flocal” in Force3D, but had no effects.

John

Hi,

I have a quick look on your code.

In ‘contact_force.any’ file in your model, I added a line like this:

AnyDrawVector DrawSupport1 = {
  AnyRefFrame &ref = .CenterOfPressure1;
  Vec = 0.002*.ForceOnPressureCenter.F;
  PointAway = On;
  DrawCoord = Off;
  Line.RGB = {0,0,1};
  Line.Thickness =0.001;
  Line.End.Thickness = 2*0.0075;
  Line.End.Length = 2*0.0075;
  [b]GlobalCoord = Off;[/b]
};

Then you can see the different result of force visualization.

Best regards,
Moonki

Moonki:

Thanks! The contact force is now shown in correct direction by adding “GlobalCoord = Off”.

I have here a further question for the same model. I have changed “F” to “Flocal” in AnyForce3D, but don’t see any difference. I don’t know if this has a physical effect on the model.

John

Hi John,

The number of active reaction and driver forces of your model is less than the number of degrees of freedom. So the inverse dynamics can’t do solve your model.

When I looked your model, you may have to modify ‘thumb_drivers.any’ file to increase the number of active reaction and driver forces.

This can be one solution:

AnyFolder Drivers = {    
  //---------------------------------
//  AnyKinEqSimpleDriver CMCMotion = {
    AnyKinEqInterPolDriver CMCMotion = {     
    AnySphericalJoint &Jnts = Main.ThumbModel.Jnts.CMC;
    
    AnyVar AD0 = (-10/180)*pi;
    AnyVar FE0 = (-20/180)*pi;
    AnyVar PS0 = (160/180)*pi;

    Data={PS0-Main.jnt_data_T.Data[2]*pi/180,AD0+Main.jnt_data_T.Data[0]*pi/180,FE0+Main.jnt_data_T.Data[1]*pi/180};
    T=Main.jnt_data_T.T;
    Type = Bspline;
    BsplineOrder = 4;

    //Reaction.Type = {Off,Off,Off};
    Reaction.Type = {On,On,On};
//    
    
  }; //CMC driver

Then you may be able to see the change according to your choice:

AnyForce3D ForceOnPressureCenter ={
  AnySeg &ref1=.CenterOfPressure1;
  AnyVar Friction = 0.0;
  AnyVector fn = -Main.force_data_T(t);
  AnyVector ft = fn*Friction;
  //F={ft[1], ft[1], fn[1]};
  Flocal = {ft[1], ft[1], fn[1]};
};

I hope this may helpful to you.

Best regards,
Moonki

Moonki:

Thanks a lot! Now, my model does what is supposed to do.

John