00001 /* 00002 * HandJoystick.hpp 00003 * 00004 * Created on: Jan 5, 2012 00005 * Author: mriedel 00006 */ 00007 00008 #ifndef HANDJOYSTICK_HPP_ 00009 #define HANDJOYSTICK_HPP_ 00010 00011 #include <telekyb_defines/telekyb_defines.hpp> 00012 00013 #include "HandJoystickOptions.hpp" 00014 00015 #include <ros/ros.h> 00016 00017 #include <sensor_msgs/Joy.h> 00018 #include <geometry_msgs/TransformStamped.h> 00019 00020 #include <telekyb_base/Spaces.hpp> 00021 00022 namespace TELEKYB_NAMESPACE { 00023 00024 class HandJoystick { 00025 protected: 00026 HandJoystickOptions options; 00027 00028 ros::Subscriber joySub; 00029 ros::Subscriber transformSub; 00030 00031 // Publish Joy 00032 ros::Publisher pubJoy; 00033 // Publish StampedTransform 00034 ros::Publisher pubTransform; 00035 00036 bool neutralPosSet; 00037 bool neutralPosSetRequest; 00038 Position3D neutralPosition; 00039 00040 public: 00041 HandJoystick(); 00042 virtual ~HandJoystick(); 00043 00044 void joystickCB(const sensor_msgs::Joy::ConstPtr& msg); 00045 void transformCB(const geometry_msgs::TransformStamped::ConstPtr& msg); 00046 }; 00047 00048 } /* namespace telekyb */ 00049 #endif /* HANDJOYSTICK_HPP_ */