ROS AsyncSpinner Example

有个疑问:如果使用AsyncSpinner,请问ros服务是异步的(就是单独开一个线程执行ros服务)吗?
经过测试发现是异步的,这和之前的认知有些不同,得知是异步的真是开心的不行,
AsyncSpinner具体咋用?和单线程spining有什么不同,也是全百度各路大神的解释没一个能让我明白,ok推荐一个外国兄弟,自己建网站自己出教程。来来就是这个,
The Robotics Back-End

来一段开场白
In this tutorial I’ll show you how to use a ROS AsyncSpinner with an example. You’ll see when using a roscpp AsyncSpinner is required, instead of the standard roscpp spinner.

This tutorial could also be called: how to solve roscpp callback issues, when it seems that some callbacks are stuck or late.

We’ll start by seeing a code example which has some callback problems. Some callbacks will be stuck, waiting for other callbacks (from different topics) to finish. And then we’ll see how using AsyncSpinner instead of the standard roscpp spinner can solve that.

Also, the problem you’ll see here only applies to roscpp callbacks, not rospy. You’ll get to know why during this tutorial.

猜你喜欢

转载自blog.csdn.net/windxf/article/details/111663605
ROS