Limits on btGeneric6DofSpringConstraint not working?

hogius
Posts: 2
Joined: Wed Mar 24, 2010 3:19 pm

Limits on btGeneric6DofSpringConstraint not working?

Post by hogius »

Dear all,

My friend and I try to simulate a metal wire using a chain of btCapsuleShape connected by btGeneric6DofSpringConstraint. However, it turns out to be very 'wobbly', i.e. shows a lot of bending and displacement even if we set all limits to zero (which should result in one solid rod). Has anyone an idea what to do about that? Any help and new ideas are welcome :)

Best Regards,
Chris
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Limits on btGeneric6DofSpringConstraint not working?

Post by Erwin Coumans »

They should be stiff, unless you use large differences in mass. Can you try making the masses involved more similar?

Otherwise, try reproducing it in the Bullet/Demos/ConstraintDemo and attach a zipped reproduction case,
Thanks,
Erwin
hogius
Posts: 2
Joined: Wed Mar 24, 2010 3:19 pm

Re: Limits on btGeneric6DofSpringConstraint not working?

Post by hogius »

Hey,

thank you for the fast response! The masses are exactly the same. I modified the "ragdoll"-demo and attached it. Please let me know if you prefer a modification of the "constraint" demo. The interesting part beginns at line 480.

Thank you for your time and effort,
Chris
You do not have the required permissions to view the files attached to this post.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Limits on btGeneric6DofSpringConstraint not working?

Post by Erwin Coumans »

Ah, I missed the 'spring' part. Using springs in combination with a fixed degree of free doesn't work well. Not sure how to simulate a wire in the best way, you might want to try the soft body ropes, with some settings too (and attaching rigid bodies for the collisions).

Make sure to not use too small body/shape sizes, and the bodies should not overlap. Attached is a slightly modified demo with bigger shapes that don't overlap.
Thanks,
Erwin

By the way, I also create a .bullet snapshot. You can create such .bullet snapshot by pressing on the '=' key in the Bullet 2.76 demos. Such .bullet file can be opened in the work-in-progress Bullet physics editor, see http://bullet-physics-editor.googlecode.com
You do not have the required permissions to view the files attached to this post.