Skip to content

Setup New Robot Repo

Armaan Gomes edited this page Aug 9, 2023 · 2 revisions

Setup-New-Robot-Repo

Authors: Armaan, Aditi

Date: 7/10/23

** NOTE: This should only be done once at the beginning of build season by the tech leads and whenever a new robot project is needed**

Steps

  1. Open Wpilib vscode
  2. Control + Shift + P Create new project
  3. Fill out all fields
  4. For the select a base folder create a new folder with the project name and select that
  5. Top settings template java TimedRobot
  6. Press generate project
  7. Cd into the base folder (the project name folder the highest level one)
  8. run git init
  9. git add .
  10. git commit -m "initialize"
  11. Open github desktop
  12. Under repository click add
  13. Add existing repo
  14. Select the the main folder
  15. Publish to github and select the organization as HHS-Team670
  16. Open the most recent robot's code
  17. Copy paste the contents of vendordeps from the previous repo into the new repo
  18. Open the build.gradle from the new repo and change JAVA_11 to JAVA_17
  19. Change the ROBOT_MAIN_CLASS to "frc.team670.robot.Main"
  20. Create the team670 folder as a subfolder of frc
  21. Move the robot folder into the team670 folder
  22. CD into the team670 folder in terminal
  23. Run git submodule add https://github.com/HHS-Team670/MustangLib
  24. Create a constants folder as a subfolder of robot
  25. Create a file RobotConstants.java which extends RobotConstantsBase
  26. Fill out relevant constants (or leave blank)
  27. Copy paste the OI.java from the previous repo into the constants folder
  28. Remove all button assignments
  29. Copy paste field constants if necessary
  30. Copy paste everything else you need
  31. git add .
  32. git commit -m "set up repo"
  33. git push
  34. Go to github.com
  35. Find the repo
  36. MustangLib will probably be capitalized
  37. Reclone the repo (from scratch)
  38. git mv MustangLib mustnaglib
  39. git mv mustnaglib mustanglib
  40. git add .
  41. git commit -m "fixed mustanglib"
  42. git push
  43. Delete ExampleSubsystem.java and Constants.java
  44. Replace RobotContainer.java and Robot.java from the new repo with ones from the old repo.
  45. Fix all errors in Robot Container and remove anything that does not make sense
  46. Delete ExampleCommand.java and Autos.java
  47. Build
  48. git add .
  49. git commit -m "removed examples and updated robot container"
  50. git push

Resources

Clone this wiki locally