App SDK Updates

Over time, the FTC Engineering team updates the FTC App SDK with new features and fixes. Most of these changes are documented in the app’s Readme, which is shown on the front page of the GitHub repository. Be sure to check the version of the SDK you’re using before trying to use new features. Here is an overview of the important changes:

Version 3.1 (2017-05-09)

Version 3.0 and 3.1 came out in close succession for those of us who weren’t paying attention during and after the World Championships. The changes, however, are pretty significant:

Rev Expansion Hub Support

The application now supports the use of the Rev Robotics Expansion Hub, which is legal for the 2017-2018 season.

Motor Profiles

Previously, some of the PID motor modes depended on the use of the setMaxSpeed() method. This gave the motor controller an upper bound of the motor’s speed so that it could scale power appropriately. Now we give this information when the motor is configured on the robot controller phone, and the set/get methods no longer exist.

All Sources Published

The more curious among us will celebrate that the entire App SDK source is now available. Previously, a number of important classes were including in compiled form only, limiting the understanding we could gain by digging through the SDK’s source code. No more!

Sensor Changes

Now that the Rev Robotics Expansion Hub includes a Bosch BNO-055 IMU built-in, it doesn’t make sense to call it an “Adafruit” sensor. Some renaming has been done to the relevant classes, along with some changes to the communication methodology.

Robocol Changes

For the first time in a while, the way the robot controller and driver station apps communicate has changed. As a result, we need to upgrade the driver station to use the new software.

Version 2.62 (2017-01-07)

Versions 2.5, 2.6, and 2.61 fixed some bugs and added a number of features for the Blocks programming mode. Version 2.62 is most notable because it fixes an issue that caused the “OpMode stuck in loop()” error that plagued quite a few teams. This fix is described as “Changes to enhance Modern Robotics USB protocol robustness.” If you are curious, there is more information about what was happening here.

Version 2.4 (2016-11-13)

There are plenty of updates to the Blockly programming mode, along with a few bug fixes. Notably, hitting “Cancel” while editing a robot configuration file will work in a more predictable manner. Most importantly, however, the robot controller log files will contain a lot more information if the program ends unexpectedly. This is in response to a rash of “OpMode stuck in loop()” errors that occur without much log information. There’s also a way to transfer the logs off of the robot controller phone so that we can examine these new messages.

If you’re experiencing the “OpMode stuck in loop()” errors, you may want to read this.

Version 2.3 (2016-10-05)

Most of the changes in this release are bug fixes and updates for the Blockly programming mode. However, they updated the Vuforia library to close a security loophole, so you’ll want to pay attention to that.

Version 2.2 (2016-09-08)

This release focused on sensor implementations, which will make a number of sensors easier to use. There are now classes for:

  • Modern Robotics Compass & Acceleration Sensor
  • Modern Robotics Range Sensor (combined optical + ultrasonic)

Both of these are I2C sensors, so the implementations make them more accessible to teams who don’t want to dig into I2C reading and writing. There are sample OpModes available (SensorMRCompass and SensorMRRangeSensor). You can see the class implementations by right-clicking on ModernRoboticsI2cCompassSensor or ModernRoboticsI2cRangeSensor and selecting Go To > Implementation(s).

There are also a few additions to the web-based programming interface, Blockly, which may or may not interest you.

Version 2.1 (2016-09-03)

There’s a feature in this release that will excite quite a few teams: support for the Adafruit BMO055 IMU. This is a powerful sensor that can be difficult to use without digging into details of the I2C implementation. You should be aware that values return as special objects (i.e. class Acceleration), which you’ll need to query.

Version 2.0 (2016-08-19)

This is a huge release for the SDK. There’s a ton of updates — for a full list, read through the change log — so we’ll discuss some highlights here.

DC Motor Coasting

We can now change the behavior of a motor at zero power:

When the motor is told to setPower(0) , this will decide whether the motor actively brakes or allows the axle to coast to a stop.

DC Motor PID Modes

The DC motor “run modes” have been revamped entirely:

See the DC Motor Overview for more information on the run modes, as well as some warnings about the motor’s maximum speed. This also means that the way we reset encoders has changed:

Inside of the DC motor interface, there’s an important comment we should remember:

Further, it should be noted that setting a motor to STOP_AND_RESET_ENCODER  may or may not be a transient state: motors connected to some motor controllers will remain in this mode until explicitly transitioned to a different one, while motors connected to other motor controllers will automatically transition to a different mode after the reset of the encoder is complete.

So remember to set your run mode back after the encoders reset.

Vuforia Computer Vision

A computer vision SDK has been added in. The idea is that you can use images on the walls of the playing field to extrapolate your position and orientation on the field. We’ll need a license to use it, but developers are able to obtain licenses for free.

Blockly Programming Mode

There’s a new way to program the robot controller. In the robot controller menu, check out the “Programming Mode” option. We can use a web browser to create and manage programs on the controller.

Inspection Page

In the menu of either the robot controller or the driver station, checkout “Self Inspect.” Thanks to work by Team Hazmat (9277 and 10650), there is a nice inspection page that will help you get ready for field inspection. It will also help field inspection go much faster!

AJ Foster

AJ is a Field Technical Advisor in Orlando, FL. He enjoys teaching concepts related to the FIRST Tech Challenge, helping teams at competitions, and making the things he learns accessible to everyone.