I would like to drive a human model doing a squat exercise in 2D. For input I have angles in ankle and angles in knee from time 0s to time 2s.
Which driver should I use and how to input this time dependent data?
Can thorax be driven in a way that the body has a constant center of pressure? Or is it possible to just exclude thorax and still do the inverse dynamics analysis?
You can use AnyKinEqInterpolDriver for defining such behaviour:
AnyKinEqInterPolDriver <ObjectName> =
{
//RefFrames = ;
//Surfaces = ;
//KinMeasureArr = ;
//KinMeasureIndexArr = ;
//MeasureOrganizer = ;
//CType = ;
//WeightFun = ;
Type = ;
//BsplineOrder = 4;
//T = ;
//Data = ;
//FileName = "";
//FileErrorContinueOnOff = Off;
//AnyKinMeasure &<Insert name0> = <Insert object reference (or full object definition)>; You can make any number of these objects!
};
Please check the repository for the usage example, e.g.:
Examples\MoCapModel\Model\JointsAndDriversOptimized.any
Examples\Egress\Model\JointsAndDrivers.any
CoP constraint is used in, for example, StandingModel. Please check JointsAndDrivers.any file in the Model folder:
//Constraint the collective CoM to be right above the GlobalRef
AnyKinEqSimpleDriver CoMDriver = {
AnyKinCoM CoM = {
AnyFolder &Body = Main.Model.HumanModel;
};
MeasureOrganizer = {0,2}; // Only the x and z directions
DriverPos = {0,0};
DriverVel = {0,0};
Reaction.Type = {Off,Off};
};
As Pavel proposed I have used AnyKinEqInterpolDriver, put the .txt files for input and it is all working as it should.
Next problem is when I try to put that driver in the Standing model (for both legs) for example for the HipFlexion I get two additional constraints. I have tried getting rid of the existing ones
You just need to remove the existing driver from the model (since you have knee/ankle data - you need to modify knee/ankle drivers). There are a couple of ways to do it - you can simply delete/outcomment the driver from the code:
or you can learn about MechObjectExclude feature, which allows to exclude mechanical objects from your particular study, but keeping the definition in the model. This way you can simply add new drivers on top of existing ones and then configure your particular study.
But otherwise it should be quite simple - if your remove a driver for a single DoF, then one driver needs to be added to the relevant structure.
I have another question, though. In the attachment, you can see muscles vastus lateralis and my question is why are there several 0 values for all the muscles?