Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


I need some information about timing when doing car physics.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 vadevaman   Members   -  Reputation: 157

Like
0Likes
Like

Posted 07 June 2014 - 02:13 AM

Well to start off there's to much code to post, and I dont know exactly where this problem of mine occurs. So I cant even post a part of it. Sorry.
But what I can do, is describe what the car is doing visually. Or for those who ask in PM I can send a private demo To see this error closely.
 

Problems Description:
The rear of the car seems to wobble when accelerating, just as if the car's tires are improperly timed to accelerate, so the left one accelerates and then the right. The differential itself is simple open differential, and it works in C# code, but in C++ it wobbles.

So anyone experienced, what would be the best timing order for doing things in car related setup's ?

I'm doing it in this order atm:

car:

  1. load car setup (a.k.a. configuration)
  2. givewheels to differential (to compute the average speed)
  3. update driveline mechanics (gearbox, clutch engine)
  4. get information after update (drivetrain torque etc.)
  5. update differential (powered wheels)

wheel:

  1. update raycast
  2. update geometric effects (steering geometry)
  3. load wheel setupa.k.a. configuration)
  4. update suspension (compression and force, also get normal force from here)
  5. update tire (slip ratios, slip angles, low speed friction model & pacejka)
  6. calculate wheel accelerations (apply braking and traction torque, angular velocity calcs)
  7. apply forces ONLY when on ground, otherwise zero slips and forces

So the order from my view looks ok. Ps the order is for a single frame and gets repeated every frame.
This order works in C# as I mentioned before, but in C++ something gets messed up.

I've had issues with C++ for quite some time, but have been able to fix them,

mostly the issues have been about floating point inaccuracy & nan/infinity return's.

Might this problem also be related to the previous issues?

Thanks!

 

Edit:
Wobbling only occurs when on throttle, while coasting or trusting (applying a force to push the car) the wobbling doesnt occur at all...

 

Edit2:
After some fiddling, it seems it's pacejka(combining) related.

Not sure if real tires could produce such effect? At 0 toe and 0 camber it is


Edited by vadevaman, 07 June 2014 - 05:14 AM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS