Open hacker1024 opened 7 months ago
I faced a similar issue and looked a bit into it
With the regular node https://github.com/ros/class_loader/blob/iron/include/class_loader/class_loader_core.hpp#L313 calls addOwningClassLoader
with a nullptr
whereas in the component container getCurrentlyActiveClassLoader()
returns a not-nullptr.
For the regular node the else if
in branch https://github.com/ros/class_loader/blob/iron/include/class_loader/class_loader_core.hpp#L418 than matches (because the owner is nullptr
) whereas for the component container neither of the two branches match (I guess expected is the first branch), and therefore for the component container it cannot load the plugin.
I still need to find out why
1) getCurrentlyActiveClassLoader() == nullptr
and getCurrentlyLoadingLibraryName() == ""
for the regular node but not for the component container
and
2) why the first branch does not match in the component container case
but when I hack in that I always override the output of getCurrentlyActiveClassLoader()
with nullptr, I can load the plugin also in the component container
pluginlib
plugins fail to load in nodes launched as components.When executed from a composable node, this line in
class_loader
seems to returnnullptr
when it would normally not. I have not found out why.To reproduce
Setup:
Working: Regular nodes
Note that the
static_layer
plugin loads successfully.Broken: Composable nodes
Note that the
static_layer
plugin fails to load.