#include <iostream>
#include <boost/thread.hpp>
#include <boost/foreach.hpp>
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
#include <std_msgs/Int32.h>
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 foreach BOOST_FOREACH |
Definition at line 40 of file VelocityDispatcher.cpp.
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.
int _currentInput |
Definition at line 48 of file VelocityDispatcher.cpp.
Definition at line 57 of file VelocityDispatcher.cpp.
int _currentOutput |
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.
vector<Subscriber> _inputs |
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.