How to run services on another thread?

asked 2019-11-22 05:18:49 -0600

drodgu gravatar image

updated 2019-11-22 05:21:01 -0600

Hi everyone,

I have a navigation application and I need a callback to run on another thread rather than the main one. I've search on the internet and I've discovered that you can do such things using ros subscribers as it is shown in this other reference [1]. In this node I need to use ros service communication. My question is how can I setup my ros::AdvertiseServiceOptions::create in order to link that service server advertisment to another thread by using ros::AsyncSpinner?

Thanks in advance for your help!

edit retag flag offensive close merge delete