SkyStone
FTC SDK
Install / Use
/learn @FIRST-Tech-Challenge/SkyStoneREADME
NOTICE
This repository contains the public FTC SDK for the SKYSTONE (2019-2020) competition season. If you are looking for the current season's FTC SDK software, please visit the new and permanent home of the public FTC SDK:
Welcome!
This GitHub repository contains the source code that is used to build an Android app to control a FIRST Tech Challenge competition robot. To use this SDK, download/clone the entire project to your local computer.
Getting Started
If you are new to robotics or new to the FIRST Tech Challenge, then you should consider reviewing the FTC Blocks Tutorial to get familiar with how to use the control system:
Even if you are an advanced Java programmer, it is helpful to start with the FTC Blocks tutorial, and then migrate to the OnBot Java Tool or to Android Studio afterwards.
Downloading the Project
If you are an Android Studio programmer, there are several ways to download this repo. Note that if you use the Blocks or OnBot Java Tool to program your robot, then you do not need to download this repository.
- If you are a git user, you can clone the most current version of the repository:
-
Or, if you prefer, you can use the "Download Zip" button available through the main repository page. Downloading the project as a .ZIP file will keep the size of the download manageable.
-
You can also download the project folder (as a .zip or .tar.gz archive file) from the Downloads subsection of the Releases page for this repository.
Once you have downloaded and uncompressed (if needed) your folder, you can use Android Studio to import the folder ("Import project (Eclipse ADT, Gradle, etc.)").
Getting Help
User Documentation and Tutorials
FIRST maintains online documentation with information and tutorials on how to use the FIRST Tech Challenge software and robot control system. You can access this documentation using the following link:
Note that the online documentation is an "evergreen" document that is constantly being updated and edited. It contains the most current information about the FIRST Tech Challenge software and control system.
Javadoc Reference Material
The Javadoc reference documentation for the FTC SDK is now available online. Click on the following link to view the FTC SDK Javadoc documentation as a live website:
Documentation for the FTC SDK is also included with this repository. There is a subfolder called "doc" which contains several subfolders:
- The folder "apk" contains the .apk files for the FTC Driver Station and FTC Robot Controller apps.
- The folder "javadoc" contains the JavaDoc user documentation for the FTC SDK.
Online User Forum
For technical questions regarding the Control System or the FTC SDK, please visit the FTC Technology forum:
Release Information
Version 5.5 (20200824-090813)
Version 5.5 requires Android Studio 4.0 or later.
New features
- Adds support for calling custom Java classes from Blocks OpModes (fixes SkyStone issue #161).
- Classes must be in the org.firstinspires.ftc.teamcode package.
- Methods must be public static and have no more than 21 parameters.
- Parameters declared as OpMode, LinearOpMode, Telemetry, and HardwareMap are supported and the argument is provided automatically, regardless of the order of the parameters. On the block, the sockets for those parameters are automatically filled in.
- Parameters declared as char or java.lang.Character will accept any block that returns text and will only use the first character in the text.
- Parameters declared as boolean or java.lang.Boolean will accept any block that returns boolean.
- Parameters declared as byte, java.lang.Byte, short, java.lang.Short, int, java.lang.Integer, long, or java.lang.Long, will accept any block that returns a number and will round that value to the nearest whole number.
- Parameters declared as float, java.lang.Float, double, java.lang.Double will accept any block that returns a number.
- Adds telemetry API method for setting display format
- Classic
- Monospace
- HTML (certain tags only)
- Adds blocks support for switching cameras.
- Adds Blocks support for TensorFlow Object Detection with a custom model.
- Adds support for uploading a custom TensorFlow Object Detection model in the Manage page, which is especially useful for Blocks and OnBotJava users.
- Shows new Control Hub blink codes when the WiFi band is switched using the Control Hub's button (only possible on Control Hub OS 1.1.2)
- Adds new warnings which can be disabled in the Advanced RC Settings
- Mismatched app versions warning
- Unnecessary 2.4 GHz WiFi usage warning
- REV Hub is running outdated firmware (older than version 1.8.2)
- Adds support for Sony PS4 gamepad, and reworks how gamepads work on the Driver Station
- Removes preference which sets gamepad type based on driver position. Replaced with menu which allows specifying type for gamepads with unknown VID and PID
- Attempts to auto-detect gamepad type based on USB VID and PID
- If gamepad VID and PID is not known, use type specified by user for that VID and PID
- If gamepad VID and PID is not known AND the user has not specified a type for that VID and PID, an educated guess is made about how to map the gamepad
- Driver Station will now attempt to automatically recover from a gamepad disconnecting, and re-assign it to the position it was assigned to when it dropped
- If only one gamepad is assigned and it drops: it can be recovered
- If two gamepads are assigned, and have different VID/PID signatures, and only one drops: it will be recovered
- If two gamepads are assigned, and have different VID/PID signatures, and BOTH drop: both will be recovered
- If two gamepads are assigned, and have the same VID/PID signatures, and only one drops: it will be recovered
- If two gamepads are assigned, and have the same VID/PID signatures, and BOTH drop: neither will be recovered, because of the ambiguity of the gamepads when they re-appear on the USB bus.
- There is currently one known edge case: if there are two gamepads with the same VID/PID signature plugged in, but only one is assigned, and they BOTH drop, it's a 50-50 chance of which one will be chosen for automatic recovery to the assigned position: it is determined by whichever one is re-enumerated first by the USB bus controller.
- Adds landscape user interface to Driver Station
- New feature: practice timer with audio cues
- New feature (Control Hub only): wireless network connection strength indicator (0-5 bars)
- New feature (Control Hub only): tapping on the ping/channel display will switch to an alternate display showing radio RX dBm and link speed (tap again to switch back)
- The layout will NOT autorotate. You can switch the layout from the Driver Station's settings menu.
Breaking changes
- Removes support for Android versions 4.4 through 5.1 (KitKat and Lollipop). The minSdkVersion is now 23.
- Removes the deprecated
LinearOpModemethodswaitOneFullHardwareCycle()andwaitForNextHardwareCycle()
Enhancements
- Handles RS485 address of Control Hub automatically
- The Control Hub is automatically given a reserved address
- Existing configuration files will continue to work
- All addresses in the range of 1-10 are still available for Expansion Hubs
- The Control Hub light will now normally be solid green, without blinking to indicate the address
- The Control Hub will not be shown on the Expansion Hub Address Change settings page
- Improves REV Hub firmware updater
- The user can now choose between all available firmware update files
- Version 1.8.2 of the REV Hub firmware is bundled into the Robot Controller app.
- Text was added to clarify that Expansion Hubs can only be updated via USB.
- Firmware update speed was reduced to improve reliability
- Allows REV Hub firmware to be updated directly from the Manage webpage
- Improves log viewer on Robot Controller
- Horizontal scrolling support (no longer word wrapped)
- Supports pinch-to-zoom
- Uses a monospaced font
- Error messages are highlighted
- New color scheme
- Attempts to force-stop a runaway/stuck OpMode without restarting the entire app
- Not all types of runaway conditions are stoppable, but if the user code attempts to talk to hardware during the runaway, the system should be able to capture it.
- Makes various tweaks to the Self Inspect screen
- Renames "OS version" entry to "Android version"
- Renames "WiFi Direct Name" to "WiFi Name"
- Adds Control Hub OS version, when viewing the report of a Control Hub
- Hides the airplane mode entry, when viewing the repo
