Home | Tutorials | Wiki | Issues
Ask Your Question
0

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 libvtol_camera.so: /home/mago/Development/Repository/ROS/labrob_hydro_hetcont/devel/lib/libvtol_camera.so: undefined symbol: _ZTIN6gazebo17DepthCameraPluginE

I am using Gazebo 2.1 and ROS hydro

edit retag flag offensive close merge delete

Comments

1

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
0

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
0

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

Comments

I see that the question is kind of related to this one: http://answers.gazebosim.org/question/5113/symbol-lookup-error-in-example-plugin/

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

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
Login/Signup to Answer

Question Tools

Stats

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

Seen: 925 times

Last updated: Feb 05 '14