3.5. Omnigraph: Custom Python Nodes

There already exist a large number of default nodes that comes with Isaac Sim. You can find the definitions and descriptions for them in either the Omnigraph Node Library or Isaac Sim API Documentation. If those prove to be insufficient, you can write your own and integrate them into Isaac Sim. This tutorial is for writing nodes in Python. For writing custom C++ nodes, go to Omnigraph: Custom C++ Nodes.

Prerequisites

A detailed tutorial for writing your own nodes can be found in Omnigraph’s Custom Node Tutorial. It will walk you through using the Node Description Editor to create a new extension, and creating the two files, .py and .ogn, needed to define and describe a node. Please go through that to get started.

Once you’ve completed it and have created a local extension that contains your new node, you can now add more nodes by simply have the .py and .ogn files for your future nodes in the same directory as the one you’ve created during the tutorial. Remember that your new extension will be under “Third Party” tab in the extension manager, and it must be turned on in order for your custom nodes to show up.

../_images/isaac_custom_node_enable_new_ext.png

Examples

You are welcome to dig into the code behind some of our existing omnigraph nodes to find examples of how to structure a node, or even modify them to suite your own need. To find the backend .py and .ogn files for a particular node. Hover your mouse over the node in the editor window, a tooltip window will appear and the name of the extension will be written in the parenthese. You can then navigate to the extensions’s folder that contains the backend scripts for the nodes by going to exts/omni.isaac.<ext_name>/omni/isaac/<ext_name>/ogn/python/nodes/.

Not all of the nodes are written in Python, some have C++ backends, so if you won’t necessarily see a corresponding .py and .ogn files for all the nodes on the list. Note that if you found a folder with a list of Ogn<node_name>Database.py, this is NOT the directory that contains the Python description of the node.

../_images/isaac_custom_node_existing_node_ext.png

You can also simply insert your custom node’s .py and .ogn files into any of extensions that already have a directory that contains the .py and .ogn files for existing nodes and thereby avoid creating your own extension that way.