1 of 14

2018 FRC Controls Software

Beta Test Report

2 of 14

Environment

  • Visual Studio Code
  • FRC/WPLIB plug-ins
  • CTRE plug-ins
  • NI Suite Updates
  • Did not test Kauai Labs plug-ins as we no longer use the NavX]
  • 7 Laptops used for testing
  • Utilized 2 Tile Runners (software test robots with RoboRio running a CAN TalonSRX-based drive and various sensors)
  • Didn’t get to the point of testing with previous competition robots.

3 of 14

Installation

  • Nice that everything installs in order, so screensteps should be easier
  • Some post installation setup (e.g. manage vendor libraries)
    • Right click under build.gradle and select manage vendor libraries. It will allow you to select the installed CTRE (and KauaiLabs extensions)

​

4 of 14

5 of 14

Installation

  • Early on there were many installation issues:
    • 7 laptops and many differences in the installed environment
      • Picked up other environments which caused issues with Intellisense and/or Gradle builds
        • RobotC used for Demonstration Robots
        • Visual Studio C# environment used with hero board development
        • Other C++ environments
      • Latest installation seemed to go smoother, however, it wasn’t published until after the holiday break, so limited testing.

6 of 14

Installation

  • Learn how to modify build.gradle
  • Early on, it would pick up other environments by default causing weird build and intellisense errors. Examples:
    • Indicate it couldn’t find a header, but could open the definition
    • Editor would indicate a header wasn’t found, but building would find it
    • Many laptops had environments for our demonstration robots:
      • RobotC for VEX-based robots
      • Visual Studio with C# for HERO board-based robots
      • These environments caused dependencies to be put in build.gradle that were wrong
      • Refreshing the environment would re-add these
        • Many times this would occur multiple times an hour

​

7 of 14

Installation Fixes

  • Provided in early December which broke the Vendor library integrations
  • This wasn’t fixed until mid to late December
    • From the limited testing after that point, the Intellisense/Build issues seemed to be fixed (not all laptops tested this as we were on Christmas break by that point).

​

​

8 of 14

build.gradle

sources.cpp {

source {

srcDir 'src/main/cpp'

// we use a thirdparty opensource library for parsing

// xml files, so we put it in a different folder, so it

// needs to get built

srcDir 'src/main/thirdparty'

// Restrict what files get built (default is everything)

include "**/*.c"

include "**/*.cc"

include "**/*.cpp"

include "**/*.cxx"

​

}

​

9 of 14

build.gradle

exportedHeaders {

srcDir 'src/main/include'

// Add xml parsing includes

srcDir 'src/main/thirdparty'

if (includeSrcInIncludeRoot) {

srcDir 'src/main/cpp'

}

// restrict what header files are exported

include "**/*.h"

include "**/*.hpp"

include "**/*.hxx"

}

​

10 of 14

Visual Studio Code

  • Basic functions are either keyboard shortcuts or buried on a large command palette (I was having flashbacks to learning LabView)
    • Good for power users
    • Harder for less experienced users) or is buried on a large command palette.
    • Extensions might help (didn’t explore)

​

11 of 14

Other Editors

  • We didn’t get to explore other editors, but this may be something we explore before kick-off
    • Chief Delphi had a thread about using Eclipse as an editor and VS Code to set up and build projects
    • JetBrains CLion’s latest version supports C++ Gradle projects

12 of 14

Code Changes

  • Most includes were deprecated are replaced by once that had frc/ in front
    • Instead of:
    • #include <AnalogInput.h>
    • #include <frc/AnalogInput.h>
  • New methods for adding auton choices to the smart dashboard.
  • Overall, getting existing code to compile was pretty straightforward once the intellisense issues were resolved (before this you were never sure if it was finding the includes or not)
  • Iterative Robot was deprecated in the latest build
    • Switched to timed robot

13 of 14

Compiling

  • Overall, it seemed to take longer
  • Once it was built and incremental changes were being made, the times improved and probably surpassed the previous environment.
  • Didn’t have the unexplainable 3 errors that were always present when a project was opened.

14 of 14

Imaging Hardware

  • CTRE’s has a new tool for setting IDs, loading Firmware, etc.
    • Can load firmware on all devices of the same type at once (much faster and cleaner)
    • Latest update had some more diagnostic tools, but we haven’t had a chance to try it yet
  • NI
    • RoboRio Imaging tool initially gave errors
    • Loaded LabView on the computer fixed the problem
    • Other teams also reported problems, but some teams did not (seems like a random error)
    • Latest version doesn’t feed the watchdog properly when a motor is stopped, so you need to send 0.0 each loop