ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

You need to set the parameters depth_topic and depth_image_transport on the Parameter Server (also see this tutorial.

The exact name depends on whether the node handle nh is a private node handle or not. Private node handles are initialized like this:

ros::NodeHandle nh("~");

... whereas the global node handle lacks the "~".

Assuming nh is a private node handle, and your node is called my_node, the full name of the parameters are /my_node/depth_topic and /my_node/depth_image_transport. You need to set these to the names of the topics you want to use. You can use either the rosparam command line tool before starting your node, set the parameters in the launch file, or add them to the rosrun call (just search for these things on the wiki). Use rosparam dump FILENAME.yaml to inspect the parameters currently stored on the parameter server and rostopic list to see what topics are advertised.