[ODE] Simulations running in real time?

Chris Royce croyce at ntlworld.com
Mon Mar 28 15:38:53 MST 2005


Yeh i figgured i could do that, ie could have something like.

if(timeSinceLastUpdate > 0.5ms)
{
    do simulation
}

I understand how to do the get time and get the difference etc.
The question I have is if I wanted to say update it every 0.5ms, what would 
I use for a worldStep value? assuming it was going to be called at the rate 
of every 0.5ms ?

when I am placing dWorldTimeStep at 0.5 does that mean each time that it is 
called it does so at 0.5ms increments. that said if i had it being called 
every 0.5ms and had timestep at 0.5 would that be real time ?

Cheers


----- Original Message ----- 
From: "Mark Wayland" <mwayland at torus.com.au>
To: "Chris Royce" <croyce at ntlworld.com>; <ode at q12.org>
Sent: Monday, March 28, 2005 3:31 PM
Subject: Re: [ODE] Simulations running in real time?


> Using a fixed timeslice for world stepping simply means the simulation is
> advanced by that amount of time in each call to the stepping code. On fast
> computers, that call will be more frequent than on slow ones. Simply
> throttle your application using any one of the million examples out there 
> on
> the 'net - for example you may wish to use QueryPerformanceCounter and/or
> timeGetTime on Windows (note that there's a bug in some PCI components 
> that
> make QueryPerformanceCounter jump ahead or back 5 seconds or something -
> there's a Microsoft tech note on how to address it, should you wish your 
> sim
> to be robust on all Win32 systems).
>
> Cheers,
> Mark
>
> ----- Original Message ----- 
> From: "Chris Royce" <croyce at ntlworld.com>
> To: "ode" <ode at q12.org>
> Sent: Monday, March 28, 2005 11:10 PM
> Subject: [ODE] Simulations running in real time?
>
>
> Hello there I'm trying to get my simulation to run in real time,
>
> Basically the problem I'm having at the moment is that the simulation is
> running at different speeds on different computers. I'm working in C++ and
> using the drawStuff interface.
>
> I'm also noticing that by changing the dWorldStep value the motion varies
> quite considerably, whereas I'd expected to run simply faster or slower ?
>
> Thanks for any advice
>
> Chris
>
>
> ----------------------------------------------------------------------------
> ----
>
>
>> _______________________________________________
>> ODE mailing list
>> ODE at q12.org
>> http://q12.org/mailman/listinfo/ode
>>
>
> 




More information about the ODE mailing list