400 likes | 553 Views
US First Kickoff 2012 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. Classmate PC. Rookie Teams
E N D
US First Kickoff 2012Software 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
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!
Classmate PC • See handout “Updating the CTL Classmate PC” for how to load up the software from the USB Thumb Drive provided in the KOP • Note: Make sure you get the right USB Thumb Drive for your Classmate (E09 For Veteran Teams E11 for Rookie Teams)
New Version Of LabVIEW • Upgrading from LabVIEW 8.6 to LabVIEW 2011 • New Features • VI Snippets • Probe Window • Changes to Begin.vi • Kinect driving code
VI Snippets • A built-in screenshot capture in LabVIEW. • Highlight section, then go to Edit>Create VI Snippet from Selection. • File saves as .png. • Dragging picture into block diagram will paste the code.
Probe Window • A window that lists every open probe. • Creating a probe normally will open the window and apply future probes to the window.
Changes to Begin.vi • Modules are now numbered by instance of that module. • In a typical setup of 1 Digital, 1 Analog, and 1 Solenoid, each module is known as the 1st of its kind.
Basic Kinect Driving Code • Kinect treats your arms as two joysticks, and is configured for basic tank drive. • Your left arm maps to axis 2, and your right arm maps to axis 4. • While testing, remember to limit your motor output.
Driver Station • New E-Stop • # Diagnostics Tab • Kinect Skeleton
New E-Stop • No physical E-stop button needed for testing. • Spacebar now acts as E-stop, disabling robot and requiring a manual reboot. • Enter is the new disable button.
# Diagnostics Tab • New Driver Station tab. • Collects data from robot and graphs. • Adjustable graph (information, color, graph-line type) • Graphs Packet loss, packet trip time, robot voltage, and robot CPU.
Kinect Skeleton • New tab for viewing Kinect data. • Shows joints, as well as x, y, z coordinates of arms.
Hardware • cRIO–II • 2012 Jaguar
cRIO-II • 4 module slots, 1 Ethernet port, 1 serial I/O port. • Cameras now plug in through the gaming adapter. • DIP switches now activate through the Imaging Utility.
2012 Black Jaguar • Same model, different firmware. • Optional built-in ramp mode (524 steps per millisecond, 0.125 seconds from -1 to +1) • Available by aligning jumper pins horizontally (opposite of picture)
cRIO Imaging Utility • Now displays model of cRIO currently connected. • DIP switches can be toggled here. • Shows installed location of modules. • Only accepts modules in specific order (1-Digital, 2-Analog, 3-Solenoid, 4-Any module) • A cRIO-I is seen as two cRIO-II’s glued together.
Kinect • Will only run on computers with Windows 7. • Both the Windows Kinect SDK and Microsoft Visual Express are required on the Driver Station. • KinectServer.exe runs in the background of the Driver Station, converting Kinect data to Driver Station data.
Kinect Driving Positions • Neutral (both arms at 0) • Full Forward (left arm at 1, right arm at 1) • Full Reverse (left arm at -1, right arm at -1)
Other Notes • Programming in C++ and Java pretty much the same as last year • WPILib only modified slightly (mostly to do with 4 or 8 slot cRIO) • Sorry – could not find anything on how the Kinect is integrated to C++ or Java
Making Connections-Network CAN optional Pit tethering Optional FRC I FRC II CAN optional Both
Making Connections - Power Optional 24v
Programming Options • LabVIEW • C/C++ • Java
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 build in documentation (help on every VI)
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 (better in 2011) • Programmers (those who know standard programming languages) have a hard time with the graphical nature of LabVIEW
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
C/C++ Disadvantages • In the past there has been Licensing issues!
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.
Java Disadvantages • Newest Language (only the 3rdyear offered) • Least amount of help/info available
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)
Keep Current • A common rookie mistake is not to keep the software up to date. • Check the 2012 software update website often.
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)
Thanks to….. • The Fighting PI (Team 1718) • http://www.fightingpi.org/first-robotics-competition/ • Hauppauge Robotic Eagles (Team 358) • Bill’s Blog • http://frcdirector.blogspot.com/ • FRC Website • http://www.usfirst.org/Default.aspx
Presentation • This presentation will be posted at: http://memphisfirstteams.org/