I wrote the code to translate /World/Cubes/Cube1 to /World/Cubes/Cube2
To translate Cube1 to Cube 2, I used action graph and ‘TranslateToTarget’ Node.
Below is the code:
controller = action_og.Controller()
keys = controller.Keys
controller.edit(
{"graph_path": "/controller_graph", "evaluator_name": "execution"},
{
keys.CREATE_NODES: [
("OnTick", "omni.graph.action.OnTick"),
("TranslateToTarget", "omni.graph.nodes.TranslateToTarget"),
],
keys.SET_VALUES: [
("OnTick.inputs:onlyPlayback", True),
("TranslateToTarget.inputs:sourcePrim", "/World/Cubes/Cube1"),
("TranslateToTarget.inputs:targetPrim", "/World/Cubes/Cube2"),
],
keys.CONNECT: [
("OnTick.outputs:tick", "TranslateToTarget.inputs:execIn"),
],
},
)
However, when I ran the code, the following error still appears:
[Error] [omni.graph] Unable to set simple value from AttributeData ‘inputs:targetPrim’ of type ‘rel’
It seems that the value for sourcePrim and targetPrim should be the path, but the values written in each node is path, as least I think.
Is there any way to solve this issue?
Thanks in advance!