atlascar_base::Manager Class Reference

Global management and control class. More...

#include <manager.h>

List of all members.

Public Member Functions

Mandatory common functions

These functions are mandatory to all low level classes in the atlacar_base namespace. All these must operate in a similar fashion across class. The constructor must only initialize variable values, all major initializations must be done in the init() function, setupMessaging() subscribes and advertises command messages and status (in that order). The loop() function will block the program in a constant loop relaying information to the hardware.

The loop() function can operate in two fashions: setting a spin rate and calling ros::spinOnce() or calling directly ros::spin() if the command callback has been setup properly. In this class (Manager) it works by calling the ros::spinOnce() at a predefined rate.

Warning:
These functions are MANDATORY
void init ()
 Initialize the class.
void loop ()
 Start main control loop.
 Manager (const ros::NodeHandle &nh)
 Class constructor.
void setupMessaging ()
 Start ros message subscribing and advertising.
 ~Manager ()
 Class destructor.

Private Member Functions

void commandCallback (const atlascar_base::ManagerCommandPtr &command)
 Main command callback.
void driverStatusCallback (const human_driver_monitor::HumanDriverMonitorStatusPtr &status)
 Driver status callback.
void gearboxStatusCallback (const atlascar_base::GearboxStatusPtr &status)
 Gearbox status callback.
void odometerStatusCallback (const odometer::OdometerStatusPtr &status)
 Velocity status callback.
void plcStatusCallback (const atlascar_base::PlcStatusPtr &status)
 Plc status callback.
void stateManager (const atlascar_base::ManagerCommandPtr &command)
void throttleStatusCallback (const atlascar_base::ThrottleStatusPtr &status)
 Throttle status callback.
void toOutgoingMessages (const atlascar_base::ManagerCommandPtr &command)

Private Attributes

atlascar_base::ManagerCommandPtr command_
 Command message pointer.
ros::Publisher command_gearbox_pub_
 Gearbox command publisher.
ros::Publisher command_plc_pub_
 Plc command publisher.
TopicQueuePriority
< atlascar_base::ManagerCommandPtr > 
command_queue_
 Command queue holding class.
ros::Subscriber command_sub_
 Ros command subscriber.
ros::Publisher command_throttle_pub_
 Throttle command publisher.
human_driver_monitor::HumanDriverMonitorStatus driver_status_
 Driver status message.
atlascar_base::GearboxCommand gearbox_command_
 Gearbox command message.
atlascar_base::GearboxStatus gearbox_status_
 Gearbox status message.
ros::NodeHandle nh_
 Ros node handler.
odometer::OdometerStatus odometer_status_
 Velocity status message.
atlascar_base::PlcCommand plc_command_
 Plc command message.
atlascar_base::PlcStatus plc_status_
 Plc status message.
atlascar_base::ManagerCommandPtr safety_command_
 Safety command message pointer.
atlascar_base::ManagerStatus status_
 Status message.
ros::Subscriber status_driver_sub_
 Driver status subscriber.
ros::Subscriber status_gearbox_sub_
 Gearbox status subscriber.
ros::Subscriber status_odometer_sub_
 Velocity status subscriber.
ros::Subscriber status_plc_sub_
 Plc status subscriber.
ros::Publisher status_pub_
 Ros status publisher.
ros::Subscriber status_throttle_sub_
 Throttle status subscriber.
atlascar_base::ThrottleCommand throttle_command_
 Throttle command message.
atlascar_base::ThrottleStatus throttle_status_
 Throttle status message.
bool verbose_
 Verbose mode.

Detailed Description

Global management and control class.

This class is responsible for the synchronization, calibration and contextual control for the atlascar vehicle. The class communicates locally with the low level modules via command and status messages. The received status messages must be interpreted and calibrated while being integrated into global asynchronous status publisher. The global atlascar_base::ManagerStatus in periodically published independently of the frequency of incoming partial status messages. The manager receives global control messages atlascar_base::ManagerCommand.

Definition at line 70 of file manager.h.


Constructor & Destructor Documentation

atlascar_base::Manager::Manager ( const ros::NodeHandle &  nh  ) 

Class constructor.

Initialize variables, do not call any function

Definition at line 35 of file manager.cpp.

atlascar_base::Manager::~Manager (  ) 

Class destructor.

Do nothing.

Definition at line 39 of file manager.cpp.


Member Function Documentation

void atlascar_base::Manager::commandCallback ( const atlascar_base::ManagerCommandPtr &  command  )  [private]

Main command callback.

Receive command messages from outside the atlascar_base.

Definition at line 111 of file manager.cpp.

void atlascar_base::Manager::driverStatusCallback ( const human_driver_monitor::HumanDriverMonitorStatusPtr &  status  )  [private]

Driver status callback.

Receive status messages from the Driver low level module

Definition at line 144 of file manager.cpp.

void atlascar_base::Manager::gearboxStatusCallback ( const atlascar_base::GearboxStatusPtr &  status  )  [private]

Gearbox status callback.

Receive status messages from the Gearbox low level module

Definition at line 166 of file manager.cpp.

void atlascar_base::Manager::init (  ) 

Initialize the class.

Add the safety message to the command queue.

Definition at line 42 of file manager.cpp.

void atlascar_base::Manager::loop (  ) 

Start main control loop.

Start ros spin and main state machine.

Definition at line 184 of file manager.cpp.

void atlascar_base::Manager::odometerStatusCallback ( const odometer::OdometerStatusPtr &  status  )  [private]

Velocity status callback.

Receive status messages from the Velocity low level module

Definition at line 161 of file manager.cpp.

void atlascar_base::Manager::plcStatusCallback ( const atlascar_base::PlcStatusPtr &  status  )  [private]

Plc status callback.

Receive status messages from the Plc low level module

Definition at line 126 of file manager.cpp.

void atlascar_base::Manager::setupMessaging (  ) 

Start ros message subscribing and advertising.

Subscribe local command messages and advertise local status messages. Subscribe to all low level status messages, and advertise all low level command messages.

Definition at line 54 of file manager.cpp.

void atlascar_base::Manager::stateManager ( const atlascar_base::ManagerCommandPtr &  command  )  [private]

Definition at line 179 of file manager.cpp.

void atlascar_base::Manager::throttleStatusCallback ( const atlascar_base::ThrottleStatusPtr &  status  )  [private]

Throttle status callback.

Receive status messages from the Throttle low level module

Definition at line 172 of file manager.cpp.

void atlascar_base::Manager::toOutgoingMessages ( const atlascar_base::ManagerCommandPtr &  command  )  [private]

Definition at line 72 of file manager.cpp.


Member Data Documentation

atlascar_base::ManagerCommandPtr atlascar_base::Manager::command_ [private]

Command message pointer.

Definition at line 202 of file manager.h.

Gearbox command publisher.

Definition at line 194 of file manager.h.

ros::Publisher atlascar_base::Manager::command_plc_pub_ [private]

Plc command publisher.

Definition at line 192 of file manager.h.

TopicQueuePriority<atlascar_base::ManagerCommandPtr> atlascar_base::Manager::command_queue_ [private]

Command queue holding class.

Definition at line 198 of file manager.h.

ros::Subscriber atlascar_base::Manager::command_sub_ [private]

Ros command subscriber.

Definition at line 178 of file manager.h.

Throttle command publisher.

Definition at line 196 of file manager.h.

human_driver_monitor::HumanDriverMonitorStatus atlascar_base::Manager::driver_status_ [private]

Driver status message.

Definition at line 216 of file manager.h.

atlascar_base::GearboxCommand atlascar_base::Manager::gearbox_command_ [private]

Gearbox command message.

Definition at line 208 of file manager.h.

atlascar_base::GearboxStatus atlascar_base::Manager::gearbox_status_ [private]

Gearbox status message.

Definition at line 210 of file manager.h.

ros::NodeHandle atlascar_base::Manager::nh_ [private]

Ros node handler.

Definition at line 176 of file manager.h.

odometer::OdometerStatus atlascar_base::Manager::odometer_status_ [private]

Velocity status message.

Definition at line 222 of file manager.h.

atlascar_base::PlcCommand atlascar_base::Manager::plc_command_ [private]

Plc command message.

Definition at line 212 of file manager.h.

atlascar_base::PlcStatus atlascar_base::Manager::plc_status_ [private]

Plc status message.

Definition at line 214 of file manager.h.

atlascar_base::ManagerCommandPtr atlascar_base::Manager::safety_command_ [private]

Safety command message pointer.

Definition at line 204 of file manager.h.

atlascar_base::ManagerStatus atlascar_base::Manager::status_ [private]

Status message.

Definition at line 206 of file manager.h.

ros::Subscriber atlascar_base::Manager::status_driver_sub_ [private]

Driver status subscriber.

Definition at line 182 of file manager.h.

Gearbox status subscriber.

Definition at line 186 of file manager.h.

Velocity status subscriber.

Definition at line 184 of file manager.h.

ros::Subscriber atlascar_base::Manager::status_plc_sub_ [private]

Plc status subscriber.

Definition at line 180 of file manager.h.

ros::Publisher atlascar_base::Manager::status_pub_ [private]

Ros status publisher.

Definition at line 190 of file manager.h.

Throttle status subscriber.

Definition at line 188 of file manager.h.

atlascar_base::ThrottleCommand atlascar_base::Manager::throttle_command_ [private]

Throttle command message.

Definition at line 218 of file manager.h.

atlascar_base::ThrottleStatus atlascar_base::Manager::throttle_status_ [private]

Throttle status message.

Definition at line 220 of file manager.h.

Verbose mode.

Definition at line 200 of file manager.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


atlascar_base
Author(s): Jorge Almeida, Miguel Oliveira, Pedro Salvado, Andre Oliveira and Pedro Pinheiro
autogenerated on Wed Jul 23 04:34:35 2014