Autonomous Navigation Workshop
Download
Report
Transcript Autonomous Navigation Workshop
Mechanics of LabVIEW
Workshop
January 10, 2009
Farmingdale State College
SPBLI - FIRST
Mark McLeod
Advisor
Hauppauge Team 358
Northrop Grumman Corp.
[email protected]
Agenda
Architecture
Project from Scratch
Default Framework
– Basic
– Advanced
Typical Operations
Mechanics of Downloading
FRC Palette Overview
Download Programs & Test
2009 Control System
Software
(check periodically for latest update)
Robot Programming
– Wind River Workbench
– LabVIEW
PC Dashboard
– LabVIEW
FRC cRIO Imaging Tool --Apply updates to the
cRIO
Setup Axis Camera --Create FRC user account
Vision Assistant –Play with camera vision
Architecture
Hardware Layers
–
–
–
–
FPGA
PowerPC
Modules
Breakout Bumpers/Sidecar
Software Layers
–
–
–
–
FPGA code
vxWorks
WPILib
User Code in LabVIEW or C++
Project From Scratch
Limited by lack of Robot Mode function, but
works for Basic Teleop
Create a vi
– Structure
Open -> Loop -> Close
Create a project
Basic Tasks
• Watchdog
• Driver Station
Communication
• Compressor
• Solenoid control
Drives
• Teleop Tank Drive
• Teleop Arcade Drive
Miscellaneous
• Driver Station Custom Inputs
• Button Toggle
Default Frameworks
A Framework is required for full functionality
Basic
– Basic Robot Main.vi
– Drive loop
– Camera loop
– Periodic loop
– Autonomous Independent.vi
Advanced
– Team Code
Begin.vi
Teleop.vi
Vision Processing.vi
Autonomous Iterative.vi or Autonomous Independent.vi
Periodic Tasks.vi
Modifying the Framework
What’s Missing:
Tank Drive
– Drive loop or Teleop.vi
Compressor & solenoid control
– Compressor in periodic
– Solenoid control in Drive loop or Teleop.vi
Manipulator and other unique controls
– Their own loop or vi
Sample Autonomous
LabVIEW Kills Autonomous Independent.vi at the end of autonomous mode
Downloading or Running a
Project
Run
– Used to test & debug using your PC
– Temporarily executes your code
– Gone after a reboot
– Can disable Downloaded code, so test
reboot
Download/Deploy
– As a stand-alone application
– Must reboot to take affect
My Computer
Target
For programs that run on your PC
Dashboard template
What it does
How to customize the default Dashboard
– DS Digital/Analog input display
– Digital Sidecar PWMs, Relays, DIO
– Analog/Solenoid
FRC-cRIO-358 (10.3.58.2)
Target
For Robot programs
Build Specifications
– Run as Startup
– Build/Deploy
Cautions
Set the cRIO as a LabVIEW environment
If you get conflict messages when “Running”, then the
formerly deployed code will execute on reboot
Development is still underway, so expect the process and
behavior to change somewhat
Careful when relocating LabVIEW projects due to relative
directory paths.
Examples are not setup to download as stand-alone
applications, but “Run” works
Must use delay in master While loop to avoid running as
fast as possible and sucking up the CPU
Must use WATCHDOG as of Update 2
“Run” must be done from RobotMain.vi
FRC Palette Overview
WPILib
–
–
–
–
–
–
–
–
Robot Drive
Sensors
Actuators
I/O
Driver Station
Camera
Communications
Utilities
FIRST Vision
– Image Management
– Intensity
Measurement
– Particle Analysis
– Image
Enhancement
– Image Conversion
– Display Interaction
FRC WPI Palettes
Robot Drive
FRC WPI Palettes
Sensors
FRC WPI Palettes
Actuators
FRC WPI Palettes
I/O
FRC WPI Palettes
Driver Station
FRC WPI Palettes
Camera
FRC WPI Palettes
Communications
FRC WPI Palettes
Utilities
FIRST Vision Palettes
Programming Palettes
Where to Find Further
Information
NI FIRST forum:
http://decibel.ni.com/content/community/
first
Video Tutorials
– http://decibel.ni.com/content/docs/DOC-2511
– http://labviewzone.blip.tv
– http://www.lvmastery.com/tipjar2008-12-12
– http://first.wpi.edu/FRC/contro876.html
Presentation slides at:
Team358.org
Questions/Help please email
[email protected]