Hey @toni.sm @Hammad_M @ahaidu @rthaker
What’s the formula to calculate real time factor of isaac sim? I looked up and found that FPS * Frame time can give render factor, but how to get an equivalent of gazebo’s RTF?
Hey @toni.sm @Hammad_M @ahaidu @rthaker
What’s the formula to calculate real time factor of isaac sim? I looked up and found that FPS * Frame time can give render factor, but how to get an equivalent of gazebo’s RTF?
Hi @vyachu07,
The RTF is calculated as rtf = (elapsed_sim_frame_time / elapsed_real_frame_time)
Please take a look at ROS 2 Publish Real Time Factor (RTF) — Omniverse IsaacSim latest documentation which explains how you can get the rtf.
Note:Tthis tutorial is for ROS users but if you are not using ROS you can simply read from the Isaac Real Time Factor
OmniGraph node.
Hi @Ayush_G
I am implementing this in Isaac Sim 2023.1.1 as its pretty stable for my application. I tried to access the source of the Isaac Real Time Factor
node, but cant find it. Is there a simplified version?
hey @Ayush_G
Is this the formula you’re talking about?
def run(self):
“”"
Method that implements the application main loop, where the physics steps are executed.
“”"
# Start the simulation
start_real_time = time.time()
self.timeline.play()
# Initialize variables for RTF calculation
frame_count = 0
start_sim_time = self.timeline.get_current_time()
start_real_frame_time = time.time()
while simulation_app.is_running() and not self.stop_sim:
# Update the UI of the app and perform the physics step
self.world.step(render=True)
self.physics_context.enable_gpu_dynamics(True)
# Measure elapsed time since last frame update
curr_sim_time = self.timeline.get_current_time()
curr_real_frame_time = time.time()
elapsed_sim_frame_time = curr_sim_time - start_sim_time
elapsed_real_frame_time = curr_real_frame_time - start_real_frame_time
# Calculate RTF for this frame
rtf = elapsed_sim_frame_time / elapsed_real_frame_time
print(f"Frame {frame_count} RTF: {rtf}")
# Update variables for next frame
start_sim_time = curr_sim_time
start_real_frame_time = curr_real_frame_time
frame_count += 1
# Cleanup and stop
carb.log_warn("PegasusApp Simulation App is closing.")
self.timeline.stop()
simulation_app.close()
what happens is that I get values like 0.1. My physics step is default 60s
Hi @vyachu07 do you still need help on this topic?
It looks like your system might be overloaded. Do you observe lags in your simulation? What is your CPU and GPU usage?
Hello!
We noticed that this topic hasn’t received any recent responses, so we are closing it for now to help keep the forum organized.
If you’re still experiencing this issue or have additional questions, please feel free to create a new topic with updated details. When doing so, we recommend mentioning or linking to this original topic in your new post—this helps provide context and makes it easier for others to assist you.
Thank you for being part of the NVIDIA Isaac Sim community.
Best regards,
The NVIDIA Isaac Sim Forum Team