[ODE] Faking a wheel joint

StephanK madmax at red-falcon.net
Wed Jul 2 15:41:02 2003


Thanks for the information.
I decided to implement the fixed wheels and calculating the forces manually.
I've looked into it and the math is pretty straigt forward.
It's not primarily a racing game I'm working on, at least not in the sense of
Formula One or Nascar or smth. but driving is very important indeed!

02.07.2003 03:36:01, Nate W <coding@natew.com> wrote:

>On Wed, 2 Jul 2003, Max wrote:
>
>> 14.04.2003 17:27:15, "David Whittaker" <david@csworkbench.com> wrote:
>> >You take a hinge joint with a vertical axis, attach it to the chassis and
>> >an extra body, at the same position as the wheel.  Then you attach a
>> >slider from that extra body to the wheel body, set both its stops to 0,
>> >and adjust the StopCFM and StopERP parameters as you would for the hinge2
>> >suspension parameters.
>> 
>> Has anyone tried this with success ?
>> 
>> Btw, Nate, do you experience the "bendy wheels" problem with your
>> double-wishbone suspension, too ?
>
>Yes, the double-wishbone buggy will show the bendy wheel problem above a
>certain speed.  The rest of the car holds together well, suspension and
>all, but the axle joints get very erratic.
>
>However, if I was to start work on a racing game (the thought has crossed
>my mind), I'd try using regular hinge-2 joints, with the wheel-rotation
>axis locked.  Friction between the wheel and environment would have to be
>calculated 'manually,' using FDir1 and FDir2 to get the sorts of forces
>you'd expect from rolling tires.  The advantage is that the bendy wheel
>problem won't happen, because the wheels would never spin at all.  The
>drawback is that you'd have to compute your own wheel-ground friction
>force (which you would probably want anyhow for a racing game), and you'd
>have to compute a 'wheel rotation matrix' for the rendered mesh (so you
>can draw spokes rotating realistically at lower speeds).
>
>I think that is basically what David was describing, but, using a Hinge-2
>joint (rather than a hinge, slider, and intermediate body) should require
>a bit less computation per world step.
>
>It might be possible to use unlocked Hinge-2 joints and normally
>calculated friction at low speeds, then transition to the above scheme
>when wheel rotation speed approaches the bendy-wheel threshold.  That
>would save you the trouble of deriving the wheel orientation at low
>speeds.  When the speed hits the limit, you could lock the wheel
>orientation, compute your own friction, and draw some sort of blurred
>wheel texture.  Then again, it would probably be a lot more complicated to
>handle both cases, and the transitions back and forth, than to just derive
>the wheel rotation matrix for rendering purposes - especially considering
>that half of that code would probably already be in place for the same of
>drawing blurred wheel spokes...
>
>Just thinking out loud. :-)
>
>-- 
>
>Nate Waddoups
>Redmond WA USA
>http://www.natew.com
>
>
>_______________________________________________
>ODE mailing list
>ODE@q12.org
>http://q12.org/mailman/listinfo/ode
>