This class simplifies the implementation of a interface between xbox and PTU. More...
#include <class_xbox_ptu_teleop.h>
Classes | |
| struct | TYPE_analog |
| struct to define a analog button More... | |
Public Types | |
| enum | { MAN_AUTO_STEER = 0, MAN_AUTO_BRAKE = 1, MAN_AUTO_THROTTLE = 2, MAN_AUTO_CLUTCH = 3, _B4 = 4, MAN_AUTO_IGNITION = 5, START = 6, E_STOP = 7, _B8 = 8, _B9 = 9, HIGH_LIGHTS = 10, WARNING_LIGHTS = 11, MEDIUM_LIGHTS = 12, _B13 = 13, STOP = 14 } |
enumerator to describe all digital buttons More... | |
| enum | { STEERING = 0, _A1 = 1, BRAKE = 2, _A3 = 3, CLUTCH = 4, THROTTLE = 5 } |
enumerator to describe all analog buttons More... | |
| enum | { MAN_AUTO_STEER = 0, MAN_AUTO_BRAKE = 1, MAN_AUTO_THROTTLE = 2, MAN_AUTO_CLUTCH = 3, _B4 = 4, MAN_AUTO_IGNITION = 5, START = 6, E_STOP = 7, _B8 = 8, _B9 = 9, HIGH_LIGHTS = 10, WARNING_LIGHTS = 11, MEDIUM_LIGHTS = 12, _B13 = 13, STOP = 14 } |
digital buttons at xbox and their function More... | |
| enum | { STEERING = 0, _A1 = 1, BRAKE = 2, _A3 = 3, CLUTCH = 4, THROTTLE = 5 } |
analog buttons and their functionalities More... | |
Public Member Functions | |
| XboxTeleopAtlascar (int num_but, int num_axis) | |
| constructor | |
| XboxTeleopAtlascar (int num_but, int num_axis) | |
| constructor | |
| ~XboxTeleopAtlascar () | |
| destructor | |
| ~XboxTeleopAtlascar () | |
| destructor | |
Private Member Functions | |
| void | XboxCallback (const sensor_msgs::Joy::ConstPtr &joy) |
| constructor | |
| void | XboxCallback (const sensor_msgs::Joy::ConstPtr &joy) |
| callback that is called when a xbox msg is received | |
Private Attributes | |
| vector< TYPE_analog > | analog |
| vector with analog/axis values | |
| ros::Publisher | atlascar_cmd_ |
| method just to publish the base message | |
| double | b_brake |
| float | b_brake |
| double | b_left_ang |
| float | b_left_ang |
| double | b_right_ang |
| float | b_right_ang |
| double | b_speed |
| float | b_speed |
| double | brake_max |
| double | brake_min |
| minimum & maximum brake values | |
| vector< int > | button |
| vector with all digital buttons status | |
| double | clutch_max |
| double | clutch_min |
| minimum & maximum clutch values | |
| atlascar_base::AtlascarCommand | command |
| struct with the Atlascar Base Command message | |
| ros::Subscriber | joy_sub_ |
| method to subscribe the gamepad message | |
| double | m_brake |
| values to create the linear interpolation | |
| float | m_brake |
| line segment slope to calculate whished car speed value | |
| double | m_left_ang |
| values to create the linear interpolation | |
| float | m_left_ang |
| line segment slope, left side and right side | |
| double | m_right_ang |
| float | m_right_ang |
| double | m_speed |
| values to create the linear interpolation | |
| float | m_speed |
| line segment slope to calculate whished car speed value | |
| ros::NodeHandle | nh_teleop |
| int | num_axes |
| int | num_buttons |
| variable with number of digital buttons and analog axis | |
| ros::Publisher | ptu_pub |
| double | speed_max |
| float | speed_max |
| double | speed_min |
| values to create the linear interpolation | |
| float | speed_min |
| car speed limits | |
| double | steering_left_ang |
| values to create the linear interpolation | |
| float | steering_left_ang |
| limit values for the steering angles | |
| double | steering_max |
| minimum & maximum steering angle values | |
| double | steering_min |
| double | steering_right_ang |
| float | steering_right_ang |
| double | throttle_max |
| double | throttle_min |
| minimum & maximum throttle values | |
This class simplifies the implementation of a interface between xbox and PTU.
Definition at line 49 of file class_xbox_ptu_teleop.h.
| anonymous enum |
enumerator to describe all digital buttons
| MAN_AUTO_STEER | |
| MAN_AUTO_BRAKE | |
| MAN_AUTO_THROTTLE | |
| MAN_AUTO_CLUTCH | |
| _B4 | |
| MAN_AUTO_IGNITION | |
| START | |
| E_STOP | |
| _B8 | |
| _B9 | |
| HIGH_LIGHTS | |
| WARNING_LIGHTS | |
| MEDIUM_LIGHTS | |
| _B13 | |
| STOP |
Definition at line 77 of file class_xbox_ptu_teleop.h.
| anonymous enum |
enumerator to describe all analog buttons
Definition at line 81 of file class_xbox_ptu_teleop.h.
| anonymous enum |
digital buttons at xbox and their function
| MAN_AUTO_STEER | |
| MAN_AUTO_BRAKE | |
| MAN_AUTO_THROTTLE | |
| MAN_AUTO_CLUTCH | |
| _B4 | |
| MAN_AUTO_IGNITION | |
| START | |
| E_STOP | |
| _B8 | |
| _B9 | |
| HIGH_LIGHTS | |
| WARNING_LIGHTS | |
| MEDIUM_LIGHTS | |
| _B13 | |
| STOP |
Definition at line 83 of file class_xbox_teleop.h.
| anonymous enum |
analog buttons and their functionalities
Definition at line 87 of file class_xbox_teleop.h.
| XboxTeleopAtlascar::XboxTeleopAtlascar | ( | int | num_but, | |
| int | num_axis | |||
| ) |
constructor
function to initialize the XboxTeleop for the AtlasCAR robot
| num_but | - number of digital buttons in the gamepad | |
| num_axis | - number of analog buttons or axis | |
| num_but | - specifies the number of digital buttons that the xbox gamepad have | |
| num_axis | - specifies the number of analog buttons that the xbox gamepad have |
Definition at line 42 of file class_xbox_ptu_teleop.cpp.
| XboxTeleopAtlascar::~XboxTeleopAtlascar | ( | ) |
destructor
| XboxTeleopAtlascar::XboxTeleopAtlascar | ( | int | num_but, | |
| int | num_axis | |||
| ) |
constructor
| num_but | - number of digital buttons in the gamepad | |
| num_axis | - number of analog buttons or axis |
| XboxTeleopAtlascar::~XboxTeleopAtlascar | ( | ) |
destructor
| void XboxTeleopAtlascar::XboxCallback | ( | const sensor_msgs::Joy::ConstPtr & | joy | ) | [private] |
constructor
| void XboxTeleopAtlascar::XboxCallback | ( | const sensor_msgs::Joy::ConstPtr & | joy | ) | [private] |
callback that is called when a xbox msg is received
private method associated to the callback when a new message from the gamepad is received, and construct the message that will be sent to atlascar_base
| joy | - struct with gamepad message | |
| joy | - is the message received from the gamepad |
Definition at line 94 of file class_xbox_ptu_teleop.cpp.
vector< TYPE_analog > XboxTeleopAtlascar::analog [private] |
vector with analog/axis values
vector of analog buttons values
Definition at line 106 of file class_xbox_ptu_teleop.h.
ros::Publisher XboxTeleopAtlascar::atlascar_cmd_ [private] |
method just to publish the base message
Definition at line 141 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::b_brake [private] |
Definition at line 120 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::b_brake [private] |
Definition at line 128 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::b_left_ang [private] |
Definition at line 113 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::b_left_ang [private] |
Definition at line 115 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::b_right_ang [private] |
Definition at line 113 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::b_right_ang [private] |
Definition at line 115 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::b_speed [private] |
Definition at line 118 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::b_speed [private] |
Definition at line 124 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::brake_max [private] |
Definition at line 103 of file class_xbox_teleop.h.
double XboxTeleopAtlascar::brake_min [private] |
minimum & maximum brake values
Definition at line 103 of file class_xbox_teleop.h.
vector< int > XboxTeleopAtlascar::button [private] |
vector with all digital buttons status
vector of digital buttons values
Definition at line 101 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::clutch_max [private] |
Definition at line 105 of file class_xbox_teleop.h.
double XboxTeleopAtlascar::clutch_min [private] |
minimum & maximum clutch values
Definition at line 105 of file class_xbox_teleop.h.
atlascar_base::AtlascarCommand XboxTeleopAtlascar::command [private] |
struct with the Atlascar Base Command message
atlascar command message
Definition at line 137 of file class_xbox_ptu_teleop.h.
ros::Subscriber XboxTeleopAtlascar::joy_sub_ [private] |
method to subscribe the gamepad message
Definition at line 145 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::m_brake [private] |
values to create the linear interpolation
Definition at line 120 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::m_brake [private] |
line segment slope to calculate whished car speed value
Definition at line 128 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::m_left_ang [private] |
values to create the linear interpolation
Definition at line 113 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::m_left_ang [private] |
line segment slope, left side and right side
Definition at line 115 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::m_right_ang [private] |
Definition at line 113 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::m_right_ang [private] |
Definition at line 115 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::m_speed [private] |
values to create the linear interpolation
Definition at line 118 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::m_speed [private] |
line segment slope to calculate whished car speed value
Definition at line 124 of file class_xbox_ptu_teleop.h.
ros::NodeHandle XboxTeleopAtlascar::nh_teleop [private] |
Definition at line 96 of file class_xbox_ptu_teleop.h.
int XboxTeleopAtlascar::num_axes [private] |
Definition at line 132 of file class_xbox_ptu_teleop.h.
int XboxTeleopAtlascar::num_buttons [private] |
variable with number of digital buttons and analog axis
specifies the number of digital buttons and analog buttons in the gamepad
Definition at line 132 of file class_xbox_ptu_teleop.h.
ros::Publisher XboxTeleopAtlascar::ptu_pub [private] |
Definition at line 128 of file class_xbox_teleop.h.
double XboxTeleopAtlascar::speed_max [private] |
Definition at line 116 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::speed_max [private] |
Definition at line 120 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::speed_min [private] |
values to create the linear interpolation
Definition at line 116 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::speed_min [private] |
car speed limits
Definition at line 120 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::steering_left_ang [private] |
values to create the linear interpolation
Definition at line 111 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::steering_left_ang [private] |
limit values for the steering angles
Definition at line 111 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::steering_max [private] |
minimum & maximum steering angle values
Definition at line 101 of file class_xbox_teleop.h.
double XboxTeleopAtlascar::steering_min [private] |
Definition at line 101 of file class_xbox_teleop.h.
double XboxTeleopAtlascar::steering_right_ang [private] |
Definition at line 111 of file class_xbox_teleop.h.
float XboxTeleopAtlascar::steering_right_ang [private] |
Definition at line 111 of file class_xbox_ptu_teleop.h.
double XboxTeleopAtlascar::throttle_max [private] |
Definition at line 107 of file class_xbox_teleop.h.
double XboxTeleopAtlascar::throttle_min [private] |
minimum & maximum throttle values
Definition at line 107 of file class_xbox_teleop.h.