Isaac Sim Version 5.0.0
Operating System Ubuntu 22.04
Topic Description
- I am writing a callback to create OmniGraph in Isaac Sim, but I cannot create inputs with vector type
Steps to Reproduce
- my callback
import omni.graph.core as og
def create_script_node(graph_path: str = "/World/ScriptNode"):
"""
Create a ROS2 clock publishing graph that matches the image shown.
This graph publishes simulation time to ROS2 /clock topic.
Args:
graph_path: Path where the graph will be created
node_namespace: ROS2 node namespace
topic_name: ROS2 topic name for clock data
"""
# Define nodes using GraphNode class
on_playback_tick = GraphNode("OnPhysicsStep", NodeTypes.ON_PLAYBACK_TICK)
script = GraphNode("ScriptNode", NodeTypes.SCRIPT)
try:
# (_, (_, script_node), _, _) = og.Controller.edit(
(_, (_, script_node), _, _) = og.Controller.edit(
{"graph_path": graph_path, "evaluator_name": "execution"},
{
og.Controller.Keys.CREATE_NODES: [
(on_playback_tick.name, on_playback_tick.type),
(script.name, script.type),
],
og.Controller.Keys.CONNECT: [
# Physics step triggers execution
(on_playback_tick.outputs.tick, script.inputs.execIn),
# Simulation time connection
],
og.Controller.Keys.SET_VALUES: [
# Clock publisher configuration
],
},
)
og.Controller.create_attribute(
script_node,
"inputs:x",
og.Type(og.BaseDataType.DOUBLE, 1, 0, og.AttributeRole.NONE),
og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT,
)
og.Controller.create_attribute(
script_node,
"inputs:y",
og.Type(og.BaseDataType.DOUBLE, 1, 0, og.AttributeRole.NONE),
og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT,
)
og.Controller.create_attribute(
script_node,
"inputs:vec",
og.Type(og.BaseDataType.DOUBLE, 1, 3, og.AttributeRole.VECTOR),
og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT,
)
# script_node.get_attribute("inputs:step").set(2)
print(f"ROS2 Clock graph created at {graph_path}")
except Exception as e:
print(f"Error creating ROS2 Script graph: {e}")
Error Messages
Error creating ROS2 Script graph: OmniGraphError: Attribute type double (vector) does not represent a legal OGN type
Additional Information
Additional Context
Workflow: UI Extension using generated extension.