Im trying to control the velocty of a conveyor (built with the isaac sim conveyor extension) from a custom python extension.
I am trying to use the og.IVarialbe.get method, linked here, to interact with the Velocity variable that comes from the conveyor pre-made action graph, like this:
# Look up the graph by path
graph = og.get_graph_by_path(self.conveyor_11_path)
gc = og.Graph.get_context(graph) # You need to obtain the graph context
# Call to get()
result = og.IVariable.get(
graph_context=gc, # Pass the correct graph context here
instance_path="/World/Conveyors/ConveyorTrack_11/ConveyorBeltGraph/Velocity" # The instance path to set the value on
)
print(result)
However, I get this type error when calling get:
TypeError: get(): incompatible function arguments. The following argument types are supported:
1. (self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, instance_path: str = None) -> object
Invoked with: kwargs: graph_context=<omni.graph.core._omni_graph_core.GraphContext object at 0x78b033931e30>, instance_path='/World/Conveyors/ConveyorTrack_11/ConveyorBeltGraph/Velocity'
Any ideas on whats happening here? Im reading in some old changelogs that the Py_GraphContext wrapper may be deprecated? Is there another way to reference this?
Thanks!