I am not sure whether there is a better way, but the issues is dealt with by using WritePrimAttribute and JointState as in the following ActionGraph.
ROS2 gets the jointstate message → Convert it to float → Get a joint value from the joint state by using the ArrayIndex → Write the joint value to the Joint State property directly by using the WritePrimAttribute such as
state:linear:physics:position or state:angular:physics:position
By doing this it updates the JointStates every simulation tick.
In Python Code, (Not exactly matching with the above graph, but same concept.)
og.Controller.edit(
{“graph_path”: “/ActionGraph”, “evaluator_name”: “execution”},
{
og.Controller.Keys.CREATE_NODES: [
(“OnTick”, “omni.graph.action.OnTick”),
(“SubscribeJointState”, “omni.isaac.ros2_bridge.ROS2SubscribeJointState”),
(“ToFloat”, “omni.graph.nodes.ToFloat”),
(“ArrayIndex1”, “omni.graph.nodes.ArrayIndex”),
(“ArrayIndex2”, “omni.graph.nodes.ArrayIndex”),
(“ArrayIndex3”, “omni.graph.nodes.ArrayIndex”),
(“WritePrimAttribute1”, “omni.graph.nodes.WritePrimAttribute”),
(“WritePrimAttribute2”, “omni.graph.nodes.WritePrimAttribute”),
(“WritePrimAttribute3”, “omni.graph.nodes.WritePrimAttribute”),
],
og.Controller.Keys.CONNECT: [
(“OnTick.outputs:tick”, “SubscribeJointState.inputs:execIn”),
(“SubscribeJointState.outputs:execOut”, “WritePrimAttribute1.inputs:execIn”),
(“SubscribeJointState.outputs:execOut”, “WritePrimAttribute2.inputs:execIn”),
(“SubscribeJointState.outputs:execOut”, “WritePrimAttribute3.inputs:execIn”),
(“SubscribeJointState.outputs:positionCommand”, “ToFloat.inputs:value”),
(“ToFloat.outputs:converted”, “ArrayIndex1.inputs:array”),
(“ToFloat.outputs:converted”, “ArrayIndex2.inputs:array”),
(“ToFloat.outputs:converted”, “ArrayIndex3.inputs:array”),
(“ArrayIndex1.outputs:value”, “WritePrimAttribute1.inputs:value”),
(“ArrayIndex2.outputs:value”, “WritePrimAttribute2.inputs:value”),
(“ArrayIndex3.outputs:value”, “WritePrimAttribute3.inputs:value”),
],
og.Controller.Keys.SET_VALUES: [
(“SubscribeJointState.inputs:topicName”, “/cmd_pos”),
(“ArrayIndex1.inputs:index”, 0),
(“ArrayIndex2.inputs:index”, 1),
(“ArrayIndex3.inputs:index”, 2),
(“WritePrimAttribute1.inputs:prim”, “/ART/ART_TRANSPORTER/D6J1/J1”),
(“WritePrimAttribute2.inputs:prim”, “/ART/ART_TRANSPORTER/D6J1/J2”),
(“WritePrimAttribute3.inputs:prim”, “/ART/ART_TRANSPORTER/D6J1/J3”),
(“WritePrimAttribute1.inputs:name”, “state:linear:physics:position”),
(“WritePrimAttribute2.inputs:name”, “state:linear:physics:position”),
(“WritePrimAttribute3.inputs:name”, “state:linear:physics:position”),
],
},
)