Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Ropes Jitter in Crane Movement
#1
We are developing a crane simulation based on some our own R&D and currently experiencing jitter when we try to move the object attached to the crane ropes. It works very well when we use a single rope but when we attach 4 ropes, it jitters. Video is available for reference.

Video on Google Drive

Also Attached as well

We developed the simulations before similar to that but those were on old backend, now we are using the latest 6.5 OBI with burst backend.

All 4 ropes are using the same blue print (only displaced by the game object transform in unity, equally). At top ropes are attached with single point as static attachment and at bottom towards the load (red box object) they are dynamically attached. It is interesting that the jitter mostly occurs at high speed and usually its higher when we are using 4 ropes (on a single rope it is very minimal and can be ignore)

Any advice on how to overcome or minimize this jitter is high appreciated. Thanks in advance


Attached Files Thumbnail(s)
           
Reply
#2
(16-03-2023, 04:58 PM)vrtraining Wrote: We are developing a crane simulation based on some our own R&D and currently experiencing jitter when we try to move the object attached to the crane ropes. It works very well when we use a single rope but when we attach 4 ropes, it jitters. Video is available for reference.

Video on Google Drive

Also Attached as well

We developed the simulations before similar to that but those were on old backend, now we are using the latest 6.5 OBI with burst backend.

All 4 ropes are using the same blue print (only displaced by the game object transform in unity, equally). At top ropes are attached with single point as static attachment and at bottom towards the load (red box object) they are dynamically attached. It is interesting that the jitter mostly occurs at high speed and usually its higher when we are using 4 ropes (on a single rope it is very minimal and can be ignore)

Any advice on how to overcome or minimize this jitter is high appreciated. Thanks in advance

Hi!

I don't have permission to access the video you shared, requested access to it.

Jittering issues can have a lot of causes, but none of them are caused by the actual rope/blueprint setup. The top culprits are:

- Incorrect updating: updating crane movement in Update, while the rope is updated in FixedUpdate: since FixedUpdate works at a fixed frequency (the default is 50 Hz) but Update() is called once per frame at a variable frequency, you'll get frames where the crane moves but the rope doesn't.

- Incorrect execution order: the order in which Unity calls the same callbacks for different components is undefined by default. So you might get the crane updating first some frames and updating after some others. You can fix this by using Obi's own solver callbacks, or explicitly setting Unity's execution order.

- Attaching the rope inside a collider: if you add an attachment inside of or very close to a collider that the rope is colliding against, you're asking the solver to make sure that the rope is simultaneously inside the collider (due to the attachment) and outside of it (due to collisions). This will lead to jittering as the solver tries to solve this impossible configuration. This issue along with its solution is explained in the manual, see "Attachments inside colliders": http://obi.virtualmethodstudio.com/manua...ments.html

kind regards,
Reply
#3
(17-03-2023, 08:16 AM)josemendez Wrote: Hi!

I don't have permission to access the video you shared, requested access to it.

Jittering issues can have a lot of causes, but none of them are caused by the actual rope/blueprint setup. The top culprits are:

- Incorrect updating: updating crane movement in Update, while the rope is updated in FixedUpdate: since FixedUpdate works at a fixed frequency (the default is 50 Hz) but Update() is called once per frame at a variable frequency, you'll get frames where the crane moves but the rope doesn't.

- Incorrect execution order: the order in which Unity calls the same callbacks for different components is undefined by default. So you might get the crane updating first some frames and updating after some others. You can fix this by using Obi's own solver callbacks, or explicitly setting Unity's execution order.

- Attaching the rope inside a collider: if you add an attachment inside of or very close to a collider that the rope is colliding against, you're asking the solver to make sure that the rope is simultaneously inside the collider (due to the attachment) and outside of it (due to collisions). This will lead to jittering as the solver tries to solve this impossible configuration. This issue along with its solution is explained in the manual, see "Attachments inside colliders": http://obi.virtualmethodstudio.com/manua...ments.html

kind regards,


I forgot to enable the sharing in Google Drive. Now I have enabled it so you can check it as well if you can notice any specific pattern in jitter.

Thanks a lot for pointing out the probable causes, i'll look into them one by one as well to see if any one of them is causing the trouble or not
Reply
#4
(17-03-2023, 08:24 AM)vrtraining Wrote: I forgot to enable the sharing in Google Drive. Now I have enabled it so you can check it as well if you can notice any specific pattern in jitter.

Thanks a lot for pointing out the probable causes, i'll look into them one by one as well to see if any one of them is causing the trouble or not

The video looks as if the solver is parented to the crane's boom, and the boom is being rotated in Update. So Id' look for causes #1 or #2 in the above list, I think the third one can be safely ruled out. #1 is the most probable one, specially since you mention that adding more ropes causes jittering to be worse, which makes sense since more workload increases the frequency gap between Update and FixedUpdate().

Also note that parenting the "load" (the gray box hanging from the ropes) to the crane as it seems to be the case in the video doesn't make much sense: that will kinematically move the load together with the boom which is certainly not what you want in any crane. It also doesn't make sense for the solver to be part of the boom: that will simulate in the local space of the boom, while you most certainly want to simulate either in world space or the crane's local space.

kind regards,
Reply
#5
(17-03-2023, 08:29 AM)josemendez Wrote: The video looks as if the solver is parented to the crane's boom, and the boom is being rotated in Update. So Id' look for causes #1 or #2 in the above list, I think the third one can be safely ruled out. #1 is the most probable one, specially since you mention that adding more ropes causes jittering to be worse, which makes sense since more workload increases the frequency gap between Update and FixedUpdate().

Also note that parenting the "load" (the gray box hanging from the ropes) to the crane as it seems to be the case in the video doesn't make much sense: that will kinematically move the load together with the boom which is certainly not what you want in any crane. It also doesn't make sense for the solver to be part of the boom: that will simulate in the local space of the boom, while you most certainly want to simulate either in world space or the crane's local space.

kind regards,

Yes the structure is like this

- Root (Obi Solver and Component)
- - Crane
- - - Crane Boom (Movement Script but not in Update, its event based)
- - - - Ropes
- - - - Load

Now when the crane boom moves it moves the both ropes and load, this is because if I take Load outside the Crane Boom then it gets a huge swing. So I'm also moving the load to reduce the huge swing. How I can reduce the swing if I take it outside?
Reply
#6
(20-03-2023, 04:28 AM)vrtraining Wrote: Yes the structure is like this

- Root (Obi Solver and Component)
- - Crane
- - - Crane Boom (Movement Script but not in Update, its event based)
- - - - Ropes
- - - - Load

[quote='vrtraining' pid='14081' dateline='1679282920']
Now when the crane boom moves it moves the both ropes and load, this is because if I take Load outside the Crane Boom then it gets a huge swing. So I'm also moving the load to reduce the huge swing. How I can reduce the swing if I take it outside?

Hi!

It should swing, that's the physically correct outcome. If you want to reduce swinging amplitude, you can apply damping/drag on the rigidbody hanging from the rope. If you want to reduce swinging frequency, you need to increase the rope's length, as per the pendulum equation (f = 1 / (2* pi * sqrt(L / g)), where L is the rope length and g is gravitational acceleration).

kind regards,
Reply