When is private nodehandle useful
Looking into many codes and programs I see not rarely some nodes which are called toghether with a private name. For istance:
ros::NodeHandle nh;
ros::NodeHandle nh_private("~");
finding out this tutorial I read that:
// Use a private node handle so that multiple instances of the node can
// be run simultaneously while using different parameters.
// Parameters defined in the .cfg file do not need to be initialized here
// as the dynamic_reconfigure::Server does this for you.
ya ok, but I would ask now: Why?!?
In which case should I need to run simultaneously many istances of the same node? Is the risiko, that some nodes publishing on the some topics create a lot of confusion running the main prog, too big?
Since im trying to write more complicated drivers for my robot and I look into the coe of other users, I see that private nodes are normal.
Regards