World time and simulation time

Note: For any Isaac Lab topics, please submit your topic to its GitHub repo (GitHub - isaac-sim/IsaacLab: Unified framework for robot learning built on NVIDIA Isaac Sim) following the instructions provided on Isaac Lab’s Contributing Guidelines (Contribution Guidelines — Isaac Lab Documentation).

Please provide all relevant details below before submitting your post. This will help the community provide more accurate and timely assistance. After submitting, you can check the appropriate boxes. Remember, you can always edit your post later to include additional information if needed.

Isaac Sim Version

4.5.0
4.2.0
4.1.0
4.0.0
4.5.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):

Operating System

Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify): Ubuntu 24.04

GPU Information

  • Model: NVIDIA GeForce RTX 4090
  • Driver Version: 550.120

Issue

My goal is to run the simulation at 500Hz (2ms per step) to match a controller sending data at 500Hz.

world setting:

from isaacsim.core.api import World
world = World(stage_units_in_meters=1.0)
world.set_simulation_dt(physics_dt=0.002, rendering_dt=0.005)  # 500Hz physics, 200Hz rendering
self.world.set_simulation_dt(physics_dt=0.002, rendering_dt=0.002)
get_current_stage().SetTimeCodesPerSecond(0.002)

main code:

    def run(self) -> None:
        reset_needed = False
        try:
            while self.simulation_app.is_running():
                start_time = time.time()
                if self.world.is_stopped() and not self.world.is_playing():
                    reset_needed = True
                    self.world.step()
                    continue
                if self.world.is_playing():
                    if reset_needed:
                        self.world.reset(soft=True)
                        reset_needed = False
                
                self.world.step()
                self.control_loop  # PD control
                end_time = time.time()
                elapsed_time = end_time - start_time
                # if elapsed_time < 0.002:
                #     time.sleep(0.002 - elapsed_time)  
                print(f"Time taken for step: {end_time - start_time:.6f} seconds")

Status

  • The physics engine runs correctly at 500Hz (self.world.current_time advances by 0.002s per step). (estimate using world.current_time)
  • However, Real-world step times (time.time()) are 0.003–0.007s, which is fine for now but may need to be faster for real-time later.

Questions

I already saw Isaac Sim Speedup Cheat Sheet — Isaac Sim 4.2.0 (OLD) and Isaac Sim Performance Optimization Handbook — Isaac Sim Documentation,
but there are some invalid functions like set_min_simulation_frame_rate and I couldn’t solve the problem.

  1. Physics Stepping Without World Time Synchronization:
  • Is it possible to drive the simulation purely based on the physics_dt (e.g., 0.002s) without trying to match real-world time (time.time())?
  • How can I ensure the physics solver steps consistently at 500Hz, prioritizing simulation accuracy over real-time synchronization?
  1. Performance for Humanoid Simulation:
  • My steps take 0.003–0.007s. If real-time becomes needed, how can I get closer to 2ms? (e.g., reduce rendering, optimize PD control)
  • Are there specific settings for humanoid simulations (e.g., solver type, PD gains) to keep 500Hz stable?
  1. General Optimization:
  • Are there specific settings (e.g., physics parameters, solver type, or GPU configurations) to ensure stable 500Hz physics updates, regardless of real-time constraints?
  • Could background processes (as shown in my nvidia-smi output below) be impacting performance, and how can I minimize their interference?

Screenshots or Videos



Could you clarify what you mean by “trying to match real-world time (time.time())”? By default, when you call world.step() in a loop without any additional synchronization or delays, Isaac Sim will advance the simulation as quickly as your hardware allows. In this mode, the simulation time (which advances by your specified physics_dt per step) is completely independent of the actual wall-clock time measured by time.time().

If you want the simulation to run in real time (so that each simulation step takes exactly as long as physics_dt in the real world), you would need to add your own timing logic—such as using time.sleep() to slow down the loop. Otherwise, the simulation will simply run as fast as possible, and simulation time may progress much faster or slower than real time depending on your system’s performance.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.