FRC Programming Software Installation: Difference between revisions

From TrcWiki
Jump to navigation Jump to search
(Created page with "Before coming to the Programming class, you need to install the required software on your laptop. Please do this at home before coming to class. We do not want to dedicate class time to install software because they are time consuming and require downloading gigabytes of data from the Internet which would overwhelm our Internet bandwidth if all students were downloading at the same time. Therefore, please make sure you finish these tasks at home before coming to class....")
 
No edit summary
Line 1: Line 1:
Before coming to the Programming class, you need to install the required software on your laptop. Please do this at home before coming to class. We do not want to dedicate class time to install software because they are time consuming and require downloading gigabytes of data from the Internet which would overwhelm our Internet bandwidth if all students were downloading at the same time. Therefore, please make sure you finish these tasks at home before coming to class.
In this lesson, we will talk about installing Source Control Software as well as FRC Software Components.


The target audience of this Programming class is for students who already have basic knowledge of the Java language. The class is primarily designed for FRC although it is also applicable for FTC. Since the class is focused on teaching our TRC Library which is shared between FTC and FRC, you should be able to write code for both FTC and FRC robots with some minor differences.
== Source Control Software ==
In this document, we will talk about installing Source Control Software as well as FRC Software Components.
We use GitHub Desktop as our [https://en.wikipedia.org/wiki/Source_Code_Control_System source control] software that stores our source code on the Internet at GitHub.com (GitHub repositories). Follow these instructions to set up and install software to access our GitHub repositories.
Source Control Software
* Create a GitHub account if you do not already have one (https://GitHub.com).
We use GitHub Desktop as our source control software that stores our source code on the Internet at GitHub.com (GitHub repositories). Follow these instructions to set up and install software to access our GitHub repositories.
* Download and install the GitHub Desktop software from [https://desktop.github.com here].
Create a GitHub account if you do not already have one (GitHub.com).
* Start GitHub Desktop, click File->Clone repository...
Download and install the GitHub Desktop software from here.
* Select the URL tab and enter the repository URL: https://github.com/trc492/FrcTemplate.git
Start GitHub Desktop, click File->Clone repository...
* Enter the local path to clone the repository into. Please note that Windows may suggest cloning into your OneDrive folder. Unless you pay for huge storage on OneDrive, we recommend you change it to your local hard drive (e.g. C:\Users\<You>\Document\GitHub).
Select the URL tab and enter the repository URL:
https://github.com/trc492/FrcTemplate.git
Enter the local path to clone the repository into. Please note that Windows may suggest cloning into your OneDrive folder. Unless you pay for huge storage on OneDrive, we recommend you change it to your local hard drive (e.g. C:\Users\<You>\Document\GitHub).
   
   
Click the Clone button.
* Click the Clone button.
Congratulations! You have now successfully cloned the FrcTemplate repository.
Congratulations! You have now successfully cloned the FrcTemplate repository.
FRC Software Components
 
== FRC Software Components ==
To develop code for an FRC robot, you need to install the following software components:
To develop code for an FRC robot, you need to install the following software components:
1. Visual Studio Code: Integrated Development Environment (IDE)
# Visual Studio Code: Integrated Development Environment (IDE)
2. WPILib: Software Library provided by FIRST and WPI (Worchester Polytechnic Institute)
# WPILib: Software Library provided by FIRST and WPI (Worchester Polytechnic Institute)
3. Git Command Line Tools: Git command line tools (plug-in for Visual Studio Code)
# Git Command Line Tools: Git command line tools (plug-in for Visual Studio Code)
4. FRC Game Tools (Optional): Include Driver Station Software and RoboRio Imaging tool
# FRC Game Tools (Optional): Include Driver Station Software and RoboRio Imaging tool
5. 3rd-party Vendor Libraries: Libraries for 3rd party devices.
# 3rd-party Vendor Libraries: Libraries for 3rd party devices.
Visual Studio Code
 
=== Visual Studio Code ===
WPILib includes a version of Visual Studio Code for FRC. Therefore, by installing WPILib as described below, Visual Studio Code will be installed.
WPILib includes a version of Visual Studio Code for FRC. Therefore, by installing WPILib as described below, Visual Studio Code will be installed.
WPILib
WPILib

Revision as of 00:33, 21 June 2024

In this lesson, we will talk about installing Source Control Software as well as FRC Software Components.

Source Control Software

We use GitHub Desktop as our source control software that stores our source code on the Internet at GitHub.com (GitHub repositories). Follow these instructions to set up and install software to access our GitHub repositories.

  • Create a GitHub account if you do not already have one (https://GitHub.com).
  • Download and install the GitHub Desktop software from here.
  • Start GitHub Desktop, click File->Clone repository...
  • Select the URL tab and enter the repository URL: https://github.com/trc492/FrcTemplate.git
  • Enter the local path to clone the repository into. Please note that Windows may suggest cloning into your OneDrive folder. Unless you pay for huge storage on OneDrive, we recommend you change it to your local hard drive (e.g. C:\Users\<You>\Document\GitHub).
  • Click the Clone button.

Congratulations! You have now successfully cloned the FrcTemplate repository.

FRC Software Components

To develop code for an FRC robot, you need to install the following software components:

  1. Visual Studio Code: Integrated Development Environment (IDE)
  2. WPILib: Software Library provided by FIRST and WPI (Worchester Polytechnic Institute)
  3. Git Command Line Tools: Git command line tools (plug-in for Visual Studio Code)
  4. FRC Game Tools (Optional): Include Driver Station Software and RoboRio Imaging tool
  5. 3rd-party Vendor Libraries: Libraries for 3rd party devices.

Visual Studio Code

WPILib includes a version of Visual Studio Code for FRC. Therefore, by installing WPILib as described below, Visual Studio Code will be installed. WPILib Follow the instructions here to download and install WPILib. Git Command Line Tools Git command line tools allow you to perform Git operations within Visual Studio Code. You can download and install them from here. During the installation, it will ask you to select a lot of choices, just take all the defaults unless you know what you are doing. FRC Game Tools (Optional: You can skip this) This is optional unless you are using your laptop to drive/operate an FRC robot, or using your laptop to install the OS to the Robot Controller (RoboRIO). Generally, we use the team’s Driver Station laptop to drive/operate the robot, so there is no reason to install these tools on your laptop. If you want it, you can download and install the FRC Game Tools from here. 3rd-Party Vendor Libraries There are a few 3rd-party vendor libraries that we need. The number of vendor libraries depends on what hardware devices we are using for the season. Generally, we install the following libraries: • KauaiLabs_navX_FRC: Library for navX IMU (https://dev.studica.com/releases/2023/NavX.json) • CTRE-Phoenix: Library for CTRE motor controllers, PDP, PCM etc. (https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-frc2023-latest.json) • REV-Lib: Library for REV PDH, PCH, SparkMAX etc. (https://software-metadata.revrobotics.com/REVLib-2023.json) • Photon-Lib: OpenCV Vision Library (https://software-metadata.revrobotics.com/REVLib-2023.json) • PlayingWithFusion: Time Of Flight Range sensor (https://maven.photonvision.org/repository/internal/org/photonvision/PhotonLib-json/1.0/PhotonLib-json-1.0.json) • LibCu-Lib: Library for Laser Shark LiDAR (https://copperforge.cc/files/dev/vendordeps/LibCu-latest.json) 3rd-Party Vendor Libraries are installed per project, meaning they are installed for a particular project. If you have cloned the FrcTemplate project, the vendor libraries from the above list are already installed and checked into GitHub for the FrcTempalte project. In other words, by cloning the project, you already have the required Vendor Libraries you need. Nevertheless, the instructions for installing these libraries are included below for your reference if you ever want to install some other vendor libraries.

To install the vendor libraries above to Visual Studio Code, click the W enclosed within a red hexagon at the top right corner of Visual Studio Code.

Then select “WPILib: Manage Vendor Libraries”.

Then select “Install new libraries (online)”.

Then copy and paste one of the json URLs from the above list and hit enter.

Repeat these steps for each of the vendor libraries you want to install.