I'm trying to create a rigid connection between two objects (one static and one dynamic) using the 6DOF constraint with all the angular/linear limits locked. The resulting constraint seems springy/squishy. Needs a little viagra. In searching the forum I've come across some indirect references to a solution for this but I can't seem to find the solution itself. I'm guessing I just need to configure some parameters of the constraint, but I'm having trouble figuring out which ones.
The constraint seems to work as expected if both objects are dynamic. I've been sure to set the mass and the inertia of the static object to zero.
----------
Chuck Spencer
http://www.hypercosm.com
Locked 6DOF constraint is springy
-
- Posts: 109
- Joined: Thu Dec 14, 2006 4:27 pm
- Location: Colombia
Re: Locked 6DOF constraint is springy
LOLchucksspencer wrote:The resulting constraint seems springy/squishy. Needs a little viagra

Well, in fact all constraints in bullet are not totally rigid at all. That happens due of the nature of the projected gauss-seidel constraint solver in bullet (mmm well, in bullet the constraint solver is impulse-based).
But I think that this situation will change when Bullet team implements the featherstone algorithm for constraints. I'm waiting for that feature.
http://code.google.com/p/bullet/issues/detail?id=33
Stay tuned.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Locked 6DOF constraint is springy
It could be a bug, specific to static-dynamic case. We will investigate this issue. Did you make sure to disable collision detection between the two connected bodies?The resulting constraint seems springy/squishy. The constraint seems to work as expected if both objects are dynamic.
Code: Select all
bool disableCollisionsBetweenLinkedBodies=true;
dynamicsWorld->addConstraint(constraint, disableCollisionsBetweenLinkedBodies);
The constraints in Bullet should be quite rigid, and not springy. The Bullet constraint solver implementation is purely projected gauss seidel (PGS). Although we hope for a Featherstone implementation, the PGS solver should be sufficient in most cases.projectileman wrote: Well, in fact all constraints in bullet are not totally rigid at all. That happens due of the nature of the projected gauss-seidel constraint solver in bullet (mmm well, in bullet the constraint solver is impulse-based).
Anyhow, you can check progress on this issue here: http://code.google.com/p/bullet/issues/detail?id=210
Thanks,
Erwin
-
- Posts: 109
- Joined: Thu Dec 14, 2006 4:27 pm
- Location: Colombia
Re: Locked 6DOF constraint is springy
I think that it shouldn't be considered a bug.
You should review the constraint parameters. They are configured springly by default for benefiting ragdolls, and it could be changed with some tweaks:
Just look at file btGeneric6DofConstraint.h, line 37:
http://code.google.com/p/bullet/source/ ... nstraint.h
6DOF constraints class contains internal btRotationalLimitMotor objects for each orientation axis (XYZ) . This substructures have the parameters for the softness/rigidness in the constraint. You could access to these substructures by using the getRotationalLimitMotor() method from a btGeneric6DofConstraint object. Then change the m_ERP and m_limitSoftness attributes to 1.0f, or to an approximated value.
I hope that it helps.
You should review the constraint parameters. They are configured springly by default for benefiting ragdolls, and it could be changed with some tweaks:
Just look at file btGeneric6DofConstraint.h, line 37:
http://code.google.com/p/bullet/source/ ... nstraint.h
6DOF constraints class contains internal btRotationalLimitMotor objects for each orientation axis (XYZ) . This substructures have the parameters for the softness/rigidness in the constraint. You could access to these substructures by using the getRotationalLimitMotor() method from a btGeneric6DofConstraint object. Then change the m_ERP and m_limitSoftness attributes to 1.0f, or to an approximated value.
I hope that it helps.
-
- Posts: 35
- Joined: Wed Jun 25, 2008 2:52 pm
Re: Locked 6DOF constraint is springy
I tried it with and without the collision between the two bodies disabled - made no difference (in my test case, the two bodies weren't close to one another).Erwin Coumans wrote: It could be a bug, specific to static-dynamic case. We will investigate this issue. Did you make sure to disable collision detection between the two connected bodies?
I can confirm that when both bodies are dynamic, the constraint seems rigid as expected.Erwin Coumans wrote: The constraints in Bullet should be quite rigid, and not springy. The Bullet constraint solver implementation is purely projected gauss seidel (PGS). Although we hope for a Featherstone implementation, the PGS solver should be sufficient in most cases.
Thanks for looking into it!
-Chuck
-
- Posts: 56
- Joined: Sat Mar 08, 2008 12:37 am
Re: Locked 6DOF constraint is springy
If objects are fairly closeby, the simulation should not be springy. In the attached demo 6DOF constraint between static and dynamic objects has all DOF locked and looks stable.
Can you try to keep the static and dynamic object closeby?
Thanks,
Roman
Can you try to keep the static and dynamic object closeby?
Thanks,
Roman
You do not have the required permissions to view the files attached to this post.
-
- Posts: 35
- Joined: Wed Jun 25, 2008 2:52 pm
Re: Locked 6DOF constraint is springy
Hi Roman, thanks for the response. We're using the constraints in a simulation where the user will be able to make connections between arbitrary shapes in the scene at arbitrary times. We have no way of knowing how close they'll be when the connections are made, and I'd like to avoid enforcing limits on that if I don't have to.rponomarev wrote:If objects are fairly closeby, the simulation should not be springy. In the attached demo 6DOF constraint between static and dynamic objects has all DOF locked and looks stable.
Can you try to keep the static and dynamic object closeby?
So the short answer is, unfortunately no I'm afraid I can't guarantee the static and dynamic objects will be close to one another.
-
- Posts: 2
- Joined: Sat Dec 01, 2012 2:15 am
Re: Locked 6DOF constraint is springy
I'm having a similar issue with a SliderConstraint that I'm adding on contact with a linUpper/Lower limit of 0.0f. I've verified that both of the objects are dynamic, and collision between constrained objects is off (true passed in to the addConstraint function). Any further assistance or ideas on how to resolve this would be appreciated.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Locked 6DOF constraint is springy
Try to avoid large mass ratios (constraints between very light and very heavy objects).
Another option is to increase the number of solver iterations, just for that constraint:
If that still doesn't help, share the .bullet file so others can look at it (attach a zip file).
Another option is to increase the number of solver iterations, just for that constraint:
Code: Select all
constraint->setOverrideNumSolverIterations(40);
Code: Select all
btDefaultSerializer* serializer = new btDefaultSerializer();
dynamicsWorld->serialize(serializer);
FILE* file = fopen("testFile.bullet","wb");
fwrite(serializer->getBufferPointer(),serializer->getCurrentBufferSize(),1, file);
fclose(file);