How do I set multiple values to one parameter through og.Controller.Keys in omnigraph

I want to be able to set multiple values to the node omni.isaac.ros2_bridge.ROS2PublishTransformTree, in targetPrims field. It clearly supports it as shown in the image below:

image

However, I can’t seem to find a way to do it through python script, as it takes only one. How can this be done? This is my current code but the last one replaces the others:

    keys = og.Controller.Keys
    (graph_handle, list_of_nodes, _, _) = og.Controller.edit(
        {"graph_path": "/action_graph", "evaluator_name": "execution"},
        {
            keys.CREATE_NODES: [
                ("tick", "omni.graph.action.OnPlaybackTick"),
                ("sim_time","omni.isaac.core_nodes.IsaacReadSimulationTime"),
                ("publish_transform", "omni.isaac.ros2_bridge.ROS2PublishTransformTree")
            ],
            keys.SET_VALUES: [
                ("publish_transform.inputs:parentPrim", "/World"),
                ("publish_transform.inputs:targetPrims", "/World/Camera"),
                ("publish_transform.inputs:targetPrims", "/World/Laydown")
            ],
            keys.CONNECT: [
                ("tick.outputs:tick", "publish_transform.inputs:execIn"),
                ("sim_time.outputs:simulationTime", "publish_transform.inputs:timeStamp")
            ],
        },
    )

You need to use Sdf.path.

Here’s how:

from pxr import Sdf

keys.SET_VALUES: [
                ("PublisherTF.inputs:topicName", "/tf"),
                ("PublisherTF.inputs:parentPrim", "/World"),
                ("PublisherTF.inputs:targetPrims", [Sdf.Path("/World/UR10/ee_link"), Sdf.Path("/World/UR10/base_link")]),
            ],

(Entire graph code):

import omni.graph.core as og
keys = og.Controller.Keys
(graph_handle, list_of_nodes, _, _) = og.Controller.edit(
    {"graph_path": "/Graph/ROS_TF", "evaluator_name": "execution"},
    {
        keys.CREATE_NODES: [
            ("OnPlaybackTick", "omni.graph.action.OnPlaybackTick"),
            ("Context","omni.isaac.ros2_bridge.ROS2Context"),
            ("ReadSimTime","omni.isaac.core_nodes.IsaacReadSimulationTime"),
            ("PublisherTF","omni.isaac.ros2_bridge.ROS2PublishTransformTree")
        ],
        keys.SET_VALUES: [
            ("PublisherTF.inputs:topicName", "/tf"),
            ("PublisherTF.inputs:parentPrim", "/World"),
            ("PublisherTF.inputs:targetPrims", [Sdf.Path("/World/UR10/ee_link"), Sdf.Path("/World/UR10/base_link")]),
        ],
        keys.CONNECT: [
            ("OnPlaybackTick.outputs:tick", "PublisherTF.inputs:execIn"),
            ("ReadSimTime.outputs:simulationTime", "PublisherTF.inputs:timeStamp"),
            ("Context.outputs:context", "PublisherTF.inputs:context")
        ],
    },
)

Found this while browsing the example at
/isaac-sim/exts/omni.isaac.ros2_bridge/omni/isaac/ros2_bridge/scripts/og_shortcuts/og_utils.py
The line is:

if self._has_existing_node and self._add_to_existing_node:
            ## if add to existing node, simply append it to the existing list of target prims
            existing_targets = og.Controller.attribute(tf_pub_node + ".inputs:targetPrims").get()
            existing_targets.append(Sdf.Path(self._target_prim))
            # must use this controller edit function, not og.controller.attribute().set() for some reason
            og.Controller.edit(
                graph_handle, {keys.SET_VALUES: [(self._og_path + "/PublisherTF.inputs:targetPrims", existing_targets)]}

Best of luck :)