Real time factor in Issac sim

How do you find out the speed of the issac sim simulation with respect to real time?

1 Like

The only way I found so far is to drop an object from 9.8 meters and measure the time manually when it hits the ground!! LOL!! There should be a fat box which tells us the real time factor!

If the simulation is running via the regular launcher start/isaac-sim.sh then the physics step will adjust itself as best it can to remain realtime. If you are running via python.sh then you can do something like this:

The amount of time that is slept will tell you how much faster than realtime things are running. Provided that the simulation is simple enough to run faster than realtime.

class SteadyRate:
    """ Maintains the steady cycle rate provided on initialization by adaptively sleeping an amount
    of time to make up the remaining cycle time after work is done.

    Usage:

    rate = SteadyRate(rate_hz=60.)
    while True:
      app.update() # render/app update call here
      rate.sleep()  # Sleep for the remaining cycle time.

    """

    def __init__(self, rate_hz):
        self.rate_hz = rate_hz
        self.dt = 1.0 / rate_hz
        self.last_sleep_end = time.time()

    def sleep(self):
        work_elapse = time.time() - self.last_sleep_end
        sleep_time = self.dt - work_elapse
        if sleep_time > 0.0:
            time.sleep(sleep_time)
        self.last_sleep_end = time.time()