Defines | Functions | Variables
VelocityDispatcher.cpp File Reference
#include <iostream>
#include <boost/thread.hpp>
#include <boost/foreach.hpp>
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
#include <std_msgs/Int32.h>
Include dependency graph for VelocityDispatcher.cpp:

Go to the source code of this file.

Defines

#define foreach   BOOST_FOREACH

Functions

void createSubscribersAndPublishers (NodeHandle &node, map< string, string > &inputs, vector< string > &outputs)
int main (int argc, char **argv)
void onInputVelocityMessage (const geometry_msgs::Twist::ConstPtr velocityMessage, int inputId)
void onSetInputMessage (const std_msgs::Int32::ConstPtr inputIdMessage)
void onSetOutputMessage (const std_msgs::Int32::ConstPtr outputIdMessage)
void publishStatus (TimerEvent timerEvent)
void publishVelocity ()
bool setupInputOutput (NodeHandle &node)

Variables

int _currentInput
Publisher _currentInputPublisher
int _currentOutput
Publisher _currentOutputPublisher
geometry_msgs::Twist _currentVelocity
volatile bool _enableOutput
vector< Subscriber_inputs
vector< Publisher_outputs
Subscriber _setInputSubscriber
Subscriber _setOutputSubscriber
Timer _statusPublishTimer
boost::thread * _velocityPublishThread

Define Documentation

#define foreach   BOOST_FOREACH

Definition at line 40 of file VelocityDispatcher.cpp.


Function Documentation

void createSubscribersAndPublishers ( NodeHandle node,
map< string, string > &  inputs,
vector< string > &  outputs 
)

Inputs

Outputs

Control

Status

Publishing threads & timers

Definition at line 118 of file VelocityDispatcher.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 195 of file VelocityDispatcher.cpp.

void onInputVelocityMessage ( const geometry_msgs::Twist::ConstPtr  velocityMessage,
int  inputId 
)

Definition at line 89 of file VelocityDispatcher.cpp.

void onSetInputMessage ( const std_msgs::Int32::ConstPtr  inputIdMessage)

Definition at line 69 of file VelocityDispatcher.cpp.

void onSetOutputMessage ( const std_msgs::Int32::ConstPtr  outputIdMessage)

Definition at line 76 of file VelocityDispatcher.cpp.

void publishStatus ( TimerEvent  timerEvent)

Definition at line 98 of file VelocityDispatcher.cpp.

void publishVelocity ( )

Definition at line 108 of file VelocityDispatcher.cpp.

bool setupInputOutput ( NodeHandle node)

Definition at line 162 of file VelocityDispatcher.cpp.


Variable Documentation

Definition at line 48 of file VelocityDispatcher.cpp.

Definition at line 57 of file VelocityDispatcher.cpp.

Definition at line 49 of file VelocityDispatcher.cpp.

Definition at line 58 of file VelocityDispatcher.cpp.

geometry_msgs::Twist _currentVelocity

Definition at line 63 of file VelocityDispatcher.cpp.

volatile bool _enableOutput

Definition at line 46 of file VelocityDispatcher.cpp.

Definition at line 51 of file VelocityDispatcher.cpp.

Definition at line 52 of file VelocityDispatcher.cpp.

Definition at line 54 of file VelocityDispatcher.cpp.

Definition at line 55 of file VelocityDispatcher.cpp.

Definition at line 61 of file VelocityDispatcher.cpp.

boost::thread* _velocityPublishThread

Definition at line 60 of file VelocityDispatcher.cpp.



mr_tools
Author(s): Igor Makhtes
autogenerated on Fri Aug 28 2015 11:35:35