Hello all!
I am still busy with generating synthetic data (lidar sensor) and now I am facing some issues.
- My plan is to trigger the randomization using a custom event. I just saw that there is the opportunity to register triggers using the replicator api:
omni.replicator.core.trigger.register(fn, override=True)
Is it possible to do so? Are there any examples of the registration of trigger events?
- The next point is to trigger all writers using a custom event node. Is it possible to call a simple function that is acting as a trigger for them? However, I would use the _attach_trigger function for the writers to connect both of them
My overall plan for the data generation is the following:
triggerRandomization() # trigger randomization
world.step() # do physics simulation
triggerWriters() # trigger the writers to retrieve the latest data
Are there any suggestions from you? I did not find any documentation to go ahead with this.
Does my plan make sense?
Best regard,
Christof
Just for my understanding:
What is the order of execution in action graph? Is it that the randomization is first executed and when it is finished that the sensor measurement is scheduled?
Hi @christof.schuetzenhoefer! You’re correct, randomization is executed, then measurement (ie. annotation) is scheduled, but may not be complete by the time the scene is modified for the next frame. Custom triggers for randomization is possible but not yet easily done. Triggers for writers is a feature we’re actively developing and which is not currently possible. Could you give more details on your use case? We may be able to provide you with a workaround until these features are available, and I’d love to incorporate your feedback into the development and ensure we’re offering the best experience.
Thanks for the response @jlafleche !
Workflow should look like this (preferable that the functions blocks the execution until the desired processing is done):
triggerRandomization() # trigger randomization
world.step() # do physics simulation
triggerWriters() # trigger the writers to retrieve the latest data
For my use case, I want to use the replicator for the randomization of a scene. When this is done, then the measurement of the sensors can be initiated (or a way that I can get the correct results for the finished scene). Finally, the writer can be directly triggered from a function (or after one correct measurement?).
In my opinion, it should be guaranteed that the measurement is captured when the randomization is done (this is essentially for synthetic data). Or another idea is to get the first measurement of the randomized scene after the randomization step (additionally the writers are also triggered).
I hope it is clear for my use case and I am looking forward to figuring out a workaround until this becomes a feature!
: -)
Best Regards,
Christof