Skip to content

Software Architecture

bdhollis edited this page Jul 29, 2014 · 13 revisions

FlexCraft Simulator (FCS) uses software to interface the user command modules (input devices) with the system actuators (output devices). Software interface was chosen over purely electrical and mechanical control as software allows for increase modularity and simplifies the interfacing with an external control system, as necessary for teleoperation.

System Architecture

Above is a simple diagram of the physical setup for the system. (it is important to note some sensors are directly connected to the linux machine). While this diagram displays the physical system, it is useful for understanding the code. As shown in a diagram below, the code is broken into main areas (sensors - sensors, controllers - human interfaces, displays - human interfaces, control_sw - fcs linux machine, messages - network). These areas are mainly tied to a single aspect of the physical diagram, or relate directly to one of them. So, looking at the next diagram showing a general node diagram, it is important to note how they relate to the different physical systems.

This diagram shows the planned nodes and topics between them.

ROS Node Layout

While this is the basic idea, some specifics have changed.

Package Structure

This diagram shows the layout structure for the code.

File structure

*** Note this is a high level diagram, and currently a early staged one. This does not show all folders and does not show exact paths (e.g. technically the second level are in the src folder of the main folder). It does show the general layout, allowing for organized code to allow fairly simplistic swapping capability.

FCS Simulator*

This folder is designed to contain all packages that directly relate to a virtual simulation of the FlexCraft. The idea is to be able to virtually test software to check for major design flaws before testing it on the physical system which could be dangerous and harmful. The current plan to to do the simulation in Gazebo as it is very integrated into ROS.

* The folder apparently has been renamed to flexcraft_gazebo

Controllers

This folder is meant to hold the packages for the physical controller. Basically these are the controller drivers. The diagram currently shows to possible packages included in Controllers, but these are not necessarily developed.

Sensors

This folder contains the driver packages for the different sensors. It also contains packages for manipulating sensor data, such as filtering or fusing. Again packages listed are examples and while many are intended to be implemented, not all will be necessarily. And others could be added.

Exec*

This folder was originally designed for control software. This is could be state machine based software or control loops, but is the main hub of code that connects the rest. The simplest example is an interpreter that takes the data from the controllers and just converts it to low level code for the thrusters.

* This folder is currently named control_sw

** This folder could also reference the launch folder I intend to create that will contain launch scripts to allow for simple start up of the software for the craft.

Displays

This folder contains the code for the graphical feedback to the operators. This packages could be used either for the driver or the base station operator. Possible additional packages in this folder could be non-physical feedback code. This could include haptic and audio feedback.

Autonomy

This folder currently does not exist and may not. It may make more sense to move the packages in this folder to other packages (specifically control_sw (aka Exec)). The original idea is this folder would contain packages that gave autonomy to the FlexCraft where the operator gives general commands and software determines the details of how to implement such instructions. The displayed packages would be two such examples (waypoint being given a pose as input and self determine its path there and braking having the input to stop and it determining how to stop the craft as quickly as possible.

Messages*

This folder contains the custom messages used for the FlexCraft code. This is designed so packages are not dependent on each other. This is especially useful to ensure no circular dependencies.

* This folder is currently named flexcraft_msgs

Clone this wiki locally