How to change value of omnigraph variables by python

Note: For any Isaac Lab topics, please submit your topic to its GitHub repo (GitHub - isaac-sim/IsaacLab: Unified framework for robot learning built on NVIDIA Isaac Sim) following the instructions provided on Isaac Lab’s Contributing Guidelines (Contribution Guidelines — Isaac Lab Documentation).

Please provide all relevant details below before submitting your post. This will help the community provide more accurate and timely assistance. After submitting, you can check the appropriate boxes. Remember, you can always edit your post later to include additional information if needed.

Isaac Sim Version

4.5.0
4.2.0
4.1.0
4.0.0
4.5.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):

Operating System

Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify):

GPU Information

  • Model: A6000
  • Driver Version:

Topic Description

Detailed Description

(Describe the issue in detail, including what you were trying to do, what you expected to happen, and what actually happened)

I have a question to change vaule of omnigraph variable by python API.

I’m tring with bellow code. But it doesnt work ever without any errors.

 graph_path = "/World/ActionGraph"
            controller = og.Controller()
            keys = og.Controller.Keys
            
            graph = og.get_graph_by_path(graph_path)
            
            variable_name = node_name.replace("/", "_")
            read_node_name = variable_name+"_Reader"
            prim_name = graph_path + "/" + read_node_name
            
            controller.edit(graph_path, {
                keys.SET_VALUES: [
                    (f"{read_node_name}.inputs:value", new_value )
                ]
            })
            

So my question is like bellow:

  1. User couldnt change value of variable by python?
  2. If there is a method to do that, then help me.

@gustjr31321 i am just another user, and i haven’t look too closely into the snippet you’ve provided. that said, have you tried referencing the omnigraph python scripting section from the official doc already along with omnigraph’s core API?

also, is the intent to use omnigraph for SDG or ROS2?

Thx for your reply lol

Facing the same problem. Can’t find a good example Python code.