Gazebo | Ignition | Community
Ask Your Question
0

libLedPlugin.so throws undefined symbol error when loading

asked 2020-07-07 09:36:21 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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})`
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-13 04:56:10 -0600

kumpakri gravatar image

updated 2020-07-13 07:29:25 -0600

Did you write the LedPlugin and the FlashLightPlugin yourself in some package? There is no project name in the CMake Lists. Those plugins are existing in gazebo. If you wish to use the default gazebo plugin, you do not build it. Just use them in your model plugin tags and delete all the lines about those plugins from the CMakeLists.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-07-07 09:36:21 -0600

Seen: 112 times

Last updated: Jul 13 '20