Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
atlascar_base::Maneuvers Class Reference

#include <maneuvers.h>

Public Types

enum  CarState {
  UNKNOWN, INIT, POSITIVE_VELOCITY, NEUTRAL_VELOCITY,
  NEGATIVE_VELOCITY, PARALLEL_PARKING, REVERSING, NEUTRAL_VELOCITY_PARKING
}
 Car state machine status. More...
 
enum  sequentialState {
  FIRST, SECOND, THIRD, FOURTH,
  FIFTH, SIXTH, SEVENTH, EIGHTH,
  NINETH, TENTH
}
 

Public Member Functions

void init ()
 Initialize the class. More...
 
void loop ()
 Start main control loop. More...
 
 Maneuvers (const ros::NodeHandle &nh_)
 
void setupMessaging ()
 Start ros message subscribing and advertising. More...
 
void stateManager ()
 State Manager. More...
 

Public Attributes

int maneuver
 Parking status. More...
 

Protected Member Functions

double map (double value, double min_value, double max_value, double min_required, double max_required)
 
void negative_velocity (int value)
 Callback - Change and send message to manager. More...
 
void neutral_velocity (int value)
 Callback - Change and send message to manager. More...
 
void neutral_velocity_parking (int value)
 Callback - Change and send message to manager. More...
 
void parallel ()
 Parallel. More...
 
void parallel_parking (int value)
 Callback - Change and send message to manager. More...
 
void positive_velocity (int value)
 Callback - Change and send message to manager. More...
 
void reverse ()
 Reverse. More...
 
void reversing (int value)
 Callback - Change and send message to manager. More...
 
void saveData (string report_name)
 
void statusCallback (const atlascar_base::ManagerStatusPtr &status)
 Callback - Status of all paramters. More...
 

Protected Attributes

Class variables

The class variables can be both public or private. They should preferably be private whenever possible.

CarState current_state
 Current state of state machine. More...
 
sequentialState pparking
 Moving to stopped state. More...
 
sequentialState rreverse
 Moving to stopped state. More...
 
ros::NodeHandle nh
 Ros node handler. More...
 
ros::Publisher command_pub
 Ros command publisher. More...
 
ros::Subscriber command_sub_
 Ros command subscriber. More...
 
ros::Subscriber status_sub
 Ros status subscriber. More...
 
atlascar_base::ManagerCommand command_msg
 Command message. More...
 
atlascar_base::ManagerStatus status_msg
 Status message. More...
 
atlascar_base::ManagerStatus status_memory
 Status message memory. More...
 
Gamepad gamepad
 Gamepad communication class. More...
 

Detailed Description

Definition at line 45 of file maneuvers.h.

Member Enumeration Documentation

Car state machine status.

Define all states of macine

Enumerator
UNKNOWN 
INIT 
POSITIVE_VELOCITY 
NEUTRAL_VELOCITY 
NEGATIVE_VELOCITY 
PARALLEL_PARKING 
REVERSING 
NEUTRAL_VELOCITY_PARKING 

Definition at line 100 of file maneuvers.h.

Enumerator
FIRST 
SECOND 
THIRD 
FOURTH 
FIFTH 
SIXTH 
SEVENTH 
EIGHTH 
NINETH 
TENTH 

Definition at line 113 of file maneuvers.h.

Constructor & Destructor Documentation

atlascar_base::Maneuvers::Maneuvers ( const ros::NodeHandle &  nh_)
inline

Definition at line 48 of file maneuvers.h.

Member Function Documentation

void atlascar_base::Maneuvers::init ( )

Initialize the class.

Add the safety message to the command queue.

Definition at line 36 of file maneuvers.cpp.

void atlascar_base::Maneuvers::loop ( )

Start main control loop.

Loop the module sending command messages (velocity) to the manager. It currently loops at about 100Hz.

Definition at line 474 of file maneuvers.cpp.

double atlascar_base::Maneuvers::map ( double  value,
double  min_value,
double  max_value,
double  min_required,
double  max_required 
)
protected
void atlascar_base::Maneuvers::negative_velocity ( int  value)
protected

Callback - Change and send message to manager.

Impose a negative velocity

Definition at line 121 of file maneuvers.cpp.

void atlascar_base::Maneuvers::neutral_velocity ( int  value)
protected

Callback - Change and send message to manager.

Impose a neutral velocity 0 km/h

Definition at line 168 of file maneuvers.cpp.

void atlascar_base::Maneuvers::neutral_velocity_parking ( int  value)
protected

Callback - Change and send message to manager.

Impose a neutral gear

Definition at line 180 of file maneuvers.cpp.

void atlascar_base::Maneuvers::parallel ( )
protected

Parallel.

Redefine values of variables to be send

Definition at line 326 of file maneuvers.cpp.

void atlascar_base::Maneuvers::parallel_parking ( int  value)
protected

Callback - Change and send message to manager.

Impose a sequence of velocity and direction

Definition at line 134 of file maneuvers.cpp.

void atlascar_base::Maneuvers::positive_velocity ( int  value)
protected

Callback - Change and send message to manager.

Impose a positive velocity

Definition at line 107 of file maneuvers.cpp.

void atlascar_base::Maneuvers::reverse ( )
protected

Reverse.

Redefine values of variables to be send

Definition at line 193 of file maneuvers.cpp.

void atlascar_base::Maneuvers::reversing ( int  value)
protected

Callback - Change and send message to manager.

Impose a sequence of velocity and direction

Definition at line 151 of file maneuvers.cpp.

void atlascar_base::Maneuvers::saveData ( string  report_name)
protected
void atlascar_base::Maneuvers::setupMessaging ( )

Start ros message subscribing and advertising.

Subscribe command messages and advertise status messages.

Definition at line 72 of file maneuvers.cpp.

void atlascar_base::Maneuvers::stateManager ( )

State Manager.

Analyzes the state of state machine

Definition at line 410 of file maneuvers.cpp.

void atlascar_base::Maneuvers::statusCallback ( const atlascar_base::ManagerStatusPtr &  status)
protected

Callback - Status of all paramters.

Allow check all parameters from manager

Definition at line 80 of file maneuvers.cpp.

Member Data Documentation

atlascar_base::ManagerCommand atlascar_base::Maneuvers::command_msg
protected

Command message.

Definition at line 229 of file maneuvers.h.

ros::Publisher atlascar_base::Maneuvers::command_pub
protected

Ros command publisher.

Definition at line 220 of file maneuvers.h.

ros::Subscriber atlascar_base::Maneuvers::command_sub_
protected

Ros command subscriber.

Definition at line 223 of file maneuvers.h.

CarState atlascar_base::Maneuvers::current_state
protected

Current state of state machine.

Definition at line 208 of file maneuvers.h.

Gamepad atlascar_base::Maneuvers::gamepad
protected

Gamepad communication class.

Definition at line 238 of file maneuvers.h.

int atlascar_base::Maneuvers::maneuver

Parking status.

Variable to define parking satus

Definition at line 132 of file maneuvers.h.

ros::NodeHandle atlascar_base::Maneuvers::nh
protected

Ros node handler.

Definition at line 217 of file maneuvers.h.

sequentialState atlascar_base::Maneuvers::pparking
protected

Moving to stopped state.

Definition at line 211 of file maneuvers.h.

sequentialState atlascar_base::Maneuvers::rreverse
protected

Moving to stopped state.

Definition at line 214 of file maneuvers.h.

atlascar_base::ManagerStatus atlascar_base::Maneuvers::status_memory
protected

Status message memory.

Definition at line 235 of file maneuvers.h.

atlascar_base::ManagerStatus atlascar_base::Maneuvers::status_msg
protected

Status message.

Definition at line 232 of file maneuvers.h.

ros::Subscriber atlascar_base::Maneuvers::status_sub
protected

Ros status subscriber.

Definition at line 226 of file maneuvers.h.


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


atlascar_base
Author(s): Jorge Almeida, Sérgio Pinho, Miguel Oliveira, Pedro Salvado, Andre Oliveira and Pedro Pinheiro
autogenerated on Mon Mar 2 2015 01:31:23