Hello AnyBody,
I'm trying to change the knee joint from a revolute joint to an FDK joint with 6 degrees of freedom in the MOCAP Plug-In Gait Simple Lower extremity. I have used the tutorials and the THA Knee Bend example for excluding the joint, adding the implants, and the contact forces because I didn't find the TKA Knee Bend in the beta section.
I have used AnyMechObjectExcluder to exclude the joint.
AnyMechObjectExcluder ExcludedKneeJoint=
{
Objects = arrcat(
ObjSearch("Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJoint","AnyMechObject"),
ObjSearch("Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJoint","AnyMechObject"),
ObjSearchRecursive("Main.HumanModel.BodyModel.Right.Leg.Jnt.Knee","*","AnyMechObject"),
ObjSearchRecursive("Main.Studies.InverseDynamicStudy.ModelEnvironmentConnection.JointsAndDrivers.JntDriverRightLegTD","Knee*","AnyMechObject"),
ObjSearchRecursive("Main.HumanModel.BodyModel.Right.Leg.Jnt.Knee.Constraints","AnyMechObject")
);
};
After that, I added the FDK knee joint with implants and contact forces, but the result is that the segments are penetrating each other, and the femoral implant is located below the tibial plateau.
// New Knee Joint:
//JZ
AnyKinRotational Knee ={
AnyRefNode &ShankNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJointAnatomicalFrame;
AnyRefNode &ThighNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJointAnatomicalFrame;
Type=RotVector;
};
//JZ
AnyKinLinear KneeLin={
AnyRefNode &ShankNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJointAnatomicalFrame;
AnyRefNode &ThighNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJointAnatomicalFrame;
Ref=0;
};
//JZ
AnyRevoluteJoint FDKKneeJoint = {
Axis = z;
AnyRefNode &ShankNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJointAnatomicalFrame;
AnyRefNode &ThighNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJointAnatomicalFrame;
//AnyDrawStdJoint Knee = { };
//JZ
Constraints = {
CType = {ForceDep, ForceDep, ForceDep, ForceDep, ForceDep};
Reaction.Type={Off,Off,Off,Off,Off};
};
};
//Implants
Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJointAnatomicalFrame = {
// Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJoint= {
// Node to position the femoral implant
AnyRefNode FemImplantNode =
{
sRel={-0.01, 0.001, 0};
// Surface geometry of the femoral implant
AnySurfSTL FemoralImplant =
{
FileName = "../Input/simplefemoral";
ScaleXYZ = 0.9*1*{1.0, 1.0, 1.0};
AnyDrawSurf DrwSurfFem = {
FileName = .FileName;
ScaleXYZ = .ScaleXYZ;
Opacity = 1;
};
};
};
};
Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJointAnatomicalFrame = {
// Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJoint = {
//JZ
AnyRefNode ShankImplantNode =
{
sRel={-0.01, 0.006, 0};
// Surface geometry of the Shank implant
AnySurfSTL ShankImplant =
{
FileName = "../Input/simpletibial";
ScaleXYZ = 1*{1.0, 1.0, 1.0};
AnyDrawSurf DrwSurfFem = {
FileName = .FileName;
ScaleXYZ = .ScaleXYZ;
RGB = {1,0,0};
Opacity = 1;
};
};
};
};
AnyForceSurfaceContact FSurf =
{
AnySurface &sMaster = Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJointAnatomicalFrame.FemImplantNode.FemoralImplant;
AnySurface &sSlave= Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJointAnatomicalFrame.ShankImplantNode.ShankImplant;
PressureModule = 3.7e10;//3.7e9;//600e8; //Vol Pen
ForceViewOnOff = On;
MeshRefinementMaster = 0;
MeshRefinementSlave = 0;
SingleSidedOnOff= Off;
};
AnyKinLinear KneeLin={
AnyRefNode &ShankNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJointAnatomicalFrame.ShankImplantNode;
AnyRefNode &ThighNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJointAnatomicalFrame.FemImplantNode;
Ref=0;
};
AnyKinRotational Knee ={
AnyRefNode &ShankNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJointAnatomicalFrame.ShankImplantNode;
AnyRefNode &ThighNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJointAnatomicalFrame.FemImplantNode;
Type=RotVector;
};
AnyForce ArtificialStiffness1 =
{
AnyFloat Stiffness = 7.5e2;//5e4; // N/m
AnyKinLinear &lin = Main.Studies.KneeLin;
F = -1*Stiffness * lin.Pos;
};
AnyForce ArtificialStiffness2 =
{
AnyFloat Stiffness = 7.5e2;//5e4; // N/m
AnyKinRotational &Rot=Main.Studies.Knee;
F = -1*Stiffness * Rot.Pos;
};
AnyKinPLine ArtificialSpring =
{
AnyRefNode &ShankNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJointAnatomicalFrame.ShankImplantNode;
AnyRefNode &ThighNode =Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJointAnatomicalFrame.FemImplantNode; AnyDrawPLine drw =
{
//Visible = On;
//Opacity = 1;
Thickness = 0.005;
RGB = {0,0,1};
};
};
I've tried to change the position of the implants, adjust the stiffness, and modify the pressure module, but nothing changes. I have also added a ligament using the tutorials, and here I also encountered a problem because when I run the calibration of this ligament, the slack length doesn't change.
//Calibration of the ligament in AnyMocapModel Studies section :
AnyBodyCalibrationStudy LigCali = {
AnyFolder &Model = Main.HumanModel.BodyModel.Right.Leg.Ligament.LigModel;
nStep = 1;
// This driver puts the joint into the calibration position
Main.Studies.InverseDynamicStudy.ModelEnvironmentConnection.JointsAndDrivers.JntDriverRightLegTD.KneeFlexion= {
AnyRevoluteJoint &Jnt = Main.Studies.InverseDynamicStudy.FDKKneeJoint;
};
};
So my questions are: Is the penetration problem a result of the exclusion of the knee joint? Did I exclude more things than I should have? Is it a result of the parameters, such as pressure module and stiffness? Should I add more ligaments? And how can I ensure the calibration of the ligament changes the slack length?
And finally, could you please provide the TKA Knee Bend demo example?
Best Regards,
Jamila