Gazebo | Ignition | Community
Ask Your Question
0

gazebo 11.7 -- gz 'SDF parsing the xml failed' [closed]

asked 2021-11-29 05:13:16 -0600

smdorsey42 gravatar image

updated 2021-11-30 03:57:45 -0600

I am trying to insert a model file into gazebo from gnome-terminal using the gz utility. I get the error Error: SDF parsing the xml failed if I use the command, "gz model -f ./model.sdf -m my_robot".

When I insert this or other model files manually, they work. Do you know how I can use the above command to insert an SDF file into gazebo from terminal?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by smdorsey42
close date 2021-11-30 05:12:15.993726

Comments

For future reference, the following manpage explicitly stated what the "gz model" and "gz sdf" commands are for, but I just didn't comprehend it correctly:

http://manpages.ubuntu.com/manpages/b...

smdorsey42 gravatar imagesmdorsey42 ( 2021-11-30 05:13:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-11-30 05:11:23 -0600

smdorsey42 gravatar image

updated 2021-11-30 05:11:52 -0600

Update: I am replying here in case any other users new to gazebo needing to insert a model file from terminal, for whatever reason, can find this thread. I doubt anyone else will suffer the same misconception as I did, but there you go.

I have learned the following things and resolved my core issue, and so will be closing this thread in a minute: 1) I'm a big, dumb, dodo bird

2) gz sdf is not, or can not, be used to spawn an sdf file, but is used to parse, convert, and/or output SDF files from at least the URDF file format, and possibly others??? Maybe it can use the --spawn-file argument to spawn URDF files, but that is not what I needed for the tutorial.

3) The answer to my question was to use the command: "sudo gz model -f /home/gazebo/.gazebo/models/my_robot/model.sdf -m "My Robot" "

And doing so, I explicitly used sudo thinking it would help guarantee that gz was allowed to read from the .gazebo directory, without any permissions issues arising. This may be a non-issue, but I wanted to be sure.

The model file spawned and was automatically shifted to the appropriate x, y, z, R, P, Y values as defined in the model file.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-11-29 05:12:20 -0600

Seen: 875 times

Last updated: Nov 30 '21