Ask Your Question
0

Error when trying to load and execute a custom nodelet

asked 2019-08-07 09:15:04 -0500

Confused Lizard gravatar image

updated 2019-08-08 05:33:54 -0500

ENV: Ros Melodic on Ubuntu 18.04

Hi,

I am trying to launch my custom nodelet after building it.

after running a catkin_make without any problem and executing roscore followed of

rosrun nodelet nodelet manager __name:=nodelet_manager

And when trying to load my nodelet by running

rosrun nodelet nodelet load quadcopter/Quadcopter nodelet_manager

I received the following error:

[ INFO] [1565186442.980560504]: Loading nodelet /quadcopter_Quadcopter of type quadcopter/Quadcopter to manager nodelet_manager with the following remappings:
[FATAL] [1565186443.003452463]: Failed to load nodelet '/quadcopter_Quadcopter` of type `quadcopter/Quadcopter` to manager `nodelet_manager'

From the terminal where the nodelet manager is running, I received this error:

[ INFO] [1565180138.705802164]: Initializing nodelet with 8 worker threads.
[ERROR] [1565180345.275768382]: Failed to load nodelet [/quadcopter_Quadcopter] of type [quadcopter/Quadcopter] even after refreshing the cache: Failed to load library /home/workspace/quadcopter/devel/lib//libnodelet_quad.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/workspace/quadcopter/devel/lib//libnodelet_quad.so: undefined symbol: _ZN10quadcopter10Quadcopter2g0E)
[ERROR] [1565180345.275832676]: The error before refreshing the cache was: Failed to load library /home/workspace/quadcopter/devel/lib//libnodelet_quad.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/workspace/quadcopter/devel/lib//libnodelet_quad.so: undefined symbol: _ZN10quadcopter10Quadcopter2g0E)
[ERROR] [1565180354.586223790]: Failed to load nodelet [/quadcopter] of type [quadcopter] even after refreshing the cache: According to the loaded plugin descriptions the class quadcopter with base class type nodelet::Nodelet does not exist. Declared types are  depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid quadcopter/Quadcopter stereo_image_proc/disparity stereo_image_proc/point_cloud2
[ERROR] [1565180354.586274424]: The error before refreshing the cache was: According to the loaded plugin descriptions the class quadcopter with base class type nodelet::Nodelet does not exist. Declared types are  depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-08-08 09:09:59 -0500

Confused Lizard gravatar image

updated 2019-08-08 09:18:22 -0500

I found the issue. It was a linking library issue as expected but it was coming from a ill defined static constexpr variable withing my nodelet class.

I diagnosed it using c++filt _ZN10quadcopter10Quadcopter2g0E

The loading does not return this error anymore.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-08-07 09:15:04 -0500

Seen: 30 times

Last updated: Aug 08