FRC2024
Execution
- Simulation :
python -m robotpy sim
- Deployment :
python -m robotpy deploy
- Run tests :
python -m robotpy test
- Sync dependencies :
python -m robotpy sync
- Format code with black
python -m black .
- Save autoproperties :
python properties.py saveonce
- Save loop autoproperties :
python properties.py saveloop
Environment setup
- Download the latest Miniconda version on your computer with the following link (https://docs.conda.io/en/latest/miniconda.html)
- Open Anaconda Prompt
- Run the following commands to make sure everything is up-to-date:
conda config --add channels conda-forge
conda config --set channel_priority strict
conda update conda
conda update python
- Run the following command to create an environment named "frc2024":
conda create -n frc2024 python=3.12
- Add the environment to the interpreter on PyCharm
- Run the following commands on the PyCharm terminal to install the requirements
pip install robotpy
python -m robotpy sync
(In a new project, execute python -m robotpy init
instead.)
Writing Conventions
- All code must be written in the English language
- Follow PyCharm style recommendations
- Commit names must be clear and informative
- Progress must be tracked with GitHub Projects (https://github.com/orgs/Ultime5528/projects/8)
- File names use lowercase without spaces
- Class names use PascalCase
- Function names use camelCase
- Variable names use snake_case
- Function and command names start with an action verb (get, set, move, start, stop...)
- Commands and subsystems inherit from SafeCommand and SafeSubsystem
- Ports
- Must be added to ports.py
- Respect the naming convention : "subsystem" "component type" "precision"
- Example : drivetrain_motor_left
- Autoproperties
- Respect the naming convention : "variable type" _ "precision"
- Example : speed_slow, height_max, distance_max