gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.2k stars 482 forks source link

Trouble with gzfactory spawn -f model.sdf #834

Open osrf-migration opened 11 years ago

osrf-migration commented 11 years ago

Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


If you are in a folder that contains a file named model.sdf and attempt to spawn it with the command gzfactory spawn -f model.sdf, it will fail with the following error:

$ gzfactory spawn -f model.sdf
Error [parser_urdf.cc:2597] Unable to call parseURDF on robot model
Error [parser.cc:273] parse as old deprecated model file failed.
Error: SDF parsing the xml failed

This occurs because sdf::findFile finds share/sdformat/1.4/model.sdf before it finds the model.sdf in the local folder.

Using an absolute path works:

$ gzfactory spawn -f $PWD/model.sdf
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.1.183
Spawning Model into default world.

Other filenames also work.

$ gzfactory spawn -f model-1_3.sdf
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.1.183
Spawning Model into default world.

Presumably, other file names will have this same issue: joint.sdf, light.sdf, etc.

osrf-migration commented 11 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).