roscpp node handles convention
I want to know what is the convention for creating ROS node handles. I have my ROS nodes, but I realized that for every subscriber/publisher in my node I have created an individual node handle.
I am doing this in one node/program, for example:
ros::NodeHandle motor_nh;
ros::NodeHandle velocity_nh;
ros::NodeHandle vel_callback_nh;
ros::NodeHandle imu_nh;
ros::NodeHandle alarm_sound_nh;
I am not sure if that is the correct usage, or am I supposed to have one single node handle for the entire node/program?
Thanks