How to manage nodes order/branches?

Hi!

I’m using Replicator to randomize kinda complex scenes and one of the requirements is that I need to control the branches leaving the trigger.
I have (this is a simplification, I have a couple hundred nodes):

  • Randomization C depends of randomization B, which depends on randomization A
  • Randomization E depends on randomization D, and D depends on nothing.

An ideal graph would look like this:

trigger
|- Node A → Node B → Node C
|- Node D → Node E

I’ve tried many methods, and I always end up with combinations that make no sense at all, or with the trigger connected to many more nodes.

What’s the correct way of ensuring this behavior? Should I make the connections manually? And if so, what’s the recommended way? (I’ve tried calling _disconnect, acquiring _get_last_exec_attr and then auto_connect and it always connects against the trigger directly.
I’ve also tried using sequential(), but it didn’t solve my problem either. And I think it gets worse when you need to connect against a previous pose() since it uses sequential() (that seems to get the execution pointer back to the trigger if I understood the code correctly) AND it goes against the rules of a ReplicatorItem, it does not return a node!

Any help would be welcomed.
Thanks in advance.

Hey @christianbarcelo ,

I’ve sent your question to the replicator dev team. I will report back with more information when I hear from them!

1 Like

Hi @christianbarcelo In this scenario, I would investigate the ways isaacsim is using step async and hybridizing the use of replicator graphs depending on various scenarios.

There’s a lot of goodies packed into their example here:
https://docs.omniverse.nvidia.com/isaacsim/latest/replicator_tutorials/tutorial_replicator_ur10_palletizing.html

This may not be exactly what you’re looking for, but if I were in the situation where I need branching options, this is the approach I’d take.

For specific randomizations you can also do these using plain USD or Isaac Sim API:

Nice demo! I assume this came with the latest version, I don’t remember seeing it before.

So either hybridizing, or if I can’t (because I’m in the middle of a project that’s already structured classic way) I should be able to put all the randomization together in a custom node (from a custom extension) and just trigger all that in order using USD/Omni APIs.

A question following that example, is it possible to use the async API when running standalone (instantiating a SimulationApp)?

Thanks for the help! Even tho it’s not exactly what I needed, helped me wrap my head around the issue/solution, I appreciate it.

Yeah, I have most of my randomization already done using Replicator’s API, but I can do what you suggest from inside a custom node and wrap it with Replicator.

Thanks for the suggestion!

All the async function have sync versions as well, take a look at this example which includes the same script as standalone and as a script editor (async version):