discontinous constraints
-
- Posts: 15
- Joined: Thu Jan 11, 2007 7:45 pm
discontinous constraints
I have a simple chain of objects connected via btPoint2PointConstraint or btHingeConstraints. There is a static object on one end and a large mass on the other. The problem is I want to increase the stiffness of the constraints so that it doesn't stretch apart when the forces of of both ends are to great or one end gets caught behind a wall. Is there a simple way around this or do I have to implement my own constraints?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: discontinous constraints
large mass ratios are a problem for most constraint solvers. You can try to increase the number of iterations, that helps a little bit:
In the future, we plan on adding new constraint solver (Featherstone), which should solve this problem.
Thanks,
Erwin
Code: Select all
//number of iterations defaults to 10
dynamicsWorld->getSolverInfo().m_numIterations = 20
Thanks,
Erwin
Hamstray wrote:I have a simple chain of objects connected via btPoint2PointConstraint or btHingeConstraints. There is a static object on one end and a large mass on the other. The problem is I want to increase the stiffness of the constraints so that it doesn't stretch apart when the forces of of both ends are to great or one end gets caught behind a wall. Is there a simple way around this or do I have to implement my own constraints?
-
- Posts: 127
- Joined: Sun Aug 13, 2006 4:41 pm
- Location: Cedar Hill, Texas
I'm playing around with constraints again (it's been a while since I've had time) - and I just can't get any 6-dof constraints to behave themselves no matter what. I want something that can slide up and down in Y and rotate about the X axis - so two of the six DOF's are "limits" and the remaining four are "locked" - but the locked axes float around all over the place - I can't get them to stay where I told them to be. In an object that's a couple of meters across, I easily get constrained objects bouncing around by 30cm!
I've played with altering the masses of the objects involved - that doesn't seem to do much so I don't think this is a situation where there are wildly disparate masses (or sizes or anything).
I've tried increasing the number of iterations (getSolverInfo().m_numIterations) - first to 20 then to 200 and now to 2000 and it doesn't make a bit of difference (except that everything slows down a lot!). I also tried running all of the physics at 600Hz instead of 60Hz - and it simply has no effect. Objects that in the real world are held together with big bits of metal are flopping around like they are nailed to a piece of Jello!
In some earlier version of bullet there was a property called 'tau' that you could play with to tighten up these constriants - but that seems to be hard-coded nowadays. Does that still have some effect?
I've played with altering the masses of the objects involved - that doesn't seem to do much so I don't think this is a situation where there are wildly disparate masses (or sizes or anything).
I've tried increasing the number of iterations (getSolverInfo().m_numIterations) - first to 20 then to 200 and now to 2000 and it doesn't make a bit of difference (except that everything slows down a lot!). I also tried running all of the physics at 600Hz instead of 60Hz - and it simply has no effect. Objects that in the real world are held together with big bits of metal are flopping around like they are nailed to a piece of Jello!
In some earlier version of bullet there was a property called 'tau' that you could play with to tighten up these constriants - but that seems to be hard-coded nowadays. Does that still have some effect?
-
- Posts: 15
- Joined: Thu May 08, 2008 9:55 am
- Location: India, Kerala
Re: discontinous constraints
Hi,
Did you get the solution for the problem ? I am also facing the same issue .
Can you share the results with me?
Likes to hear your thoughts about this problem....
Thanks,
Bindumol
Did you get the solution for the problem ? I am also facing the same issue .
Can you share the results with me?
Likes to hear your thoughts about this problem....
Thanks,
Bindumol