Having 4 callback functions
I have a code where I need 4 callback functions (4 subscribers) for each wheel of my robot. What will be the best option to create those subscribers?
My idea was to create 4 threads that can run simultaneously:
ros::MultiThreadedSpinner spinner(4);
But from my understanding, the spinner will be blocking one and 4 threads won't use callbacks at the same time so I might just use a regular spinOnce();
, am I correct?
Can you suggest may be something?