[ODE] Driving boxes on the arc or curve.
Seweryn Habdank-Wojewódzki
habdank at megapolis.pl
Thu Oct 12 03:43:32 MST 2006
Hi everyone
I want to join ODE library as a base for my open source simulator of the
road traffic. I have some models, how drivers are generally
driving, and there are some problems to fit them with ODE. This rather not a
problem with ODE, but with models. So I am asking form small help. I want to
understand ho can I fit models to ODE.
Models are working on the assumption that not acceleration is important, but
velocity. However I have calculated acceleration as a function dependent of
the velocity and bumper-to-bumper distance. What is my problem? I do not
really know what is optimal to set in to ODE world.
If I know absolute with sign value of the acceleration (from model) I know the
absolute with sign value of the force which has to be set. So the way is to
take force vector from ODE world, then calculate singular vector of it and
multiply by the absolute force. Then I will set the needed force vector, in
the direction of the movement.
The problem is when I want to turn right or left the modelled
car. I do not know what I should use? Let say that I know linear acceleration
or force at the begin of the movement, calculated like before. Then I could
calculate relative Torque (or Torque) as M = F x r, where x is cross product,
r is known radius, F is known force. At the next step I need to take the
linear velocity from the car, to calculate next value of the acceleration.
Interesting thing is further, when I try to use curvature radius, which
changes from point to point if the movement is _not_ on the circle but on the
curve e.g. Bezier curve parametrised by the length recalculated to the real
value (0,1). I have some formulas for such a curvature radius, but I do not
really know how to make an optimal code for that using ODE. Especially it is
important that I have no other physical elements in the world like in
test_basket demo.
Can anyone tell me how can I better organize such a calculations? Maybe
something I missed, probably something I complicate too much.
Important for me is to create very abstract vehicle, without wheels, just
floating box, but this box have to have a mass, and I need to set the
acceleration or force to it from outside. The simplification is done because
I need to simulate about 8000-16000 vehicles. I the future I want to let them
influence each other like in demo test_crash. So this is the reason tha I
choose the ODE library.
Best regards.
--
|\/\/| Seweryn Habdank-Wojewódzki
`\/\/'
More information about the ODE
mailing list