I need my gimbal model to be solidary to axis rotations

Typically: "How do I... ", "How can I... " questions
Post Reply
Javierrc99
Posts: 23
Joined: 08 May 2022, 18:34

I need my gimbal model to be solidary to axis rotations

Post by Javierrc99 »

Scene: https://drive.google.com/file/d/1GIeXsm ... share_link
RemoteClient: https://drive.google.com/file/d/1RIcHGG ... share_link
the client might need some changes to work but the main thing to try is to make some rotation for example around axis Z, and make it work the way I describe next.

Hello, the thing is I have an scene where i have modelled a gimbal attached to a camera. I followed the steps in another of my posts and the way it works is that if you rotate the Z axis, this is the only axis that rotates, but I believe that the gimbal should rotate as a whole, I mean if you rotate 90º around Z of the gimbal, the X and Y joints should rotate around Z those 90º too, and the same for rotations around X and Y. This is not what happens now, so I ask if you know some way to fix the child scripts in the Scene to make the other axis solidary to the axis that rotates.
Thanks in advance.
I would appreciate if you dont change the fact that the angle reference comes from a remote Client, but maybe is easier for you to set this reference directly from the Scene that with my client.

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

Re: I need my gimbal model to be solidary to axis rotations

Post by coppelia »

Hello,

your gimbal looks fine. If you change the angle of joint Eje_Z_cam, it is normal that the other joints do not change. I am not sure I understand your question correctly.

Maybe also have a look at the demo scene in scenes/eulerAngles.ttt which is very similar to what you want to achieve.

Cheers

Javierrc99
Posts: 23
Joined: 08 May 2022, 18:34

Re: I need my gimbal model to be solidary to axis rotations

Post by Javierrc99 »

Hi again, I am not sure how a Gimbal should be modeled. Maybe I am wrong.

Screenshot: https://drive.google.com/file/d/1ke1H02 ... share_link

If you rotate 90º around Z axis, the camera attached follows that rotation which is correct. But I think that the Gimbal should also be rotating as a whole, like the X and Y joints should rotate too (which I think wouldn't affect the camera).

Think about this, if I rotate around Z and X doesn't rotate, if i later rotate around X it would be rotating in its original position, but if X had rotated following the previous Z rotation, now the X rotation would move the camera differently since the X joint would be skewed to a side because of the Z rotation. Thats why I think the Gimbal doesn't work properly.
If you watch the diagram in the screenshot, the rotation Xr and Xr' would be significantly different I think.
Tell me if you understand. Thanks

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

Re: I need my gimbal model to be solidary to axis rotations

Post by coppelia »

No, I don't understand.

From the scene hierarchy, you can easily verify thingy manually, by computing things using transformation matrices.

cheers

Javierrc99
Posts: 23
Joined: 08 May 2022, 18:34

Re: I need my gimbal model to be solidary to axis rotations

Post by Javierrc99 »

Hello, I think I have found some way to start, if you run this scene:
https://drive.google.com/file/d/1Q491F5 ... share_link
the Z axis child code will make it rotate 90º, also moving the other joints as a I wanted.
In my system, the Y axis never rotates.
Do you have any idea on how should I rotate the X joint/axis after it has rotated the first time (I don't quite get the hierarchy system and how should I rotate this axis)?
I need it this to be done from a client but I might figure that out.
Let me know if you understand a way of rotating that X axis
Thanks again

Post Reply