--- tags: byting-irish, projects --- # Byting Irish Projects ## https://rebrand.ly/byting-projects The following is a list of projects for team members to pick from * Create Paths for Scoring * Autonomous Paths and Robot code * Robot Test * Shuffleboard Widgets / Diagnostics info * Photon Vision / April Tags ## Getting Started To get to playing with robot code in the simulator: * Install wpilib ([doc](https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html)). * Install github desktop client from [here](https://desktop.github.com/) * Get a new project from the StateSpaceDriveSimulation example. You can do that in one of the following 2 ways: * Clone the git repository https://github.com/smoser-frc/frc-sim-base - if you have github or git, this is the fastest way, and will allow you to easily see what you have changed. * Walk through the wizard in wpilib. * Hit 'ctrl-shift-p' or press the 'w' icon in the top right and then 'Create a new project'. * example -> java -> StateSpaceDriveSimulation * Base folder: Pick a directory (documents is fine) and a new folder will be created under there. * **Make sure you click Enable Desktop Support** ## Project Details ### Create Paths for Scoring [camilla, alexa] You'll use [Path Planner](https://github.com/mjansen4857/pathplanner) to generate some paths. First install pathplanner. You can download at [here](https://github.com/mjansen4857/pathplanner/releases/tag/v2023.3.1). There is some more at https://github.com/mjansen4857/pathplanner/wiki . Open Up path planner and start playing with it. TODO: * pathplanner puts its output in src/main/deploy/pathplanner of the project you selected. We need to figure out how to use of those (check their docs) * how to commit this code to tree? There is wpilib documentation on path planning at https://docs.wpilib.org/en/stable/docs/software/pathplanning/index.html ### Autonomous [joseph, nico] This project is to fill out the autonomous routine and also add a "chooser" on the shuffleboard ui that allows the drive team to pick which routine the bot will take. There is wpilib documentation [here](https://docs.wpilib.org/en/stable/docs/software/dashboards/smartdashboard/choosing-an-autonomous-program-from-smartdashboard.html) ### Robot Test [vincent, connor, difei] Lots of things can go wrong with the robot. Lots of things *do* go wrong with the robot. The goal of this excercise is to develop code that will run when the robot is put in "test mode". This will help the pit crew verify whether or not certain functions are working, and will allow us to run a quick "sanity test" to see that all the components are. Given our current chassis robot, here is an example of things that we want to do: * spin left wheels forward 1 second * spin right wheels forward 1 second * spin left wheels backward * spin right wheels backward As we get more of the "real robot" together we'll add things to this list. There is wpilib documentation on test mode [here](https://docs.wpilib.org/en/stable/docs/software/basic-programming/using-test-mode.html) You'll want to read about "LiveWindow" also [here](https://docs.wpilib.org/en/stable/docs/software/dashboards/smartdashboard/test-mode-and-live-window/displaying-LiveWindow-values.html). ### Shuffleboard Widgets / Diagnostics [walter] We can add a new tab to shuffleboard dashboard that has widgets set up and laid out that we choose. These widgets can give information about the robot, or even help control it in test mode. The first goal of this excercise will be to: * create a new tab on shuffleboard called "diag" * Add a widget to that tab that shows the robot's current speed. To do this, you'll have to populate a field in network tables that includes the rate of change from encoder values. Additional goals: * Add a Gyro widget. * Turn left and right speed widgets into a dial through code. * Add widget for raw encoder data. Last year I put together some code that added "motor controller" widgets that allowed us to tinker with PID settings. You can see that code [here](https://github.com/smoser/SPARK-MAX-Examples/blob/dfbaa51b8999380c9d03b7f750ee0d25b6cbca32/Java/Position%20Closed%20Loop%20Control/src/main/java/frc/robot/Robot.java). There is lots of good infromation on shuffleboard at in the [wpilib docs](https://docs.wpilib.org/en/stable/docs/software/dashboards/shuffleboard/index.html). ### Photon Vision / April Tags [eli] I'm hoping that we'll be able to use the PhotonVision library with the robot to find position on the field. What you'll do to start here is see if we can get the PhotonVision code running on a laptop and interacting with the vscode simulation robot. We'll need a webcam and april tags printed. This obviously wont' be exactly like the robot environment. Your april tags won't likely be set up exactly as they are on the field, and you wont have the exact pitch and height of the robot camera, but you can walk through all of the photonlib documentation and play with it as you go. See PhotoVision documentation: * [Installation](https://docs.photonvision.org/en/latest/docs/getting-started/installation/sw_install/windows-pc.html) * [Programming](https://docs.photonvision.org/en/latest/docs/programming/photonlib/index.html#) * [Robot Integration](https://docs.photonvision.org/en/latest/docs/integration/index.html) * [Examples](https://docs.photonvision.org/en/latest/docs/examples/index.html) We will hopefully write some documentation that will be contributed to PhotonVision on how to use a local webcam and interact with