I get the following error:
omni.graph.core._impl.errors.OmniGraphError: OmniGraphError: Failed to connect /ROSRobotDescription/ros2_subscriber.outputs:data -> /ROSRobotDescription/insert_attribute.inputs:attrToInsert
When i try create add this graph:
og.Controller.edit(
{"graph_path": "/ROSRobotDescription", "evaluator_name": "execution"},
{
og.Controller.Keys.CREATE_NODES: [
("OnPlaybackTick", "omni.graph.action.OnPlaybackTick"),
("send_custom_event", "omni.graph.action.SendCustomEvent"),
("ros2_subscriber", "omni.isaac.ros2_bridge.ROS2Subscriber"),
("bundle_constructor", "omni.graph.nodes.BundleConstructor"),
("insert_attribute", "omni.graph.nodes.InsertAttribute"),
("ros2_context", "omni.isaac.ros2_bridge.ROS2Context"),
],
og.Controller.Keys.CONNECT: [
("OnPlaybackTick.outputs:tick", "ros2_subscriber.inputs:execIn"),
("OnPlaybackTick.outputs:tick", "send_custom_event.inputs:execIn"),
("ros2_context.outputs:context", "ros2_subscriber.inputs:context"),
("ros2_subscriber.outputs:data", "insert_attribute.inputs:attrToInsert"),
("bundle_constructor.outputs_bundle", "insert_attribute.inputs:data"),
("insert_attribute.outputs_data", "send_custom_event.inputs:bundle"),
],
og.Controller.Keys.SET_VALUES: [
("send_custom_event.inputs:eventName", "MY_CUSTOM_EVENT"),
("ros2_subscriber.inputs:messageName", "String"),
("ros2_subscriber.inputs:messagePackage", "std_msgs"),
("ros2_subscriber.inputs:messageSubfolder", "msg"),
("ros2_subscriber.inputs:topicName", "/robot_description"),
("insert_attribute.inputs:outputAttrName", "data"),
],
},
)
It works well if i remove ("ros2_subscriber.outputs:data", "insert_attribute.inputs:attrToInsert")
and connect them in the IsaacSim graph editor.
I assume that it’s related to the ROS2 Subscriber
determines its outputs dynamically, but i couldn’t figure it out how to connect the nodes later from code.
Isaac Sim 4.1.0