$search

listener_async_spin.cpp File Reference

#include "ros/ros.h"
#include "std_msgs/String.h"
#include <boost/thread.hpp>
Include dependency graph for listener_async_spin.cpp:

Go to the source code of this file.

Classes

class  Listener

Functions

void chatter4 (const std_msgs::String::ConstPtr &msg)
int main (int argc, char **argv)

Variables

ros::Duration d (0.01)

Function Documentation

void chatter4 ( const std_msgs::String::ConstPtr &  msg  ) 

Definition at line 60 of file listener_async_spin.cpp.

int main ( int  argc,
char **  argv 
)

The AsyncSpinner 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_async_spin.cpp.


Variable Documentation

This tutorial demonstrates simple receipt of messages over the ROS system, using an asynchronous Spinner object to receive callbacks in multiple threads at the same time.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


roscpp_tutorials
Author(s): Morgan Quigley
autogenerated on Sat Mar 2 13:20:46 2013