This repository holds common code for 3484 in Python
- Controls - Abstracts the hardware controller inputs, to allow for any controller input to appear as any other type. This implements a more convenient interface for interacting with OI
- LEDs - Common LED code for robots
- Motion - Motor template classes, which allows for creating motors in subsystems without any of the repeated code for setup, PID, and feed forward.
- Pathfinding - Code for handling pathfinding with Pathplanner, and for finely aligning to locations on the fields
- Pose Manipulation - Helper functions for handling AprilTag poses and applying offsets to them
- Vision - Code for getting the current pose of the robot based on visible AprilTags
Open your robot project, and create a virtual environment:
cd RobotCode
python -m venv .venv
source ./.venv/bin/activate # This may vary depending on your OSInstall the library:
pip install git+https://github.com/FRC-Team3484/FRC3484_Lib_PythonAdd the following to your pyproject.toml:
requires = [
"frc3484 @ git+https://github.com/FRC-Team3484/FRC3484_Lib_Python.git@main"
]Then, update the robotpy cache:
robotpy syncIf installed with pip, you may have to forcefully reinstall the library to get the new changes:
pip install git+https://github.com/FRC-Team3484/FRC3484_Lib_Python --no-cache-durWhen deploying this lib with robot code, you may need to forcefully reinstall all of the packages to get library changes to apply:
robotpy deploy --force-installClone this repository:
git clone https://github.com/FRC-Team3484/FRC3484_Lib_Python
cd FRC3484_Lib_PythonOr, use Git: Clone in the VSCode command palate (Ctrl+Shift+P)
Create a new virtual environment and activate it:
python -m venv .venv
source ./.venv/bin/activate # This may vary depending on your OSOr, with the Python VSCode extension, click the Python version number in the bottom right, and select Create Virtual Enviroment
Install the dependencies:
pip install uv
uv sync