PROGRAMMING II
Software Overview
MEMBERSHIP
PACKAGE
2JHVF55
JAVA
Reasons for using Java
FRC supports Java, Python & C++
Python is new to FRC -> lack of support
Vanier doesn’t teach C++
Java is decently powerful and has lots of
support
LEARN JAVA
SOFTWARE
OVERVIEW
WPILIB
Fork of VSCode
Comes with libraries & tools
to program & tune the robot
Main tool
WPILIB TOOLS
SmartDashboard, Shuffleboard
SysID
Datalogger Tool
AdvantageScope
Project Generator
Vendor Library Installer
DRIVER STATION
Allows us to connect to the robot & run different modes
PHOENIX TUNER X, REV
HARDWARE CLIENT
Set CAN IDs, current limits, etc. for motor controllers
PATHPLANNER
Generates paths - autos for the robot to follow during
the autonomous period
CHOREO
Generates robot-optimized paths from point A to B
PATHPLANNER CHOREO
Easier to setup Generates fastest
Chain paths together possible paths
Make robot perform Only makes paths
functions during path Harder to implement
following
Path-on-the fly
GIT
Version control platform --> integration with GitHub
GIT
Allows code collaboration
Backs up different versions of code
Lets us see who made changes
Github uses Git
TERMINOLOGY
Repository: Virtual storage of a project
Branch: A modified version of the main branch
Clone: Copying a branch onto a computer
Merge: Combine two branches
Commit: Creates a local save of your changes
TERMINOLOGY
Push: Updates the repository with your committed
changes
Fetch: Fetches new changes from the main branch
Pull: Fetches new changes and merges them
Stash: Stores changes for later to allow a merge to occur
COMMAND BASED PROGRAMMING
Robot Container initializes and runs all code
Code is divided into Subsystems and Command objects
Subsystems define general methods and initialize
subsystem devices
Command use subsystem methods to perform a specific
task
METHODS
A method, or function, performs a task when called
Methods take parameters, which could be pretty much
anything
For Command Based Programming, methods are used to
perform general actions for a subsystem
i.e A Drivetrain Method could be drive
OBJECTS
An object, or class, is a blueprint for something
An class contains all the attributes and methods
An object can be instantiated similar to a variable
Java objects must be created in their own files
In Command Based Programming, objects are used to
define subsystems and commands
COMMANDS
A command is an FRC-specific object that takes usually
takes one or more subsystem as a parameter to perform
a specific task
Commands chain together the methods of the
subsystem
ACTIVITY
1. Make a GitHub account
2. Using VSCode, clone the TRAINING2024 repo on the
Vanier Vikings GitHub
3. Pull
4. Make changes and make a commit
5. 1 person gets to push to main
HOMEWORK
(Optional) Work on CodeHS
Test next week!
Review slides