[ODE] Slightly More Complex Car Shocks Simulation

John Butterfield johnb003 at hotmail.com
Sun Oct 13 00:19:02 2002


I am working on a racing game and to start with I made a hovercraft to avoid 
using joints and figuring out what works and what doesn't, but now I am 
working on my rc10 and I've got some problems. Here is the page for my game, 
I've got a picture of the vehicle on the 'home page':
     http://web.csuchico.edu/~jb393/urgent

Ok so my problem is that I have a few more moving parts than the standard 
buggy problem.  The top red axel thing I am treating as the same body as the 
carbody, the moving parts are, the wheel, the spring/shock, and the lower 
axel.  So it's really just a puzzle of how to put it together.

Let me ask this first, there will likely be a lot of torque and quick 
movements since the masses are so small, being an remote controlled car, so 
would it be better to use fewest joints (like one hinge2 joint) and set the 
other positions manually and rotations manually based on the position of the 
wheel and body, or maybe add extra joints to add support.  For example, with 
a large mass ratio like that of my lower axel and the carbody, if I use a 
regular hinge with some axis and apply a force along the same axis but 
translated out to add leverage, would that hinge want to break. An analogy 
would be hanging on a cupboard cabinet with all of your weight.  Instead of 
using a hinge then, you could construct a seemingly more stable structure by 
making a triangle with ball joints, like this where F is the force and y is 
the vertical axis:
|O
|  \
|   \
y    O
|   / ^
|  /  |F
|O    |

Something I didn't mention, since I was trying to keep things simple is that 
I made a scripting interface to the physics that corresponds to a 3ds file. 
This means any kind of hack like setting the position of the shock based on 
the wheel, I would like to avoid so the scripts can correspond to the 
existing physics.  If it truly is the best solution, I could add my own 
special kind of joints, I suppose, and make them available for the scripts.

The method of connecting the bodies I've been experimenting is as follows:
wheel->hinge2joint->shock,
shock->sliderjoint(vertical axis)->carbody

just this has a lot of error; the shock->sliderjoint->carbody doesn't 
maintain it's orientation with the carbody (it falls off it's axis)
then for the bottom axel I needed a joint that only restricts 2 positional 
degrees of freedom, it's a combo of a balljoint and a slider... looks like 
this  X====|----O it's kind of a "look at" joint.
I would just make fake bodies, and by that I just mean bodies that don't 
have any corresponding model to draw, or no physical matter but I was scared 
to use 0 for a mass so they just have very small masses.
Ok this post is getting long, I'll leave it at that.

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com