Hi Bjorn,
thank you for the reply!
Let me explain the problem better.
I have pedal markers trajectory data from the c3d file, but I did not model (nor I'd like to) the pedal itself, so I don't have pedal nodes defined in a "pedal segment" that I can drive.
I'd like to apply force data, coming from the instrumented pedal, directly to the foot, but in a reference frame consistent with the pedal, because the force components data are parallel and perpendicular to the pedal.
To do this, I have already set up a loads folder with interpolated time-varying forces, but as first attempt I applied the force to a forefoot marker (RTTO), and the simulation worked nice:
AnyForce3D FRight = {
AnyRefFrame &PointofAttack = Main.HumanModel.BodyModel.Right.Leg.Seg.Foot.RTTO;
AnyFunInterpol Forcex = {
Type = PiecewiseLinear;
FileName = "FxR.txt";
};
AnyFunInterpol Forcez = {
Type = PiecewiseLinear;
FileName = "FzR.txt";
};
AnyVector Fx = Forcex(t);
AnyVector Fz = Forcez(t);
Flocal = {Fx[0],0,Fz[0]};
};
However, the RTTO reference frame is not exactly aligned with the pedal reference frame, so the force input is not interpreted in the right way, because the foot moves with respect to the pedal over time.
Therefore, I would now like to define a new reference frame, inside the foot, but with axes oriented as the pedal, i.e. oriented as the vector that connects the 2 pedal markers over time.
The reference frame should have its origin in the middle of the forefoot (point O below).
I've tried to use the same approach used for the time-dependent force to handle the manual definition of the moving reference frame:
Main.HumanModel.BodyModel.Right.Leg.Seg.Foot = {
AnyRefNode PedalFrame =
{
AnyVec3 O = 0.5*(Main.HumanModel.BodyModel.Right.Leg.Seg.Foot.RTVM.sRel +
Main.HumanModel.BodyModel.Right.Leg.Seg.Foot.RTFB.sRel);
AnyFunInterpol &RPED = Main.ModelSetup.C3DFileData.Points.Markers.RPED.PosInterpol;
AnyFunInterpol &RPEP = Main.ModelSetup.C3DFileData.Points.Markers.RPEP.PosInterpol;
AnyVec3 X = RPED(t) - RPEP(t);
AnyVec3 Y = {0.0,0.0,1.0};
AnyVec3 Z = cross(X,Y);
sRel = O;
ARel = {X/vnorm(X),Y/vnorm(Y),Z/vnorm(Z)}';
};
};
but I got this error:
ERROR(SCR.EXP10) Expression evaluation failed at moment 'DesignVar':
X: argument will not be ready for evaluation until moment 'TimeVar'
Ideally I wouldn't like to create marker drivers for the pedal markers, also because as already mentioned I don't have a pedal segment.
I hope the problem is now clearer.
Best regards,
Marco