[ODE] Vehicle Speed (Generic Units to Real World Units)
Jeff Weber
jeffreyweber at hotmail.com
Wed Jul 30 05:49:01 2003
I understand units in ODE are generic and i can choose whatever units I want
as long as I am consistent.
I currently have things set up so that 8 ode units = 1 meter. This is
arbitrary and was chosen for reasons related to the graphics engine we are
using.
I have conversions that allow me to go back and forth between ode units and
meters and everything works well. I can make a vehicle wheel with a radius
read from a spec sheet, then create a geom and body of the correct size to
simulate it in my world.
My problem now, is figuring out vehicle speed in real world units. (m/s for
instance). I need to be able to relate my vehicle wheel's angular speed to
my vehicles speed so that if I want my vehicle to go 50 m/s I know what I
need to set for my wheel joint's dParamVel ("Desired Velocity")
I think my confusion is with the "time" unit. It's a pretty easy calculation
to go from angular velocity to linear velocity (ignoring slip) if you know
the radius of the wheel. However, the value returned from
GetHinge2Angle2Rate() does not jive with the real world. The vehicles
linear speed calculated from the angular speed returned from this function
is wrong.
I'm sure it is because I assumed "seconds" as a unit of time. My question
is how can I figure out a unit of time that will give my correct results?
Do I need to physically measure it within the context of my world? For
instance, knowing the radius of my wheel, and setting the "Desired Velocity"
of my wheel to 1 should I measure how long it takes to go a certain distance
and figure the time unit conversion from their?
Is there a better/easier way?
I apologize for the long post, but this is important for our project.
-jeff
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail