Ask Your Question
0

Nodelet namespace collision warning

asked 2019-04-23 06:43:08 -0500

lucascoelho gravatar image

Hi all,

I'm implementing a solution based on a collection of nodelets that run together. But for one of these nodelets, I'm getting the following warning every time I try to run it:

Initializing nodelet with 4 worker threads. Warning: class_loader.impl: SEVERE WARNING!!! A namespace collision has occured with plugin factory for class nodelet_package::NodeletName. 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 212 in /opt/ros/indigo/include/class_loader/class_loader_core.hpp

At runtime, I have a node that loads all these nodelets using nodelet.load() from nodelet/loader.h

I tried to understand and compare this nodelet with the other ones I'm using but I was not able to not guess what is wrong with this specific nodelet. Could anyone give me an example of what circumstances this warning might occur and give me tips on how to investigate this warning and potentially solve it?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-04-23 11:17:06 -0500

lucascoelho gravatar image

Thanks @gvdhoorn, your comment gave me good insights.

In my specific case, I defined the same nodelet source file as a library multiple times on my CMakeLists.txt file:

set (LIB_SOURCES .... # some cpp files src/PositionNodelet.cpp )

add_library(PositionNodelet src/PositionNodelet.cpp)

target_link_libraries(PositionNodelet ${catkin_LIBRARIES})

Then, I've removed "src/PositionNodelet.cpp" from the "set (LIB_SOURCES ...)" command and now it works fine.

edit flag offensive delete link more
0

answered 2019-04-23 07:19:51 -0500

gvdhoorn gravatar image

Could anyone give me an example of what circumstances this warning might occur

the warning message mentions one such situation: a node that uses nodelet.load(..) but also target_link_libraries(..) against the libraries that host the nodelets. If you have find_package(catkin .. COMPONENTS nodeletlib0 nodeletlib1 ..) and finally a target_link_libraries(.. ${catkin_LIBRARIES}) that would cause this.

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

2 followers

Stats

Asked: 2019-04-23 06:43:08 -0500

Seen: 62 times

Last updated: Apr 23