From 449e3185c2ff27e3496aa36ab170a5267d958d21 Mon Sep 17 00:00:00 2001 From: Luke Tao Date: Fri, 31 Jan 2025 17:54:23 -0500 Subject: [PATCH] Update README and requirements.txt --- README.md | 36 +++++++++++++++++------------------- engine/plot_trajectory.py | 2 +- requirements.txt | 19 +++++++++---------- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 3106ba3e..3ecf0891 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,34 @@ Set-up for Nexus software environment: -Installing virtual environment (venv) & nexus software dependencies: +Installing virtual environment (venv) & Nexus software dependencies: 1. Ensure python3 is downloaded -2. Navigate to the directory -3. Create venv by running: - * macOS: - * linux: - * windows: -4. Activate the venv by running: - *macOS: - *linux: - *windows: -5. Run: to install nexus software dependencies. +2. Navigate to the `src` directory +3. Create venv by running: + - macOS: `python3 -m venv venv` + - linux: `python3 -m venv venv` + - windows: `py -m venv venv` +4. Activate the venv by running: + - macOS: `source venv/bin/activate` + - linux: `source venv/bin/activate` + - windows: `venv\Scripts\activate` +5. Run: `pip3 install -r requirements.txt` to install nexus software dependencies. For IMU lsm9ds1, must be operating on Raspberry Pi to run these commands. -1. Enable I2C using -2. run -3. run and make sure that a fair bit displayed on the command line +1. Enable I2C using `sudo raspi-config` +2. run `sudo apt-get install python3-dev python3-pip python3-smbus i2c-tools -y` +3. run `sudo i2cdetect -y 1` and make sure that a fair bit displayed on the command line (aka a number is being displayed). If nothing is being displayed, recheck the IMU connections. -4. run +4. run `sudo pip3 install adafruit-circuitpython-LSM9DS1` 5. make sure you are using python3. other versions of python do not support the lsm9ds1 and busio libraries from circuitpython. For RF Module, must be operating on Raspberry Pi to run these commands. -1. Enable Serial data transmission from RF Module and raspberry pi - +1. Enable Serial data transmission from RF Module and raspberry pi `sudo raspi-config` 2. Go to "interfacing options" and select the "Serial" option. Make the login shell accessible. For GUI Module -1. install tkinter - brew install python-tk@3.10 +1. install tkinter `brew install python-tk@3.10` diff --git a/engine/plot_trajectory.py b/engine/plot_trajectory.py index a25611db..b498b380 100644 --- a/engine/plot_trajectory.py +++ b/engine/plot_trajectory.py @@ -96,7 +96,7 @@ def plot_sim_traj(m): # Global parameters for animation functions global mission, ax, circle_patch, wedge_patch, circle_patch_base, wedge_patch_base, anim - plt.style.use("seaborn-whitegrid") + plt.style.use("seaborn-v0_8-whitegrid") x_coords = m.mission_state.robot.robot_state.truthpose[:, 0] y_coords = m.mission_state.robot.robot_state.truthpose[:, 1] fig, ax = plt.subplots() diff --git a/requirements.txt b/requirements.txt index e521a804..c5d5ee5a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,15 @@ -geopy==2.1.0 -pyserial==3.5 -pynmea2==1.15.0 -pyparsing==2.2.1 +geopy>=2.1.0 +pyserial>=3.5 +pynmea2>=1.15.0 +pyparsing>=2.2.1 matplotlib -haversine==2.3.0 -vincenty==0.1.4 -numpy==1.22.0 -statistics==1.0.3.5 -PySimpleGui == 4.59.0 #comment this out when running on rpi +haversine>=2.3.0 +vincenty>=0.1.4 +numpy>=1.22.0 +statistics>=1.0.3.5 +PySimpleGui >= 4.59.0 #comment this out when running on rpi black >= 23.0.0 coverage -numpy CMake wmm2020 ahrs