ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
In addition to @Martin 's answer and answering the additional questions you asked:
You must find out if your nodehandle nh is private or not. I don't know what you mean by node is not private. But assuming you meant the nodehandle is not private, that would mean that they are global parameters. And therefore just in the global namespace: /depth_topic /depth_image_transport
You do not get the ROS_INFO rosout because you are setting those parameters in your code. This has the same effect as the rosparam call or placing it in the launch file (as mentioned above). The line that sets the 'depth_topic' variable is a default value for the param in the case it hasn't been set.
If depth_topic is not used anywhere else then it is useless but the general use case would be that that param has some meaning. In this case, it looks like the node subscribes to the raw image topic of some sort of camera.
Run a rosnode info
on the node and see what it subscribes to. You will likely find that topic.