Home | Tutorials | Wiki | Issues
Ask Your Question
1

how to solve undefined symbol error?

asked 2013-06-12 12:13:35 -0500

Zahra gravatar image

updated 2013-06-18 00:09:33 -0500

nkoenig gravatar image

Hello,

I am implementing laser scanner using gazebo_ros_laser plugin

https://bitbucket.org/osrf/drcsim/src/b4e76f22bc670ed5bf39aae1f991eb3800bff0a8/ros/atlasmsgs/gazeboros_laser.h?at=default

when I loaded the model in gazebo, I get the following error: Failed to load plugin “path to my plugin” undefined symbol: _ZN6gazebo9RayPlugin15OnNewLaserScansEv

any idea how to solve this problem? I set up gazebo path plugin environment in the right way, but still cannot figure out what it might be wrong.

Thanks in advance!

edit retag flag offensive close merge delete

Comments

That could mean the plugin is compiled against a different of gazebo then the one you are running. You can recompile the plugin from source to avoid this issue. Can you show how we can reproduce this issue? thanks.

hsu gravatar imagehsu ( 2013-06-12 14:24:26 -0500 )edit

sorry for the trivial question. What do you by compile the plugin from the source? For example , I have created a camera sensor using the CameraPlugin plugin and I followed the camera plugin tutorials on here http://gazebosim.org/wiki/Tutorials/1.0/plugins/camera_plugin and compiled the plugin as it is in this tutorial and everything worked well.I have been working with Gazebo standalone version for sometime and I have followed the Pre-compiled binaries method when installing it. thanks

Zahra gravatar imageZahra ( 2013-06-13 00:25:31 -0500 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2013-06-13 04:12:50 -0500

Zahra gravatar image

updated 2013-06-18 00:10:50 -0500

nkoenig gravatar image

I have installed Gazebo and compiling it from source . Followed http://gazebosim.org/wiki/1.5/install then, I edited the CmakeLists.txt file of my project by linking the libraries to RayPlugin as following:

target_link_libraries(gazebo_ros_laser ${roscpp_LIBRARIES} ${GAZEBO_LIBRARIES} ${Boost_LIBRARIES} ${PROTOBUF_LIBRARIES} RayPlugin)

the undefined symbol error is solved. but another error msgs occurred when I launch my world file that has my plugin as following gazebo model.world.

the error :

Not loading plugin since ROS hasn't been properly initialized. Try starting gazebo with ros plugin:

gazebo -s libgazeborosapi_plugin.so

that msg error is part of gazeboroslaser.cpp. and when I start gazebo with : gazebo -s libgazeboroslaser.so , I get the following error msgs:

Msg Waiting for master.Error [gazebo.cc:48] System is attempting to load a plugin, but detected an incorrect plugin type. Plugin filename[libgazeboroslaser.so].

so, Can you please tell me what am I missing here?

Thanks in advance!

edit flag offensive delete link more
0

answered 2013-06-13 04:07:08 -0500

PMilani gravatar image

try changing cmakelists.txt to get it to target the library with your plugin. see http://answers.gazebosim.org/question/3176/resolving-symbol-lookup-errors-in-gazebo-15-and-18/.

Though in short it is a linking issue, changing CMakeLists.text targeting the right libraries would be a good place to start.

edit flag offensive delete link more

Comments

thanks PMilani, I have seen you post earlier and edited CMakeLists.txt , and it helped solving that linking issue, but I have now other issues with Launching the world file that has my plugin in, as I just explained in the answer.

Zahra gravatar imageZahra ( 2013-06-13 04:15:56 -0500 )edit

thanks PMilani, I have seen you post earlier and edited CMakeLists.txt , and it helped solving that linking issue, but I have now other issues with Launching the world file that has my plugin in, as I just explained in the answer.

Zahra gravatar imageZahra ( 2013-06-13 04:15:59 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-06-12 12:13:35 -0500

Seen: 3,237 times

Last updated: Jun 18 '13