Gazebo | Ignition | Community
Ask Your Question
2

how to use gzsdf ?

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

Jey_316 gravatar image

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

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

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

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

AndreiHaidu gravatar image

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

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.

edit flag offensive delete link more

Comments

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

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

AndreiHaidu gravatar imageAndreiHaidu ( 2013-02-01 13:12:25 -0500 )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 -0500 )edit
0

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

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

Stats

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

Seen: 3,250 times

Last updated: Apr 10 '13