teleop.h
Go to the documentation of this file.
00001 #ifndef __TELEOP_H__
00002 #define __TELEOP_H__
00003 
00004 #include <ros/ros.h>
00005 #include <sensor_msgs/Joy.h>
00006 #include <keyboard/Key.h>
00007 #include "universal_teleop/Event.h"
00008 
00009 namespace universal_teleop {
00010   class Teleop {
00011     public:
00012       Teleop(void);
00013       void control(void);
00014 
00015     private:
00016       void joystick_event(const sensor_msgs::Joy::ConstPtr& joy);
00017       void keyboard_up_event(const keyboard::Key::ConstPtr& key);
00018       void keyboard_down_event(const keyboard::Key::ConstPtr& key);
00019 
00020       void process_event(const universal_teleop::Event& e);
00021 
00022       ros::NodeHandle n;
00023       
00024       ros::Subscriber joy_sub, keyup_sub, keydown_sub;
00025       ros::Publisher pub_vel, pub_event, pub_control;
00026       ros::Publisher pub_takeoff, pub_land, pub_emergency;
00027 
00028       sensor_msgs::Joy last_joy_msg;
00029       std::map<int, std::string> joy_button_map;
00030       std::map<int, std::string> joy_axis_map;
00031       std::map<uint16_t, std::string> key_map;
00032       
00033       std::map<std::string, float> axis_scales;
00034 
00035       std::map<std::string, int> joy_axes;
00036 
00037       bool override_enabled;
00038   };
00039 }
00040 
00041 #endif


universal_teleop
Author(s):
autogenerated on Thu Aug 27 2015 15:32:46