Home | Tutorials | Wiki | Issues
Ask Your Question
0

Cannot open local sdf file in ignition gazebo

asked 2020-03-15 09:05:46 -0500

Jaeyoung-Lim gravatar image

updated 2020-03-19 03:31:55 -0500

Continuing Discussion from: https://community.gazebosim.org/t/can...

I am trying out the ignition gazebo citadel, and I am a bit confused on how this works compared to the classical gazebo.

I have a local model.sdf that I want to open in ignition gazebo. However, the application exists without any obvious errors. The output on the console is as the following.

ign gazebo ./model.sdf -v 5
[Msg] Ignition Gazebo Server v2.15.0
[Msg] Ignition Gazebo GUI    v2.15.0
[Msg] Loading SDF world file[/home/jaeyoung/src/Firmware/Tools/sitl_gazebo/models/uneven_ground/./model.sdf].
[Dbg] [Application.cc:87] Initializing application.
[GUI] [Dbg] [Application.cc:407] Create main window
[Dbg] [ign.cc:150] Shutting down ign-gazebo-server
[GUI] [Dbg] [SignalHandler.cc:141] Received signal[2].
[GUI] [Dbg] [SignalHandler.cc:141] Received signal[2].
[GUI] [Dbg] [Application.cc:130] Terminating application.

Version of ignition gazebo is:

$ ign gazebo --version
Ignition Gazebo, version 2.15.0
Copyright (C) 2018 Open Source Robotics Foundation.
Released under the Apache 2.0 License.

Update: The sdf file I am trying to spawn is this one: https://github.com/PX4/sitl_gazebo/bl...

But also other models in the repo have the same result


Update

@chapulina Thanks for the answer,

I created a sdf file following your suggestion, as the following

<?xml version="1.0" ?>
<sdf version="1.6">
    <!-- Runs physics -->
    <plugin
    filename="libignition-gazebo-physics-system.so"
    name="ignition::gazebo::systems::Physics">
    </plugin>

    <!-- Broadcasts the server state to the GUI -->
    <plugin
    filename="libignition-gazebo-scene-broadcaster-system.so"
    name="ignition::gazebo::systems::SceneBroadcaster">
    </plugin>

    <!-- Supports commands like spawning and teleporting entities -->
    <plugin
    filename="libignition-gazebo-user-commands-system.so"
    name="ignition::gazebo::systems::UserCommands">
    </plugin>
</sdf>

however it still fails to load anything

$ ign gazebo ./ignition.world -v 5
[Msg] Ignition Gazebo Server v2.15.0
[Msg] Ignition Gazebo GUI    v2.15.0
[Msg] Loading SDF world file[/home/jaeyoung/src/Firmware/Tools/sitl_gazebo/worlds/./ignition.world].
[Dbg] [Application.cc:87] Initializing application.
[GUI] [Dbg] [Application.cc:407] Create main window
[Dbg] [ign.cc:150] Shutting down ign-gazebo-server
[GUI] [Dbg] [ign.cc:230] GUI requesting list of world names. The server may be busy downloading resources. Please be patient.
[GUI] [Dbg] [SignalHandler.cc:141] Received signal[2].
[GUI] [Dbg] [SignalHandler.cc:141] Received signal[2].
[GUI] [Dbg] [Application.cc:130] Terminating application.

Update2

@chapulina Although adding the default world plugins stopped the ign client from crashing, I still cannot spawn models such as https://github.com/PX4/sitl_gazebo/tr... into the world. And does the model always need to be predefined inside the world sdf file? Is it possible to spawn vehicles in a already existing world?

edit retag flag offensive close merge delete

Comments

I moved the other answer you created to an update to the question. You will need to add the <plugin> tags to the SDF world file you're loading, inside the <world> tag.

chapulina gravatar imagechapulina ( 2020-03-17 11:36:41 -0500 )edit
1

Thanks! That worked.

Jaeyoung-Lim gravatar imageJaeyoung-Lim ( 2020-03-18 04:16:28 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-15 11:22:10 -0500

chapulina gravatar image

While on Gazebo-classic all features are enabled at all times, even if users don't need them, on Ignition users can turn on only the features they need.

Right now, all necessary features must be explicitly enabled on the SDF file. We're already working on a way for Ignition to load a few default plugins if the user doesn't specify any, but this will only be available in the upcoming minor releases.

Until then, you should include all world plugins that you need, like Physics and SceneBroadcaster. Here's a good list to start with:

<!-- Runs physics -->
<plugin
  filename="libignition-gazebo-physics-system.so"
  name="ignition::gazebo::systems::Physics">
</plugin>

<!-- Broadcasts the server state to the GUI -->
<plugin
  filename="libignition-gazebo-scene-broadcaster-system.so"
  name="ignition::gazebo::systems::SceneBroadcaster">
</plugin>

<!-- Supports commands like spawning and teleporting entities -->
<plugin
  filename="libignition-gazebo-user-commands-system.so"
  name="ignition::gazebo::systems::UserCommands">
</plugin>
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-03-15 09:05:46 -0500

Seen: 83 times

Last updated: Mar 19