# Revision history [back]

### Using SDF instead of URDF with ROS Robot State Publisher

With URDF models, you can use robot_state_publisher to have the joints published in tf. Since this needs the <robot> tag, it does not work with SDF models. If you try to roslaunch for a SDF it would say

Could not find the 'robot' element in the xml file


Everything else works fine in gazebo but the state publisher dies

Is there any way I can use robot state publisher with SDF? Maybe include URDF into the SDF? Or specify the <robot> tag in it somehow?

TL;DR:

I have found many other questions related to this question but none had a positive answer and most of them are more than 5 years old. However,

• This answer suggests that you can do anything with SDF that is possible in URDF.
• This question has an answer suggesting an alternative by having both URDF and SDF but it's an ugly solution
• There's this old unanswered question as well

I want to create a 6 wheeled robot model with two wheels having shock absorbers (prismatic joints with damping and spring actions). To my understanding, this cannot be done using URDF