Hello,
We are trying to programmatically use a make array (ConstructArray), but we are unable to set anything which is not input0.
Error:
2023-06-04 13:09:54 [1,965,188ms] [Error] [omni.kit.app.plugin] [py stderr]: OmniGraphError: Failed trying to look up attribute with (/nakai_container/MovementGraph/velocity_command_duplicator.inputs:input1, node=None, graph=None)
At:
/home/amram/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.graph/omni/graph/core/_impl/object_lookup.py(404): __attribute_from_info
/home/amram/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.graph/omni/graph/core/_impl/object_lookup.py(411): attribute
/home/amram/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.graph/omni/graph/core/_impl/controller.py(649): _process_set_value
/home/amram/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.graph/omni/graph/core/_impl/controller.py(656): <listcomp>
/home/amram/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.graph/omni/graph/core/_impl/controller.py(656): _process_set_values
/home/amram/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.graph/omni/graph/core/_impl/controller.py(1031): __do_the_edits
/home/amram/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.graph/omni/graph/core/_impl/controller.py(1038): __edit
Reproduction script:
import omni.graph.core as og
keys = og.Controller.Keys
og.Controller.edit(
{"graph_path": "/nakai_container/MovementGraph", "evaluator_name": "execution"},
{
keys.CREATE_NODES: [
("velocity_command_duplicator", "omni.graph.nodes.ConstructArray"),
],
keys.SET_VALUES: [
("velocity_command_duplicator.inputs:arraySize", 4),
("velocity_command_duplicator.inputs:arrayType", "double[]"),
("velocity_command_duplicator.inputs:input0", 1),
("velocity_command_duplicator.inputs:input1", 2),
("velocity_command_duplicator.inputs:input2", 3),
("velocity_command_duplicator.inputs:input3", 4),
]
},
)
In the GUI, there is the plus button for adding inputs, but how can it be done via the python api?