simple pendulum sticks

supernewb
Posts: 7
Joined: Thu Dec 13, 2012 10:37 am

simple pendulum sticks

Post by supernewb »

I have modified the ragdoll demo so that a single capsule is hinged using a balljoint at one end to a fixed point above the ground. It works fine except that when the rod is held and released a little off the vertical it sticks and very slowly slips back to vertical. I've tried changing all friction/damping settings but I can't prevent this sticking. Any suggestions please?
kalesony
Posts: 33
Joined: Tue Sep 25, 2012 12:16 pm
Location: Poland

Re: simple pendulum sticks

Post by kalesony »

No promises, but you can start by providing the source for repro ;).
supernewb
Posts: 7
Joined: Thu Dec 13, 2012 10:37 am

Re: simple pendulum sticks

Post by supernewb »

Source is attached. The pendulum setup starts around line 20 in swing.cpp

Thanks

Supernewb
You do not have the required permissions to view the files attached to this post.
supernewb
Posts: 7
Joined: Thu Dec 13, 2012 10:37 am

Re: simple pendulum sticks

Post by supernewb »

Anyone seeing the same problem I'm seeing?
kalesony
Posts: 33
Joined: Tue Sep 25, 2012 12:16 pm
Location: Poland

Re: simple pendulum sticks

Post by kalesony »

I see this: https://dl.dropbox.com/u/39695680/swing.avi
Are we supposed to modify the code anyhow for something evil to happen? ;) Or is it the way the pendulum finally stabilizes that you find awkwardly looking?
supernewb
Posts: 7
Joined: Thu Dec 13, 2012 10:37 am

Re: simple pendulum sticks

Post by supernewb »

Hi, thanks for the post. I get different behaviour! - the capsules stick at a much earlier point, when they are at the maximum reach of a swing. Could this be a machine issue? I'm on dual boot I'll swap into windows on mac later.
supernewb
Posts: 7
Joined: Thu Dec 13, 2012 10:37 am

Re: simple pendulum sticks

Post by supernewb »

https://www.dropbox.com/s/m0svuf30ztny2fz/swing_SN.avi
see how the stick on the right gets stuck then slowly slips down.

I'm using bullet-2.81-rev2613 / vs2010 / Windows 7 on a macbook pro

@kalesony : You can't get it to stick at all?
kalesony
Posts: 33
Joined: Tue Sep 25, 2012 12:16 pm
Location: Poland

Re: simple pendulum sticks

Post by kalesony »

I played around and - nope, it looks nothing like yours. Have you tried different bullet releases?
supernewb
Posts: 7
Joined: Thu Dec 13, 2012 10:37 am

Re: simple pendulum sticks

Post by supernewb »

Thanks, which version do you use?
kalesony
Posts: 33
Joined: Tue Sep 25, 2012 12:16 pm
Location: Poland

Re: simple pendulum sticks

Post by kalesony »

2.80.

Will try it out with 2.81 when I have a spare minute.
kalesony
Posts: 33
Joined: Tue Sep 25, 2012 12:16 pm
Location: Poland

Re: simple pendulum sticks

Post by kalesony »

You're right, I have the sticking issue using 2.81 and your code.
supernewb
Posts: 7
Joined: Thu Dec 13, 2012 10:37 am

Re: simple pendulum sticks

Post by supernewb »

Thanks. I guess this should be flagged as a potential issue.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: simple pendulum sticks

Post by Erwin Coumans »

It seems to happen because you enable damping and additionalDamping.

If you comment out those lines, it works just fine here. Can you try it?

Code: Select all

//m_body->setDamping( 0.05f, 0.85f );
//rbInfo.m_additionalDamping = true;