Working on btGeneric6DofConstraint....Gotcha!!

User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia

Working on btGeneric6DofConstraint....Gotcha!!

Post by projectileman »

Hi.

Finally I could fix the btGeneric6DofConstraint for making it more robust and versatile. The old one was working very bad.

Check it out, download this new add-on at:
https://sourceforge.net/project/showfil ... _id=245140

Now it supports Motors on each angular axis. The supported limit range is:
  • For axis X: (-PI,PI) .
  • For axis Y: (-PI/2,PI/2).
  • For axis Z: (-PI,PI).
Also you can set the constraint parameters for each Rotation constraint indepently. See the btRotationalLimitClass in the btGeneric6DofConstraint.h file.

However, it is recomended to get limited the Y axis always between that range (-PI/2,PI/2). This code uses a method for find the relative Euler Angles between the bodies, which only gives the Y angle through the ArcSin function.

Also I've implemented support for Typed Joints in the ODE QuickStep solver.

In the zipped file you can find three demos, whose are a rewritten version of the Ragdoll demo. Press 'E' for spawn many ragdolls:
  • I'm not kidding when saying that the old btGeneric6DofConstraint was working very bad. The demo appGenericJointDemo_old.exe shows the ragdolls working with the previous class; The body suffers an epileptic attack and then explodes!
  • The demo appGenericJointDemo_seq.exe implements my new approach for Generic Constraints, which seems works pretty fine. It uses the btSequentialImpulseConstraintSolver class.
  • The demo appGenericJointDemo_quickstep.exe implements Generic Joints using the ODE quickstep solver. May be it behaves more stable, may be not. Judge yourself.
I just use the ragdoll demo for showing the Generic Joints in action, but It is needed a demo that uses Motors. Would be nice if someone develops a Robot demostration using Generic Joints with motors.

Thanks,
Att: Francisco León
User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia

Re: Working on btGeneric6DofConstraint....Gotcha!!

Post by projectileman »

At this moment I've updated the btGeneric6DofConstraint add-on for Bullet version 2.57.

Please download it again from:
https://sourceforge.net/project/showfil ... _id=245140

Note: OdeQuickstep solver gives problems with version 2.57. Meanwhile use Sequencial Impulse solver only.
Youne
Posts: 40
Joined: Sun Jan 27, 2008 2:55 pm

Re: Working on btGeneric6DofConstraint....Gotcha!!

Post by Youne »

Hi Erwin

hi !
i have a problem with btGeneric6DofConstraint, and i hope you can help me !

I created a "Slider" to model a "Hydraulic jack" using two rigidbodies (cylinder) and the function btGeneric6DofConstraint.
By defining:
Lowerlimit < Upperlimit -> axis it limited in that range

I am in the process of constructing a model made up of several "Slider". The problem is that the "Slider" does not often respect the imposed limitations and it ends up in all different directions. Is there a method or a way to rectify this instability?

Thank you for your helps

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

Re: Working on btGeneric6DofConstraint....Gotcha!!

Post by Erwin Coumans »

Youne wrote: I am in the process of constructing a model made up of several "Slider". The problem is that the "Slider" does not often respect the imposed limitations and it ends up in all different directions. Is there a method or a way to rectify this instability?
We always need a reproduction case, can you modify the ConstraintDemo to show the problem?

Thanks,
Erwin