Common usage of NodeHandle?
When developing classes that provide ROS-specific functionality, what is the recommended approach (if any) to use the NodeHandle class?
Should they 1) be passed to each class as a constructor argument (copied/referenced from a 'global' handle initialized on main()), or 2) be declared as private/protected members & initialized by each class's constructor? What would be the pros/cons of each implementation?
I've been using (1) for some time, but I wonder if it's what NodeHandle was designed for? Passing around a shared NodeHandle clutters the constructor signatures and otherwise hinders code readability. A NodeHandle is cheap to copy, so I'm assuming performance-wise it's irrelevant, but maybe there is some other aspect I'm not seeing?