Gazebo | Ignition | Community
Ask Your Question

Plugin.hh undefined symbol

asked 2013-12-03 10:44:05 -0500

Andrea gravatar image

Hello, I am trying to write a plugin for a camera. The building works fine, but when I launch the world I get the following error

Error [Plugin.hh:141] Failed to load plugin /home/mago/Development/Repository/ROS/labrob_hydro_hetcont/devel/lib/ undefined symbol: _ZTIN6gazebo17DepthCameraPluginE

I am using Gazebo 2.1 and ROS hydro

edit retag flag offensive close merge delete



This may happen when your plugin is built but not linked, could you try adding this (if you don't have it already) to your CMakeLists file: target_link_libraries(vtol_camera ${catkin_LIBRARIES})

AndreiHaidu gravatar imageAndreiHaidu ( 2013-12-04 04:38:04 -0500 )edit

Hi, the plugin is actually linked: target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${GAZEBO_LIBRARIES} ${ARMADILLO_LIBRARIES} )

Andrea gravatar imageAndrea ( 2013-12-04 11:40:16 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2014-02-05 12:16:48 -0500

Andrea gravatar image

I found a solution. I forgot to link the library in the CMakeLists.txt file

target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${GAZEBO_LIBRARIES} ${ARMADILLO_LIBRARIES} DepthCameraPlugin )
edit flag offensive delete link more

answered 2013-12-16 19:12:50 -0500

Andrea gravatar image

I still cannot understand what is going on, any clue please?

edit flag offensive delete link more


I see that the question is kind of related to this one:

AndreiHaidu gravatar imageAndreiHaidu ( 2013-12-17 02:13:26 -0500 )edit

answered 2014-01-29 14:13:57 -0500

Andrea gravatar image

The question you linked me refers to a gazebo bug. Until I got some reference problems I run the 2.2 version of Gazebo and the problem was not solved. Some details my plugin is declaread in this way

   class camera : public DepthCameraPlugin

moreover in the load function

  void camera::Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf){
      DepthCameraPlugin::Load(_parent, _sdf);

I believe that is the line that causes the problem. Any ideas?

edit flag offensive delete link more

Question Tools


Asked: 2013-12-03 10:44:05 -0500

Seen: 1,402 times

Last updated: Feb 05 '14