rec.autos.simulators

Car physics - collision impulses,

Ruud van Ga

Car physics - collision impulses,

by Ruud van Ga » Thu, 09 Aug 2001 20:00:55

Hi all,

As I catched a bug yesterday, I realised there's something structural
missing perhaps from my sim.

When bottoming out the suspension, I just notice the situation and
kept the suspension from compressing any further. The bug I had was
that the suspension velocity wasn't reset, so it could take some time
before the wheel started moving away from the full compression point
again.
After that, I realised that the real effect was that a collision took
place; I would have to bump the car up, much like when you hit a wall
face on (well ;-) ).
Still, like regular forces, you can easily have all the wheels bottom
out at (nearly) the same time, for example when dropping the car from
1m above the ground. This would in effect bounce the car back straight
up. Does anyone have an idea to the possibility of implementing this
sort of thing cleanly? Seems like an added system of impulses, which
add up somehow, instead of taking 1 collision point and mirror
velocity over that (like I do know when you hit the rail, and I don't
even take into account rotational velocity changes yet).

Gosh I should read Chris Heckers physics docs again I think. Still, I
think that handles only 1 collision, while I want to cleanly handle
things like:

body.AddImpulse(Vector *pointOfApplication,Vector
*velocityAtThatPoint)

Where velocityAtThatPoint is something like either the body velocity,
the collision object velocity (another car?), or just the difference
so it's always like one object is static, and the other one isn't.

Sounds a bit like the problem where you drop a cube cleanly to the
floor and all 4 vertices (well, one face actually) hits the ground in
exactly the same time. I guess it would be better perhaps to just
handle 1 impulse per time step, and do a queue maybe which keeps the
other 3 impulses alive for other timesteps.
Am I answering my own question here? ;-)

Anyway, any thoughts on this? Thanks,

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.racesimcentral.net/
Free car sim  : http://www.racesimcentral.net/

Gregor Vebl

Car physics - collision impulses,

by Gregor Vebl » Thu, 09 Aug 2001 20:09:58

Hi Ruud,

I imagine that you have compliance built into your tyres (a vertical
spring coefficient for your tyres). When the wheels hit the end of the
suspension movement, there is no need to go into impulse calcs in this
case, as any force on the wheel due to its compression at the ground
isn't 'used' to
 accelerate the wheel anymore, but is sent directly to the car body.
That is to say, when you will be applying your stuff algorithmically,
when the suspension reaches maximum travel, the effect of the suspension
on the car body isn't K_spring*Suspension_travel in the direction of the
wheel travel + the forces on the wheeel that are lateral to suspension
travel anymore, but directly the total force (not only lateral) on the
wheel as it is now effectively rigidly coupled to the body via what is
an effectively completely stiff suspension.

Cheers,

-Gregor


> Hi all,

> As I catched a bug yesterday, I realised there's something structural
> missing perhaps from my sim.

> When bottoming out the suspension, I just notice the situation and
> kept the suspension from compressing any further. The bug I had was
> that the suspension velocity wasn't reset, so it could take some time
> before the wheel started moving away from the full compression point
> again.
> After that, I realised that the real effect was that a collision took
> place; I would have to bump the car up, much like when you hit a wall
> face on (well ;-) ).
> Still, like regular forces, you can easily have all the wheels bottom
> out at (nearly) the same time, for example when dropping the car from
> 1m above the ground. This would in effect bounce the car back straight
> up. Does anyone have an idea to the possibility of implementing this
> sort of thing cleanly? Seems like an added system of impulses, which
> add up somehow, instead of taking 1 collision point and mirror
> velocity over that (like I do know when you hit the rail, and I don't
> even take into account rotational velocity changes yet).

> Gosh I should read Chris Heckers physics docs again I think. Still, I
> think that handles only 1 collision, while I want to cleanly handle
> things like:

> body.AddImpulse(Vector *pointOfApplication,Vector
> *velocityAtThatPoint)

> Where velocityAtThatPoint is something like either the body velocity,
> the collision object velocity (another car?), or just the difference
> so it's always like one object is static, and the other one isn't.

> Sounds a bit like the problem where you drop a cube cleanly to the
> floor and all 4 vertices (well, one face actually) hits the ground in
> exactly the same time. I guess it would be better perhaps to just
> handle 1 impulse per time step, and do a queue maybe which keeps the
> other 3 impulses alive for other timesteps.
> Am I answering my own question here? ;-)

> Anyway, any thoughts on this? Thanks,

> Ruud van Gaal, GPL Rank +53.25
> Pencil art    : http://www.marketgraph.nl/gallery/
> Free car sim  : http://www.marketgraph.nl/gallery/racer/

Ruud van Ga

Car physics - collision impulses,

by Ruud van Ga » Thu, 09 Aug 2001 21:51:09

On Wed, 08 Aug 2001 13:09:58 +0200, Gregor Veble


>Hi Ruud,

>I imagine that you have compliance built into your tyres (a vertical
>spring coefficient for your tyres). When the wheels hit the end of the
>suspension movement, there is no need to go into impulse calcs in this
>case, as any force on the wheel due to its compression at the ground
>isn't 'used' to
> accelerate the wheel anymore, but is sent directly to the car body.

Hm yes, you have a point there. Hopefully this will be enough for the
car to bounce back before the body sinks in (which is still just being
accelerated upwards). Still, this probably won't be too much of a
problem, since at that point collision detection of the body kicks in
and it gets an impulse anyway.

Thanks!

Ruud van Gaal, GPL Rank +53.25
Pencil art    : http://www.marketgraph.nl/gallery/
Free car sim  : http://www.marketgraph.nl/gallery/racer/

Gregor Vebl

Car physics - collision impulses,

by Gregor Vebl » Thu, 09 Aug 2001 22:15:29

Not only should this be enough, this is also the correct way of doing it
:).

If you didn't have flexible tyres you would need to go for impulses
(such as with a cube), as the change of velocity would be instantaneous.
Flexible tyres act just like additional springs in the system, which
means that the collision is not instantaneous but takes time (of the
order sqrt(car_mass/tyre_spring_coefficient) ). If your timestep is
small enough (at least of the order of the previous estimate), the car
should in no way sink on jumps etc.

-Gregor


> Hm yes, you have a point there. Hopefully this will be enough for the
> car to bounce back before the body sinks in (which is still just being
> accelerated upwards). Still, this probably won't be too much of a
> problem, since at that point collision detection of the body kicks in
> and it gets an impulse anyway.

> Thanks!

> Ruud van Gaal, GPL Rank +53.25
> Pencil art    : http://www.marketgraph.nl/gallery/
> Free car sim  : http://www.marketgraph.nl/gallery/racer/

Matthew V. Jessic

Car physics - collision impulses,

by Matthew V. Jessic » Fri, 10 Aug 2001 08:43:36

You might do a back of the envelope calculation of
how little a height you need to drop the car from
to cause the suspension to bottom.  It's probably rather less
than a meter. Being stiffer doesn't usually help because
you just allow less stroke ;)   So you will probably need the
impulses at some point for something.

The difficulty is that they can't really be generated
individually for each wheel... in general you need to solve for
them in a coordinated sense that can be complicated and
time consuming.

Another issue is extension constraints. It is not uncommon to
have the extension limit inside the compression zone of the spring
such that the tire gets lifted off the ground at some low
but non-zero normal force.

If the impulse for body grounding doesn't unload the tires,
you will loose an important effect that leads to setups
that don't ground out ;).  Depending on how you do the impulses
and other modeling this may or may not be a problem.
It should work out properly, but should be tested :)


rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.