frc control system 2016 beta

31
Jeff Downs Jeff Downs Team 1511 – Rolling Team 1511 – Rolling Thunder Thunder http://penfieldrobotics.c om FRC Control System FRC Control System 2016 Beta 2016 Beta Rob Heslin Rob Heslin Team 340 – GRR Team 340 – GRR http://www.team340.org

Upload: gloria-rodgers

Post on 18-Jan-2018

221 views

Category:

Documents


0 download

DESCRIPTION

Forward Cautionary Note! All information based on Beta Testing done this fall We received beta versions of control system software and documentation Near end, docs and software are near final product We didn’t receive any game info or part legality information!! So….. Be sure to read the game and robot manual after kickoff!

TRANSCRIPT

Page 1: FRC Control System 2016 Beta

Jeff DownsJeff DownsTeam 1511 – Rolling ThunderTeam 1511 – Rolling Thunderhttp://penfieldrobotics.com

FRC Control System FRC Control System 2016 Beta2016 Beta

Rob HeslinRob HeslinTeam 340 – GRRTeam 340 – GRRhttp://www.team340.org

Page 2: FRC Control System 2016 Beta

Forward Cautionary Note!Forward Cautionary Note! All information based on All information based on Beta Testing Beta Testing

done this falldone this fall We received We received beta beta versions of control versions of control

system software and documentationsystem software and documentation Near end, docs and software are near final Near end, docs and software are near final

productproduct We didn’t receive any game info or part We didn’t receive any game info or part

legality information!!legality information!! So….. So…..

Be sure to read the game and Be sure to read the game and robot manual after kickoff!robot manual after kickoff!

Page 3: FRC Control System 2016 Beta

What we directly tested….What we directly tested…. Hardware:Hardware:

– New OpenMesh OM5P-AN RadioNew OpenMesh OM5P-AN Radio– New CTRE Magnetic EncoderNew CTRE Magnetic Encoder– Enhancements to Talon SRX functionalityEnhancements to Talon SRX functionality

Software:Software:– Updated NI Utilities for RoboRioUpdated NI Utilities for RoboRio– Updated Driver Station SoftwareUpdated Driver Station Software– C++ Updates to WPILibC++ Updates to WPILib

Page 4: FRC Control System 2016 Beta

Items We FollowedItems We Followed LabVIEW changesLabVIEW changes Java changesJava changes New Speed/Motor ControllersNew Speed/Motor Controllers Ancillary Software UtilitiesAncillary Software Utilities

– Robot Builder improvementsRobot Builder improvements– Robot Simulator improvementsRobot Simulator improvements– ““Smart Dashboard” and Network Tables Smart Dashboard” and Network Tables

updatesupdates– ““GRIP” Image processing softwareGRIP” Image processing software

Page 5: FRC Control System 2016 Beta

New 2016 RadioNew 2016 Radio OpenMesh OM5P-ANOpenMesh OM5P-AN (Probably) (Probably) requiredrequired for all for all

teams in 2016teams in 2016 Included in your 2016 Kit of Included in your 2016 Kit of

PartsParts 12V DC input12V DC input Power supply not included Power supply not included

in retail purchases!in retail purchases! Two (2) Ethernet portsTwo (2) Ethernet ports

Equivalent function once Equivalent function once FRC firmware is loadedFRC firmware is loaded

Page 6: FRC Control System 2016 Beta

New 2016 Radio - FunctionNew 2016 Radio - Function Similar in function to 2015’s DAP-1522Similar in function to 2015’s DAP-1522 Custom firmware will be supplied (and Custom firmware will be supplied (and

required) by FIRSTrequired) by FIRST 2.4 or 5 GHz operation, access point or bridge2.4 or 5 GHz operation, access point or bridge

– Most teams use AP mode at homeMost teams use AP mode at home Acts as DHCP serverActs as DHCP server Enforces bandwidth cap similar to Enforces bandwidth cap similar to

competition field!competition field!– All teams use Bridge mode at competitionAll teams use Bridge mode at competition– Mode swap done via configuration utility only! Mode swap done via configuration utility only!

No physical switch on back!No physical switch on back!

Page 7: FRC Control System 2016 Beta

New 2016 Radio - WiringNew 2016 Radio - Wiring Power from VRM module (NOT PD board!) as Power from VRM module (NOT PD board!) as

in 2015in 2015 2016 radio is 2016 radio is 12V12V! ! 2015’s DAP-1522 was 2015’s DAP-1522 was

5V!!5V!! Center pin on radio is Center pin on radio is positivepositive

Use one of the 12V / 2A

Terminal Pairs for this year’s

radio!

Do not use 5V terminals for this year’s radio! Old VRMs may have a sticker over one of these 5V terminals that says “Radio Power”. Remove it!!

Page 8: FRC Control System 2016 Beta

New 2016 Radio - SetupNew 2016 Radio - Setup Use the “FRC Radio Configuration Utility”Use the “FRC Radio Configuration Utility” Separate downloadSeparate download

– No longer included in NI Update SuiteNo longer included in NI Update Suite Performs 2 functions:Performs 2 functions:

– ConfigurationConfiguration Bridge / AP mode and 2.4/5 GHz band selectionBridge / AP mode and 2.4/5 GHz band selection WPA Key configurationWPA Key configuration Team # and IP configurationTeam # and IP configuration

– Firmware loadingFirmware loading Loads FRC-specific firmwareLoads FRC-specific firmware Resets radio to default values!Resets radio to default values!

Page 9: FRC Control System 2016 Beta

New 2016 Radio - SetupNew 2016 Radio - Setup

Page 10: FRC Control System 2016 Beta

New 2016 Radio – Setup New 2016 Radio – Setup Firmware LoadingFirmware Loading

Not neededNot needed for units received in Kit of for units received in Kit of Parts!Parts!

Use on externally purchased unitsUse on externally purchased units … … Or to reset the radio to default configOr to reset the radio to default config Laptop Ethernet Laptop Ethernet mustmust be plugged into radio be plugged into radio

port port furthest from the power supply!furthest from the power supply! Radio power must be Radio power must be unpluggedunplugged before before

initiating the firmware load!initiating the firmware load! MustMust do configuration step do configuration step afterafter every every

firmware load!firmware load!

Page 11: FRC Control System 2016 Beta

CTRE Magnetic EncoderCTRE Magnetic Encoder Rotational sensorRotational sensor Dual outputDual output

Absolute rotational positionAbsolute rotational position Quad Encoder-style relativeQuad Encoder-style relative

Mounts to popular transmissionsMounts to popular transmissions Wires direct to Talon-SRX speed controllersWires direct to Talon-SRX speed controllers

Uses fine-pitched non-FRC typical Uses fine-pitched non-FRC typical connectorsconnectors

Setup programmatically via CAN bus or Setup programmatically via CAN bus or using roboRIO web interfaceusing roboRIO web interface

Talon-SRX can use for closed-loop motor Talon-SRX can use for closed-loop motor controlcontrol

… … or read value back over CAN bus for or read value back over CAN bus for other useother use

Page 12: FRC Control System 2016 Beta

Motor ControllersMotor Controllers

Page 13: FRC Control System 2016 Beta

Hardware: Motor ControllersHardware: Motor Controllers All 2015 controllers remain supported in All 2015 controllers remain supported in

20162016

DiscontinuedDiscontinued devices: availability is left to devices: availability is left to team “recycling” and bartering!team “recycling” and bartering!

Device Availability (as of 1/7/16)

Notes

VeXPro Victor 888VeXPro Victor 884

FIRSTChoice: ~2000VeX: Discontinued

PWM only

VeXPro Jaguar Discontinued Formerly Texas InstrumentsPWM or CAN BusContains Serial-to-CAN bridge

Talon-SR Discontinued PWM onlyVictor-SP Active Production

In StockPWM only$59.99

Talon-SRX Active ProductionPre-Order only

CAN Bus or…PWM (less intuitive connection)$89.99

Page 14: FRC Control System 2016 Beta

Hardware: Motor ControllersHardware: Motor Controllers New New controllers for 2016controllers for 2016

For both of these devices….For both of these devices…. New designs New designs Use traditional PWM connectors and cablesUse traditional PWM connectors and cables Screw terminals for power input and outputScrew terminals for power input and output Feature forward/reverse limit switch connectionsFeature forward/reverse limit switch connections Physical brake/coast settingsPhysical brake/coast settings Passively cooled – no fans!Passively cooled – no fans!

Device Availability (as of 1/7/2016)

Notes

MindSensors.com SD540

Active ProductionIn Stock

PWM only$49.00

RevRobotics Spark

Active ProductionIn Stock

PWM only$45.00 Amazon Prime 2-day ship!

Page 15: FRC Control System 2016 Beta

MindSensors.com SD540MindSensors.com SD540

Page 16: FRC Control System 2016 Beta

RevRobotics SparkRevRobotics Spark

Page 17: FRC Control System 2016 Beta

Talon-SRX Software UpdatesTalon-SRX Software Updates Additional features added to Talon-SRXAdditional features added to Talon-SRX

Enabled via 2016 WPILib and Talon Enabled via 2016 WPILib and Talon Firmware upgradeFirmware upgrade

Benefits existing hardware! Just update Benefits existing hardware! Just update FW!FW!

Firmware included in NI Update packageFirmware included in NI Update package Update performed via roboRIO web Update performed via roboRIO web

interfaceinterface Enhanced roboRIO web interfaceEnhanced roboRIO web interface

SettingsSettings Diagnostic informationDiagnostic information

Magnetic Encoder supportMagnetic Encoder support

Page 18: FRC Control System 2016 Beta

Talon-SRX Software UpdatesTalon-SRX Software Updates Additional Closed Loop Control Modes:Additional Closed Loop Control Modes:

Voltage compensation (maintain output voltage)Voltage compensation (maintain output voltage) Target current (maintain output current)Target current (maintain output current) Motion profile: give a series of positions/velocities Motion profile: give a series of positions/velocities

and duration to maintainand duration to maintain More control of closed-loop operation:More control of closed-loop operation:

Set Min / Max output valueSet Min / Max output value Limit error value used as input to closed loop Limit error value used as input to closed loop

calculationcalculation Able to use alternate units: rotations and RPM vs. Able to use alternate units: rotations and RPM vs.

plain “counts” or “counts per minute”plain “counts” or “counts per minute” InformativeInformative and thorough software manual and thorough software manual

from manufacturer!from manufacturer!

Page 19: FRC Control System 2016 Beta

roboRIO UpdatesroboRIO Updates New firmware and image for 2016New firmware and image for 2016

– First: First: Update firmware via roboRIO web interfaceUpdate firmware via roboRIO web interface– Second: Second: Image roboRIO with new imageImage roboRIO with new image

mDNS name for roboRIO changed!mDNS name for roboRIO changed!– Name used to access roboRIO on network and web configName used to access roboRIO on network and web config– 2015: roborio-####.local 2015: roborio-####.local (#### is team number)(#### is team number)– 2016: roborio-####2016: roborio-####-frc-frc.local.local– To get to 1511’s roboRIO web interface in 2016: To get to 1511’s roboRIO web interface in 2016:

http://roborio-1511http://roborio-1511-frc-frc.local/.local/ Automatic program restartAutomatic program restart

– roboRIO will restart your program if it crashesroboRIO will restart your program if it crashes– Intended to help during competition matchesIntended to help during competition matches

Page 20: FRC Control System 2016 Beta

WPILib Updates: C++ & JavaWPILib Updates: C++ & Java NetworkTables rewriteNetworkTables rewrite

– Underpinnings of “Smart Dashboard” Underpinnings of “Smart Dashboard” communicationcommunication

– Core feature set & purpose is relatively unchangedCore feature set & purpose is relatively unchanged– Fixes many, many, many, many bugsFixes many, many, many, many bugs– Enhanced performanceEnhanced performance– New feature allows table values to be written New feature allows table values to be written

periodically to roboRIO storageperiodically to roboRIO storage– Some API changes to be more user friendlySome API changes to be more user friendly

Digital filtering classes addedDigital filtering classes added– DigitalGlitchFilter: ignore pulses < “x” time periodDigitalGlitchFilter: ignore pulses < “x” time period– LinearDigitalFilter: high & low pass, moving averageLinearDigitalFilter: high & low pass, moving average

Page 21: FRC Control System 2016 Beta

WPILib Updates: C++ & JavaWPILib Updates: C++ & Java SpeedController classes (Jaguar, Talon, etc.)SpeedController classes (Jaguar, Talon, etc.)

– Option added to invert output polarity!Option added to invert output polarity! Gyro restructuringGyro restructuring

– Gyro class is now simply an interface - old Gyro Gyro class is now simply an interface - old Gyro class is now known as AnalogGyroclass is now known as AnalogGyro

– Digital gyro implementations will share Gyro Digital gyro implementations will share Gyro interfaceinterface

– Calibration now separate from initializationCalibration now separate from initialization– Calibration parameters can be set by user, Calibration parameters can be set by user,

rather than calculatedrather than calculated

Page 22: FRC Control System 2016 Beta

WPILib Updates: C++ & JavaWPILib Updates: C++ & Java RobotBase initialization changesRobotBase initialization changes

– 2015: prestart() function could be overridden to do 2015: prestart() function could be overridden to do initialization required before the robot would tell the initialization required before the robot would tell the Driver Station that it is “ready” to play matches. Driver Station that it is “ready” to play matches. robotInit() was sometimes invoked after this “ready” robotInit() was sometimes invoked after this “ready” signal was given.signal was given.

– This caused confusion and inconsistency across This caused confusion and inconsistency across frameworks.frameworks.

– 2016: prestart() is removed. robotInit() is now always 2016: prestart() is removed. robotInit() is now always invoked before giving the DS the “ready to play” signalinvoked before giving the DS the “ready to play” signal

PID-related updatesPID-related updates– Much easier to specify a minimum PID outputMuch easier to specify a minimum PID output– Improved support for velocity-oriented PID controlsImproved support for velocity-oriented PID controls

Page 23: FRC Control System 2016 Beta

WPILib Updates: C++ OnlyWPILib Updates: C++ Only Toolchain support for newer C++ revisions (C+Toolchain support for newer C++ revisions (C+

+11, C++14)+11, C++14) Increased use of C++ constructs across WPIlib:Increased use of C++ constructs across WPIlib:

– Shared_ptr and unique_ptr instead of “plain” pointersShared_ptr and unique_ptr instead of “plain” pointers– Some use of templates, mostly with STL classesSome use of templates, mostly with STL classes– STL classes, notably std::string, vector, thread typesSTL classes, notably std::string, vector, thread types

Task, Notifier, and synchronization typesTask, Notifier, and synchronization types– Each of these were substantially reworkedEach of these were substantially reworked– Old code using these may need significant portingOld code using these may need significant porting

Porting guide has details on all 2016 changes!Porting guide has details on all 2016 changes!

Page 24: FRC Control System 2016 Beta

LabVIEW ChangesLabVIEW Changes LabVIEW 2015-basedLabVIEW 2015-based

New “Command and Control” frameworkNew “Command and Control” framework– Inspired by the C++/Java “Command based” Inspired by the C++/Java “Command based”

frameworkframework– Optional – traditional framework remainsOptional – traditional framework remains

Page 25: FRC Control System 2016 Beta

Software UtilitiesSoftware Utilities Robot Builder: updatedRobot Builder: updated

– New: Parameterized commandsNew: Parameterized commands– New: Drag & Drop command group creationNew: Drag & Drop command group creation– New: CAN-based Talon-SRX controlNew: CAN-based Talon-SRX control– New: Plug-in system for user-supplied custom controlsNew: Plug-in system for user-supplied custom controls– Bug fixesBug fixes

Smart Dashboard: updatedSmart Dashboard: updated– Uses rewritten Network Tables: enhanced reliability/performanceUses rewritten Network Tables: enhanced reliability/performance– LiveWindow Widgets for tuning of PID parameters used with closed LiveWindow Widgets for tuning of PID parameters used with closed

loop control on CAN-based Jaguars and Talon-SRXsloop control on CAN-based Jaguars and Talon-SRXs FRCSim: updatedFRCSim: updated

– New: supports import of Solidworks model for simulationNew: supports import of Solidworks model for simulation GRIP: New image processing utility using OpenCVGRIP: New image processing utility using OpenCV

– GUI setup of image processing to be done on robotGUI setup of image processing to be done on robot

Page 26: FRC Control System 2016 Beta

Driver Station SoftwareDriver Station Software Similar to 2015 in function and UISimilar to 2015 in function and UI New messages interface on main screenNew messages interface on main screen

– Shows errors only by default (similar to 2015)Shows errors only by default (similar to 2015)– Can show user-supplied print outs from robot code Can show user-supplied print outs from robot code

(printf/cout/System.out.print)(printf/cout/System.out.print)– Can also open a separate, resizable “Console” window to Can also open a separate, resizable “Console” window to

show user printsshow user prints

Supports communicating with older (pre 2015, Supports communicating with older (pre 2015, cRIO-based) robots – must set protocol setting on cRIO-based) robots – must set protocol setting on each run!each run!

Page 27: FRC Control System 2016 Beta

Software: System Software: System RequirementsRequirements

Some software components of the control system Some software components of the control system will function on non-Windows computerswill function on non-Windows computers Driver station software and most NI-provided tools require Driver station software and most NI-provided tools require

Windows!Windows! Radio configuration utility requires WindowsRadio configuration utility requires Windows

Windows 7, 8, 8.1, and 10 have been testedWindows 7, 8, 8.1, and 10 have been tested XP will XP will notnot work! work!

roboRIO web interface requires Microsoft SilverlightroboRIO web interface requires Microsoft Silverlight Web interface access is a must for basic configuration of Web interface access is a must for basic configuration of

roboRIO (firmware loading, device setup, diagnostic)roboRIO (firmware loading, device setup, diagnostic) Silverlight plug-in support was Silverlight plug-in support was removedremoved in recent in recent

versions of Chromeversions of Chrome A non-Chrome browser that supports SilverLight is A non-Chrome browser that supports SilverLight is

required required (Internet Explorer probably is best choice for this)(Internet Explorer probably is best choice for this)

Page 28: FRC Control System 2016 Beta

Software Installation Software Installation PackagingPackaging

Installation Steps based on Programming LanguageInstallation Steps based on Programming Language LabVIEW teams:LabVIEW teams:

Install LabVIEW from Kit DVD or Internet DownloadInstall LabVIEW from Kit DVD or Internet Download Install NI FRC Update SuiteInstall NI FRC Update Suite

C++ teams:C++ teams: Download and install C++ “Toolchain” Download and install C++ “Toolchain” Download and install Java JDK from Oracle (not a typo!)Download and install Java JDK from Oracle (not a typo!) Download and install Eclipse IDEDownload and install Eclipse IDE Install FRC Plug-ins into EclipseInstall FRC Plug-ins into Eclipse Install NI FRC Update Suite Install NI FRC Update Suite Installing anything from LabVIEW DVD is not necessary Installing anything from LabVIEW DVD is not necessary

this yearthis year Java Teams:Java Teams:

Same as C++, but without C++ toolchain installSame as C++, but without C++ toolchain install All Teams:All Teams: Download and install radio configuration utility! Download and install radio configuration utility!

Page 29: FRC Control System 2016 Beta

Software Installation Software Installation PackagingPackaging

Installing for Driver Station only? (no programming)Installing for Driver Station only? (no programming) Install NI Update SuiteInstall NI Update Suite Done!Done!

Keeping up to date:Keeping up to date: NI Updates provide updated tools and roboRIO NI Updates provide updated tools and roboRIO

imagesimages C++ and Java plug-ins updated directly from C++ and Java plug-ins updated directly from

Eclipse “Check for Updates” featureEclipse “Check for Updates” feature Whenever you update eitherWhenever you update either roboRIO Image roboRIO Image

or C++/Java plug-ins, or C++/Java plug-ins, be sure the versions be sure the versions are meant to work togetherare meant to work together

Easy rule: if you update one, check updates for Easy rule: if you update one, check updates for the other!the other!

Page 30: FRC Control System 2016 Beta

2016 Quick Start2016 Quick Start1.1. Read the documentation! Read the documentation! http://wpilib.screenstepslive.com2.2. Wire up control systemWire up control system

• Remember! Radio power this year is 12V!Remember! Radio power this year is 12V!3.3. Setup programming computer (prior slides)Setup programming computer (prior slides)4.4. Update roboRIO using Update roboRIO using USB connection onlyUSB connection only

1.1. Update firmware via roboRIO web interface – note: recent Update firmware via roboRIO web interface – note: recent versions of Chrome will no longer work!versions of Chrome will no longer work!

2.2. Image using roboRIO imaging toolImage using roboRIO imaging tool5.5. Java users only: download and install Java for roboRIO using Java users only: download and install Java for roboRIO using

provided utilityprovided utility6.6. Setup robot radio using the 2016 toolSetup robot radio using the 2016 tool7.7. Deploy a simple program from one of the examplesDeploy a simple program from one of the examples8.8. Run Driver Station software and setup team #Run Driver Station software and setup team #9.9. Verify basic functionVerify basic function

Page 31: FRC Control System 2016 Beta

Download URL:http://penfieldrobotics.com/controlsystem-

2016.ppt