Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
XboxTeleopAtlascar Class Reference

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 More...
 
 XboxTeleopAtlascar (int num_but, int num_axis)
 constructor More...
 
 ~XboxTeleopAtlascar ()
 destructor More...
 
 ~XboxTeleopAtlascar ()
 destructor More...
 

Private Member Functions

void XboxCallback (const sensor_msgs::Joy::ConstPtr &joy)
 callback that is called when a xbox msg is received More...
 
void XboxCallback (const sensor_msgs::Joy::ConstPtr &joy)
 constructor More...
 

Private Attributes

vector< TYPE_analoganalog
 vector with analog/axis values More...
 
ros::Publisher atlascar_cmd_
 method just to publish the base message More...
 
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 More...
 
vector< int > button
 vector with all digital buttons status More...
 
double clutch_max
 
double clutch_min
 minimum & maximum clutch values More...
 
atlascar_base::AtlascarCommand command
 struct with the Atlascar Base Command message More...
 
ros::Subscriber joy_sub_
 method to subscribe the gamepad message More...
 
double m_brake
 values to create the linear interpolation More...
 
float m_brake
 line segment slope to calculate whished car speed value More...
 
double m_left_ang
 values to create the linear interpolation More...
 
float m_left_ang
 line segment slope, left side and right side More...
 
double m_right_ang
 
float m_right_ang
 
double m_speed
 values to create the linear interpolation More...
 
float m_speed
 line segment slope to calculate whished car speed value More...
 
ros::NodeHandle nh_teleop
 
int num_axes
 
int num_buttons
 variable with number of digital buttons and analog axis More...
 
ros::Publisher ptu_pub
 
double speed_max
 
float speed_max
 
double speed_min
 values to create the linear interpolation More...
 
float speed_min
 car speed limits More...
 
float steering_left_ang
 limit values for the steering angles More...
 
double steering_left_ang
 values to create the linear interpolation More...
 
double steering_max
 minimum & maximum steering angle values More...
 
double steering_min
 
double steering_right_ang
 
float steering_right_ang
 
double throttle_max
 
double throttle_min
 minimum & maximum throttle values More...
 

Detailed Description

This class simplifies the implementation of a interface between xbox and PTU.

Definition at line 49 of file class_xbox_ptu_teleop.h.

Member Enumeration Documentation

anonymous enum

enumerator to describe all digital buttons

Enumerator
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

Enumerator
STEERING 
_A1 
BRAKE 
_A3 
CLUTCH 
THROTTLE 

Definition at line 81 of file class_xbox_ptu_teleop.h.

anonymous enum

digital buttons at xbox and their function

Enumerator
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

Enumerator
STEERING 
_A1 
BRAKE 
_A3 
CLUTCH 
THROTTLE 

Definition at line 87 of file class_xbox_teleop.h.

Constructor & Destructor Documentation

XboxTeleopAtlascar::XboxTeleopAtlascar ( int  num_but,
int  num_axis 
)

constructor

function to initialize the XboxTeleop for the AtlasCAR robot

Parameters
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

Parameters
num_but- number of digital buttons in the gamepad
num_axis- number of analog buttons or axis
XboxTeleopAtlascar::~XboxTeleopAtlascar ( )

destructor

Member Function Documentation

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

Parameters
joy- struct with gamepad message
joy- is the message received from the gamepad

Definition at line 94 of file class_xbox_ptu_teleop.cpp.

void XboxTeleopAtlascar::XboxCallback ( const sensor_msgs::Joy::ConstPtr &  joy)
private

constructor

Member Data Documentation

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

atlascar command 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

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.

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_left_ang
private

values to create the linear interpolation

Definition at line 111 of file class_xbox_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.


The documentation for this class was generated from the following files:


atlascar_teleop
Author(s): David Gameiro
autogenerated on Mon Mar 2 2015 01:31:27