Converting Action Graphs to scripts

Hello All,

Is there a way to convert Action Graphs to scripts ?

Thank you

Hi @quark01 - I do not think it is possible. But you can develop the action graph using scripts. OmniGraph — Omniverse Extensions documentation

I thought you could add the ability to convert the action graph to a script for model migration, or is there a good way to copy the action graph to another robot

Hi @litao_bate - While there isn’t a direct way to convert an Action Graph to a script, you can replicate the logic of an Action Graph in a script using the Omniverse Kit’s Python API. This can be useful for model migration or copying behaviors between robots.

As for copying an Action Graph to another robot, you can do this by duplicating the Action Graph and then changing the target nodes to reference the new robot. Here’s a general process:

  1. Open the Action Graph window (Window > Visual Scripting > Action Graph).
  2. Find the Action Graph you want to copy.
  3. Right-click on the Action Graph and select Duplicate.
  4. In the duplicated Action Graph, find the nodes that reference the original robot.
  5. Change the references in these nodes to point to the new robot.

Remember that the specifics of this process can vary depending on the structure of your Action Graph and the characteristics of your robots.