# Groovy and nodelets, node using opencv not starting

I have nodelet code that when I try it in groovy and catkin give me:

[ERROR] [1362604082.371073156]: Failed to load nodelet [/VDetectorsNodelet] of type [CUASVision/VDetectorsNodelet]: Failed to load library /home/tompe/lrs_ws/devel/lib//libCUASVNodelets.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/tompe/lrs_ws/devel/lib//libCUASVNodelets.so: undefined symbol: _ZTVN2cv11_InputArrayE)
[ERROR] [1362604082.377656950]: Failed to load nodelet [/VTrackersNodelet] of type [CUASVision/VTrackersNodelet]: Failed to load library /home/tompe/lrs_ws/devel/lib//libCUASVNodelets.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/tompe/lrs_ws/devel/lib//libCUASVNodelets.so: undefined symbol: _ZTVN2cv11_InputArrayE)


and

tompe@tpdell:~$echo "_ZTVN2cv11_InputArrayE" | c++filt vtable for cv::_InputArray  I have checked the obvious things and compared to the nodlet code in image_proc. Any idea about what could cause this? edit retag close merge delete ## Comments I think people will need to see parts of your code to help much with this. ( 2013-03-06 09:43:26 -0500 )edit Maybe. What I wondered was what library that provides "cv::_InputArray" and how that is supposed to be linked with a nodelet that is dynamically loaded. But I might have to dig deeper. This is a nodelet that was working with rosbuild but in the conversion to carkin it stopped working. ( 2013-03-06 09:56:34 -0500 )edit ## 1 Answer Sort by » oldest newest most voted It seems that you have to link libraries to the nodelet target that builds nodes. Doing the following seems to have solved the problem:  add_library(CUASVNodelets src/VTrackersNodelet.cpp src/VDetectorsNodelet.cpp ) target_link_libraries(CUASVNodelets${catkin_LIBRARIES}
)


But that might not have been the solution since I got:

Warning: class_loader::class_loader_private: SEVERE WARNING!!! A namespace collision has occured with plugin factory for class (null). New factory will OVERWRITE existing one. This situation occurs when libraries containing plugins are directly linked against an executable (the one running right now generating this message). Please separate plugins out into their own library or just don't link against the library and use either class_loader::ClassLoader/MultiLibraryClassLoader to open.
Warning: class_loader::class_loader_private: SEVERE WARNING!!! A namespace collision has occured with plugin factory for class (null). New factory will OVERWRITE existing one. This situation occurs when libraries containing plugins are directly linked against an executable (the one running right now generating this message). Please separate plugins out into their own library or just don't link against the library and use either class_loader::ClassLoader/MultiLibraryClassLoader to open.


I wonder how to tell the standalone nodlet then to use opencv libraries.

===============

I think the above warning was just a mistake in the code using some macros twice. Everything is working now and the answer I was looking for was the target_link_libraries above.

more