© 2018  7203 KNO3  Robotics

  • YouTube Social  Icon
  • Twitter Social Icon
  • Facebook Social Icon

Getting started with the FTC SDK

 

An overview of the FTC SDK, installation and creating your first autonomous and tele-op programs.

Autonomous/Teleop Transitioner

Introduction

New to the 2017-2018 season, there is only 5 seconds between the end of the hands-off autonomous period, and the beginning of the driver-controlled teleop period. This leaves very little time for the drive team to pick up their controllers, and even less time for the coach to change the program, initialize it, and make sure everything is working. In order to make this transition faster for the drive team, we have created a tool to automate the process of selecting a teleop program and initializing it.

 

 

Usage

Using this utility is very simple, and only takes one line of code to be inserted into your autonomous OpModes. To get it set up, follow the following steps:

  1. Copy the AutoTransitioner.java file into your package (default is org.firstinspires.ftc.teamcode)

  2. Note the exact name of your teleop program; it can be found in your @TeleOp annotation.

    1. For example, if your annotation reads @TeleOp(name = "Robot Teleop") then the name is Robot Teleop.

  3. Type AutoTransitioner.transitionOnStop(this, "<Program Name Here>"); into your autonomous program, preferably during the initialization part.

    1. For LinearOpModes, type the line just before waitForStart();

    2. For OpModes, type the line at the end of your init() method.

    3. For example, if your program name is Robot Teleop, type:

                   AutoTransitioner.transitionOnStop(this, "Robot Teleop");

 

And that's it! When your autonomous program next stops, whether it be because of the stop button being pressed or the 30-second timer hitting zero, the specified teleop program will automatically be selected and initialized. All you have to do it hit play!

 

Disclaimer

This utility uses a field in the OpMode class specifically marked "this is logically an internal field. DO NOT USE". It is possible that using this causes some form of instability, and you should use it at your own risk. So far, this utility has only been tested on ZTE Speed phones. However, it is a fairly simple process and should be stable.

Download

Contains the AutoTransitioner.java class and example programs.

Example