Skip to content

Kurokishi592/Falcon

Repository files navigation

CP2106-Orbital-Falcon

A vision-based dynamic landing system for drones (UAVs) on moving platforms autonomously, using real-time AprilTag detection and comes with a GUI. Ideal for Raspberry Pi and compatible with Linux, macOS, and Windows.

Setting up of Telegram bot

The code for running a Telegram bot that sends warning messages when parameters exceed a certain threshold is included with FALCON. This requires the user to have a Telegram account, and the computer running FALCON must have internet access.

To begin the Telegram setup, search for the @BotFather account on Telegram, which is Telegram's built-in bot manager. To begin, send the command /newbot to begin the setup process.

  1. Choosing a name for the bot

This name will be the display name on Telegram.

  1. Choosing a username for the bot

This is the "@username_bot" Telegram handle for the new bot, and can be found by anybody with a Telegram account.

  1. API Key

After the name and username are chosen, BotFather will automatically generate a HTTP API key.

Duplicate creds_sample.json and rename it to creds.json, and paste the generated API key inside.

FALCON Setup Instructions

  1. Download the Project
cd ~/Desktop
git clone https//github.com/Kurokishi592/Falcon.git
cd Falcon

Or alternatively, download the ZIP file, extract it, and move into under your local Desktop folder.

For 🐧 Linux/macOS/Raspberry Pi

If you don't have git, install it using your system's package manager (e.g., sudo apt install git on Raspberry Pi/Linux).

  1. To use the Telegram bot, check the steps above for the setup process after the download is complete.

  2. Run the following commands:

chmod +x setup_and_run.sh
./setup_and_run.sh

For 💻 Windows

Download Git Bash if you do not have it installed: https://git-scm.com/downloads, click on "Windows", run the Installer .exe file and leave settings at their default values.

  1. Open Git Bash from the Start Menu

  2. Go to the "Falcon" directory by running:

cd ~/desktop/Falcon
  1. Run the following command to run Falcon:
./setup_and_run.sh

This will:

  • Create a Python virtual environment
  • Install all required packages
  • Launch the GUI application

FALCON Simple User Test

With the FALCON GUI opened, start the camera feed:

  1. Under "Select Camera" dropdown options, select the camera that starts with '700', this should start your webcam. (Or any other usb camera you can use)

  2. Open the pdf "recursive tag id 0 1 2" to test the apriltag detection using another device. As long as the tag is displayed on a separate screen any method will do. You can just open using your phone.

  3. Display the tag in front of your webcam/camera and FALCON will reflect an overlay to show detection.

  • Ensure that the tag is fully displayed on your separate screen
  • Zoom in on the pdf. The recursive tag, as the name suggests, has tags placed within tags
  • It is robust to rotation of up to 80 degrees, and far or near, try it yourself

Done! FALCON is now opened with a GUI and your selected camera feed. Feel free to play around with the other features too!

Required Dependencies

The GUI relies on Python's Tkinter dependency. Tkinter comes preinstalled with any Python 3 version.

Other required dependencies include:

  1. OpenCV

OpenCV is used for interfacing with camera. It can be installed with the following bash command:

pip install opencv-python
  1. cv2-enumerate-cameras

cv2-enumerate-cameras is used for listing all the cameras present on the system. It can be installed with the following bash command:

pip install cv2-enumerate-cameras
  1. pupil-apriltags pupil-apriltags is used for the AprilTag detection.
pip install pupil-apriltags
  1. Pillow Pillow is used for displaying images on the Tkinter GUI
pip install Pillow
  1. pyserial pyserial is used for communicating with the MCU (Teensy 4.1) through UART
pip install pyserial
  1. matplotlib Matplotlib is used to generate the live graph on the Tkinter GUI
pip install matplotlib
  1. python-telegram-bot Python interface to control the backend of a Telegram bot
pip install python-telegram-bot

About

Orbital Team ID: 7003 (Apollo 11)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors