[ODE] Faking a wheel joint
DjA
djarcas at hotmail.com
Wed Jul 2 09:42:02 2003
Is there some sort of algorithm to limits how fast the wheels should be
turning? I'm sure timestep is involved somewhere. Is it a factor of the
hinge2 motor speed, too? Would making your car with wheels twice as big help
(as they only have to spin half as fast to get the car to go at the same
speed)
Adam
----- Original Message -----
From: "Nate W" <coding@natew.com>
To: <ode@q12.org>
Sent: Wednesday, July 02, 2003 2:36 AM
Subject: Re: [ODE] Faking a wheel joint
> 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
>