1 of 22

StuySplash 2022 - Beta Testing

Upcoming software changes for the FRC 2022 season

2 of 22

What is Beta Testing?

Beta testing is the process of working with new or updated software to document any bugs or to suggest improvements.

Every year, FIRST releases new versions of software (WPILib, FRC Game Tools) to teams who have registered for beta testing. Their job is to install and work with the software and report their experience to FIRST through task reports.

3 of 22

Installation

Beta software/files are released through TeamForge (https://usfirst.collab.net)

  • Installer for WPILib Java/C++ and LabVIEW
  • FRC Game Tools
  • CTRE and REV libraries
  • roboRIO images for flashing

4 of 22

Overview

A general overview of known issues and a complete list of changes can be found here:

https://tinyurl.com/frc-2022

The documentation for the most recent WPILib java version of the beta (currently 2022.1.1 Beta 3) can be found here:

https://tinyurl.com/beta-j

Alternatively, the C++ version can be found here:

https://tinyurl.com/beta-c

5 of 22

Major Changes

  • Drive class functions no longer invert the right side by default. Instead use setInverted.
  • VSCode no longer allows for the old Command-Based template. Instead migrate to the new Command-Based template.
  • Similarly, the IterativeRobot template has been removed. Instead use the TimedRobot template.

6 of 22

General Library Changes

  • Updated Mechanism2d with support for NetworkTables.
  • Added a TimesliceRobot template.
  • Added a C++ TankDrive template.
  • Added a PS4Controller controller class.
  • Added a Debouncer class for Java/C++.
  • Added a PneumaticHub class for use with REV Pneumatics Hub.

7 of 22

General Library Changes

  • Methods in the XboxController class no longer take arguments. Instead use the appropriate method.
    • Ex: controller.getTriggerAxis(GenericHID.Hand.kLeft) -> controller.getLeftTriggerAxis();
  • getInstance() methods in CameraServer, DriverStation, LiveWindow, Preferences, SendableRegistry have been deprecated and replaced with static functions.
  • Timer::HasPeriodPassed() and Timer.hasPeriodPassed() have been deprecated. Instead use AdvanceIfElapsed().

8 of 22

Breaking Changes

  • PDP has been renamed to PowerDistribution.
  • Classes like Solenoid and Compressor that utilize Pneumatic Control Modules now require a PneumaticsModuleType of CTREPCM or REVPH.
    • CTRE specific methods have been moved to PneumaticsControlModule, and REV specific methods have been moved to PneumaticHub.

9 of 22

Breaking Changes cont.

  • Sendable has been split into NetworkTable and non-NetworkTable components to make it easier for 3rd party libraries to integrate Sendable.

  • InterruptableSendableBase has been split into AsynchronousInterrupt and SynchronousInterrupt.
    • AsynchronousInterrupt and SynchronousInterrupt should be passed through rather than extend DigitalInput.

10 of 22

Breaking Changes cont.

  • SpeedController has been renamed to MotorController and moved to a motorcontrol package.
  • Duplicate SpeedController (now MotorController) methods have been removed.
    • setSpeed -> set, setDisable -> disable
    • position, bounds, periodMultiplier, zerolatch, and raw methods have been removed. These methods can be accessed through the PWM class.
  • Various DriverStation In[Mode] functions have been renamed.
    • InDisabled -> inDisabled

11 of 22

Breaking Changes cont.

Several features marked for deprecation from previous years have been removed.

  • wpilibj.cameraserver has been removed. Instead use cameraserver.
  • RobotDrive has been removed. Instead use DifferientialDrive.
  • GearTooth has been removed. Instead us Counter.
  • C++: WPILib.h has been removed.

12 of 22

Breaking Changes cont.

Main C++ changes

  • DriverStation.ReportWarning and DriverStation.ReportError have been removed. Instead use FRC_ReportError in frc\Errors.h
    • frc::err:Error, frc::warn:Warning
  • wpi::StringRef has been replaced with std::string_view
  • wpi::ArrayRef has been replaced with wpi::span
  • wpi::Twine has been replaced with fmtlib
  • wpi::sys::path has been replaced with fs::path

13 of 22

Breaking Changes cont.

Various C++ classes have been migrated to use units

14 of 22

Package Renames

  • Some packages from wpilibj have migrated to math
    • controller, estimator, geometry, kinematics, math, spline, system, trajectory
  • wpiutil.math has been moved to math
  • wpiutil is now util
  • SlewRateLimiter, LinearFilter, and MedianFilter have been moved to math.filters
  • Timer has been moved from frc2 to frc
  • Motor controllers have been moved to a motorcontrol package
  • edu.wpi.cscore has moved to edu.wpi.first.cscore

15 of 22

Miscellaneous Changes

  • Shuffleboard
    • Added Field2d widget
    • Icons for widget layouts, titles for widgets
    • Fixed issues with CameraServer streams
    • Ease of use changes
  • GradleRIO
    • Updated to version 7.2
    • Ease of use changes
    • Deployment is more customizable
  • cscore
    • Updated OpenCV version to OpenCV4

16 of 22

Miscellaneous Changes cont.

  • OutlineViewer
    • Discontinued Java version, updated to be C++ based
  • VSCode
    • Added a project importer for the 2022, which will only import 2020/2021 projects
    • Removed Eclipse Project importer
  • RobotBuilder
    • Improved C++ type detection
    • Fixed imports

17 of 22

New/Heavily Modified Features

  • SysId
    • Characterization tool for simple motor setups, drivetrains, amrs, and elevators
    • Supersedes frc-characterization, which has been discontinued
    • Interface, advanced graphing analytics, Romi integration

What is characterization?

Characterization is the processing of mathematically modelling the behavior of a system. For FRC, we can use this to characterize motors and figure out the required input voltage to achieve desired velocity/acceleration outputs.

18 of 22

New/Heavily Modified Features cont.

  • Axon
    • Machine-learning based computer vision
    • Alternative to Limelight and reflective tape
    • Trained to detect type of object and provide predictions

19 of 22

New/Heavily Modified Features cont.

  • Installation
    • Axon Launcher
    • Docker Desktop
    • Supervise.ly
  • Testing/Inferencing onto a Raspberry Pi/Robot
      • Upload zipped dataset file into Web-interface
      • Provided Python script outputs inference data over NetworkTables
      • Data is sent in a JSON string to the ML/detections NT entry

20 of 22

New/Heavily Modified Features cont.

  • Record a 1-5 minute video of the object and import to Supervise.ly to create a dataset
  • Google’s Open Images dataset

21 of 22

New/Heavily Modified Features cont.

  • Upload dataset to Axon to train the neural network

22 of 22

New/Heavily Modified Features cont.

  • After training the network, you can export a model to be used for testing.
  • The test model can be used to annotate a video.
  • The annotated video can then be uploaded and used with the provided Python script to be utilized.