Skip to content

[SystemLoader.cc:92] Failed to load system plugin : Could not find shared library. HOW TO SOLVER THAT ERROR? #52

@acannbayraktar

Description

@acannbayraktar

Hi everyone,

I’m trying to run my Gazebo / Ignition simulation with my custom plugin libBoatPID.so, but I get the following error:
[Err] [SystemLoader.cc:92] Failed to load system plugin [libBoatPID.so] : Could not find shared library.

I have tried the following:

-Built the plugin using cmake and make in the boat_pid_plugin folder

-Checked that libBoatPID.so exists in ~/boat_pid_plugin/build

-Added the path to LD_LIBRARY_PATH

cmake_minimum_required(VERSION 3.10)
project(boat_pid_plugin)

# Find packages using simpler syntax
find_package(gz-sim8 REQUIRED)
find_package(gz-math7 REQUIRED)
find_package(gz-plugin2 REQUIRED)

set(CMAKE_CXX_STANDARD 17)

add_library(BoatPID SHARED src/BoatPID.cpp)


target_link_libraries(BoatPID PRIVATE
  gz-sim8::gz-sim8
  gz-math7::gz-math7
  gz-plugin2::gz-plugin2
)


install(TARGETS BoatPID
  LIBRARY DESTINATION lib/gz-sim-8/plugins
)

boat_pid_plugin/
├── CMakeLists.txt
├── src/
│ └── BoatPID.cpp
├── worlds/
└── boat_test.sdf


Envirorenmnt:
cmake version 3.22.1
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
windows 11 with WSL
ignitation math library

Could you please help me understand why Gazebo/Ignition cannot find my shared library, and how to fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions