Ask Your Question

Revision history [back]

I'd recommend reading the Callbacks and Spinning page page. Since it sounds like you are calling ros::spin(), then all callbacks get put into a callback queue in the order in which they are received. Then every call to ros::spin() will handle the callback at the front of the queue. So the answer to your question depends on the order in which the service request and the topic was received.

I'd recommend reading the Callbacks and Spinning page page. Since it sounds like you are calling ros::spin(), then all callbacks get put into a callback queue in the order in which they are received. Then every call to ros::spin() will handle the callback at the front of the queue. So the answer to your question depends on the order in which the service request and the topic was were received.