Basically, what I intend to do is to create a moment in the ankle joint with the following code:
AnyForce AnkleStiffness = {
AnyKinMeasure &lin = Main.Studies.HumanModel.BodyModel.Right.Leg.Jnt.Ankle;
AnyInputFile Data_file = {FileName = "Moments.txt";};
AnyVector M = Data_file.T;
F = M;
// F = {-2*lin.Pos[0]};
};
Basically, I have created a vector of moments M that needs to be applied to the ankle joint. When I run the code, I get this error:
AnkleStiffness.F : Size of F does not match the number of force components in this AnyForce objects
I have already ensured that the number of values in the vector M is the same as the number of values in, for example, vector Main.Studies.HumanModel.BodyModel.Right.Leg.Jnt.Ankle.Pos[0]. I did this by displaying a chart of the vector Main.Studies.HumanModel.BodyModel.Right.Leg.Jnt.Ankle.Pos[0], obtaining the values of the chart in text form, and counting how many values are in the vector. I am pretty sure that the reason for this error is that I am not supposed be assigning F as a whole vector of values, but as a single value at each frame. For example, writing F = 2*t works.
Any help would be appreciated,
Háski.