Ask Your Question

Revision history [back]

You might need more than one spin threads. When you call spin, roscpp starts a loop that serves service and topic requests, i.e. it calls the callback. When calling a service inside a service, you might need a second spin loop. Have a look at roscpp's AsyncSpinner and this page.