You can use the command line. Here a MWE:
# Download the URDF and convert it to SDF
$ wget https://gist.githubusercontent.com/fsuarez6/f8503449ce747668e30a742289c26e58/raw/132506b4fa03879d4309ff9014c16d9df6e5f740/rrbot.xacro.urdf
$ gz sdf --print rrbot.xacro.urdf > rrbot.sdf
# Start gazebo
$ gazebo
# Open another terminal, and spawn the model
$ gz model --spawn-file=rrbot.sdf --model-name=rrbot
Tested on Ubuntu 16.04 (Xenial):
$ gazebo --version
Gazebo multi-robot simulator, version 7.0.0
Copyright (C) 2012-2016 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
Update
Thanks to @nkoenig comment, you can spawn directly URDF models. Here a MWE:
# Download the URDF
$ wget https://gist.githubusercontent.com/fsuarez6/f8503449ce747668e30a742289c26e58/raw/132506b4fa03879d4309ff9014c16d9df6e5f740/rrbot.xacro.urdf
# Start gazebo
$ gazebo
# Open another terminal, and spawn the model
$ gz model --spawn-file=rrbot.xacro.urdf --model-name=rrbot
Originally posted by Francisco with karma: 143 on 2017-11-30
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by nkoenig on 2017-12-01:
Gazebo uses libsdformat, which can read both SDF and URDF files.
Comment by xianxjm on 2017-12-03:
it works ,thanks!