Some functions are not called and ros::spin() issue
I am having some parts of code that are not called. The code is here. The scanCallback() function is not called at all, I think(I don't know what to be passed in from the main function as it is a callback function). I already use ros::spin() there, but then, I still need to call some of the member functions explicitly.
I've been told that when using ros::spin, I don't need to invoke the member functions explicitly, but, when I tried, it's not so. What is the culprit?
Hopefully, some experienced coders can guide me on this. Thanks in advance.