ASCO Aerial Autonomy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
BaseRobotSystem Class Referenceabstract

Provides functions to switch between active controllers and get goals. More...

#include <base_robot_system.h>

Inheritance diagram for BaseRobotSystem:
Inheritance graph
[legend]
Collaboration diagram for BaseRobotSystem:
Collaboration graph
[legend]

Public Member Functions

 BaseRobotSystem ()
 Constructor to initialize active controllers and mutexes to NULL. More...
 
template<class ControllerHardwareConnectorT , class GoalT >
void setGoal (GoalT goal)
 sets goal to the connector and swaps the active connector with the specified connector type. More...
 
template<class ControllerHardwareConnectorT , class GoalT >
GoalT getGoal () const
 Get the goal from connector. More...
 
template<class ControllerHardwareConnectorT >
ControllerStatus getStatus () const
 Get the status of a controller. More...
 
ControllerStatus getActiveControllerStatus (HardwareType hardware_type) const
 Get the status of the active controller. More...
 
void abortController (HardwareType hardware_type)
 Remove active controller for given hardware type. More...
 
void runActiveController (HardwareType hardware_type)
 Run active controller stored for a given hardware type. More...
 
virtual std::string getSystemStatus () const =0
 Provide the current state of robot system. More...
 

Protected Attributes

TypeMap
< AbstractControllerHardwareConnector
controller_hardware_connector_container_
 Container to store and retrieve controller-hardware-connectors. More...
 

Detailed Description

Provides functions to switch between active controllers and get goals.

Constructor & Destructor Documentation

BaseRobotSystem::BaseRobotSystem ( )
inline

Constructor to initialize active controllers and mutexes to NULL.

Member Function Documentation

void BaseRobotSystem::abortController ( HardwareType  hardware_type)
inline

Remove active controller for given hardware type.

Parameters
hardware_typeType of hardware for which active controller is switched off
ControllerStatus BaseRobotSystem::getActiveControllerStatus ( HardwareType  hardware_type) const
inline

Get the status of the active controller.

Parameters
hardware_typeHardware to get controller for
Returns
status of the active controller. If no active controller returns status as not engaged
template<class ControllerHardwareConnectorT , class GoalT >
GoalT BaseRobotSystem::getGoal ( ) const
inline

Get the goal from connector.

Template Parameters
ControllerHardwareConnectorTType of connector to use
GoalTType of Goal to get
Returns
goal of GoalT type
template<class ControllerHardwareConnectorT >
ControllerStatus BaseRobotSystem::getStatus ( ) const
inline

Get the status of a controller.

Template Parameters
ControllerHardwareConnectorTType of connector
Returns
Status is active/completed/critical
virtual std::string BaseRobotSystem::getSystemStatus ( ) const
pure virtual

Provide the current state of robot system.

Returns
string representation of the robot system state

Implemented in UAVSystem, ArmSystem, UAVArmSystem, and UAVVisionSystem.

void BaseRobotSystem::runActiveController ( HardwareType  hardware_type)
inline

Run active controller stored for a given hardware type.

Parameters
hardware_typeType of hardware for which active controller is run
template<class ControllerHardwareConnectorT , class GoalT >
void BaseRobotSystem::setGoal ( GoalT  goal)
inline

sets goal to the connector and swaps the active connector with the specified connector type.

Template Parameters
ControllerHardwareConnectorTtype of connector to use
GoalTType of Goal to set to connector
Parameters
goalGoal to set to connector

Member Data Documentation

TypeMap<AbstractControllerHardwareConnector> BaseRobotSystem::controller_hardware_connector_container_
protected

Container to store and retrieve controller-hardware-connectors.


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