Installing Necessary Software - FRC Java Programming (frcteam3255.github.io)
Know the RoboRio webpage access: http://172.22.11.2/
Definitions: IN A NUTSHELL, Git is the software that does all the tracking of the different types of changes, Github hosts it online and makes it easier to collaborate and manage it, Github Desktop just helps run the different COMMANDS for Git but has a visual interface for it.
Git: used for tracking changes on files, this is normally used for programming but honestly can be used for anything. Git tracks specific changes and allows you to revert or try multiple things at the same time without ever losing your code. Git runs LOCALLY which means that it runs on your computer without the need for wifi. You can use Git by itself using COMMANDS in the TERMINAL.
Github: used for hosting REPOSITORIES which is basically just a codebase or a collection of files. Github uses the Git software and helps manage files online collaboratively. Github is actually online meaning you need wifi to run it and use it and it does not run LOCALLY.
Github Desktop: used for managing git visually. The TERMINAL can be scary when starting out and running COMMANDS can be unintuitive in large projects so Github Desktop does the exact same thing as COMMANDS but uses a visual interface for it so it's easier to manage.
There are alternatives to Github such as GitLab and Bitbucket. There are also alternatives to Github Desktop such as SourceTree and GitKraken. In a team, everyone has to settle for one Git hosting and collaboration software such as Github. BUT anyone can use whatever software they want to use and manage Git LOCALLY, so individually anyone can use Github Desktop, SourceTree, GitKraken or no software and they can just run COMMANDS if they wanted to.
Terminology:
Stage: Whenever you make a change and want it to be included in the COMMIT then you’re supposed to stage it, otherwise your changes will not be saved. Github Desktop does this automatically so you don’t have to worry about it if you’re using software like that.
Commit: basically just a milestone or a checkpoint for your code, it tracks all the changes you made and allows you to revert to it in the future if needed. Commits keep track of specific changes. Some people can commit with 1000 lines of new code or with 5 lines of new code. You commit after you make a change to the code and STAGE your changes. The number of commits is not necessarily a good indicator of progress being made. However, it's normally advised to commit frequently to keep track of changes in an organized matter.
Branch: Branching can be a little tricky to explain but essentially it's when there is a very basic version of the code and people want to work on different things on that code. So you take that code and “branch off” so people can work independently on their own branch and keep all their commits on their own, not interfering with other people’s work.
When you make a branch, you have to branch off ANOTHER branch.
All projects start with the MAIN branch (in Prosper Engineering we use PRODUCTION instead of MAIN).
When you branch off, you take the code from the branch you’re branching off of and now all commits on that branch are isolated from all other branches. This is quintessential for teams so code doesn’t conflict with each other.
Merge: When you are happy with the commits you made on a branch you can merge your branch. Say we started with a MAIN branch and we created an ARM branch and DRIVE branch off the MAIN branch. Now let's say we work on different branches and are happy with our code, we can MERGE our branches onto the MAIN branch so our code is unified and we can deploy on the robot as a whole codebase.
Push: A PUSH HAS TO BE DONE AFTER A COMMIT IN ORDER TO HAVE THE CHANGES BE “PUSHED” ONLINE. When you commit, you only keep track of the changes on git, but in order to add those changes online and allow other people to see it, you have to PUSH after every COMMIT.
Fetch: A fetch just checks if there have been any changes on the codebase so you can PULL new changes.
Pull: A pull is the opposite of a push, after you fetch, you can pull to take the code people edited from online and put it on your computer.
Github Talon Standard:
Fetch, commit, and push always before going home from practice -- never keep the latest version only on your local computer
Add/update comments to explain your code
Commit code under your own account/username
Keep a single copy of your local copy to maintain version control -- stay organized
Commit each functional change as you go using descriptive comments
Do not commit known broken code or code with compile errors
Commit working code with solid logic first, then commit the tuning changes as you go
Use a fork of the main repo if you want to experiment
Link: Github Concepts
Vex Robotics have test data on FRC motors can be found here (link)
Reference the charts to know how much to limit the current used by the motor to prevent burn out
Reference the chart to know how much torque or speed will be produced at a given current
In general, motors should be operated around the Max efficiency curve
Minimizes battery power usage and prevents brownouts on intense matches
Operates in the optimal region for max control of the motor output with precision by minimizing inertial ratio between the motor and the output (this is why you'll see teams with large chain sprockets and gear reductions -- it makes it very easy for the motor to manipulate the output without working too hard).
Operate closer to the max power curve if a lot of power is needed in the shortest amount of time
A good example for this was in Rapid React's (2022) climb requirement for the robot to lift up to 150 lbs across 4 bars in the shortest amount of time
Understand stator current limits vs supply current limits
Set stator limits to max before wheels start to slip
Good discussion on motor curves and current limits here (link)
Krakens (Store site: link)
The latest generation of high performance motors made by CTR Electronics
Always pay close attention to installation instructions. Hardware documentation can be found here (link) and also on the Swerve Drive Specialty (SDS) site (link)
Phoenix 6 software framework is used to control and configure all CTRE devices. Documentation can be found here (link)
NEO 1.1
Last generation's motor made by Rev Robotics
Documentation can be found here (link)
IMPORTANT: Watch Units! Default is meters+radians, not feet+degrees
364 BaseFalconSwerve: Gold standard swerve code -- adaptable for other motors and encoders
CTRE Swerve Generator: When using all Falcon/Kraken, Pigeon, and CanCoders
YAGSL (Yet Another Generic Swerve Library)
Good if mixing vendors (NEO Steer with Kraken Drive or CTRE CanCoder)
BroncBotz3481/YAGSL: Yet Another General Swerve Library (github.com)
A robot diagnostics, log review/analysis, and data visualization application
Reads logs in WPILOG, DS log, Hoot (CTRE), and RLOG file formats, plus live robot data viewing using NT4 or RLOG streaming
Mechanical-Advantage/AdvantageScope: Robot telemetry application (github.com)
A logging framework that records every input going into robot code to produce a diagnostic output simulation
Allows overlay of multiple input sources to see correlation between input and output (ie. proper shooter wheel spinup based on vision distance reading)
AdvantageKit/docs at main · Mechanical-Advantage/AdvantageKit (github.com)
Automating with Apriltags and Photonvision (video)
Vision Programming with Apriltags by FRC7028 (video) (slides)
Vision systems facilitate accurate positioning of the robot and it's mechanisms using a camera system to detect April Tags or objects
Photon Vision is an easy to use, open source vision system that can detect April Tags. Documentation can be found here (link)
Limelight 3/3G is another system that uses an all-in-one camera system to detect April tags as well. Documentation can be found here (link)
Object detection is another feature can be used to tell the robot where the next object is or how to refine its positioning for efficient object intaking
Firmware
WPILib/VSCode:
Update to new season
Convert previous year code to new season
Advanced Programming — FIRST Robotics Competition documentation (wpilib.org)
Java Programming Basics - FRC Java Programming (frcteam3255.github.io)
PIDs (PIDFs) Loops: A Primer - 6940 Swerve documentation (6940swerve-docs.readthedocs.io)
https://frc-radio.vivid-hosting.net/miscellaneous/network-assistant-tool