US First Kickoff 2013 Software Programming

32
US First Kickoff 2013 Software Programming (And Control System) Daniel Kohn University of Memphis

description

US First Kickoff 2013 Software Programming. (And Control System) Daniel Kohn University of Memphis. What will be presented……. For Everyone Classmate Updates / Install. Veteran Teams Changes from Last year. Rookie Teams General intro programming options. - PowerPoint PPT Presentation

Transcript of US First Kickoff 2013 Software Programming

Page 1: US First Kickoff  2013 Software Programming

US First Kickoff 2013Software Programming

(And Control System)

Daniel KohnUniversity of Memphis

Page 2: US First Kickoff  2013 Software Programming

What will be presented……

Veteran Teams• Changes from Last

year

Rookie Teams• General intro

programming options

For Everyone• Classmate Updates / Install

This is NOT intended to TEACH you how to program, just give you an overview of the control system and programming changes from last year and to show the various programming options teams have.

Page 3: US First Kickoff  2013 Software Programming

Classmate PC• Rookie Teams

There will probably be NO Software loaded on the Classmate when you get it.

• Veteran Teams Classmates (driver station NetBook) will be re-

imaged. – BACKUP FIRST!

Page 4: US First Kickoff  2013 Software Programming

Classmate PC (Rookie Teams)• See handout, but start at the section

“Applying the Image” on page 9 for how to load up the software from the USB Thumb Drive provided in the KOP.

Page 5: US First Kickoff  2013 Software Programming

Classmate PC (Veteran Teams)• You will have to follow the Handout from Page 1. It

steps you though: Downloading 7zip and RMprepUSB (software

you need to create the image) Selecting and downloading the image Creating the USB Thumb drive to install from The installation process

• you need a 8Gbyte USB Thumb Drive or larger

Page 6: US First Kickoff  2013 Software Programming

VETERAN TEAMS

Page 7: US First Kickoff  2013 Software Programming

New with LabVIEW in 2013

Page 8: US First Kickoff  2013 Software Programming

LabVIEW• Still LabVIEW 2011• New Features

More options when starting a new robot project– Arcade drive, Mecanum Drive, Arcade Drive with Arm– Simulation Available (BUT….)– [DEMO]

Easier to add information to Driver Station Dashboard– New “Dashboard” Library

Page 9: US First Kickoff  2013 Software Programming

LabVIEW• New Features

Debugging– Project Performance Measure

> TOOLS | Profiles | Profile Performance and Memory

– Log Viewer Installed to startup menu (hidden last year)

– Elapsed Times VI (help debug timing issues)> Place anywhere to measure time to run code.> Use control space shortcut then look for “Elapsed Times.VI”

NOT “Elapsed Time”– Drive Safety can be disabled (and also adjust timeout)

Page 10: US First Kickoff  2013 Software Programming

LabVIEW• Help | Explain Error

Lets you type in an error code and get more info

Page 11: US First Kickoff  2013 Software Programming

LabVIEW Seminar• NI is sending out trainers to Quick Builds to

do LabVIEW for FRC Training• NI is coming to the Memphis Quick Build

next week (Jan 12). All teams are welcome to attend the seminar.

Page 12: US First Kickoff  2013 Software Programming

Java and C++• Biggest change is Robot BUILDER (Java or C)

Wizard that lets you define robot systems and builds system code for you.

http://wpilib.screenstepslive.com/s/3120/m/7882/l/88538-overview-of-robotbuilder

Generates I/O Wiring table for you Will keep your code intact even if changes are made via

Robot Builder – so long is code is placed outside of comments “Begin Autogenerated Code” and

“End Audogenerated Code” Smart Dashboard – lets you test sub systems (great for in PIT

testing)

Page 13: US First Kickoff  2013 Software Programming

C/C++Install• Unlike Java who’s install is straight forward,

C/C++ has issues Make sure to read the instructions carefully

when installing. 2 Disk install – if you answer questions

incorrectly during the install of the first disk, C will not function properly and you will have to uninstall and start again!

Page 14: US First Kickoff  2013 Software Programming

Hardware• Radio

All teams getting a D-Link DAP 1522 Rev B WARNING – This looks very similar to the old radio used

last year, but you MUST USE THIS RADIO

12v to 5v Power Converter STILL NEEDED

Page 15: US First Kickoff  2013 Software Programming

Hardware• Talon Motor Controller • Victor 888

Victor 884 still legal

Page 16: US First Kickoff  2013 Software Programming

ROOKIE TEAMS

Page 17: US First Kickoff  2013 Software Programming

Programming Options• LabVIEW• C/C++• Java

Page 18: US First Kickoff  2013 Software Programming

LabVIEW - Advantages• Made By National Instruments (NI)

Makers of the cRIO Control system• Graphical Programming Language• Lots of support on line in forums and from NI

NI is a huge supporter of FRC and FIRST• Lots of built in documentation (help on every VI,

examples for every sensor/system)• Now includes a robot simulation tool for off robot

testing

Page 19: US First Kickoff  2013 Software Programming

LabVIEW - Disadvantages• Many windows need to be opened to do

anything (hard to do on the Classmate)• Hard to find things the first time you need

them.• Programmers (those who know standard

programming languages) have a hard time with the graphical nature of LabVIEW

Page 20: US First Kickoff  2013 Software Programming

Sample LabVIEW Code

Page 21: US First Kickoff  2013 Software Programming

C/C++ Advantages• Common programming language

Mentors and students might be more comfortable with C/C++ if they programmed in C before

• Many books on C/C++ (but NOT the specifics for FRC teams)

• Mentors and students who know C/C++ will have a shorter learning curve

Page 22: US First Kickoff  2013 Software Programming

C/C++ Disadvantages• Licensing issues!• Installation issues (discussed previously)• Rumor has it C/C++ support might end in

2015

Page 23: US First Kickoff  2013 Software Programming

Sample C/C++ Code

Page 24: US First Kickoff  2013 Software Programming

Java Advantages• Uses NetBeans (commonly used by

programmers)• Mentors and students who know Java

already will have a very short learning curve.• All public domain – no licensing issues in off

season and no registration required.

Page 25: US First Kickoff  2013 Software Programming

Java Disadvantages• Newest Language (only the 4rd year offered)

Page 26: US First Kickoff  2013 Software Programming

Sample Java Code

Page 27: US First Kickoff  2013 Software Programming

Robot Builder• With the introduction of Robot Builder, Java

and C/C++ will be easier to use for teams who have programming mentors who know those languages (in the past many mentors could not get over the issues of defining robot hardware, this is now done in Robot Builder)

Page 28: US First Kickoff  2013 Software Programming

Where to Start• Basic code

Each language has basic robot code or templates available

Don’t be afraid to search the internet, some teams post code from previous years!

• HINT: the basic code usually uses the standard wiring (don’t deviate from the standard wiring or code will not work)

Page 29: US First Kickoff  2013 Software Programming

Keep Current• A common rookie mistake is not to keep the

software up to date.• Check the 2013 software update website

often.

Page 30: US First Kickoff  2013 Software Programming

Other Comments• If you are NOT using LabVIEW, you will need some

of the files included with the LabVIEW Install

• You will probably want to do your programming on a computer with a bigger screen (laptop)

• If you plan to use the Robot Simulator in LabVIEW, you will need a Laptop with higher specifications

Page 31: US First Kickoff  2013 Software Programming

Thanks to…..• FRC Blog

http://www.usfirst.org/roboticsprograms/frc/blog

• FRC Website http://www.usfirst.org/roboticsprograms/frc

• National Instruments https://decibel.ni.com/content/community/first

• WPI http://wpilib.screenstepslive.com/s/3120

Page 32: US First Kickoff  2013 Software Programming

Presentation• This presentation will be posted at:

http://memphisfirstteams.org/