Re: Force feedback integration : need help about physics
Annick et Jean-Philippe <[email protected]>
| Newsgroups | gmane.games.torcs.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Christos, and all.
>> Currently working on force feedback integration in Torcs,
>> I am very close to the moment when I'm able to inject some effects into my wheel.
>
> Since we already use the Pacejka formula, adding the aligning force is
> trivial. I hope that it works correctly.
>
> I guess I can export a couple of variables in some structure..
> How about
> struct SteeringFeedback {
> float align; // magnitude of the horizontal force
> float bump; // magnitude of the vertical force
> float bump_frequency; // in case the force updates are too slow
> };
Great !
But, just to see if I understand (feel free to correct me if not) :
- what you call "magnitude of the horizontal force" is the _signed_ magnitude
(say negative on left hand side and positive on right hand side, or reverse,
depending on the orientation of the axis) of the force that "tries and force"
the front (steering) wheels to align themselves back
to the car movement axis ?
- what you call the "magnitude of the vertical force" is the magnitude
of the force that the front (steering) wheels feel from the ground ?
I guess this time, this force is always positive or nul ... am I right ?
- for the "bump_frequency", when you say "in case the force updates
are too slow", do you means that :
- if we are able to feed the device at a sufficient pace (Shannon says :
at least twice the frequency of the vibration that the wheels feel
when rolling on a kirb), there is no need for the "bump_frequency"
as we can simply use a ConstantForce effect,
updated at the sufficient pace ?
- if not (too high speed for the car, too slow device effect update pace),
we need this bump_frequency to inject a consistent Periodic Force Effect
in the device ?
> Now, there bumps may be a bit tricky. The simulation's dt is currently
> 0.002 if I remember correctly.
What do you call the "simulation's dt" ? I was believing that the pace of the
simulation was variable, according to the current frame rate ? In other words,
that, say, the human module "rbDrive()" function was called once per global
Torcs loop (the one that runs and runs raceengineclient/raceengine::ReUpdate(),
and so the update function of the simulation engine) ?
Does this have something to do with the fact that
raceengineclient/raceengine::ReOneStep is called multiple times (loop) inside
of raceengineclient/raceengine::ReUpdate() ?
Can you explain how it works, then ?
> I think that the control feedback is set to 0.01, though I could be wrong.
What do you mean by "control feedback" ? In Torcs ? in the device ? ... ?
May be that's not relevant, but a quick computation indicates that
a car that rolls at 200 km/h on a kerb with a bump every 50cm,
will experience a 111 Hz vibration (200*1000/3600/0.5).
Does this ~0.01s period as something to see with your 0.01 value
for the "control feedback" ?
> In that case, you wouldn't need a bump_frequency, just a magnitude for the
vertical forces and then how
> that is handled would depend on the actual feedback wheel used.
> Are there any other forces that you'd feel on the wheel?
For the moment, I have no ther idea, but may be someone else
with more physics skills and feelings will ...
> I think I'll add the structure in interfaces/car.h and
> add it to the tPrivCar structure.
>
> How's that?
Simply GREAT !
I'm very impatient to get your patch ;-)
Thanks a lot for you quick answer and help.
Cheers,
Jean-Philippe.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/