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

If you're in a nodelet use the multi threaded nodelet interface.
If you're not use the Asynchronous spinner.

The nodelet interface will only work if you're inside a nodelet manager as a nodelet.

You can add your own threads on top of the callback threads in either case. If you do you are in charge of cleaning up correctly.

For portability Boost Thread is recommended over pthreads.

In most cases there will be no performance difference, unless you are doing something very exotic. And if you're doing that very exotic thing you will know the performance differences. The most common case is running a single threaded process.