Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Northeastern-Electric-Racing/Telemetry-Hub

Repository files navigation

Telemetry Hub

This GUI Application allows for processing and display of data generated from the car. It is broken down into a series of Windows, each with different types of connections. These include:

  • Vehicle Window: Processes data in real time from the car (usually using data from XBee wireless modules)
  • SD Window: Processes log files saved to an SD card on the car
  • Database Window: Allows interaction with data from hostorical vehicle sessions

It is written Python using the PyQt GUI framework for the frontend.

Setup and Installation

The pipenv library is used to extablish a virtual project environment. The only prerequisite is that you have python version 3.10 installed (here).

Follow the steps below to run the project:

  1. Clone the repo (Navigate to your desired directory and run git clone https://github.com/Northeastern-Electric-Racing/Telemetry-Hub.git)
  2. Install pipenv globally (pip install --user pipenv)
  3. Navigate into the main directory (/Telemetry-Hub) and run pipenv install to install all project dependencies
  4. Run pipenv shell to activate the virtual environment
  5. Start the app with the command python start.py

After the inital run, only steps 4/5 will be needed to run the app again (enter the environment and start the app).

NOTE: If any of the commands in steps 2-5 fail, prepend them with python -m and try again.

Drivers

If data is not being received from the XBee via the serial port, install the correct driver found here. This should only be an issue on Mac computers. Here is a guide with more information on installing the required drivers on a Mac.

NOTE: There is no current driver for Apple Silicon Macs, so these cannot be used to view live XBee data.

Tech Resources

The application is written in python using the PyQt GUI toolkit. The following resources are good for an introduction to PyQt:

Python resources:

Formatting

We're using autopep8 to automatically fix style errors with the code. Run using:

autopep8 -iraa ner_telhub

To run on any other directory, just swap the name with ner_telhub.

It is also recommended to install a Python linting tool (if using VSCode you can easily install an extension).

Running Processing Library

To avoid the overhead of the GUI on large files, the ner_processing library can be run seperately. Follow the below steps:

  1. Create a directory called logs in the project root (same level as ner_processing), and place the log files to process
  2. Start using the command python -m ner_processing. The output file will be written to output.csv in the project root

Deployment

In order to generate an executable, we are using pyinstaller. Follow these steps to generate the executable file:

  1. Build with the provided spec file depending on your OS by running pyinstaller telhub_[platform].spec (win for windows, mac for mac)
  2. A folder located at dist/telhub/ is generated. This is what's needed to run the app. To run, execute the telhub.exe executable in this folder

In order to install the app on a specific OS, follow directions here.

We shouldn't have to regenerate the spec files, but if needed, the following commands generated them:

  • Windows: pyinstaller -n "telhub" --add-data "resources/*;./resources" -i "resources/ner_logo.ico" -p "ner_processing" start.py
  • Mac: pyinstaller -n "telhub" -w --add-data "resources/*:./resources" -i "resources/ner_logo.icns" -p "ner_processing" start.py

About

Gui application for telemetry and data interaction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published