Team2556 / RobotPython2025

Fresh Start for REEFScape 2025
0 stars 0 forks source link

RobotPython2024

Fresh start ; created for the 2025 season; transition to python

FRC Robot Project

This repository contains the code for our FRC robot using Python, PyRobot, and WPILib.

Setup

  1. Create a python based profile in your VS Code: optional profile file

  2. Make sure you have Python 3.12.5

    
    python --version
    ------------------------ 
    OUTPUT: Python 3.12.5
    1a. If not go to [Other Resources] and download it.
  3. Clone the repository:

    
    git clone https://github.com/Team2556/RobotPython2025.git
    cd RobotPython2025
  4. ??automatic for newcomer?? Activate the virtual environment:

    
    On Windows: 
    venv\Scripts\activate
    On macOS/Linux: 
    source venv/bin/activate
  5. ??automatic for newcomer?? Install the dependencies:

    
    pip install . #the dot references your current directory
    <!-- 
  6. initialize robotpy

    
    
    3. Create folders named 'subsytems' and 'tests'
    ```sh
    mkdir subsytems
    mkdir tests
    py -3 -m robotpy init -->
    <!--
  7. move robot.py file created by initilization to 'src' folder move robot2.py src\ -->

  8. Run the robot code:

    
    python src/robot.py

Repository Structure

Other Resources

VS Code Extensions

TODO: Refer to our main github readme or sync here.... In the VS Code Extensions sidbar, these codes should help you find usefull extensions (well.. Git and Python are required)

ORIGINAL Setup (FYI)

  1. Clone the repository:

    
    git clone https://github.com/Team2556/RobotPython2025.git
    cd RobotPython2025
  2. Create a vertual environment (from a terminal; in the repo directry on your pc)

    
    python -m venv venv
  3. Activate the virtual environment:

    
    On Windows: 
    venv\Scripts\activate
    On macOS/Linux: 
    source venv/bin/activate
    <!-- 4. Install the dependencies:
    ```sh
    pip install . #the dot references your current directory -->
  4. initialize robotpy

    
    py -m robotpy init
  1. Run the robotpy sync to get the RoboRIO python
    
    py -m robotpy sync
  2. Run the robot code:
    
    python src/robot.py