Home | Tutorials | Wiki | Issues
Ask Your Question

I have to make a SDF from URDF

asked 2015-03-02 06:31:58 -0600

edo_raci gravatar image

Dear Gazebo Users,

I need to have a SDF format of the Mobile Robot mp_500 but I'm struggling too much of getting the URDF converted into SDF. Does anyone have any idea how I can convert this file? What is it that i have to change in the URDF file to make it work?

Thank you very much.

E. Raci

edit retag flag offensive close merge delete


Gazebo supports urdf models as well, you don't need to change it into sdf if you don't want to. Do you get any errors when loading the urdf model?

AndreiHaidu gravatar imageAndreiHaidu ( 2015-03-02 08:24:58 -0600 )edit

How can i make these models to spawn in Gazebo, is there a special code or something? So far i only know how to spwan models using gazebos Model Database!

edo_raci gravatar imageedo_raci ( 2015-03-02 09:31:53 -0600 )edit

As soon as i want to load the UR10 in the Gazebo, i have modified it's URDF from .gazebo/models/ur10 and because i wanted to add a sensor to it, however as soon as i want to load it in gazebo i get an error saying:

edo_raci gravatar imageedo_raci ( 2015-03-02 09:33:15 -0600 )edit

Error [Converter.cc:127] Unable to convert from SDF version 1.5 to 1.4 Error [parser.cc:697] XML Element[useparentmodel_frame], child of element[axis] not defined in SDF. Ignoring.[axis] Error [parser.cc:688] Error reading element <axis> Error [parser.cc:688] Error reading element <joint> Error [parser.cc:688] Error reading element <model> Error [parser.cc:348] Unable to read element <sdf> Error: Could not find the 'robot' element in the xml file at line 81 in /build/buildd/urdfdom-

edo_raci gravatar imageedo_raci ( 2015-03-02 09:34:59 -0600 )edit

urdfdom-0.2.10+dfsg/urdfparser/src/model.cpp Error [parserurdf.cc:2608] Unable to call parseURDF on robot model Error [parser.cc:273] parse as old deprecated model file failed. Error [ModelMaker.cc:126] Unable to load file[/home/labor/.gazebo/models/Universal_Robot/ur10.sdf]

edo_raci gravatar imageedo_raci ( 2015-03-02 09:35:08 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2015-03-03 09:39:29 -0600

nkoenig gravatar image

Gazebo has a command line too that converts URDF to SDF:

gz sdf -p <URDF>

You can redirect output to a file.

edit flag offensive delete link more


I get the Error gz:: command not found! I have placed the URDF file i want to convert into .gazebo/models directory is it correct?

edo_raci gravatar imageedo_raci ( 2015-03-05 03:27:49 -0600 )edit

answered 2015-03-02 18:22:02 -0600

NickDP gravatar image

Have you looked at the URDF in Gazebo tutorial?

In particular, make sure that you add an inertia element to each link.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2015-03-02 06:31:58 -0600

Seen: 1,666 times

Last updated: Mar 03 '15