1 / 32

2009 FRC Control System

2009 FRC Control System Software Overview Dave Doerr, Mentor, Team 67 November 15, 2008 Software Overview Developing Programs (C/C++) Developing Programs (LabVIEW) WPI Robotics Libraries Downloading and Debugging The cRIO Imaging Tool The Dashboard Choosing LabVIEW or C++ References

jacob
Télécharger la présentation

2009 FRC Control System

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. 2009 FRC Control System Software Overview Dave Doerr, Mentor, Team 67 November 15, 2008

  2. Software Overview • Developing Programs (C/C++) • Developing Programs (LabVIEW) • WPI Robotics Libraries • Downloading and Debugging • The cRIO Imaging Tool • The Dashboard • Choosing LabVIEW or C++ • References • Recommendations • Robot Operating Modes

  3. Software OverviewDeveloping Programs (C/C++) • Developing C/C++ Programs • WindRiver Workbench 3.0 Eclipse-based Embedded Software Toolset • Software Project Management • Editor • Debugger • GNU C++ Compiler for PowerPC32 • Console Terminal • FIRST Downloader • Default Robot Code: Arcade/Tank Drive • Other Example Code: Gyro, Vision

  4. Software OverviewDeveloping Programs (C/C++)

  5. Software OverviewDeveloping Programs (LabVIEW) • Developing LabVIEW Programs • LabVIEW 8.5, FRC Edition 2009 • National Instruments “G” Programming Language • LabVIEW Projects • Debugging via .vi Front Panel • Default Robot Code: Arcade/Tank Drive • Other Example Code: Gyro, Vision…

  6. Software OverviewDeveloping Programs (LabVIEW)

  7. Software OverviewThe WPI Robotics Libraries • Software Development Cycle • Create Source Code • Build and Download Executable to RAM • Run and Debug • LabVIEW Input/Output Available on vi Front Panel • C++ WindRiver Debugger • C++ Output Available in Console • Download Debugged Executable to Flash • Reboot cRIO • Power Cycle or CTRL-X in Terminal • Run

  8. Software OverviewThe WPI Robotics Libraries • An extensive set of high-level control system building blocks to make robot programming easier. • Most of the work of interfacing to robot components is already complete. • Sensors, Actuators, IO, Driver Station, Utilities • Open Source • Library can be used as-is in “black box” mode. • Library can be customized. • To be further developed by the FIRST-community • Default Robot: Run out-of-the-box • Default Dashboard • Demo Programs: Gyro, Vision, Tracking …

  9. Software OverviewThe WPI Robotics Libraries • Sensors • Accelerometer, Encoder, Gear Tooth, Gyro, Compass, I2C, Ultrasonic • Actuators • Compressor, Motor (Victor, Jaguar), Relay, Servo, Solenoid • I/O • Analog Channel, Analog Trigger, Digital Input, Digital Output, PWM

  10. Software OverviewThe WPI Robotics Libraries • Driver Station • Joystick (Complete set of Axes and Buttons), Analog Input, Digital Input, Digital Output, Driver Display, Mode, Alliance, Battery Voltage, Dashboard • Utility • Counter, PID, Drive (Tank, Arcade, Holonomic), Time, cRIO LED, cRIO Temperature • Vision • Camera, Tracking, Image Processing

  11. Software OverviewThe WPI Robotics Libraries Worcester Polytechnic Institute

  12. Software OverviewDeploying and Debugging • Deploying (temporary) • Code is loaded to cRIO RAM and run by: • White Arrow (LabVIEW) • Run Kernel Task ( C/C++, WindRiverWorkBench) • Deploying (permanent) • Code is loaded to cRIO flash memory by: • Set as Startup (LabVIEW) • FIRST >> Download ( C/C++, WindRiver Workbench) • Code will automatically run on cRIO reboot. • Undeploy (delete permanent code) • Code is erased from cRIO flash memory by: • Unset as Startup (LabVIEW) • FIRST >> Undeploy( C/C++, WindRiver Workbench)

  13. Software OverviewDeploying and Debugging • Debugging (LabVIEW) • Controls and Indicators can be used to provide real-time input and output on a VI Front Panel • Debugging ( C/C++, WindRiver WorkBench) • Debug Kernel Task • Console Output (printf) via ethernet (wired or wireless) • Console Output via cRIO Serial Port • Diagnostic output can be sent to the cRIO serial port and viewed in a another window or on another computer. The connection to the serial port can be wired or bluetooth. • cRIO Console Output Switch set to ON

  14. Software OverviewDeploying and Debugging • cRIO Serial Port: 9600 Baud • PC Terminal: Hyperterm, Tera Term, … • http://www.logmett.com/forum/index.php • RS232 Crossover Cable Or • Firefly Bluetooth “Cable”

  15. Software OverviewFirefly Bluetooth Serial Adapter • Class 1: 100m Range • Works with Class 1 or Class 2 on PC • Class 1 Needed on PC for 100m Range • Operates on 5v from Power Distribution Board • Purchase Power Connector Plug (Radio Shack 274-1571) • DB9 Connector • Female Preferred • Male Needs Gender Changer • www.bluetooth-firefly.com • GC-BT-BLUEPORT DCE (female) • www.sparkfun.com • WRL-08495, (male)

  16. Software OverviewFirefly Configuration • cRIO serial port is DTE @ 9600 Baud • Set Switches 1,2,3 off and Switch 4 on • Firefly should be configured as DCE • Male DB9 Connector Model • Jumper Pins 1-3, 2-4, 6-8, 5-7 • Female DB9 Connector Model • Jumper Pins 1-3, 2-4, 5-6, 7-8

  17. Software OverviewcRIO Imaging Tool Before use, the cRIO must be “imaged” by loading the VxWorks operating system, filesystem, FPGA code and the FIRST configuration files that determine whether LabVIEW or C++ will be used. The cRIO Imaging Tool is used to “Image” and name the cRIO and set the cRIO IP address. The tool is also used to select whether LabVIEW or C++ will be used for programming. This can be done at any time without re-imaging the cRIO.

  18. Software OverviewcRIO Imaging Tool

  19. Software OverviewThe Dashboard • A LabVIEW vi that runs on a PC that is connected to the Driver Station. • Can display and analyze data from the robot. • Can display and analyze images from the robot’s camera • A default version is supplied, or a custom dashboard can be built by the user.

  20. Software OverviewThe Dashboard

  21. Software OverviewLabVIEW or C++ ?? • About LabVIEW • Laboratory Virtual Instrumentation Engineering Workbench • Dataflow Programming Language for Measurement and Automation • A Programming Environment • Specific Range of Use • Data Acquisition • Instrumentation Control • Industrial Automation • Functions are Virtual Instruments or VIs • Block Diagram • Front Panel • Connector Panel / Icon • VIs can be debugged with real-time I/O on the Front Panel.

  22. Software OverviewLabVIEW or C++ ?? • About LabVIEW • Hardware Support for Sensors, Actuators, etc. • Libraries • WPI Robotics • Mathematics • Vision • Signal Processing • Data Communications • Signal Generation • Control (PID) • Easy to create small programs • Skill needed to create large, complicated programs • Extra effort needed to document programs • National Instruments Proprietary

  23. Software OverviewLabVIEW or C++ ?? • About C++ and WindRiver Workbench • Developed as an enhancement to C, “C with Classes” • A General Purpose Middle Level Language • Wide Range of Use • Operating System • Embedded Controller • Server-Client (High Performance) • Entertainment Software (Video Games) • … • WindRiver Workbench is a toolset to develop, build, debug and manage embedded software.

  24. Software OverviewLabVIEW or C++ ?? • About C++ and WindRiver Workbench • Libraries • WPI Robotics (including PID Control and Vision) • Easy to create small programs • Skill needed to create large, complicated programs • ISO-ANSI Standard • Compilers available for purchase or as shareware

  25. Software OverviewLabVIEW or C++ ?? • Questions to Ponder • Are you interested in software primarily as a means to an end, for example, to create a champion robot? • Or are you interested in software for its own sake. Do you love programming and computers? • Are you primarily interested in software engineering?? • Or are you primarily interested in another discipline that might involve testing, such as electrical or mechanical engineering?

  26. Software OverviewReferences ISBN 0-596-00983-6 ISBN 0-13-185672-3

  27. Software Overview References ISBN 0-201-72148-1 ISBN 0-201-37926-0

  28. Software Overview References ISBN 0-13-110370-9 ISBN 0-201-53992-6

  29. Software OverviewLinks http://forums.usfirst.org/ 2009 Control System Information 2009 Control System Beta Test Public Forum Learn about cRIO Learn LabVIEW WindRiver Workbench Evaluation Learn C++

  30. Software OverviewRecommendations • Spend time at http://forums.usfirst.org/ • Download the WindRiver Workbench Evaluation and learn how to use it. • Download LabVIEW from 2009 Control System Information and learn how to use it. • Plan to try out both LabVIEW and C++/WindRiver Workbench. The default code for both is easy to figure out if you Read the Directions. • Pay the $60 and get your kit early. • Call us if you need help.

  31. Software Overview Robot Operating Modes • Disabled Mode: Before a match begins, robot outputs (motors) are not active. Robots can be programmed to initialize. Driver controls are active. • Autonomous Mode: During the first 15 seconds of a match, driver inputs (joysticks) are not active. Robots can be programmed to use outputs (motors) and sensor inputs (encoders, gyros) for autonomous operation. • Teleoperated Mode: During the remaining 120 seconds of a match, all inputs and outputs are active. Robots are programmed for driver control.

  32. Software Overview ?

More Related