Re[1]: [ODE] Car steering
Nate W
coding at natew.com
Mon Aug 26 13:49:02 2002
On Mon, 26 Aug 2002, Thomas Harte wrote:
> > 1) compute the desired steering angle (axis 1) of each hinge-2 joint
> > 2) look at the actual axis-1 angle of each hinge-2 joint
> > 3) compute a desired velocity for axis 1 that will bring the actual angle
> > closer to the desired angle
> > 4) apply that force
>
> But how would this account for, e.g. a turned wheel hitting a side
> wall and being forced into the forward position correctly forcing the
> wheel on the other side to turn?
Good question... it wouldn't account for that.
(Warning: I'm making this up as I go along.)
You might try using an intermediate body between each hinge-2 and the
wheel. The wheel would then be attached to the intermediate body with a
hinge. That hinge would then be used for braking or motor forces, while
Axis-2 of the hinge-2 joint would have its desired velocity always set to
zero to keep the intermediate bodies from spinning. The two intermediates
could be connected by a 'steering link' which would keep the two wheels
parallel (or close to parallel).
An ASCII-art top view follows. Use a fixed-pitch font for best results:
W W
W W
WHI2XXX2IHW
W I I W
W I I W
B-----B
W = wheel
H = regular hinge
I = intermediate body
B = ball joint
X = car chassis
B = ball joint
---- = steering link
You'd still need to compute steering forces as I described earlier, but
with the linkage between the hinge-2 joints you could probably get away
with only doing that computation for one side.
This should work without too much computational cost. There might be a
better way, and it might not work at all (I have little experience with
hinge-2 joints), but it's an idea...
--
Nate Waddoups
Redmond WA USA
http://www.natew.com