#include "ros/ros.h"
#include "std_msgs/String.h"
#include <boost/thread.hpp>
Go to the source code of this file.
|
void | chatter4 (const std_msgs::String::ConstPtr &msg) |
|
int | main (int argc, char **argv) |
|
void chatter4 |
( |
const std_msgs::String::ConstPtr & |
msg | ) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
The MultiThreadedSpinner object allows you to specify a number of threads to use to call callbacks. If no explicit # is specified, it will use the # of hardware threads available on your system. Here we explicitly specify 4 threads.
Definition at line 66 of file listener_threaded_spin.cpp.
This tutorial demonstrates simple receipt of messages over the ROS system, using a threaded Spinner object to receive callbacks in multiple threads at the same time.