libLedPlugin.so throws undefined symbol error when loading
Hello Community, Im trying to use the libLedPlugin in an simulation for an underwater docking scenario using the uuv simulator. After running into this Plugin in the gazebo tutorials i searched it on my local system but could find it on my local system. There was no libLedPlugin.so or .hh/.cc file on my system. Same with FlashLightPlugin. I indeed have several working plugins installed, BlinkVisualPlugin for example.
I couldnt find the olugins anywhere so I decided to compile them myself with the code from (https://github.com/osrf/gazebo/tree/g...) and by following this tutorial (http://gazebosim.org/tutorials/?tut=p...).
Which worked great for the FashLightPlugin for example, but even though libLedPlugin.so is also compiled, it throws following error when starting a simulation using the plugin:
[Err] [Plugin.hh:180] Failed to load plugin /home/lukas/catkin_ws/src/gazebo_models/deepleng/plugins/libLedPlugin.so: /home/lukas/catkin_ws/src/gazebo_models/deepleng/plugins/libLedPlugin.so: undefined symbol: _ZN6gazebo16FlashLightPlugin4LoadEN5boost10shared_ptrINS_7physics5ModelEEESt10shared_ptrIN3sdf7ElementEE
Im using ubuntu 18.04, ros melodic and gazebo 9. gazebo 9 was installed with ros automatically i think. When compiling the code i always used the gazebo9 branch from the repository.
I would be very thankful if someone could tell me how to get the plugin working in some way! Thanks in advance!
CMake_Lists.txt:
`cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
find_package(gazebo REQUIRED)
include_directories(${GAZEBO_INCLUDE_DIRS})
link_directories(${GAZEBO_LIBRARY_DIRS})
list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")
add_library(FlashLightPlugin SHARED FlashLightPlugin.cc)
target_link_libraries(FlashLightPlugin ${GAZEBO_LIBRARIES})
add_library(LedPlugin SHARED LedPlugin.cc)
target_link_libraries(LedPlugin ${GAZEBO_LIBRARIES} ${ogre_libraries} ${IGNITION-TRANSPORT_LIBRARIES})`