Hi @rthaker
In v2021.2.1 what happened was the following
sc = SimulationContext(whatever)
timeline = omni.get_timeline_interface()
sc.play()
timeline.set_auto_update(False)
whatever was done from this point onward, the timeline wouldn’t move if not with
timeline.set_current_time/[forward/backward]_one_frame()
or similar.
This means that kit.update()
, sc.step()
, sc.step(render=False)
, sc.render()
, etc would not move the timeline and therefore the animations. Which is the desired behavior, i.e. the timeline does not auto update.
In the latest version what is happening is what I described above.
kit = SimulationApp()
timeline = omni.timeline.get_timeline_interface()
simulation_context.play()
timeline.set_auto_update(False)
simulation_context.step() # this advances the timeline!
kit.update() # this advances the timeline!
simulation_context.step(render=False) # this does not advance the timeline
i.e. anything involvign rendering does advance and auto update the timeline.
Log Example:
ipdb> timeline.is_playing()
False
ipdb> timeline.is_auto_updating()
True
ipdb> simulation_context.is_playing()
False
ipdb> timeline.get_current_time()
0.0
ipdb> simulation_context.step()
ipdb> simulation_context.step()
ipdb> simulation_context.step()
ipdb> simulation_context.step()
ipdb> timeline.get_current_time()
0.0
ipdb> simulation_context.play()
ipdb> timeline.set_auto_update(False)
ipdb> timeline.is_playing()
True
ipdb> timeline.is_auto_updating()
False
ipdb> simulation_context.is_playing()
True
ipdb> simulation_context.step()
ipdb> simulation_context.step()
ipdb> timeline.get_current_time()
0.06666666666666667
ipdb> simulation_context.step()
ipdb> timeline.get_current_time()
0.1
ipdb> kit.update()
ipdb> timeline.get_current_time()
0.13333333333333333
ipdb> simulation_context.step(render=False)
ipdb> timeline.get_current_time()
0.13333333333333333
Clearly, I can stop the timeline. But that will stop the simulation context, stopping the physics.
Let’s hope I was clearer.
As for the renderer: I capture the sequences either in RTX or Path Tracing. I use a custom loop that renders the scene using the simulation context since I need to control the simulation to move the robot around, and make changes. So I have my python script that runs a loop and a rendering call.