Gazebo | Ignition | Community
Ask Your Question
0

How does gazebo load a urdf file WITHOUT Ros?

asked 2017-11-30 05:03:23 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I want to use gazebo load my robot model (a urdf file),but do not want to install ros. Is there any kind of tool to make my urdf file be load by gazebo? Is there any way to do this ? Is there any document example or tutorials about this? Please help. Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-11-30 21:53:08 -0500

Francisco gravatar image

updated 2017-12-03 21:10:52 -0500

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
edit flag offensive delete link more

Comments

Gazebo uses libsdformat, which can read both SDF and URDF files.

nkoenig gravatar imagenkoenig ( 2017-12-01 10:30:39 -0500 )edit

it works ,thanks!

xianxjm gravatar imagexianxjm ( 2017-12-03 20:24:58 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-11-30 05:03:23 -0500

Seen: 2,899 times

Last updated: Dec 03 '17