This page provides resources and information to get started programming on FIRST Robotics Competition Team 95, The Grasshoppers.
To join these, you may need to speak with a coach.
- Our Slack: https://ghoppers.slack.com/
- Our Github: https://github.com/first95/
- Our mailing list: https://groups.google.com/forum/#!forum/first95
- Our calendar: https://calendar.google.com/calendar/embed?src=team95.admin%40gmail.com&ctz=America%2FNew_York
We use a programming language called Java to tell the robot what to do.
To get a quick introduction to Java, try one of the following websites. They have some examples that can be run directly from your web browser, and thus require no special software setup.
These tutorials are also useful, but require you to have Java installed on your computer. Try them out after installing Java and Eclipse (see below).
- https://docs.oracle.com/javase/tutorial/java/index.html
- http://www.java-made-easy.com/java-for-beginners.html
If you want a fun application of Java, you can make robots and fight them -- your own, others, or example -- using RoboCode. You can find it here: https://robocode.sourceforge.io/ Download the jar, and the only other thing you need is the JDK (Java Dev Kit) or JRE (Java Runtime Environment).
- Note, if you have problems compiling where it says it succeeded but is 0 bytes, you may need to follow the information at the following link to add the JDK or JRE to your system path, and then run Compiler --> Options --> Reset Compiler in RoboCode's editor: http://robowiki.net/wiki/Robocode/System_Requirements#PATH_must_be_set
Team 3255 has made a tutorial including accompanying PDF/slides and code for learning the basics of programming an FRC robot with Java. The main page is here. The PDF slides are here. Note that the slides are not complete and don't include everything shown in the outline, but they're a nice start with background info like a brief description of the RoboRio, the sensors commonly used, and some high-level info on Java, in addition to detailed info on how to make a basic driving robot. You can also access/download several versions of their code to try it out or compare it to what you make based on their PDF instructions -- see the README on the main page for links to that code.
- Find the Hartford High School root certificate authority file. Ask a coach for it.
- Right-click on the file and click "Install". The Certificate Import Wizard should appear.
- Click "Next".
- Select "Place all certificates in the following store".
- Click "browse". Select "Trusted Root certification authorities" and click "ok".
- Click "Next" and "yes" to all remaining prompts.
- Tell your computer to connect to the WiFi. Ask a coach for the username and password.
- You will see a Windows Security alert, saying "The Credentials provided by the server could not be validated". Click "connect" anyway.
If you have a personal laptop, it's great to use it for programming the robot. If you don't have one, you can use one of the team's laptops.
We use the following software tools. None of them cost money, so if you're asked for payment at any point, you've reached the wrong place.
- The Java Developer Kit (JDK) ** Lindsay: I think the desired version of Java is now provided with the rest of the FIRST tools so I don't think this needs to be done separately. If you wish to do it separately, version 11 is probably the right one so do similar to below but for that version. **
- Java's naming convention is confusing. What you want to download is the JDK for Java SE, version 8. Version 9 is not yet supported on the robot, as of 2017. Java versions often look like "8u144", which just means the 144th update to Java 8.
- Download here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Go to the Java SE 8 section (it'll be labeled something like "Java SE 8u144")
- Click "download" under the "JDK" section
- Click "Accept License Agreement"
- Click "Windows x64", unless you know otherwise
- All of the FIRST software and files
- Copy the directory "2020 Offline Install Prep" from the Wall USB drive
- Follow the instructions here: https://docs.wpilib.org/en/latest/
- Complete instructions listed here: http://wpilib.screenstepslive.com/s/4485/m/13503/l/599679-installing-eclipse-c-java
- You can skip any instructions labeled "For C++ teams"
- Your computer is probably 64-bit; choose "64 bit" whenever given the choice.- The FRC update suite, which contains resources that our code uses to control the robot
- GitHub, a website for a Software Version Control system called git
- This website.
- Make an account, and email your username to one of the programming coaches. He or she will add you to the team's account, so that you can edit code stored here.
- Please keep in mind that your username is visible to the world. Your email address is the only piece of information that GitHub will keep private, so don't put anything up there that you don't want shared.
- Never put passwords in files, issues, or commit messages on GitHub
- Even without an account, anyone can see our code. Take a look if you like:
- Click "Commits" to see the work history in any repository
- Click "Issues" to see the plans for upcoming work
- SourceTree, a user interface for a Software Version Control system called git, to store our code and share it among teammates
- You can download it for free here: https://www.sourcetreeapp.com/
- You may need to create an Atlassian account to download the installer. Alternatively, there's often someone on the team who has the file lying around, and can give it to you.
- Once you install SourceTree, give it the credentials for your GitHub account. This will permit you to make changes to code stored on GitHub.
- Remember that anything you put in a file or commit message in SourceTree will normally become publicly visible on GitHub.
- We use the branching structure you see here: https://nvie.com/posts/a-successful-git-branching-model/
- The CTRE Toolsuite, which includes libraries to communicate with parts on the robot (Specifically the Talon SRX)
- Download and install the most recent stable installer for the CTRE Toolsuite here: http://www.ctr-electronics.com/control-system/hro.html#product_tabs_technical_resources
We also sometimes use these tools:
- PuTTY, a Windows desktop client for the Secure SHell (SSH) remote access protocol, to configure and debug the robot
- Download it here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- The website has a rather '90s vintage look to it, but remains one of the top SSH clients for Windows
- FileZilla, a Windows desktop client for the Secure File Transfer Protocol (SFTP), to access files store on the robot
- Download it here: https://filezilla-project.org/download.php
- Some information on computer networking as used on the robot is available here
- Instructions on how to upgrade robot firmware are here
- Instructions on how to configure the radio: https://docs.wpilib.org/en/latest/docs/getting-started/getting-started-frc-control-system/radio-programming.html Note that the WiFi must be disabled, really disabled. Go to Control Panel ->Network and Sharing Center -> Network Connections. Then right click on the Wi-Fi interface and make sure you select "Disable". Then from a command line run 'netsh interface show interface' and it should show Admin State as Disabled for WiFi. This info is courtesy of the response from coach_zac in this thread https://www.chiefdelphi.com/forums/showthread.php?t=141688 In configuration screen, put in team name, robot name, limit BW, and no firewall.
- The robot control system is documented here: https://docs.wpilib.org/en/latest/
- The Talon SRX Software Manual is available as a pdf here: http://www.ctr-electronics.com/talon-srx.html#product_tabs_technical_resources
- We often use a control method known as a PID controller. https://www.csimn.com/CSI_pages/PIDforDummies.html
- OpenCV, the Open Computer Vision library, used to give the robots sight.
- Projective Geometry, the mathematical model behind many of OpenCV's operations.
- Kalman filters