uos_diffdrive_teleop_ps3joy.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Copyright (C) 2015 University of Osnabrück, Germany
00004  * 
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  *
00019  * uos_diffdrive_teleop_ps3joy.h
00020  *
00021  *  Created on: 16.02.2015
00022  *      Author: Sebastian Pütz <spuetz@uos.de>
00023  */
00024 
00025 #ifndef UOS_DIFFDRIVE_TELEOP_PS3JOY_H
00026 #define UOS_DIFFDRIVE_TELEOP_PS3JOY_H
00027 
00028 #include <ros/ros.h>
00029 #include <uos_diffdrive_teleop.h>
00030 #include <sensor_msgs/Joy.h>
00031 
00032 #define PS3_BUTTON_SELECT            0
00033 #define PS3_BUTTON_STICK_LEFT        1
00034 #define PS3_BUTTON_STICK_RIGHT       2
00035 #define PS3_BUTTON_START             3
00036 #define PS3_BUTTON_CROSS_UP          4
00037 #define PS3_BUTTON_CROSS_RIGHT       5
00038 #define PS3_BUTTON_CROSS_DOWN        6
00039 #define PS3_BUTTON_CROSS_LEFT        7
00040 #define PS3_BUTTON_REAR_LEFT_2       8
00041 #define PS3_BUTTON_REAR_RIGHT_2      9
00042 #define PS3_BUTTON_REAR_LEFT_1       10
00043 #define PS3_BUTTON_REAR_RIGHT_1      11
00044 #define PS3_BUTTON_ACTION_TRIANGLE   12
00045 #define PS3_BUTTON_ACTION_CIRCLE     13
00046 #define PS3_BUTTON_ACTION_CROSS      14
00047 #define PS3_BUTTON_ACTION_SQUARE     15
00048 #define PS3_BUTTON_PAIRING           16
00049 
00050 #define PS3_AXIS_STICK_LEFT_LEFTWARDS    0
00051 #define PS3_AXIS_STICK_LEFT_UPWARDS      1
00052 #define PS3_AXIS_STICK_RIGHT_LEFTWARDS   2
00053 #define PS3_AXIS_STICK_RIGHT_UPWARDS     3
00054 #define PS3_AXIS_BUTTON_CROSS_UP         4
00055 #define PS3_AXIS_BUTTON_CROSS_RIGHT      5
00056 #define PS3_AXIS_BUTTON_CROSS_DOWN       6
00057 #define PS3_AXIS_BUTTON_CROSS_LEFT       7
00058 #define PS3_AXIS_BUTTON_REAR_LEFT_2      8
00059 #define PS3_AXIS_BUTTON_REAR_RIGHT_2     9
00060 #define PS3_AXIS_BUTTON_REAR_LEFT_1      10
00061 #define PS3_AXIS_BUTTON_REAR_RIGHT_1     11
00062 #define PS3_AXIS_BUTTON_ACTION_TRIANGLE  12
00063 #define PS3_AXIS_BUTTON_ACTION_CIRCLE    13
00064 #define PS3_AXIS_BUTTON_ACTION_CROSS     14
00065 #define PS3_AXIS_BUTTON_ACTION_SQUARE    15
00066 #define PS3_AXIS_ACCELEROMETER_LEFT      16
00067 #define PS3_AXIS_ACCELEROMETER_FORWARD   17
00068 #define PS3_AXIS_ACCELEROMETER_UP        18
00069 #define PS3_AXIS_GYRO_YAW                19
00070 
00071 class TeleopPS3 : public Teleop
00072 {
00073   public:
00074     TeleopPS3();
00075 
00076   private:
00077     ros::Subscriber joy_sub;
00078     bool use_button_pressure;    
00079     void PS3Callback(const sensor_msgs::Joy::ConstPtr& joy);
00080 };
00081 
00082 #endif /* uos_diffdrive_teleop_ps3joy.h */
00083 


uos_diffdrive_teleop
Author(s): Jochen Sprickerhof, Sebastian Pütz
autogenerated on Wed May 24 2017 03:03:01