Revolute joint direction of rotation

Typically: "How do I... ", "How can I... " questions
Post Reply
sample
Posts: 14
Joined: 27 Mar 2017, 21:30

Revolute joint direction of rotation

Post by sample » 06 Feb 2018, 13:07

Hi Coppelia,

I have a basic question, but it's driving me crazy for a few days now. What's the direction of the rotation of revolute joint?
I have read the topic Joint types and operation, and I don't understand what is meant by "... the amount of rotation about their first reference frame's z-axis." What's the reference frame for the rotation? Is it frame of the joint? In that case direction of the rotation is determined by right hand rule where thumb is pointing in the +z direction of the joint frame, and the fingers show the direction of the rotation? Or rotation happens relative to some other frame (like frame of the parent object?)

In the first picture is shown default state of the joint (joint is enabled with control loop enabled in torque/force mode) - target position 0 deg. In the second picture target position is set to +45 deg.

pic 1 - https://imgur.com/a/EKQ57
pic 2 -https://imgur.com/a/pYhD4

coppelia
Site Admin
Posts: 6736
Joined: 14 Dec 2012, 00:25

Re: Revolute joint direction of rotation

Post by coppelia » 08 Feb 2018, 07:26

Hello,

the direction of rotation is as you describe it: clockwise when looking towards positive z-axis if the joint.
Now in your pictures it is difficult to say what is going on, since you have made the rest invisible. But I noticed 2 things:
  • The displayed orientation of the joint in the two picture is not the same! In the first picture it is (-90,0,-180), in the second picture it is (-90,0,135)
  • When your joint is selected and has a rotation value different from 0, then two frames should be visible: the joint frame (or base frame), and the frame of the rotated part of the joint (which is not visible in your case). Which makes me think that your joint is broken apart because of too large constraints or similar.
Best is always to post a minimalistic scene illustrating your problem.

Cheers

sample
Posts: 14
Joined: 27 Mar 2017, 21:30

Re: Revolute joint direction of rotation

Post by sample » 08 Feb 2018, 08:35

Hi,

here is the simplified scene(1). Pay attention to the rotation of the male_joint1 reference frame when +90 deg is set as a target position in respect to default state (target position 0 deg). What may be causing the problem/confusion is the fact that joint is not connected to a fixed object, instead it's connected to a shaft (link_dyn1) which can be rotated by either of joints (male_joint1 or female_joint1). Long story short: in this case 'shaft' (blue part) of the joint can be rotated, but joint body (orange part) can be rotated as well. So, instead of the rotation of the shaft, maybe the body of the joint rotates because of the physics of the model?

Thanks!

scene(1): https://drive.google.com/open?id=1qaET9 ... d59nnbvwga

EDIT: I have changed the hierarchy of the scene (scene 2), and made the link_dyn1 parent of both sides. Now everything works as expected. Is this new scene valid if we consider rules for building a model? So my final question is how the choice of the parent/child object of the joint affects the rotation?

scene(2): https://drive.google.com/open?id=183JLK ... yF7NA_ZH1U

coppelia
Site Admin
Posts: 6736
Joined: 14 Dec 2012, 00:25

Re: Revolute joint direction of rotation

Post by coppelia » 08 Feb 2018, 18:25

Both ways of doing are fine. It doesn't really matter. If you look at the joint child from a reference frame attached to the joint base, the child will rotate in one direction. If you look at the joint base from a reference frame attached to the joint child, the base will rotate in the other direction. It can be confusing. Sometimes it helps to attach the camera to the joint base or joint child to see things right.

Cheers

sample
Posts: 14
Joined: 27 Mar 2017, 21:30

Re: Revolute joint direction of rotation

Post by sample » 09 Feb 2018, 08:22

coppelia wrote:
08 Feb 2018, 18:25
Both ways of doing are fine. It doesn't really matter. If you look at the joint child from a reference frame attached to the joint base, the child will rotate in one direction. If you look at the joint base from a reference frame attached to the joint child, the base will rotate in the other direction. It can be confusing. Sometimes it helps to attach the camera to the joint base or joint child to see things right.

Cheers
I get it, thank you for your help!

Post Reply