Skip to content

Commit

Permalink
Started on overview and inheritance scheme.
Browse files Browse the repository at this point in the history
  • Loading branch information
iandareid committed Jun 13, 2024
1 parent cd21cf0 commit 32badfe
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/developer-guide/rosplane/controller-software-architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Controller Software Architecture

## Overview

The controller makes use of inheritance to make the controller more modular.
This creates a hierarchy of classes that each take on a responsiblity.
This means that a user that modifies the controller only has to inherit from a particular class make the modifications only to the portions of the code that matter to them, and then continue to use the other parts of the controller.
An example of this is provided in the code.
The total energy controller exemplifies this by inheriting and only changing just a few key functions.
The aim of this architecture is to make the developer's job easier.

### Inheritance Scheme

The controller starts off with the `controller_base` class.
This contains all of the interface with ROS.
The next layer implements a basic state machine for the controller.
These states control which commands are happening at what time.
An example of how this may be used is, ensuring the aircraft is at altitude before attempting major maneuvers.
Following the state machine is the actual control scheme.
By default we use a successive loop closure scheme.
This layer calculates the control errors and necessary actuator deflections to track commands.


0 comments on commit 32badfe

Please sign in to comment.