Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The firmware thus has the capability to fly the aircraft in a stable manner across any desired flight plan. Further, if so commanded, Path Manager can switch from flying mode to takeoff/landing modes. This allows fully autonomous takeoffs and landings.

Automation

Comms

Inter-thread communication on Autopilot

The Path Manager and Telemetry Manager state machines run as separate tasks that communicate with each other. For instance, the Telemetry Manager exchanges new instructions from the ground and onboard Jetson along with debug data with the Path Manager. Because the tasks are scheduled by an RTOS, their communication must be handled in a thread-safe way. FreeRTOS features mail queues as a thread-safe method of sending data between tasks. The Telemetry and Path Managers are each assigned a mail queue in which they can store data. Each task continuously updates its mail queue with the newest version of the data it needs to send. The other task reads this mail queue to access the data when necessary. In this way, both tasks are able to send and receive data between each other.

Telemetry Architecture

The Telemetry Manager is the part of the Autopilot firmware responsible for all of the data communication between ZeroPilot, the onboard Jetson, and a custom program running on the ground station. The figure below shows the layout of our Telemetry Manager architecture:

// Insert some image here

The Telemetry Manager starts its work cycle by obtaining telemetry data from the ground and onboard Jetson, if data is invalid, the manager immediately reports this error to the ground station; otherwise, data gets sent to Path Manager as expected. After data is processed by Path Manager, the feedback is processed by Telemetry Manager. If there’s any unusual activity detected, which may indicate that Zeropilot is unresponsive, an error report would be sent to the ground station. If everything works smoothly, feedback data would get sent to the ground periodically and relevant data will be sent to the onboard Jetson.

Autopilot-Jetson Communication

Communication occurs over a UART line with both Autopilot and the Jetson exchanging data relating to the drone’s current state (pitch, yaw, gps coordinates, etc.) and the position of tracked objects. This exchange of data allows for the computer vision algorithms to produce accurate gps coordinates for tracked objects that autopilot can use to steer the drone in the correct direction.

Autopilot-Ground Communication

Communication occurs over a pair of XBee Modules at 900 MHz with a custom-built protocol. Most of the data sent to the Autopilot are commands that come in the form of a change to the flight path or an indication that the takeoff/landing zones are clear. There is also support for debug data to be sent from Autopilot to the ground so issues in Autopilot can be diagnosed before a failure occurs.

Controls

Navigation

The navigation of the drone is handled by the waypoint manager, which lives inside the Path Manager state machine. It is responsible for storing and modifying the drone’s requested flight path and determining the desired heading to stay on course. It does so by navigating around a series of GPS waypoints.

...