Generic6DoFContstraintVehicle

Post Reply
senoradam
Posts: 3
Joined: Thu Jun 16, 2011 5:36 am

Generic6DoFContstraintVehicle

Post by senoradam » Mon Jul 18, 2011 7:03 am

Hi!

I'm building a robot simulation using Bullet Physics, and I need to use rigid bodies for the wheels to get enough physical realism (raycast can't deal with slipping and variable terrain realistically). I've attached 4 rigidbody wheels to my suspension base via 6DoF joints with only the wheel rotation axis free (all others locked). The suspension base is then attached to a chassis rigidbody via 4 6DoF joints with only vertical translation limited (all others locked) to simulate suspension springs. This all works fine, except when I drive my vehicle (by applying torque to the wheels) every so often one or other of the wheels appears to lock inexplicably leading to very bad driving behaviour. I tried lowering and raising the wheel/chassis mass ratio, and varying the wheel friction; I've searched my model for the source of this error and cannot find a reason, can anyone suggest anything?

Thanks very much!

Adam

Xcoder77
Posts: 6
Joined: Mon May 30, 2011 8:00 am

Re: Generic6DoFContstraintVehicle

Post by Xcoder77 » Tue Jul 19, 2011 1:32 am

Try using Hinge Constraint for your wheels , and set the rotation by using Angular motors

senoradam
Posts: 3
Joined: Thu Jun 16, 2011 5:36 am

Re: Generic6DoFContstraintVehicle

Post by senoradam » Tue Jul 19, 2011 2:42 am

Hi,

my initial thought was to use hinge constraints, but then i had this behaviour where the wheels were not held in position correctly, i.e they were able to rotate slightly along the axis parallel to the direction of the cars movement.. see my highly scientific diagram (and imagine the full stops are spaces.):

---------------|.....---
...........................|-- /.../
_________________|... /__/

And in terms of using angular motors, do you mean the rotationalLimitMotors.setTargetVelocity() method?

Post Reply