Create Joint State Publisher and Subscriber#
A joint state publisher pushes the joint state data to ROS, the subscriber node subscribes to the action commands from the neural network and applies the command to the robot.
This is a common task, so we’ll leverage a shortcut in Isaac Sim to create this graph for us.
Setup the Joint States Graph#
Go to Tools > Robotics > ROS 2 OmniGraphs > Joint States.
In the popup window, set:
Graph Path to /h1/Graph/ROS_JointStates to place the new graph in the existing Graph scope.
Articulation Root to
/h1Ensure the Publisher option is checked.
Ensure the Subscriber option is checked.
Ensure the Move Robots option is checked.
Press OK.

Select the ROS_JointStates graph in the Stage panel.
In the Property panel, under Raw USD Properties, set the pipelineStage to pipelineStageOnDemand.
Right click on ROS_JointStates and choose Open Graph.
Select and delete the On Playback Tick node
In the left side of the Action Graph UI, search for On Physics Step and drag this node onto the graph.

Connect the Exec node to Exec of these other nodes:
ROS2 Subscribe Joint State
ROS2 Publish Joint State
Articulation Controller

Select the Isaac Read Simulation Time node
In the Property Panel, check the Reset on Stop input. This resets the simulation time when the simulation stops.
In the left side of the Action Graph UI, search for ROS2 QoS Profile and drag this node onto the graph.
Connect the QoS Profile output to both the Publisher and Subscriber node inputs.
Save your work by going to Ctrl+S or going to File > Save.
Inspecting the Graph#
Observe the following nodes into the Action graph:
On Physics Step: This node is triggered when the Isaac Sim physics steps, and runs the entire graph.
ROS2 Context: This node creates a context for the ROS2 node.
ROS2 QoS Profile: This node sets the QoS profile for the ROS2 node.
ROS2 Subscribe Joint States: This node subscribes to the joint states commands from the external policy node.
ROS2 Publish Joint States: This node publishes the current joint states to ROS2 from Isaac Sim
Isaac Read Simulation Time: This node reads the simulation time from Isaac Sim.
Articulation Controller: This node will execute the joint state commands from the Subscribe joint States node
Review the following configuration#
These should be set up for you already, but for your reference:
ROS2 Publish Joint States input Target Prim to /h1, topicName set to
/joint_statesROS2 Subscribe Joint States input Topic Name set to
/joint_commandArticulation Controller input Target Prim to
/h1
Checkpoint
If you had any troubles with these steps, load the completed environment checkpoint file from the course assets:
h1_ROS/h1_ROS.usd