Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/northeastern-electric-racing/telemetry-hub
Gui application for telemetry and data interaction
https://github.com/northeastern-electric-racing/telemetry-hub
Last synced: 26 days ago
JSON representation
Gui application for telemetry and data interaction
- Host: GitHub
- URL: https://github.com/northeastern-electric-racing/telemetry-hub
- Owner: Northeastern-Electric-Racing
- Created: 2022-05-18T19:18:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-25T01:30:30.000Z (over 1 year ago)
- Last Synced: 2023-07-25T02:48:31.381Z (over 1 year ago)
- Language: Python
- Size: 4.44 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 sessionsIt is written Python using the PyQt GUI framework for the frontend.
## Setup and Installation
The [pipenv](https://pypi.org/project/pipenv/) library is used to extablish a virtual project environment. The only prerequisite is that you have python version 3.10 installed ([here](https://www.python.org/downloads/)).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](https://ftdichip.com/drivers/vcp-drivers/). This should only be an issue on Mac computers. [Here](https://learn.sparkfun.com/tutorials/how-to-install-ftdi-drivers/mac) 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:
- [General Qt description](https://wiki.qt.io/About_Qt)
- [Complete PyQt Tutorial](https://www.pythonguis.com/pyqt6-tutorial/)
- [Layouts](https://realpython.com/python-pyqt-layout/)
- [Threading](https://realpython.com/python-pyqt-qthread/)Python resources:
- [Object-Oriented Guide](https://www.pythontutorial.net/python-oop/)
- [Documentation](https://realpython.com/documenting-python-code/)## Formatting
We're using [autopep8](https://pypi.org/project/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](https://pyinstaller.org/en/stable/usage.html#building-macos-app-bundles).
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 folderIn order to install the app on a specific OS, follow directions [here](https://www.pythonguis.com/tutorials/packaging-pyqt6-applications-windows-pyinstaller/).
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`