Reasoning for using Pub/Sub vs Service
I'm struggling to determine when I should use the various communication methods ROS offers, like the publish/subscriber model, service, or action.
I figure, sensors should be publishers, short running processes can be services, and longer running ones should be actions. Do those make sense? Are there other rules of thumb to follow?
For example, I was looking at the rosserial tutorial for controlling a servo motor, and saw it was using a subscriber to move. I would have chosen a service. What would be the reasoning for choosing one over the other?