Failed to load plugin with Ignition Gazebo

asked 2021-05-03 07:15:48 -0500

ctruillet gravatar image

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/gaze... and theses files https://github.com/ignitionrobotics/i....
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

  • sample_system
    • SampleSystem.hh
    • SampleSystem.cc
    • SampleSystem2.cc
    • SampleSystem.sdf
    • CMakeLists.txt
    • Makefile
    • libSampleSystem.so

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 IGN_GAZEBO_SYSTEM_PLUGIN_PATH is set to "<path_to_my_plugin_dir>/plugins/sample_system/"

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

edit retag flag offensive close merge delete

Comments

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

Jose Luis Rivero gravatar imageJose Luis Rivero ( 2021-05-03 10:18:28 -0500 )edit

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

ctruillet gravatar imagectruillet ( 2021-05-05 04:28:23 -0500 )edit