Ask Your Question
1

Groovy and nodelets, node using opencv not starting

asked 2013-03-06 09:09:43 -0500

TommyP gravatar image

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 flag offensive close merge delete

Comments

I think people will need to see parts of your code to help much with this.

joq gravatar image joq  ( 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.

TommyP gravatar image TommyP  ( 2013-03-06 09:56:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-03-06 10:10:24 -0500

TommyP gravatar image

updated 2013-03-07 23:57:37 -0500

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}
 )

It was the target_link I had not done before.

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.
         at line 180 in /opt/ros/groovy/include/class_loader/class_loader_core.h
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.
         at line 180 in /opt/ros/groovy/include/class_loader/class_loader_core.h

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.

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

Stats

Asked: 2013-03-06 09:09:43 -0500

Seen: 1,178 times

Last updated: Mar 07 '13