omni.graph.nodes.WritePrimAttribute and omni.graph.ImportUSDPrim inside extension


I am trying to build an action graph* with Python scripting in Isaac sim in order to use it inside an extension. *Something similar to this:

First I create the action graph and create the various nodes like so:

inside keys.SET_VALUES, i add the targets (the xforms to generate the trajectory) with the following lines of code.
‘/World/pos1’ and '/World/pos2 are the xforms to generate the trajectory.

The 2 lines of code above give me the following errors:

By the way, I added the xforms into the stage like so:

Similarly, I am getting the same kind of error for a WritePrimAttribute node:
here is the error

Any ideas about the above errors.
Some help would be much appreciated.

Hi @yohan.legars - Are you trying to do this in Isaac Sim or Create (now called USD Composer)?

Hi @rthaker - I am trying to do this in Isaac Sim

Well I found a work around for now:

I build the action graph, the camera and the xforms manually with the GUI and I save the stage.
Then, when I want to use the action graph inside an extension, I just open the stage with omni.isaac.core.utils.stage.open_stage(‘path/to/stage.usd’) inside an extension first and work from there (adding terrains, prims, changing xforms positions).
The open_stage() command is critical in this case because if you first create the stage via an extension and use the add_reference_to_stage() inside your code to add the action graph, all the nodes’ targets and attributes of the action graph will be reset due to being initially saved in a different root path I suppose. As a result, there won’t be any trajectory and the camera will not move.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.