Skip to content

Commit

Permalink
allow namespaced nodelet to attach to manager in global namespace
Browse files Browse the repository at this point in the history
This fixes an issue with how the driver tries to enforce REP-135.

https://www.ros.org/reps/rep-0135.html

This fixes an issue where the Zivid driver nodelet would incorrectly
perceive that it started in the global namespace (and throw).
  • Loading branch information
danielcranston committed Apr 5, 2023
1 parent bcd7770 commit 473bf4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zivid_camera/src/zivid_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ZividCamera::ZividCamera(ros::NodeHandle& nh, ros::NodeHandle& priv)
ROS_INFO("Zivid ROS driver version %s", ZIVID_ROS_DRIVER_VERSION);

ROS_INFO("Node's namespace is '%s'", nh_.getNamespace().c_str());
if (ros::this_node::getNamespace() == "/")
if (nh_.getNamespace() == "")
{
// Require the user to specify the namespace that this node will run in.
// See REP-135 http://www.ros.org/reps/rep-0135.html
Expand Down

0 comments on commit 473bf4e

Please sign in to comment.