Symbol lookup failed : _ZN15 message_filters 10Connection10 disconnectEd [solved]
Hi,
I'm currently trying to compile a variant of costmap_2d::ObstacleLayer to experiment various obstacle-avoiding methods on ROS noetic running on Ubuntu 20.04.
I've built a new ROS package where I copy-pasted the code and dependencies of the original. I've renamed only the class and costmap_plugins to avoid interference with the original. Nothing more has been modified yet.
It builds ok, MoveBase is able to load the new plugin, but crashes immediately with the error : Symbol lookup failed : ZN15 messagefilters 10Connection10 disconnectEd
I've looked into the symbols of the SO file, and obviously 2 symbols are undefined from message_filters but not all. Here are the shell command and its first results :
$ nm devel/lib/libnonlethalobstaclelayer.so | grep "messagefilters" | head -10 U ZN15messagefilters10Connection10disconnectEv 00000000002017a0 W ZN15messagefilters10ConnectionaSEOS0_ U ZN15messagefilters10ConnectionC1ERKN5boost8functionIFvvEEE 00000000001ec51c W ZN15messagefilters10ConnectionC1Ev 00000000001ec51c W ZN15messagefilters10ConnectionC2Ev 00000000001f0be0 W ZN15messagefilters10ConnectionD1Ev 00000000001f0be0 W ZN15messagefilters10ConnectionD2Ev 000000000020b56a W ZN15messagefilters10SubscriberIN11sensormsgs10LaserScanISaIvEEEE11unsubscribeEv
I've checked messagefilters was in the package.xml, find-package, and catkinpackage. This solved the only relevant question I found on the internet (https://answers.ros.org/question/107531/linking-errors-with-message_filters-in-hydro/), but my problem stays...
Any idea about what could be wrong? Thanks, Laurent.
Asked by JeanpierreL on 2023-06-29 11:36:57 UTC
Answers
Thank you for your input. I finally found the problem, which was not related to the package itself but to the way I created it :'((. I used the following command :
catkin create pkg non_lethal_obstacle_layer dynamic_reconfigure geometry_msgs laser_geometry message_filters pluginlib roscpp sensor_msgs tf2 tf2_geometry_msgs tf2_ros tf2_sensor_msgs voxel_grid
instead of :
catkin_create_pkg non_lethal_obstacle_layer dynamic_reconfigure geometry_msgs laser_geometry message_filters pluginlib roscpp sensor_msgs tf2 tf2_geometry_msgs tf2_ros tf2_sensor_msgs voxel_grid
This created an empty copy of many standard packages. I still does not understand why it even compiled. (just an error with the dynamic reconfigure option in CMakeList, that I commented out to skip forward...) Anyway, the removal of spurious packages, cleanup and rebuild corrected the problem.
I apologize for the trouble.
Cheers, Laurent
Asked by JeanpierreL on 2023-07-04 07:33:43 UTC
Comments
Does the output of
ldd devel/lib/libnon_lethal_obstacle_layer.so
have a line similar to:If this is missing, your CMakeLists.txt probably does not correctly specify that your plugin depends on
message_filters
package.Asked by Mike Scheutzow on 2023-07-02 10:33:31 UTC
Thank you for your input. I finally found the problem, which was not related to the package itself but to the way I created it :'((. I used the following command :
instead of :
My error created an empty copy of many standard packages. I still does not understand why it even compiled. (just an error with the dynamic reconfigure option in CMakeList, that I commented out to skip forward...) Anyway, the removal of spurious packages, cleanup and rebuild corrected the problem.
I apologize for the trouble. Cheers, Laurent
Asked by JeanpierreL on 2023-07-04 03:03:54 UTC
I'm glad you figured it. You should change your comment to be an answer, then click the checkmark inside the gray circle.
Asked by Mike Scheutzow on 2023-07-04 05:45:20 UTC
Sorry, I don't have enough points to accept my own answer or even to delete my comment...
Asked by JeanpierreL on 2023-07-04 07:34:56 UTC