How to build a AnyRevoluteJoint with two parts?

Hi, I want to build an AnyRevoluteJoint with two parts, but the axis is the Z axis of the ..SHANK_PART___2.HINGE_ANKLE_FLEXION_RIGHT and the Y axis of ANKLE_PART___1.HINGE_ANKLE_FLEXION_RIGHT. Could you please tell me how to do it? Thanks!

AnyRevoluteJoint HINGE_ANKLE_FLEXION_RIGHT =
{
AnyRefFrame& base = ..SHANK_PART___2.HINGE_ANKLE_FLEXION_RIGHT;
AnyRefFrame& target = ..ANKLE_PART___1.HINGE_ANKLE_FLEXION_RIGHT;
Axis = ???;
Constraints.CType = {..ANY_CTYPE, ..ANY_CTYPE, ..ANY_CTYPE, ..ANY_CTYPE, ..ANY_CTYPE };
};

Best,
TJ

Hi @Taejun

You will need to at a AnyRefFrame which you rotate to match the axes of the other object then you can connect Z to Z or Y to Y

Best regards,
Bjørn

Sorry, could you give me an example of it? I have no idea what you are talking about.

Hi @Taejun

The idea is that on order to join the two objects along their Z axis you will need a new reference frame on the ANKLE_PART that is rotated so that when joining the z axis - the object is placed correctly.
The RotMat is a rotation matrix that rotates along one axis.

AnyRefFrame rotated = {
  sRel = {0,0,0};
  ARel = RotMat(90*pi/180, z);
};

You might need to change the rotation matrix to fit your exact need

Best regards,
Bjørn

I get it. Thank you a lot for everything you have done.
Best,
TJ

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.