ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

pcl_tracking in perception_pcl_electric_unstable gives nodelet error

asked 2012-07-20 22:35:08 -0600

Hey,

I'm trying to implement tracking using pcl::tracking library. Everything builds normaly, but when I try to run nodelet I get an error:

     Failed to load nodelet [/Detection_Tracking] of type [Detector/Detection_Tracking]: 
Failed to load library /home/grega/ros_workspace/diploma/Detector/lib/libDetector.so. 
Make sure that you are calling the PLUGINLIB_REGISTER_CLASS macro in the library code, 
and that names are consistent between this macro and your XML. 
Error string: Cannot load library: /home/grega/ros_workspace/diploma/Detector/lib/libDetector.so: 
undefined symbol: _ZN3pcl8tracking21ParticleFilterTrackerINS_12PointXYZRGBAENS0_14ParticleXYZRPYEE11initComputeEv
[FATAL] [1342859395.359533594]: Service call failed!

Do I have to link somehow libpcl_tracking.so in CMakeList.txt? Shouldn't be that done automatically when I add pcl dependency in manifest.xml?

I'm using Ubuntu and ROS Electric.

Thank's for your help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-07-21 01:27:43 -0600

I just found a solution. I added the following lines to CMakeList.txt

link_directories (/home/grega/ros_workspace/perception_pcl_electric_unstable/pcl/lib) rosbuild_add_library(Detector src/preprocessing_tracking.cpp) include_directories(/home/grega/ros_workspace/perception_pcl_electric_unstable/pcl/include) target_link_libraries(Detector pcl_tracking)

Now it builds successfully.

edit flag offensive delete link more

Comments

I don't get one thing, the error string says it can't load "diploma/Detector/lib/libDetector.so"; but you linked pcl related library with the cpp file which contains the 'undefined symbol'.... I am facing similar kind of problem, posted a question http://answers.ros.org/question/157886/error-while-loading-nodelet-velocity_multiplexer/

RB gravatar image RB  ( 2014-04-27 19:08:00 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-07-20 22:35:08 -0600

Seen: 385 times

Last updated: Jul 21 '12