spin with actionlib
if I declare an actionlib as
action_server(nh_, "execute_path", boost::bind(&MyClass::executePathCB, this, _1), false)
and also decare as callbacks like lasers and odoms.
Then it seems like executePathCB
and other callbacks work as a parallel mode, it is pretty which I expect. But is that true? Or how does it is implement?
Asked by xiaoyuanzh on 2018-06-09 22:57:47 UTC
Answers
By default, callbacks are executed sequentially by ros::spin()
and ros::spinOnce()
. If you want to execute multiple callbacks in parallel you can use an async spinner or a multithreaded spinner. See roscpp Callbacks and Spinning for details.
Asked by ahendrix on 2018-06-09 23:18:27 UTC
Comments
Emm. I means if I use action server. executePathCB just acts in a parallel mode with other odoms callbacks, without async spinner. In fact, move_base is just written by traditional ros spin. How does it works?
Asked by xiaoyuanzh on 2018-06-10 00:15:51 UTC
Comments