00001 /* 00002 * Joystick.hpp 00003 * 00004 * Created on: Oct 25, 2011 00005 * Author: mriedel 00006 */ 00007 00008 #ifndef JOYSTICK_HPP_ 00009 #define JOYSTICK_HPP_ 00010 00011 #include <telekyb_defines/telekyb_defines.hpp> 00012 00013 #include <telekyb_joystick/BaseJoystick.hpp> 00014 #include <telekyb_joystick/JoystickOptions.hpp> 00015 00016 00017 namespace TELEKYB_NAMESPACE 00018 { 00019 00020 class Joystick : public BaseJoystick { 00021 protected: 00022 // Options 00023 JoystickOptions* options; 00024 // ROS 00025 ros::NodeHandle nodeHandle; 00026 ros::Publisher pubJoy; 00027 00028 // Vector3Stamped 00029 ros::Publisher pubVector3; 00030 00031 00032 public: 00033 Joystick(); 00034 Joystick(const std::string& devPath_, bool autoOpen_ = true); 00035 virtual ~Joystick(); 00036 00037 // run loop; 00038 void run(); 00039 00040 // void startThread(); 00041 // void joinThread(); 00042 00043 // static std::vector<Joystick> getJoysticks(const std::string& paths); 00044 }; 00045 00046 } 00047 #endif /* JOYSTICK_HPP_ */