Gazebo | Ignition | Community
Ask Your Question

how to use gzsdf ?

asked 2013-01-31 14:17:10 -0600

Jey_316 gravatar image

updated 2013-01-31 14:18:49 -0600

Hello i want to transform an URDF file into a SDF file. (I am using Ros fuerte)

What am I doing wrong?

john@john-K53SD:/opt/ros/fuerte/stacks/simulatorgazebo/gazebo$ ./gazebo/bin/gzsdf print /home/john/fuerteworkspace/sandbox/miurdf/01-myfirstyo.urdf

Warning [] Gazebo SDF has no gazebo element Error [] parse as old deprecated model file failed. Error: SDF parsing the xml failed

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-01-31 17:09:58 -0600

AndreiHaidu gravatar image

updated 2013-02-01 13:10:03 -0600

The command should be $./gazebo/bin/gzsdf convert your.urdf

And if you get another error, try sourcing the bash file: $source setup.bash from gazebo

!!!! EDIT:
I remember on older Gazebo (~1.0) versions I used to do it like this:

source setup.bash, ~/path/gazebo$ source setup.bash

rosrun gazebo urdf2model -f yourmodel.urdf -o oldgazeboformat.xml (changes the urdf to gazebo model)


gzsdf print oldgazeboformat.xml > yourmodel.sdf (from gazebo model to sdf)

Hope it works.

edit flag offensive delete link more


it didnt work @AndreiHaidu

john@john-K53SD:/opt/ros/fuerte/stacks/simulator_gazebo/gazebo$ source setup.bash

john@john-K53SD:/opt/ros/fuerte/stacks/simulator_gazebo/gazebo$ ./gazebo/bin/gzsdf convert /home/john/ros/01-myfirstyo.urdf

Error: Unknown option[convert]

Jey_316 gravatar imageJey_316 ( 2013-02-01 12:52:09 -0600 )edit

Hi, I updated the answer, see if it works that way, Cheers.

AndreiHaidu gravatar imageAndreiHaidu ( 2013-02-01 13:12:25 -0600 )edit

Hi, I am trying to convert my urdf to sdf format. I tried the your edited commands. THe rosrun command did generate a xml file. But the gzsdf does not work. It says missing robot element in the xml file .

Bharadwaj Ramesh gravatar imageBharadwaj Ramesh ( 2013-04-02 10:35:21 -0600 )edit

answered 2013-04-10 19:00:03 -0600

nkoenig gravatar image

If you are using a new version of Gazebo (not one that ships with ROS), then the gzsdf tool should convert a URDF file.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2013-01-31 14:17:10 -0600

Seen: 3,374 times

Last updated: Apr 10 '13