Hi, I have a question about simulation_time.
I’m considering two options, physics_dt and rendering_dt = 1/15 and 1/30.
Test Option
A. self.world = World(stage_units_in_meters=1, physics_dt=1/30, rendering_dt=1/30)
B. self.world = World(stage_units_in_meters=1, physics_dt=1/15, rendering_dt=1/15)
Test Code
prev_time=0
cur_time =0
while simulation_app.is_running():
world.step()
if world.is_playing():
prev_time = cur_time
cur_time = world.simulation_time
print(cur_time - prev_time)
Output
A: 0.033, 0.033, 0.033 … with regular dt.
B: 0.066, 0.066, 0, 0.066, 0.066, 0, 0.066, 0, … with irregular dt.
Can I get a recommendation for this?
I want to use 15Hz data, and the dt is essential for me to post-process the simulated output. dt=0 could cause unintended results.
Thanks!
++ The output of B seems to be under the some rule.
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.06666667]
[0.]
[0.06666667]
[0.]