Hello,
I want to use joint force data of the hip calculated from a MoCap Gait trial to move a robot. However, the coordinate systems of the robot and the model do not align.
I ceated a custom pelvis node and a custom thigh node that represent the coordinate system of the robot. Example for the pelvis one below:
Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg = {
AnyRefNode PelvisNodeISB = {
// 1. ORIGIN
sRel = .Right.HipJoint.sRel;
// 2. LANDMARKS
AnyVec3 RASIV = .Right.ASIS.sRel;
AnyVec3 LASIV = .Left.ASIS.sRel;
AnyVec3 RPSIV = .Right.PSIS.sRel;
AnyVec3 LPSIV = .Left.PSIS.sRel;
AnyVec3 ASIS_mid = (RASIV + LASIV) / 2.0;
AnyVec3 PSIS_mid = (RPSIV + LPSIV) / 2.0;
// 3. AXES CALCULATION
AnyVec3 Z_raw = RASIV - LASIV;
AnyVec3 Z_axis = Z_raw / vnorm(Z_raw);
AnyVec3 Ant_raw = ASIS_mid - PSIS_mid;
AnyVec3 Y_raw = cross(Z_axis, Ant_raw);
AnyVec3 Y_axis = Y_raw / vnorm(Y_raw);
AnyVec3 X_raw = cross(Y_axis, Z_axis);
AnyVec3 X_axis = X_raw / vnorm(X_raw);
// 4. COORDINATE SYSTEM DEFINITION
ARel = {X_axis, Y_axis, Z_axis}';
// 5. VISUALIZATION magenta
AnyDrawRefFrame DrawISBFrame = {
ScaleXYZ = {0.15, 0.15, 0.15};
RGB = {1, 0, 1};
};
};
};
Then I created a custom joint with these two nodes:
AnyFolder CustomHipJoints = {
AnySphericalJoint RightHip = {
AnyRefNode &ThighNode = Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.ThighNodeISB;
AnyRefNode &PelvisNode = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.PelvisNodeISB;
};
AnySphericalJoint LeftHip = {
AnyRefNode &ThighNode = Main.HumanModel.BodyModel.Left.Leg.Seg.Thigh.HipJoint;
AnyRefNode &PelvisNode = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.Left.HipJoint;
};
};
How do I get the joint force caluclations for this custom joint? It’s not automatically calculated during the inverse dynamics study.
Or is there a completely different approach?
Thanks in advance
Christoph