Hi I wish to apply the x position of node data on the thigh( r [0]) which is the output of the AnyBody into the AnyKinEqInterPolDriver for some position calculation:
AnyPrismaticJoint &ref0=.LeftContact_Thigh;
AnyPrismaticJoint &ref1=.RightContact_Thigh;
Type = PiecewiseLinear;
T =Main.Studies.InverseDynamicStudy.tArray;
Data = {.Dx_global_Left-.rNode0 , .Dx_global_Right};
};
};
...
However, the errors as shown occurred:
ERROR(SCR.EXP10) : Main.any(229) : 'Data' : Expression evaluation failed at moment 'DesignVar' :
Main.any(218) : rNode0 : argument will not be ready for evaluation until moment 'PosVar'
You are trying to construct an interpolation function that depends on a time-dependent value. Meaning that this function will have to be re-evaluated every time Main.HumanModel.BodyModel.Left.Leg.Seg.Thigh.contactNode.Node0.r will change, which will be happening all the time. But it is not allowed in the interpolation drivers by design.
We don't use r for such purpose. We would construct a prismatic joint or a 1dof kinematic constraint using underlying nodes bypassing interpolation driver:
AnyKinEqSimpleDriver myDriver = {
AnyKinLinear lin = {
AnyRefNode &myTargetNode= ...SOME_NODE_HERE.r;
AnyRefNode &rNode0= Main.HumanModel.BodyModel.Left.Leg.Seg.Thigh.contactNode.Node0;
Ref = 1;
};
MeasureOrganizer = {0}; // specify dof of interest from 'lin' to drive
DriverPos = {0};DriverVel={0};
};
Kind regards,
Pavel
P.S. generally try not to use 'output' variables such as r, rDot, etc. to construct the model. Connect object on a more general level like shown above.