Part of Pre-built ROS 2 Nodes, this is the robot_state_publisher which is essentially the TF Tree builder. It subscribes to the topic called /joint_states (which publishes how much the moving joints like wheels or robotic arms have turned). The node just reads the XML syntax of the URDF file we give it.
Things it does
- It subscribes to
/joint_states - It combines
/joint_stateswith static URDF blueprint - It continuously broadcasts the entire physical TF Tree of the robot to the
/tfand/tf_statictopics - It first publishes the fixed, non-moving offsets (like
base_linktolidar_link) to/tf_static(fixed physical offsets) - It then constantly listens to the angles of the moving joints (wheels), uses the URDF to calculate complex 3D math (Forward Kinematics), and continuously publishes the live coordinates of the moving parts to
/tf