Reference axis in defining joints

Hello,

I have a quesiton for the reference axis in defining joints.

This quesiton is related to the existing post.
http://forum.anyscript.org/showthread.php?t=2281

In above thread, the answer is that the reference axis is defined in the first mentioned reference frame.
Then, I understand that the reference axis in defning joints is related to the local(body) reference frame of the first body.

But when I found the anybody manual, this reference axis should be one of the reference axes: x,y or z.

For instance, when we define a ‘AnyRevoluteJoint’, ‘AnyRefFrameAxis’ member variable determines this property.

But, when we define the revolute joint axis which is not aligned to the reference axes of the first body, how I can do that?

For instance, let’s assume that Body1 and Body2 are connected by a revolute joint, and the direction of the revolute joint axis is (1,1,1) with respect to the local coordinate system of the first body.

Please answer this question :slight_smile:

John.

Hi John,

It is right that the reference frame or axis of the joint is the local reference frame of the first object (or Body as called in the post 2281). However it seems to me that you consider those Body1 and Body2 of the post 2281 as AnySeg. This is not always the case. A joint can be defined between any AnyRefFrame, which include AnyFixedRefFrame, AnySeg and AnyRefNode.

So to define a joint between two segments with a skew axis not aligned with any of the segment axis, you can define an AnyRefNode with the desired orientation and create the joint with this node. the reference frame of the joint will be the node and therefore not aligned with the segment axis.

Best regards, Sylvain.

Thanks for your help.
Then, if i want to define an 'AnyRefNode' in an 'Anyseg', can I use 'ARel' property to set the orientation of the AnyRefNode?

Then, does 'ARel' property of an 'AnyRefNode' mean the transformation with respect to the local(body) coordinate system of the body where the 'AnyRefNode' is defined?

Yes, exactly. The ARel property of the AnyRefNode gives the orientation matrix of the node in the local reference frame of the AnySeg in which it is defined.

Best regards, Sylvain.