Session 11 Intro to FRC API.

Slides:



Advertisements
Similar presentations
Teacher/Mentor Institute Using the Cortex Chuck Powell.
Advertisements

Apple Pi Robotics Logic System and Programming Basics 1 1.
US First Robotics Lab View Tutorials Jim Thomas Lawrence Berkeley National Laboratory Team 496 Port Jeff Powerhouse.
Robot Code MVRT 2010 – 2011 Season. Robot code controls the robot Robot Main.vi –Calls all the smaller SubVis Rules of programming the robot –Be careful.
Java Workshop. Quick java review Goal: We want the application to tell us what the nth fibonacci number is. Components needed to achieve the goal: A Scanner.
Jason Howard. Agenda I. How to download robotc II. What is tele-op used for? III. How to build a basic tele-op program IV. Getting the robot to drive.
Jeff Beltramo NHTI-Concord’s Community College FRC Team 1922.
1. 2 LabVIEW for FRC Doug Norman National Instruments January 6, 2012.
Networking By: Matt Motl… Programmer Brent Everson… Programming Mentor.
1. 2 FRC 2010 Driver Station Doug Norman & Stephanie Brierty National Instruments January 8, 2010 Thanks to Joe Ross – Team 330.
V EX C OACHES ' T RAINING October 12, Agenda for Today 9 – 10 AM : Tina Reeves and the Engineering Notebook 10 – Noon : Finish Building, Basic Robot.
Overview of New System Beta Team from Wilsonville 1425 Wilsonville Robotics – Code Xero 2550 Oregon City Robotics.
FRC LabVIEW Software Overview Joe Hershberger Staff Software Engineer National Instruments.
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
Control System New control system: roboRIO – Allows for programming over the USB device port.
2015 FRC Control System = MOL = DUK Power Distribution Board Volts -12 Volts (4) 40 amp Circuits (4) (6) 20/30 amp Circuits (6)
How to Use This Training Deck
Drivers Station 2010 Joe Ross Team /12/2009.
Driver Station MVRT 2009 – 2010 Season. Add information Breadboard Classmate PC USB Hub Joysticks Stop Button.
US First Kickoff 2013 Software Programming (And Control System) Daniel Kohn University of Memphis.
US First Kickoff 2012 Software Programming (And Control System) Daniel Kohn University of Memphis.
COMP1070/2002/lec3/H.Melikian COMP1070 Lecture #3 v Operating Systems v Describe briefly operating systems service v To describe character and graphical.
LabView Basics The Fighting Pi Controls Group. About LabView LabView is a highly adaptable programming GUI (Graphic User Interface) LabView compiles the.
Coding for the FIRST Tech Challenge: RobotC Presented by: Audrey Yeoh Acknowledgements: Team Unlimited FTC 0001.
1999 Cabletron Systems. Wireless Networking RoamAbout RoamAbout Installation Installation/Configuration of: Network adapter card on a: Windows 95 system.
Coding for the FIRST Tech Challenge: RobotC
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
Weston Schreiber & Joshua Gabrielse Robotics Summer Training Programming #1: EasyC Basics.
Programming and Controls for FIRST – The Basics Tom Barch, Scott VanBrocklin and Kayla Peltier February 5 th, 2008.
Student Support Services Laptop Workshop. What will you Find The actual Computer The Power Cord (Comes in two parts.)
LabVIEW Workshop September 26, 2009 Hauppauge High School SPBLI - FIRST Mark McLeod Advisor Hauppauge Team 358 Northrop Grumman Corp.
The New FTC Platform (Connecting your legacy hardware)
2009 FRC Control System Software Overview Dave Doerr, Mentor, Team 67 November 15, 2008.
Teacher/Mentor Institute Using easyC Joel Kirkland July 30-31, 2015.
FRC Robot Framework Labview Made Easy (er) For FIRST Robotics 1.
BEST Robotic, Inc. easyC Breakout Session By: Guy Chetrit Programming With easyC September 15, Copyright © 2012 BEST Robotics, Inc. All rights reserved.
FTC New Platform Programming Workshop in Android Studio
Making your Robot Move Motorbolts. Notes This presentation will be available on the High Tech Kids’ website: hightechkids.orghightechkids.org For more.
2010 Control System Writing and Reading the cRio Presented By: Frank Larkin Lansdale Catholic Robotics, Team 272 First 2010 Kickoff, Jan
Part II Introduction to Robot Code. How to open a new FRC robot project 1.Open LabVIEW. 2.Click "FRC cRIO Robot Project" in the upper left section "New".
FRC Robot Programming 1.PID Continued 2.Downloading and Deploying Code 3.Program a 2012 Robot from Spec Basic code For FIRST Robotics.
Introduction to Vexnet
Part III Robot Drive. Robot Main.vi The main body of your code: accesses all of the other programs in your project A big loop! Do not add any more loops.
Find the Mindstorms Icon on the computer.. To start a new program click go.
DHP Agenda: How to Access Web Interface of the DHP-1320 on Access Point Mode How to Access Web Interface of the DHP-1320 on Router Mode How to Change.
Understanding The 2008 FRC Robot Controller Chris Gregory FRC1089 – Team Mercury
Session 12 Sensors and Timers. 3 Main Types of Robot Projects Command-Based Robot A more complicated project for more complicated robots Iterative Robot.
Envision Tutorial Horner APG, LLC July 18, Introduction The Cscape Remote Viewer allows remote interaction with the user interface on Horner OCS.
Brain Software. Things you need Administrator Rights Know how to open a folder Know how to unzip a file??? Know any special changes your IT department.
Electronics and Controls
Cr yptonite robotics labview beta findings December 19, 2015.
VAFIRST LabVIEW Workshop 11/19/11 Presenters: Marin Kobin & Patrick Foley.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
Troubleshooting Dashhawk Issues. Here's what you have to do to have the DashHawk run properly Go to the ACTUAL PROGRAM file (not the short cut)
FIRST ROBOTICS COMPETETION Introduction to Electrical & Control System Power and Signal Distribution/Interconnection Sensors, Motors, Speed Controllers,
INTRODUCTION TO JAVA PROGRAMMING FOR THE FIRST ROBOTICS COMPETITION JONATHAN DANIEL HEAD PROGRAMMER FERNBANK LINKS.
Robotics Education & Competition Foundation
After Construction Name: Per #:.
Introduction to Vexnet
BEST Robotic, Inc. MATLAB/Simulink Team Training
Basic Steps in Programming
Programming and Debugging with the Dragon and JTAG
T_C_N_L_G_ E D I D I E O Y O H I E B J I R E A A W.
GETTING STARTED ALL YOU NEED TO KNOW TO MAKE YOUR ROBOT MOVE
Connecting hardware and Booting the computer
Lesson 4: Overall Review and Assessment
Training 11/11/16 Robot Code (WPILib).
Field Management System
Introduction to Programing the Cortex for BEST
Robot and Crickit HAT © Copyright 2019 by Dr. Elizabeth I. Horvath and Dr. Eva A. Horvath 1.
Presentation transcript:

Session 11 Intro to FRC API

What is an API? API stands for application programming interface It’s a set of routines, protocols, and tools for building software You can think of it as a bunch of classes that does stuff for us If we didn’t have an API, programming a robot in 6 weeks would be impossible for most people

New Robot Project Go to File > New > Other… Open the “WPILib Robot Java Development” folder Select “Robot Java Project” and click next If you don’t have that folder: https://wpilib.screenstepslive.com/s/4 485/m/13809/l/145002-installing- eclipse-c-java

3 Main Types of Robot Projects Command-Based Robot A more complicated project for more complicated robots Iterative Robot Much more simple, but functionality is more limited Sample Robot Just the raw basics. Used for testing small things, or for highly advanced control flow.

New Robot Project Give your project a name Leave the package as is That’s how packages are supposed to be named Select “Iterative Robot” Click “Finish”

Looking at your new project Robot.java – the main class Referenced Libraries – the API wpilib – main robot stuff networktables – network communication stuff JRE System Library – what java version the project runs on

Robot.java IterativeRobot – the parent class robotInit() – called when the robot starts up periodic methods – called periodically while the robot is running All of these methods were inherited from IterativeRobot

FRC Driver Station The software that controls the robot from your computer First tab is the operation tab (left half of the screen)

Robot Run Modes TeleOperated – a human controls the robot Autonomous – the robot does stuff itself Practice – a simulation of a real match Test – anything you want it to be

Misc Information Elapsed Time – how long the robot has been running PC stats Window – how the DS appears windowed / fullscreen Team Station – where you are Can get this from the API

Robot Information Team # - ours is 5002 Battery Voltage – battery life Communications – if the DS can “see” the roboRIO Robot Code – if the roboRIO has code on it Joysticks – if a joystick is plugged in

Logs The log shows errors that happen while the robot’s running The chart shows packet loss % and other information about the roboRIO Third tab is both of them at once

Driver Station: Diagnostics Tab Shows what the DS can communicate with FMS – Field Management System, the thing at a competition Lets you reboot roboRIO Also shows version and memory usage

Driver Station: Setup Tab Team Number – determines what IP the DS looks for Practice Timing – the timing of practice mode Don’t touch dashboard type and protocols for now

Driver Station – USB Devices Tab Shows any joysticks plugged in Says what buttons are pressed Gives values of the axes

Driver Station – Power & CAN Tab Faults – very bad errors CAN Metrics – we’ll get into later

Motor Controllers They control motors via a signal from the roboRIO Simple ones use a PWM signal Advanced ones use CAN

Robot Wiring PWM ports on the right control basic motor controllers Use the number on the port to determine which one you’re controlling in code

Classes for a Basic Program Joystick – gets axes and buttons from a joystick Constructor takes which port the joystick is plugged into Talon – controls a standard Talon SR motor controller Constructor takes the PWM port it’s plugged into RobotDrive – a utility class that drives a robot Constructor takes the motor controllers

Writing the Code: Declaring Variables Declare your variables If you get an error, then the classes haven’t been imported Hover over it with your mouse and select the “Import” option

Writing the Code: Initializing Variables Make a constructor and initialize your variables in it First joystick will be 0 Need to look at roboRIO for the PWM ports of the Talons RobotDrive takes those motor controller objects

Writing the Code: TeleOp Driving around the robot in teleop is as easy as this line of code: arcadeDrive takes a joystick object and uses it to control the robot The true is for squared inputs Makes lower values of the axes less sensitive Allows for more precise control over the robot

Writing the Code: Autonomous Set a motor controller’s speed manually by using the method public void set(double speed) 0 is neutral, -1 is full reverse, 1 is full forward

Uploading the Code Connect to the roboRIO (USB, ethernet, or wireless) Run the project as “WPILib Java Deploy” Wait for the roboRIO to load the new code Run the robot