ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

spin with actionlib

asked 2018-06-09 22:57:47 -0500

xiaoyuanzh gravatar image

updated 2018-06-10 00:08:21 -0500

jayess gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-06-09 23:18:27 -0500

ahendrix gravatar image

updated 2018-06-09 23:18:40 -0500

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.

edit flag offensive delete link more

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?

xiaoyuanzh gravatar image xiaoyuanzh  ( 2018-06-10 00:15:51 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-06-09 22:57:47 -0500

Seen: 251 times

Last updated: Jun 10 '18