by Julio Jerez » Wed Jun 17, 2009 11:13 am
As I explained to you before, making a car is not a trivial task.
I hope you accept that I have a lot more experience working with matrices and physics than you have.
When I need to make a car the method I use, is making a constraint joint that allow me to apply all of the forces that are part of the car and tire dynamics,
then let a non linear constraint solvers calculate all of the internal forces that drive the car body.
You do not have to take my word for it, if you look at all of the commercial physics engine; they too implement car physics by using a constraint solver.
The people making these car joint are not beginners, the large majority hold PHDs in teoretical physics, Math, or Computer science; and they too use constraint solvers.
In fact Car physics is so hard that all of the physics engines that pseudo laws of physics (liek impulsive solvers) have to implement special solvers just to solve the car physics.
With Newton I just use the same solver because Newton do has a pure Force based Newtonian constraint solver.
You can find literature in the internet about the force that act on a tire, but all that literature does not tell you the complete truth.
Most of the literature is taken from Books written by people running empirical test in laboratories.
They use a machine called dynamometer, a device that allow the researcher to place the tire fixed on an axis and make it
spin on conditions similar to what happens on the road.
Then they measure the forces on the tire patch and also the tire behavior.
The reason they do that is because the test is designed for making table of tire characteristic on different conditions.
Essentially what they are doing is making an empirical Law of a tire behavior.
What they do no tell you is how to calculate the forces that the Dynamometer apply to the tire and the force that the tire apply to the dynamometer,
which is what is needed for a simulation of a car in a computer.
To make it even more complex, they only run the test on one tire, but in a real car you have a set of tire,
which mean the forces generated by each tire have to compete with the forces generated by other tires.
In a software simulation the Job of the Dynamometer is done by a Newtonian constraint solver.
Essentially you apply empirical laws of friction to the tire, plus the law of Gravity, the forces generated by the engine, in general all the known forces,
and the constraint solver calculate all of the reactions forces between tire and floor, tire and car hub, collision with the environment and so on.
This is a complex task to take all from scratch, you need to use building blocks that already do part of the work for you.
For the Last time, I suggest you to using the car joint, and them after that if you want to learn how to make your own, you can learn a bit how other people did it and you move from there.
The one think I will tell you is that there is not such thing as car physics, cars obey the same laws of physics all other bodies obey, the difference is that cars are subjected to different constraints.
This is why people use physics engines to simulate cars, physics engine allow the person simulating the car to specify the constraint rules that car body should obey,
just the same way they specify the constraints rule that a door shoudl obey when it swings.
The moral is, the first step to make a car is not making a car with tires, it is making a collision system and a Newtonian physics solver.
Once you have those elements, then you learn a little about the laws that control a tire, and badabim badabum you can make a car.
Even when you have those elements working, you still need a lot of tweaking, heuristic and luck.
For example I created the basic car joint in Newton but it was not fun,
it took David Gravel experience with other vehicle simulation to make it fun to drive, there is a lot of experience that you are getting there.
I hope I am not offending you, but I only want to save you lot of aggravation, and frustrations pursing something that will lead you nowhere.