1 / 40

US First Kickoff 2012 Software Programming

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

euclid
Download Presentation

US First Kickoff 2012 Software Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. US First Kickoff 2012Software Programming (And Control System) Daniel Kohn University of Memphis

  2. What will be presented…… • For Everyone • Classmate Updates / Install Veteran Teams • Changes from Last Year Rookie Teams • General intro • programming options

  3. 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!

  4. 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)

  5. Veteran Teams

  6. New with LabVIEWin 2012

  7. 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

  8. 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.

  9. Probe Window • A window that lists every open probe. • Creating a probe normally will open the window and apply future probes to the window.

  10. 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.

  11. 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.

  12. Driver Station • New E-Stop • # Diagnostics Tab • Kinect Skeleton

  13. 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.

  14. # 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.

  15. Kinect Skeleton • New tab for viewing Kinect data. • Shows joints, as well as x, y, z coordinates of arms.

  16. Hardware • cRIO–II • 2012 Jaguar

  17. 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.

  18. 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)

  19. 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.

  20. 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.

  21. 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)

  22. 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

  23. Making Connections-Network CAN optional Pit tethering Optional FRC I FRC II CAN optional Both

  24. Making Connections - Power Optional 24v

  25. Rookie Teams

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

  27. 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)

  28. 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

  29. Sample LabVIEW Code

  30. 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

  31. C/C++ Disadvantages • In the past there has been Licensing issues!

  32. Sample C/C++ Code

  33. 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.

  34. Java Disadvantages • Newest Language (only the 3rdyear offered) • Least amount of help/info available

  35. Sample Java Code

  36. 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)

  37. Keep Current • A common rookie mistake is not to keep the software up to date. • Check the 2012 software update website often.

  38. 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)

  39. 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

  40. Presentation • This presentation will be posted at: http://memphisfirstteams.org/

More Related