0
$\begingroup$

Gazebo Answers logo

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/simulator_gazebo/gazebo$ ./gazebo/bin/gzsdf print /home/john/fuerte_workspace/sandbox/miurdf/01-myfirstyo.urdf

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


Originally posted by Jey_316 on Gazebo Answers with karma: 55 on 2013-01-31

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

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)

then

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

Hope it works.


Originally posted by AndreiHaidu with karma: 2108 on 2013-01-31

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Jey_316 on 2013-02-01:
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]

Comment by AndreiHaidu on 2013-02-01:
Hi, I updated the answer, see if it works that way, Cheers.

Comment by Bharadwaj Ramesh on 2013-04-02:
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 .

$\endgroup$

Your Answer

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