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

Owns, initializes, and facilitates communication between different hardware/software components. Provides builtin position, velocity, and rpy controllers for controlling UAV. More...

#include <uav_system.h>

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

Public Member Functions

 UAVSystem (parsernode::Parser &drone_hardware)
 Constructor with default configuration. More...
 
 UAVSystem (parsernode::Parser &drone_hardware, UAVSystemConfig config)
 Constructor. More...
 
parsernode::common::quaddata getUAVData () const
 Get sensor data from UAV. More...
 
void takeOff ()
 Public API call to takeoff. More...
 
void enableAutonomousMode ()
 Public API call to enable Quadcopter SDK. This call is only necessary if Quad goes into manual mode due to rc switching while state machine is running. More...
 
void land ()
 Public API call to land. More...
 
std::string getSystemStatus () const
 Provide the current state of UAV system. More...
 
UAVSystemConfig getConfiguration ()
 Get system configuration. More...
 
void setHomeLocation ()
 save current location as home location More...
 
bool isHomeLocationSpecified ()
 Check if home location is specified. More...
 
PositionYaw getHomeLocation ()
 Stored home location. More...
 
- Public Member Functions inherited from BaseRobotSystem
 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...
 

Protected Attributes

parsernode::Parser & drone_hardware_
 Hardware. More...
 
UAVSystemConfig config_
 UAV configuration parameters. More...
 
- Protected Attributes inherited from BaseRobotSystem
TypeMap
< AbstractControllerHardwareConnector
controller_hardware_connector_container_
 Container to store and retrieve controller-hardware-connectors. More...
 

Detailed Description

Owns, initializes, and facilitates communication between different hardware/software components. Provides builtin position, velocity, and rpy controllers for controlling UAV.

Constructor & Destructor Documentation

UAVSystem::UAVSystem ( parsernode::Parser &  drone_hardware)
inline

Constructor with default configuration.

UAVSystem::UAVSystem ( parsernode::Parser &  drone_hardware,
UAVSystemConfig  config 
)
inline

Constructor.

UAVSystem requires a drone hardware. It instantiates the connectors, controllers

Parameters
drone_hardwareinput hardware to send commands back
configThe system configuration specifying the parameters such as takeoff height, etc.

Member Function Documentation

void UAVSystem::enableAutonomousMode ( )
inline

Public API call to enable Quadcopter SDK. This call is only necessary if Quad goes into manual mode due to rc switching while state machine is running.

UAVSystemConfig UAVSystem::getConfiguration ( )
inline

Get system configuration.

Returns
Configuration
PositionYaw UAVSystem::getHomeLocation ( )
inline

Stored home location.

Returns
Home location (PositionYaw)
std::string UAVSystem::getSystemStatus ( ) const
inlinevirtual

Provide the current state of UAV system.

Returns
string representation of the UAV system state

Implements BaseRobotSystem.

Reimplemented in UAVVisionSystem.

parsernode::common::quaddata UAVSystem::getUAVData ( ) const
inline

Get sensor data from UAV.

Returns
Accumulated sensor data from UAV
bool UAVSystem::isHomeLocationSpecified ( )
inline

Check if home location is specified.

Returns
True if home location is specified
void UAVSystem::land ( )
inline

Public API call to land.

void UAVSystem::setHomeLocation ( )
inline

save current location as home location

void UAVSystem::takeOff ( )
inline

Public API call to takeoff.

Member Data Documentation

UAVSystemConfig UAVSystem::config_
protected

UAV configuration parameters.

parsernode::Parser& UAVSystem::drone_hardware_
protected

Hardware.


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