Editing OmniGraphNode rel attributes programmatically (Python)

Isaac Sim Version

4.5.0

Operating System

Ubuntu 22.04

GPU Information

  • Model:
  • Driver Version:

Topic Description

Detailed Description

Hello,
I’m using a python script for dynamic compostion of an Isaac Sim scene from separate USD files, according to input arguments (specifically unitree_sim_isaaclab/sim_main.py at main · unitreerobotics/unitree_sim_isaaclab · GitHub ). I’d like to add support for ROS2 camera, for which I created a USD file with an Omni Graph (following the tutorial ROS 2 Cameras — Isaac Sim Documentation ). However, the problem is with setting inputs:cameraPrim attribute, as it is of type custom rel, which is probably the reason why it is not listed among other attributes (`prim_node.GetAttributes()`) and thus cannot be adjusted via prim_node.GetAttribute("inputs:cameraPrim").Set(...).
Is there a way to programmatically access/adjust external relationships of OmniGraph nodes? I searched the documentation, but could not find a clue about this particular process.
Thank you for your help

Steps to Reproduce

  1. minimal_example.txt (1.9 KB) (change extension to .py)

  2. ActionGraph.txt (1.6 KB) (change extension to .usda)

  3. `python3 minimal_example.py`

Error Messages

invalid attribute ‘inputs:cameraPrim’ on ‘OmniGraphNode’ prim </World/ActionGraph/ActionGraph/isaac_create_render_product> on stage with rootLayer @anon:0x5d8b857e0750:World0.usd@, sessionLayer @anon:0x5d8b84e62120:World0-session.usda@