Skip to content

Commit 388b3d4

Browse files
committed
Add warning when computation too slow
1 parent f074503 commit 388b3d4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/collect_joint_data.py

+6
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,12 @@ def main():
295295
simulation_end_margin = 1.0
296296
simulator.AdvanceTo(traj_source_initializer.get_end_time() + simulation_end_margin)
297297

298+
actual_realtime_rate = simulator.get_actual_realtime_rate()
299+
if actual_realtime_rate < 1.0:
300+
logging.warning(
301+
f"Execution was {actual_realtime_rate:.2f}x slower than real time!"
302+
)
303+
298304
# Save data
299305
visualizer.StopRecording()
300306
visualizer.PublishRecording()

0 commit comments

Comments
 (0)