Implementation of AnySphericalJoint

#1

Hi,

I created an exoskeleton structure with a ball socket joint. Now I want to implement this AnySphericalJoint in AnyBody and I used this Code:

AnyKinEqSimpleDriver KGT1= {
AnySphericalJoint BallSocket_T1 =
{
//RefFrames = ;
//Surfaces = ;
//KinMeasureArr = {…Orientation, …Orientation, …Orientation};
//KinMeasureIndexArr = {0, 1, 2};
AnyRefFrame &base = Main.EnvironmentModel.HumanAssembly.BackPlate___1.KGT1_Base;
AnyRefFrame &target = Main.EnvironmentModel.HumanAssembly.BallSocketT1___1.KGT1_Pole;
};
MeasureOrganizer = {0,1,2};
DriverPos = {0,0,0}; //{-0.2,1.1,-0.4};
DriverVel = {0,0,0};
};

I simply connected the two defined points of the two Assembly parts in the AnySphericalJoint class.
But when I drive my model with MoCap data, the joint angle of my SphericalJoint doesn’t change and seems to remain fix so that the human model movement gets affected and doesn’t correspond with the mocap data.
The Pole part is kinematically connected with my shoulder marker, so that the exoskeleton Assembly should also be moving.
Is the implementation of my joint correct? I turned off all mates in my SolidWorks file so there shouldn’t be any restrictions.

Thanks & regards,
David

#2

Hi David,

the code you have made will do two things,

  • introduce a spherical joint between the two parts

  • drive this joint to a fixed value of 0,0,0

So this is why you see the joint as locked. to allow the joint to move simply just create the spherical joint

AnySphericalJoint BallSocket_T1 ={

//RefFrames = ;
//Surfaces = ;
//KinMeasureArr = {…Orientation, …Orientation, …Orientation};
//KinMeasureIndexArr = {0, 1, 2};
AnyRefFrame &base = Main.EnvironmentModel.HumanAssembly.BackPlate___1.KGT1_Base;
AnyRefFrame &target = Main.EnvironmentModel.HumanAssembly.BallSocketT1___1.KGT1_Pole;
};

hope it helps.

Best regards
Søren

#3

That solved my problem! Thanks!