Skip to content

Phrogz/MagicBotTestFramework

Repository files navigation

Gears and Buccaneers FRC Robot Code

Pure Python codebase using RobotPy with the MagicBot framework.

Installation

  1. If not already installed, install UV and git.

  2. Clone the GitHub repo. One way is to run this command in a terminal:

    git clone git@github.com:Phrogz/MagicBotTestFramework.git
  3. In a terminal in the working directory for the cloned files (hint: cd MagicBotTestFramwork), run:

    uv sync             # Create a virtual python environment with necessary pre-requisites
    uv run robotpy sync # Install all the robotpy libraries
  4. Open the folder in VS Code.

    • Though there's little likelihood of conflict, you may wish to create a new VS Code profile with only the recommended VS Code extensions installed.

Developing the Robot Code

See lots of sample code in RobotPy Examples for isolated snippets demonstrating how to accomplish common tasks.

Running the Simulator

Open a Terminal in VS Code (hint: ctrl+`, or ), and then run robotpy sim to start the simulator.

  • Note that when you open a Terminal inside VS Code it should automatically activate the virtual environment for you. This is what enables robotpy as its own command, without the uv run prefix.

    If VS Code does not activate the virtual environment automatically, you can run source .venv/bin/activate. 🤮

  • If you connect a PS4 controller, you should be able to drive the robot around in the simulator using the left and right sticks.

    Note that the first time you will need to drag the controller from the "System Joysticks" window onto "Joystick 0" in the "Joysticks" window to connect the controller to the right joystick "port".

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages