robot-state-publisher

Configure robot_state_publisher to publish TF transforms from URDF in ROS 2.

18|2|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill robot-state-publisher
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: robot-state-publisher
Source: https://github.com/wimblerobotics/ros2-copilot-skills/tree/main/robot-state-publisher
Command: npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill robot-state-publisher

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Connects URDF to the TF tree in ROS 2 by running robot_state_publisher, enabling automatic transforms and RViz visualization. It also integrates with joint_state_publisher for testing moves and verification.

Core Features & Use Cases

  • Publishes dynamic transforms for movable joints on /tf
  • Publishes static transforms for fixed joints on /tf_static
  • Publishes the URDF on the /robot_description topic for RViz, Nav2, and MoveIt
  • Supports multi-robot setups with frame_prefix and namespaces

Quick Start

Load your robot_description URDF into the robot_description parameter and launch robot_state_publisher with a simple LaunchDescription.

Frequently Asked Questions about robot-state-publisher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish URDF to TF transforms in ROS 2?

To publish URDF to TF transforms in ROS 2, load your URDF into the robot_description parameter and use a LaunchDescription to start robot_state_publisher, which automatically publishes dynamic and static frames to the /tf and /tf_static topics.

What is the best way to visualize a URDF robot model in RViz using ROS 2?

Visualizing a URDF robot model in RViz requires robot_state_publisher to publish the URDF on the /robot_description topic and output TF transforms, allowing RViz to render the robot's geometry and coordinate frames accurately.

Do I need joint_state_publisher to test movable joints in a ROS 2 simulation?

Yes, you need joint_state_publisher alongside robot_state_publisher to simulate movable joints in ROS 2, as it provides default joint states that allow robot_state_publisher to calculate and broadcast dynamic TF transforms for testing.

Can I use robot_state_publisher for multi-robot TF setups in ROS 2?

Yes, you can use robot_state_publisher for multi-robot TF setups in ROS 2 by configuring frame_prefix and namespaces, allowing multiple robots to publish distinct URDF transforms and robot descriptions simultaneously without frame conflicts.

Why does RViz show missing TF frames when launching my URDF in ROS 2?

RViz shows missing TF frames when the robot_description parameter lacks a correctly formatted URDF or the LaunchDescription fails to properly initialize robot_state_publisher to broadcast the necessary static and dynamic transforms.