Gazebo | Ignition | Community
Ask Your Question

I have to make a SDF from URDF

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

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 -0500 )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 -0500 )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 -0500 )edit

Error [] Unable to convert from SDF version 1.5 to 1.4 Error [] XML Element[useparentmodel_frame], child of element[axis] not defined in SDF. Ignoring.[axis] Error [] Error reading element <axis> Error [] Error reading element <joint> Error [] Error reading element <model> Error [] 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 -0500 )edit

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

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

2 Answers

Sort by ยป oldest newest most voted

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

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 -0500 )edit

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

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 -0500

Seen: 2,288 times

Last updated: Mar 03 '15