Dear Anybody Team,
I’m Da Fan from Jilin University, mainland China.
Recently, I was trying to simulate the driver’s right foot moving from gas pedal to brake pedal. The model was modified from a well-worked pedaling model based on seatedhuman model. Two pedals were added and four trajectory markers were also added which was referred to the Egress model in the demo. The code is seen as below. The model is attached as well.
AnyFolder FootRestFootJnt = {
AnyFolder Right = {
AnyKinLinear FootRestFootLinMeasure = {
AnyRefFrame &FootRestRef = ...RefP.Seg.FootRest.FootRestFootJntNodeRight;
AnyRefFrame &FootRef = ...RefH.Right.Leg.Seg.Foot.FootFootRestJntNode;
Ref = 0;
};
AnyFixedRefFrame p1={
Origin={0.8, -1.25, 0.1};
AnySurfSphere sphere={Radius =.015;
AnyDrawParamSurf drw={
RGB =Main.DrawSettings.Colors.AnyBodyBlue;
};
};
};
AnyFixedRefFrame p2={
Origin={0.85,-1.2,0.15};
AnySurfSphere sphere={Radius =.015;
AnyDrawParamSurf drw={
RGB =Main.DrawSettings.Colors.AnyBodyBlue;
};
};
};
AnyFixedRefFrame p3={
Origin={0.85,-1.2,0.2};
AnySurfSphere sphere={Radius =.015;
AnyDrawParamSurf drw={
RGB =Main.DrawSettings.Colors.AnyBodyBlue;
};
};
};
AnyFixedRefFrame p4={
Origin={0.8,-1.25,0.25};
AnySurfSphere sphere={Radius =.015;
AnyDrawParamSurf drw={
RGB =Main.DrawSettings.Colors.AnyBodyBlue;
};
};
};
AnyKinPLine RightPLine ={
AnyFixedRefFrame &ref1=.p1;
AnyFixedRefFrame &ref2=.p2;
AnyFixedRefFrame &ref3=.p3;
AnyFixedRefFrame &ref4=.p4;
AnyDrawPLine drw={
Thickness=.005;
RGB =Main.DrawSettings.Colors.AnyBodyBlue;
};
};
AnyKinEqInterPolDriver FoodDriver={
AnyKinLinear &GroundJoint = .FootRestFootLinMeasure;
Type=Bspline;
BsplineOrder = 4; // This provides smooth accelerations
T = Main.Study.tEnd*{0,0.33,0.66,1.01};
Data={
{.p1.Origin[0],.p2.Origin[0],.p3.Origin[0],.p4.Origin[0]},
{.p1.Origin[1],.p2.Origin[1],.p3.Origin[1],.p4.Origin[1]},
{.p1.Origin[2],.p2.Origin[2],.p3.Origin[2],.p4.Origin[2]}
};
Reaction.Type={Off,Off,Off};
};
AnySphericalJoint FootPedal=
{
AnyRefNode &Pedal=Main.Model.EnvironmentModel.Pedal.FootNode;
AnyRefNode &Foot=Main.HumanModel.BodyModel.Right.Leg.Seg.Foot.FootBall;
}; //Right
However, errors occurred when setting initial conditions. Constrains were less than the unknowns (968 to 976). And I tried to change the constrains of ankle and knee joints, but both constrains and the unknowns decreased simultaneously. So I had no idea of how to solve this problem.
I wonder if someone could help me solve it.
Best Regards!
Da Fan