Race Sim Central
Rec.Autos.Simulators Archive

Car physics - collision impulses,

5 posts by 3 people · 08 Aug 2001 11:00 UTC - 08 Aug 2001 23:43 UTC

Ruud van Gaal 08 Aug 2001 11:00 UTC#168987
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/
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 Ruud van Gaal wrote:
Quoted text (46 lines)> > 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/
On Wed, 08 Aug 2001 13:09:58 +0200, Gregor Veble <[email hidden]> wrote:
Quoted text (8 lines)>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/
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 Ruud van Gaal wrote:
Quoted text (12 lines)> > 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/
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. > 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. 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 :)

Sponsors

Affiliate Links

Sim Gaming Expo MOZA Racing Sim-Lab Fanatec TrakRacer Asetek Internet Privacy From NordVPN Dreamhost Capital One Credit Card Application Fanatical CDKeys Amazon Amazon UK Project Motor Racing iRacing Get your racing gloves, boots and more from Demon Tweeks. Enlist at Roberts Space Industries, developers of Star Citizen and Squadron 42


Back from the ashes since July, 2019. First created in 2001 with the merger of Legends Central (founded 1999) and simracing.dk.

A site by a sort of sim racer, for sim racers, about racing sims. News and information on both modern and historic sim racing software titles.

All products and licenses property of their respective owners.


Facebook Threads Bluesky Twitter Mastodon Instagram YouTube Tiktok Twitch Reddit Google News Apple News Subscribe via WordPress Flipboard eBay

Race Sim Central © 1999-2026 | Some links pay RSC a commission. Advertising does not equal endorsement.Cookie Policy