Robotics StackExchange | Archived questions

Failed to load plugin with Ignition Gazebo

Hello everybody,

I'm currently working on Ignition Gazebo Citadel (not Gazebo classic) and I need to write some plugins.
In order to understand how plugins work with Ignition, I did some tests by creating and compiling plugins with Gazebo classic (no problem) and with Ignition Gazebo.
For Ignition Gazebo, I follow the instruction of this page https://ignitionrobotics.org/api/gazebo/3.0/createsystemplugins.html and theses files https://github.com/ignitionrobotics/ign-gazebo/tree/ign-gazebo3/examples/plugin/system_plugin.
I had no errors when I compiled the plugin (cmake . & make)
Unfortenaly, I have an error when I launch my .sdf file to test how plugins works ([Err] [SystemLoader.cc:75] Failed to load system plugin [libSampleSystem.so] : couldn't load library on path [libSampleSystem.so].)

The plugin directory looks like this

In this .sdf file, I use plugins with that

<plugin
  filename="libSampleSystem.so"
  name="sample_system::SampleSystem">
</plugin>
<plugin filename="libSampleSystem.so"
        name="sample_system::SampleSystem2">
</plugin>

And IGNGAZEBOSYSTEMPLUGINPATH is set to "/plugins/sample_system/"

It would be a great miracle for me if you had a solution or a lead concerning this.

Asked by ctruillet on 2021-05-03 05:29:23 UTC

Comments

Where exactly in your system is the libSampleSystem.so file? What happen if you hardcode the path to the directory (probably /build/) in the IGN_GAZEBO_SYSTEM_PLUGIN_PATH?

Asked by Jose Luis Rivero on 2021-05-03 10:18:28 UTC

When I hardcode the path to the directory it works perfectly ! (Well, I had another problem with having 2 versions of ign-msgs (5 and 7), I had to uninstall ign-msg7)

Thanks for your help

Asked by ctruillet on 2021-05-05 04:28:23 UTC

Answers