MAV'RIC
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
Flight_controller_stack Class Reference

Base class for cascade style controller hierarchy. More...

#include <flight_controller_stack.hpp>

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

List of all members.

Public Types

typedef Controller
< position_command_t,
velocity_command_t
pos_ctrl_t
 Alias for required type of position controller.
typedef Controller_1_to_2
< velocity_command_t,
attitude_command_t,
thrust_command_t
vel_ctrl_t
 Alias for required type of velocity controller.
typedef Controller
< attitude_command_t,
rate_command_t
att_ctrl_t
 Alias for required type of attitude controller.
typedef Controller
< rate_command_t,
torque_command_t
rate_ctrl_t
 Alias for required type of rate controller.
typedef Servos_mix mix_ctrl_t
 Alias for required type of servo mixing controller.

Public Member Functions

 Flight_controller_stack (pos_ctrl_t &pos_ctrl, vel_ctrl_t &vel_ctrl, att_ctrl_t &att_ctrl, rate_ctrl_t &rate_ctrl, mix_ctrl_t &mix_ctrl)
 Constructor.
virtual bool update (void)
 Main update function.
bool failsafe (void)
 Sets actuators in safety mode.
bool set_command (const position_command_t &position)
 Set of command setters.
bool set_command (const velocity_command_t &velocity)
 Sets the input command.
bool set_command (const attitude_command_t &attitude)
 Sets the input command.
bool set_command (const rate_command_t &rate)
 Sets the input command.
bool set_command (const torque_command_t &torque)
 Sets the input command.
bool set_command (const thrust_command_t &thrust)
 Sets the input command.
bool get_command (position_command_t &position) const
 Set of command getters.
bool get_command (velocity_command_t &velocity) const
 Returns the input command.
bool get_command (attitude_command_t &attitude) const
 Returns the input command.
bool get_command (rate_command_t &rate) const
 Returns the input command.
bool get_command (torque_command_t &torque) const
 Returns the input command.
bool get_command (thrust_command_t &thrust) const
 Returns the input command.
bool get_output (empty_command_t &command) const
 Returns the output command.

Protected Member Functions

bool update_in_thrust_and_torque_mode (void)
 Main update function when in thrust + torque mode.
bool update_in_thrust_and_rate_mode (void)
 Main update function when in thrust + rate mode.
bool update_in_thrust_and_attitude_mode (void)
 Main update function when in thrust + attitude mode.
bool update_in_velocity_mode (void)
 Main update function when in velocity mode.
bool update_in_position_mode (void)
 Main update function when in position mode.

Protected Attributes

command_t command_
 Flight commands.

Detailed Description

Base class for cascade style controller hierarchy.


Constructor & Destructor Documentation

Flight_controller_stack::Flight_controller_stack ( pos_ctrl_t pos_ctrl,
vel_ctrl_t vel_ctrl,
att_ctrl_t att_ctrl,
rate_ctrl_t rate_ctrl,
mix_ctrl_t mix_ctrl 
)

Constructor.

Parameters:
pos_ctrlReference to the position controller
vel_ctrlReference to the velocity controller
att_ctrlReference to the attitude controller
rate_ctrlReference to the rate controller
mix_ctrlReference to the mixing controller

Member Function Documentation

bool Flight_controller_stack::get_command ( velocity_command_t command) const [virtual]

Returns the input command.

Parameters:
commandInput command
Returns:
success

Implements Controller< velocity_command_t >.

Here is the call graph for this function:

bool Flight_controller_stack::get_command ( attitude_command_t command) const [virtual]

Returns the input command.

Parameters:
commandInput command
Returns:
success

Implements Controller< attitude_command_t >.

Here is the call graph for this function:

bool Flight_controller_stack::get_command ( rate_command_t command) const [virtual]

Returns the input command.

Parameters:
commandInput command
Returns:
success

Implements Controller< rate_command_t >.

Here is the call graph for this function:

bool Flight_controller_stack::get_command ( torque_command_t command) const [virtual]

Returns the input command.

Parameters:
commandInput command
Returns:
success

Implements Controller< torque_command_t >.

Here is the call graph for this function:

bool Flight_controller_stack::get_command ( thrust_command_t command) const [virtual]

Returns the input command.

Parameters:
commandInput command
Returns:
success

Implements Controller< thrust_command_t >.

Here is the call graph for this function:

bool Flight_controller_stack::get_output ( empty_command_t command) const [virtual]

Returns the output command.

Parameters:
commandoutput command
Returns:
success

Implements Controller< torque_command_t >.

bool Flight_controller_stack::set_command ( const position_command_t position) [virtual]

Set of command setters.

Based on the type of the provided command, the control mode will be changed and used in following calls to update

Implements Flight_controller.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Flight_controller_stack::set_command ( const velocity_command_t command) [virtual]

Sets the input command.

Parameters:
commandInput command
Returns:
success

Implements Flight_controller.

Here is the call graph for this function:

bool Flight_controller_stack::set_command ( const attitude_command_t command) [virtual]

Sets the input command.

Parameters:
commandInput command
Returns:
success

Implements Flight_controller.

Here is the call graph for this function:

bool Flight_controller_stack::set_command ( const rate_command_t command) [virtual]

Sets the input command.

Parameters:
commandInput command
Returns:
success

Implements Flight_controller.

Here is the call graph for this function:

bool Flight_controller_stack::set_command ( const torque_command_t command) [virtual]

Sets the input command.

Parameters:
commandInput command
Returns:
success

Implements Flight_controller.

Here is the call graph for this function:

bool Flight_controller_stack::set_command ( const thrust_command_t command) [virtual]

Sets the input command.

Parameters:
commandInput command
Returns:
success

Implements Flight_controller.

Here is the call graph for this function:

bool Flight_controller_stack::update ( void  ) [virtual]

Main update function.

Updates recursively the layers of control. The highest active layer is determined by the type of the last command

Implements Flight_controller.

Here is the call graph for this function:


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