From 32badfe83a50de5a4a8b309b5e641397a4d78bfb Mon Sep 17 00:00:00 2001 From: Ian Reid Date: Thu, 13 Jun 2024 11:11:53 -0600 Subject: [PATCH] Started on overview and inheritance scheme. --- .../controller-software-architecture.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/developer-guide/rosplane/controller-software-architecture.md b/docs/developer-guide/rosplane/controller-software-architecture.md index e69de29..ba4a0b0 100644 --- a/docs/developer-guide/rosplane/controller-software-architecture.md +++ b/docs/developer-guide/rosplane/controller-software-architecture.md @@ -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. + +