Main Page
Classes
Files
File List
File Members
include
uos_diffdrive_teleop_ps3joy.h
Go to the documentation of this file.
1
/*
2
*
3
* Copyright (C) 2015 University of Osnabrück, Germany
4
*
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
*
19
* uos_diffdrive_teleop_ps3joy.h
20
*
21
* Created on: 16.02.2015
22
* Author: Sebastian Pütz <spuetz@uos.de>
23
*/
24
25
#ifndef UOS_DIFFDRIVE_TELEOP_PS3JOY_H
26
#define UOS_DIFFDRIVE_TELEOP_PS3JOY_H
27
28
#include <
ros/ros.h
>
29
#include <
uos_diffdrive_teleop.h
>
30
#include <sensor_msgs/Joy.h>
31
32
#define PS3_BUTTON_SELECT 0
33
#define PS3_BUTTON_STICK_LEFT 1
34
#define PS3_BUTTON_STICK_RIGHT 2
35
#define PS3_BUTTON_START 3
36
#define PS3_BUTTON_CROSS_UP 4
37
#define PS3_BUTTON_CROSS_RIGHT 5
38
#define PS3_BUTTON_CROSS_DOWN 6
39
#define PS3_BUTTON_CROSS_LEFT 7
40
#define PS3_BUTTON_REAR_LEFT_2 8
41
#define PS3_BUTTON_REAR_RIGHT_2 9
42
#define PS3_BUTTON_REAR_LEFT_1 10
43
#define PS3_BUTTON_REAR_RIGHT_1 11
44
#define PS3_BUTTON_ACTION_TRIANGLE 12
45
#define PS3_BUTTON_ACTION_CIRCLE 13
46
#define PS3_BUTTON_ACTION_CROSS 14
47
#define PS3_BUTTON_ACTION_SQUARE 15
48
#define PS3_BUTTON_PAIRING 16
49
50
#define PS3_AXIS_STICK_LEFT_LEFTWARDS 0
51
#define PS3_AXIS_STICK_LEFT_UPWARDS 1
52
#define PS3_AXIS_STICK_RIGHT_LEFTWARDS 2
53
#define PS3_AXIS_STICK_RIGHT_UPWARDS 3
54
#define PS3_AXIS_BUTTON_CROSS_UP 4
55
#define PS3_AXIS_BUTTON_CROSS_RIGHT 5
56
#define PS3_AXIS_BUTTON_CROSS_DOWN 6
57
#define PS3_AXIS_BUTTON_CROSS_LEFT 7
58
#define PS3_AXIS_BUTTON_REAR_LEFT_2 8
59
#define PS3_AXIS_BUTTON_REAR_RIGHT_2 9
60
#define PS3_AXIS_BUTTON_REAR_LEFT_1 10
61
#define PS3_AXIS_BUTTON_REAR_RIGHT_1 11
62
#define PS3_AXIS_BUTTON_ACTION_TRIANGLE 12
63
#define PS3_AXIS_BUTTON_ACTION_CIRCLE 13
64
#define PS3_AXIS_BUTTON_ACTION_CROSS 14
65
#define PS3_AXIS_BUTTON_ACTION_SQUARE 15
66
#define PS3_AXIS_ACCELEROMETER_LEFT 16
67
#define PS3_AXIS_ACCELEROMETER_FORWARD 17
68
#define PS3_AXIS_ACCELEROMETER_UP 18
69
#define PS3_AXIS_GYRO_YAW 19
70
71
class
TeleopPS3
:
public
Teleop
72
{
73
public
:
74
TeleopPS3
();
75
76
private
:
77
ros::Subscriber
joy_sub
;
78
bool
use_button_pressure
;
79
void
PS3Callback
(
const
sensor_msgs::Joy::ConstPtr& joy);
80
};
81
82
#endif
/* uos_diffdrive_teleop_ps3joy.h */
83
uos_diffdrive_teleop.h
Teleop
Definition:
uos_diffdrive_teleop.h:33
TeleopPS3::use_button_pressure
bool use_button_pressure
Definition:
uos_diffdrive_teleop_ps3joy.h:78
TeleopPS3
Definition:
uos_diffdrive_teleop_ps3joy.h:71
ros::Subscriber
TeleopPS3::TeleopPS3
TeleopPS3()
Definition:
uos_diffdrive_teleop_ps3joy.cpp:27
TeleopPS3::joy_sub
ros::Subscriber joy_sub
Definition:
uos_diffdrive_teleop_ps3joy.h:77
ros.h
TeleopPS3::PS3Callback
void PS3Callback(const sensor_msgs::Joy::ConstPtr &joy)
Definition:
uos_diffdrive_teleop_ps3joy.cpp:34
uos_diffdrive_teleop
Author(s): Jochen Sprickerhof, Sebastian Pütz
autogenerated on Mon Jun 10 2019 15:49:27