0
$\begingroup$

Gazebo Answers logo

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


Originally posted by teshansj on Gazebo Answers with karma: 5 on 2020-07-13

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

My problem was URDF not being able to do some stuff SDF can. But I wasn't aware of the <gazebo> tags at the time. Using them, I was able to do what I wanted and no need of SDF has come up after that.

I got an answer in answers.gazebo. Linked for future reference for anyone in need


Originally posted by teshansj with karma: 5 on 2020-07-15

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.