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

Revision history [back]

click to hide/show revision 1
initial version

I don't think this is supported directly (ie: with some special spinner or something), but you could create your own CallbackQueue and then call CallbackQueue::callOne(..) at the appropriate time.

Note that this will mean that you're probably more likely to run into buffer overruns as spinOnce() actually calls callAvailable() which processes all available callbacks (here), so more regularly empties your queue.

I don't think this is supported directly (ie: with some special spinner or something), but you could create your own CallbackQueue and then call CallbackQueue::callOne(..) at the appropriate time.

Note that this will mean that you're probably more likely to run into buffer overruns as spinOnce() actually calls callAvailable() which processes all available callbacks (here), so more regularly empties your queue.


It might already exist, but if you want to abstract this nicely you could implement a new spinner that implements this behaviour. Then you could instantiate that in your code instead of having to maintain your own CallbackQueue instance.