I’m using some Python code to export the USD of a specific object on the stage, but I don’t know how to export a sequential USD, because I cannot get the frame time using python code after I click the button to start physical simulation. I tried to use these two AIPs:
Hi @SitianShen. I think Usd.Stage.GetStartTimeCode() may be appropriate for your start time, but for your end time, you are probably looking for a point in time when your simulation reaches a state of rest. It’ll need to be calculated. The solution will almost certainly involve some Omniverse-specific API so I would recommend asking on the Isaac Sim forum or in the #physics channel on the Omniverse Discord.
In those channels, you’ll find developers that are much more knowledgeable of that area of Omniverse than I am, but to not send you away without some help, one thought that came to mind is perhaps using OmniPVD to record/bake the simulation and then you could potentially find the last timesample or the point in time to end based on the values in the timesample data.