4. Software Team Processes - FrcTeam4919/GettingStarted GitHub Wiki

Software Getting Started

Pre-season Learning

For the software team, there are a few things we can do to prepare ourselves for the competition season. To get started programming the robot, you will need to understand the Visual Studio Code editor, version control with Git and GitHub, and Robot Builder.

Visual Studio Code

Resources for learning:

  1. FIRST Documentation: https://docs.wpilib.org/en/stable/docs/software/vscode-overview/index.html
  2. Introductory videos from MicroSoft: https://code.visualstudio.com/docs/getstarted/introvideos

Git and GitHub

Resources for learning:

  1. FIRST documentation: https://docs.wpilib.org/en/stable/docs/software/basic-programming/git-getting-started.html
  2. Github tutorial (https://guides.github.com/activities/hello-world/)
  3. If you are new to version control, here is a short (1 minute) video: https://www.youtube.com/watch?v=xKVlZ3wFVKA&list=PL5-da3qGB5IBLMp7LtN8Nc3Efd4hJq0kD.

Robot Builder

  1. FIRST Documentation: https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/robotbuilder/introduction/index.html
  2. Videos on Robot Builder and Command-based robots (multi-part video series, watch in order):

Setting Up Laptop for Developing Robot Software

  1. Create a GitHub Account: https://github.com/join.
  2. Download Git from https://git-scm.com
    1. Set user.name to GitHub username and user.emaal to the GitHub no-reply email
  3. Download and install the robot development environment.
    1. Detailed instructions for installing VSCode IDE and FRC Tools can be found at: https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html.
  4. Download and install the libraries for the motor controllers and other programmable components:
    1. https://github.com/FrcTeam4919/Robot2021/wiki#quick-start-to-programming-ctre-victortalon, and
    2. https://github.com/FrcTeam4919/Robot2021/wiki#spark-max

Optional Software for Developers

  1. Download and install the GitHub desktop version control system (VCS) client.
    1. Detailed instructions for setting up the Github Desktop Client can be found at https://help.github.com/en/desktop/getting-started-with-github-desktop/installing-github-desktop.

Prepare RoboRio and DriverStations

  1. Download and install the FRC Tools:
    1. https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/frc-game-tools.html
  2. Image the RoboRio(s) https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-3/imaging-your-roborio.html
  3. Image the radio(s) https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-3/radio-programming.html
  4. Images any other control system or 3rd party devices as indicted in WPILib documents

Software Workflow During Build Season

  1. First create a repository in Github FrcTeam4919 workspace.
    1. Name it Robot_YEAR where YEAR is the 4 digit year.
    2. It is easiest to create in GitHub first. Select Java type so GitHub adds a Java .gitignore.
  2. Clone this new repository to personal laptop
  3. Robot Software Design (start When the robot design is settled enough)
    1. Identify software subsystems (nouns) based on the robot's systems
    2. Identify the robot's functions (verbs) which will become the commands.
    3. Map the commands to Joystick buttons (working with the operators on the drive team)
    4. Research any new concepts
  4. In Robot Builder create:
    1. Subsystems
    2. Commands
    3. OI Joystick and buttons
    4. Export to Java
  5. Commit and publish to Repository
  6. Create a new branch for the feature being worked on; named descriptively for the feature
  7. Edit the code to add the feature
    1. Edit the subsystem code to add the functions calls necessary to match the commands.
    2. Edit the command code to add the corresponding subsystem function calls
    3. Add code as necessary
    4. Commit the new code often and before publishing
  8. Publish/create Pull Request when completed and ready to merge back to main branch.
  9. Repeat for each feature until done.

During Competition

Strategize and plan for last minute updates and making changes during competition:

  • How will the new code get onto the robot?
  • list of cables, computers, routers, etc. need to be brought to the competition.
  • prepare written test steps to verify the software works as intended with the robot.
  • How will code changes be managed on competition prep-day?
  • Are we going to have multiple people working on code or single?
  • How are we going to manage the code base?
  • What type of network connectivity is required to exchange code?

The plan for software at the competition will need to be coordinated with all teammates be wanting access to the robot for driving practice, and for modifying the mechanical, electrical, and pneumatic components.

Future capability development

(in no priority order)

  • Operator Console with MSP430 (Done!)
  • Learn/practice PID with elevator mechanism
  • Vision processing
  • Prototype motor controller with Leonardo
  • Learn/practice Smart Dashboard