right arm motion with some MOCAP files

hello!
I’m trying to load a model using imported data linked to a ‘AnyKinEqInterPolDriver’. At the time of loading, it appears a message like this:

ERROR(OBJ3) : C:/U…s/c…o/D…p/r…o/A…Y/R…2/ARep/R…R/p…1/prototpi1.any : ‘WristLin’ : Member expectations are not satisfied :
Members of class ‘AnyRefFrame’ or derived are expected in ‘AnyKinLinear’ : 0 found, 1…2 expected.

but if I check the script I’ve made:

AnyKinMeasure &Lin = .WristLin;
Reaction.Type = {Off, Off, Off};
};
AnyKinLinear HandLin = {
//Ref = -1;
AnyRefFrame &HandOrigin = ..Segs.Hand.HandNode;
};

AnyKinMeasure has a defined AnyRefFrame. I don’t understand what is going wrong. Can anyone help me? thanks a lot!

Hi Roger

The error says that the you have created an AnyKinLinear with no references frames inside, this is not allowed it extect to have a least one and maximum two reference frames

In think the script you have listed is not where you have the error, in the listed script you refer to the WristLin object but it is not where it is constructed. If you double click the blue link in the error message you should arrive at the location of the error.

When doing so i think you will see that the WristLin object does not contain any reference frames.

Please write again if you have further problems.

Best regards
Søren

Hi, soren.
I’ve been doing some changes on the scripts of my simulation but it still doesn’t works. You pointed me on your last e-mail that the object was not defined, but the reference is defined, or at least I think that it is. I send you the script for you to hepl me finding errors.
Please, excuse my insistence and my ignorance, but I’m just beginning with it. thanks a lot!

script:

// Todo: Write a small description of your model here

Main = {

//----------------------------------------------------------------------MyModel
//----------------------------------------------------------------------
AnyFolder ArmModel = {

//--------------------------------------------------------------Global Reference Frame
AnyFixedRefFrame GlobalRef = {

  AnyDrawRefFrame DrwGlobalRef = {
    ScaleXYZ = {1,1,1}/10;
  };
  AnyRefNode Shoulder = { 
    sRel = {0,0,0}; 
  };
  AnyRefNode DeltodeusA = { 
    sRel = {0.05,0,0}; 
  };
  AnyRefNode DeltodeusB = { 
    sRel = {-0.05,0,0}; 
  };
  AnyRefNode BicepsLong = { 
    sRel = {0.1,0,0}; 
  };
  AnyRefNode TricepsLong = { 
    sRel = {-0.1,0,0}; 
  };

};  // Global reference frame

//---------------------------------------------------------------Segments
AnyFolder Segs = {
//-------------------------------------upperarm
AnySeg UpperArm = {
r0 = {0,-0.15,0};
Axes0 = {{0,1,0},{-1,0,0},{0,0,1}};
Mass = 2.0;
Jii = {0.005,0.01,0.01};
AnyDrawSeg DrwSeg = {};

    AnyRefNode ShoulderNode = {
      sRel = {-0.2,0,0}; 
    };
    AnyRefNode ElbowNode = {
      sRel = {0.2,0,0}; 
    };
    AnyRefNode DeltodeusA = { 
      sRel = {-0.1,0,0.02}; 
    };
    AnyRefNode DeltodeusB = { 
      sRel = {-0.1,0,-0.02}; 
    };
    AnyRefNode Brachialis = { 
      sRel = {0.1,0,0.01}; 
    };
    AnyRefNode BicepsShort = { 
      sRel = {-0.1,0,0.03}; 
    };
    AnyRefNode Brachioradialis = { 
      sRel = {0.05,0,0.02}; 
    };
    AnyRefNode TricepsShort = { 
      sRel = {-0.1,0,-0.01}; 
    };
  }; // UpperArm
  //-------------------------------------lowerarm
  AnySeg LowerArm = {
    r0 = {0.25,-0.3,0};
    Mass = 2.0;
    Jii = {0.005,0.01,0.01};
   
    AnyRefNode ElbowNode = {
      sRel = {-0.2,0,0};
    };
    AnyRefNode HandNode = {
      sRel = {0.2,0,0};
    };
    AnyRefNode Brachialis = { 
      sRel = {-0.1,0,0.02}; 
    };
    AnyRefNode Brachioradialis = { 
      sRel = {0.0,0,0.02}; 
    };
    AnyRefNode Biceps = { 
      sRel = {-0.15,0,0.01}; 
    };
    AnyRefNode Triceps = { 
      sRel = {-0.25,0,-0.05}; 
    };

     AnyDrawSeg DrwSeg = {};

  }; // LowerArm
  //--------------------------------------hand
  AnySeg Hand = {
    //r0 = {0, 0, 0};
    //rDot0 = {0, 0, 0};
    //Axes0 = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
    //omega0 = {0, 0, 0};
    Mass = 1;
    Jii = {0.005,0.01,0.01};
    //Jij = {0, 0, 0};
    //sCoM = {0, 0, 0};
    //JaboutCoMOnOff = Off;
     
   AnyRefNode HandNode = { 
      sRel = {0.2, 0, 0}; 
    };
 AnyDrawSeg DrwSeg = {};
  }; //Hand

};  // Segs folder

//----------------------------------------------------------------Joints
AnyFolder Jnts = {

AnySphericalJoint Shoulder = {

AnyRefFrame &GroundNode = …GlobalRef.Shoulder;
AnyRefFrame &UpperArmNode = …Segs.UpperArm.ShoulderNode;
}; //shoulder joint

AnySphericalJoint Elbow = {
AnyRefFrame &UpperArmNode = …Segs.UpperArm.ElbowNode;
AnyRefFrame &LowerArmNode = …Segs.LowerArm.ElbowNode;
};//elbow joint

AnySphericalJoint Wrist = {
AnyRefFrame &LowerArmNode = …Segs.LowerArm.HandNode;
AnyRefFrame &HandNode = …Segs.Hand.HandNode;
};//wrist joint

}; // Jnts folder

//---------------------------------------------------------------drivers

AnyFolder Drivers = {

AnyKinLinear ElbowLin = {
//Ref = -1;
AnyRefFrame &ElbowOrigin = ..Segs.UpperArm.ElbowNode;
};

AnyKinEqInterPolDriver RightElbowDriver = {
//MeasureOrganizer = ;
Type = Bspline;
BsplineOrder = 4;
//T = ;
//Data = ;
FileName = "right elbow front.txt";
AnyKinMeasure &Lin = .ElbowLin;
Reaction.Type = {Off, Off, Off};
};
 

AnyKinLinear WristLin = {
//Ref = -1;
AnyRefFrame &WristOrigin = ..Jnts.Wrist;
};
 
AnyKinEqInterPolDriver RightWristDriver = {
//MeasureOrganizer = ;
Type = Bspline;
BsplineOrder = 4;
//T = ;
//Data = ;
FileName = "right wrist front.txt";
AnyKinMeasure &Lin = .WristLin;
Reaction.Type = {Off, Off, Off};
};
AnyKinLinear HandLin = {
//Ref = -1;
AnyRefFrame &HandOrigin = ..Segs.Hand.HandNode;
};
 
AnyKinEqInterPolDriver RightHandDriver = {
//MeasureOrganizer = ;
Type = Bspline;
BsplineOrder = 4;
//T = ;
//Data = ;
FileName = "right hand front.txt";
AnyKinMeasure &Lin = .HandLin;
Reaction.Type = {Off, Off, Off};
};

}; // Driver folder

//--------------------------------------------------------------------muscles

AnyFolder Muscles = {
  // Simple muscle model with constant strength = 300 Newton
  AnyMuscleModel MusMdl = {
    F0 = 300;
  };

  //---------------------------------
  AnyViaPointMuscle Brachialis = {
    AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
    AnyRefNode &Org = ..Segs.UpperArm.Brachialis;
    AnyRefNode &Ins = ..Segs.LowerArm.Brachialis;
    AnyDrawMuscle DrwMus = {};
  };

  //---------------------------------
  AnyViaPointMuscle DeltodeusA = {
    AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
    AnyRefNode &Org = ..GlobalRef.DeltodeusA;
    AnyRefNode &Ins = ..Segs.UpperArm.DeltodeusA;
    AnyDrawMuscle DrwMus = {};
  };

  //---------------------------------
  AnyViaPointMuscle DeltodeusB = {
    AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
    AnyRefNode &Org = ..GlobalRef.DeltodeusB;
    AnyRefNode &Ins = ..Segs.UpperArm.DeltodeusB;
    AnyDrawMuscle DrwMus = {};
  };

  //---------------------------------
  AnyViaPointMuscle Brachioradialis = {
    AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
    AnyRefNode &Org = ..Segs.UpperArm.Brachioradialis;
    AnyRefNode &Ins = ..Segs.LowerArm.Brachioradialis;
    AnyDrawMuscle DrwMus = {};
  };

  //---------------------------------
  AnyViaPointMuscle BicepsShort = {
    AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
    AnyRefNode &Org = ..Segs.UpperArm.BicepsShort;
    AnyRefNode &Ins = ..Segs.LowerArm.Biceps;
    AnyDrawMuscle DrwMus = {};
  };

  //---------------------------------
  AnyViaPointMuscle TricepsShort = {
    AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
    AnyRefNode &Org = ..Segs.UpperArm.TricepsShort;
    AnyRefNode &Ins = ..Segs.LowerArm.Triceps;
    AnyDrawMuscle DrwMus = {};
  };

  //---------------------------------
  AnyViaPointMuscle BicepsLong = {
    AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
    AnyRefNode &Org = ..GlobalRef.BicepsLong;
    AnyRefNode &Ins = ..Segs.LowerArm.Biceps;
    AnyDrawMuscle DrwMus = {};
  };

  //---------------------------------
  AnyViaPointMuscle TricepsLong = {
    AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
    AnyRefNode &Org = ..GlobalRef.TricepsLong;
    AnyRefNode &Ins = ..Segs.LowerArm.Triceps;
    AnyDrawMuscle DrwMus = {};
  };

}; // Muscles folder

}; // ArmModel

//-----------------------------------------------------------------MyStudy
//-----------------------------------------------------------------

AnyBodyStudy ArmModelStudy = {
AnyFolder &Model = .ArmModel;
RecruitmentSolver = MinMaxSimplex;
Gravity = {0.0, -9.81, 0.0};
};

}; // Main

Hi Roger!

The reason for your problem is that in [SIZE=3]
[SIZE=2]AnyKinLinear[/SIZE][/SIZE] WristLin = {
//Ref = -1;
AnyRefFrame &WristOrigin = …Jnts.Wrist;
};

you are refering to “…Jnts.Wrist” which is not a reference frame. If you look up the defintion of “Wrist”, you will find that it is a spherical joint. So you should change WristOrigin to point to a reference frame instead.

I hope that helps.

Best regards
Michael Skipper Andersen
The AnyBody Research Project