6DOF constraint parameters are ignored?

Show what you made with Bullet Physics SDK: Games, Demos, Integrations with a graphics engine, modeler or any other application
Post Reply
diamond.geezer
Posts: 7
Joined: Tue Jan 26, 2010 1:49 pm

6DOF constraint parameters are ignored?

Post by diamond.geezer »

I am using Bullet 2.78.
I have a model of a robot skeleton where the spine vertebrae are joined by 6DOF constraints.
The upper part of the model (ribcage, head, arms etc) adds up to a considerable weight and when I run the model it fall right over forwards and the rotational and translational limits I have set on the vertebrae constraints are effectively totally ignored.

One solution is to run at an extremely low timestep, but this is prohibitively slow.

Another solution is to reduce the upper weight significantly but this is a model of a real robot so it needs to use the real values.

I have therefore been attempting to tune the parameters of the constraints so that they are able to resist breaking like this.
Changing the error margin BT_CONSTRAINT_STOP_ERP and the "Constraint force mixing factor when joint is at limit" (whatever that means) BT_CONSTRAINT_STOP_CFM does help somewhat and can stop it crashing to the floor but the actual limits that I set are still mostly ignored.

However, there are a number of other constraint parameters offered in the Bullet code that act on the btRotationalLimitMotor that look like they could help.
These are parameters like m_damping, m_limitSoftness, m_maxLimitForce etc

In the code they are clearly heavily used in the btRotationalLimitMotor::solveAngularLimits() and btTranslationalLimitMotor::solveLinearAxis() methods.

However, although I can certainly set these parameters, they do not affect the behaviour in any way, even when set to crazy values.

Looking further, as far as I can see these methods are never actually called by any other code. This explains the lack of response to their tweaking.

So, my questions are:-

* am I correct to assume that these parameters/methods are actually defunct?
* if so, should they not therefore be removed to prevent confusion to other poor schmucks like me?
* Are there any other parameters or tweaks apart from just the 3 setParam(BT_CONSTRAINT_..) variations that I can use to help get the constraint limits to do what I set them to do? What happened to the bias setting that used to be available?
pwagner
Posts: 8
Joined: Tue Mar 29, 2011 11:31 am

Re: 6DOF constraint parameters are ignored?

Post by pwagner »

Hello.

I'm sorry that I can't help but I have some questions by myself. I'm also looking for some similar problems: I want to simulate a simple two mass oscillator. Therefore I need a spring which I tried to simulate via a 6DOF spring constraint. I also tried to change the ERP and CFM but never got a working link between the two objects.
So have you managed to tune your constraint to get the desired behavior? If you did I would appreciate it if you could share your knowledge with me.

Best regards.
diamond.geezer
Posts: 7
Joined: Tue Jan 26, 2010 1:49 pm

Re: 6DOF constraint parameters are ignored?

Post by diamond.geezer »

If you want 2 point masses and an idealized spring, then you don't really need Bullet do you?
Just write the equations of motions of the masses under extension/compression force from the spring.
pwagner
Posts: 8
Joined: Tue Mar 29, 2011 11:31 am

Re: 6DOF constraint parameters are ignored?

Post by pwagner »

Yes you are right. A simple two mass oscillator would be no problem. But I want to simulate bigger systems for my master thesis and springs are just one single component I will need.
Within another thread I allready asked for help with a spring/suspension but no one answered.

Thanks anyway for your answer.
Post Reply