You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's great that the driver itself enforces REP-135, but I noticed a situation where this enforcement is too strict.
It has to do with the nodelet version of the driver. The method the driver uses to determine if it was started in the global namespace (the thing that REP-135 prohibits) is ros::this_node::getNamespace().
For nodelets, this resolves to the namespace of the nodelet manager, not the Zivid driver nodelet (at least in ROS Melodic). This means that, a Zivid driver nodelet, brought up in its own namespace but attached to a manager in the global namespace, will fail to start (claiming it doesn't satisfy REP-135, but in fact it does).
Notice how the manager is in the global namespace and the Zivid driver nodelet is put in $(arg ns).
roslaunch test.launch ns:=zivid fails on master, but succeeds on danielcranston@473bf4e. Starting the nodelet (or node) in the global namespace still has the same (intended) behavior as before.
I guess one could make the argument that nodelet managers shouldn't be put in the global namespace, but I don't interpret anything in REP-135 that would discourage it, and I think it's a pretty common practice to do so.
Thanks for reading.
The text was updated successfully, but these errors were encountered:
Summary
Hi,
I think it's great that the driver itself enforces REP-135, but I noticed a situation where this enforcement is too strict.
It has to do with the nodelet version of the driver. The method the driver uses to determine if it was started in the global namespace (the thing that REP-135 prohibits) is
ros::this_node::getNamespace()
.For nodelets, this resolves to the namespace of the nodelet manager, not the Zivid driver nodelet (at least in ROS Melodic). This means that, a Zivid driver nodelet, brought up in its own namespace but attached to a manager in the global namespace, will fail to start (claiming it doesn't satisfy REP-135, but in fact it does).
I made a commit with a proposed solution here: danielcranston@473bf4e
How to reproduce
To test, you can use this minimal launchfile
Notice how the manager is in the global namespace and the Zivid driver nodelet is put in
$(arg ns)
.roslaunch test.launch ns:=zivid
fails onmaster
, but succeeds on danielcranston@473bf4e. Starting the nodelet (or node) in the global namespace still has the same (intended) behavior as before.I guess one could make the argument that nodelet managers shouldn't be put in the global namespace, but I don't interpret anything in REP-135 that would discourage it, and I think it's a pretty common practice to do so.
Thanks for reading.
The text was updated successfully, but these errors were encountered: