Gazebo | Ignition | Community
Ask Your Question

Problem with SDF files or robot_description parameter

asked 2013-08-19 00:58:14 -0500

munnveed gravatar image

updated 2013-08-19 00:58:38 -0500

So I am working my way through some of the tutorials for ROS/Gazebo. I am running into some issues with the ROS Control with Gazebo Tutorial however. In particular when I launch the robot_control package, I get an error saying

Could not find parameter robot_description on parameter server

After a little digging I added the following to my launch file:

<param name="robot_description" textfile="path/to/robot.sdf"/>

to set the robot_description parameter. However after I did that I get the error:

[ERROR] [1376891403.184690567]: Could not find the 'robot' element in the xml file
[ERROR] [1376891403.184756779]: Could not generate robot model
[ERROR] [1376891403.184774430]: Failed to extract kdl tree from xml robot description

So I am guessing that what is happening is that robot_state_publisher is looking for a URDF file while I am providing a SDF file. How do I get around this?

Thanks in advance.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-09-05 09:29:37 -0500

psei gravatar image

Hi munnveed,

I had the same problem. If you want to use RVIZ with gazebo, you definetly need an urdf-description of your robot. My workaroud was, to have both, an URDF model for the robot_description, and an SDF model for the visualization.

But this was very difficult to maintain, since all changes had to be done in both models. In the meanwhile, I took the time to setup an URDF model and extended this with <gazebo> elements as evilBiber already explained. Gazebo is able to convert it on loading, but i has to be without mistakes, otherwise the parser will fail.



edit flag offensive delete link more

answered 2013-08-19 01:16:09 -0500

updated 2013-08-19 01:49:38 -0500


if you are working with ros it might be better to change your SDFs to URDFs otherwise you won't be able to use some ROS specific things like RVIZ or the RobotStatePublisher for your robot which might be essential!

URDFs can handle all gazebo specific things inside a <gazebo> element.

I know no reason not to use URDFs when you are working with ROS (if there is please let me know...)

edit flag offensive delete link more


Ok, thank you. The only reason I was using SDF is because I was following the Gazebo tutorials, which uses SDF and suggests that SDF is a superior format ("the Simulator Description Format (SDF) was created for use in Gazebo to solve the shortcomings of URDF"). I did not realize that the robot description file would be needed by ROS as well, and that ROS does not use SDF. Thank you for the clarification.

munnveed gravatar imagemunnveed ( 2013-08-19 01:26:23 -0500 )edit

I created a URDF model in RVIZ first and it worked fine there, but somehow it didn't work in Gazebo.. In Gazebo all links were omitted except for the base link (in my case). So I created a seperate SDF file which does work in Gazebo, but like you said yourself, that's not ideal in ROS either.. So I wished that URDF was as compatible with Gazebo as everyone claims, but I actually have my doubts about that, seeing that I can't even load a URDF model properly in Gazebo. That's why I use SDF now..

Hououin Kyouma gravatar imageHououin Kyouma ( 2013-11-06 12:14:10 -0500 )edit

Never mind, I humbly take back my words. Somehow, the URDF file is working now in Gazebo, which means I can use ros_control in its whole as well.

Hououin Kyouma gravatar imageHououin Kyouma ( 2013-11-06 12:29:23 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2013-08-19 00:58:14 -0500

Seen: 5,093 times

Last updated: Sep 05 '13