Ask Your Question

# Revision history [back]

I would recommend to read the NodeHandles wiki and the Names in ros.

If your first node define a nodehandle with a private namespace then if you want to have the same namespace in your second node you would have to define the nodehandle with the fully qualified name of the first one :

//In node A
ros::NodeHandle n("~"); //Consider the private namespace to be node_a
//In node B
ros::NodeHandle n("node_a");


You could also use a remapping in a launch file if you have one.