New and Improved Autonomous Programming Tool for FIRST Robots by Brian Cieslak

Total Page:16

File Type:pdf, Size:1020Kb

New and Improved Autonomous Programming Tool for FIRST Robots by Brian Cieslak AUTOFLEX 2.0 New and Improved Autonomous Programming Tool for FIRST Robots by Brian Cieslak n the March ‘06 issue of SERVO Magazine, I Iintroduced you to a program called AutoFlex — a tool used for developing autonomous routines for FRC (First Robotics Competition) robot controllers. The program was created by members of FRC Team 1675 when they realized that they were going to the FIRST (For Inspiration and Recognition of Science and Technology) National Championships FIGURE 1. Team 1675’s first robot in Atlanta, GA without any up to the goal and shoot an entire programmed with Autoflex for the autonomous functionality for their magazine of balls through the hole FIRST Triple Play competition would know one tetra from the goal and robot. Without having access to the (most of the time). cap the second during the robot until the event, they needed a The original program was a little autonomous period. way to quickly program the robot cumbersome and complicated to use. to perform some task during the While the driver commanded the more laptops and cables, editing data, autonomous period. The solution was robot through the routine that was and reprogramming. Programmer to create a program that would allow to be recorded and then played it stress levels have been greatly reduced! the team’s driver to teach the robot back during the autonomous mode, what it had to do during the a programmer — with a laptop Imagine This! autonomous period by recording the connected to the robot via a serial driver’s commands as he drove cable — chased (or was chased by) the During practice, you set your through the autonomous routine. robot as he captured data. The robot on the playing field, click a Training took place on the practice data then had to be loaded into a button on the operator interface and field before the matches started. file and the whole program was start driving. Then you set your robot At the beginning of the match, the recompiled and reloaded into the back to the starting point, connect a robot would repeat the commands robot. From the sidelines, this was fun dongle to the competition port of the that it was taught. to watch, but those actually involved operator interface and flip the dongle In 2005 during the Triple play in the process were often quite switch to autonomous and the robot competition, the robot scored two stressed and in peril. will replay the practice session you tetras during each autonomous Autoflex has been simplified and just recorded. Don’t like what you period. During the 2006 Aim High updated to version 2.0 to take see? Just reset the dongle switch competition, the robot could drive advantage of the internal EEPROM back to the off position and just click memory available in the FRC robot the program button again to re-record Photos courtesy of FRC Team 1675 — controller. Commands are now written another session until you get it The Ultimate Protection Squad. directly to the EEPROM memory. No right. Neat, eh?? Your robot is 28 SERVO 11.2007 ready to run during the autonomous Now you are an period, all in about 15 minutes. expert. Getting Started For the Beginning A .zip file can be downloaded FIRST from the FRC Team 1675 website (see Programmer Web Links sidebar) that includes a version of the FRC default code with AutoFlex included. I/O mapping for the If you are just default program is as follows: learning to program a FIRST robot, a Joystick 1 - Y axis to PWM_1 sample project that Joystick 2 - Y axis to PWM_2 is fully functional is FIGURE 2 Joystick 1 - X axis to PWM_5 included in the zip Joystick 2 - X axis to PWM_6 file you can download from the Team shown in Figure 2. Also add the 1675 website that can serve as a tem- #include”AutoFlex.h statement at the Set your robot to program mode plate to get you started. The program- beginning of the file. and download the FRCAutoFlex.hex file ming kit that comes with your robot using the IFIdownloader program includes a disk with the MPLAB-IDE 3) Open the user_routines.c file. Add a available from the IFI website (www. programming environment and the call to the function autoflex_recorder() ifirobotics.com). C18-Complier Version 2.4, as well as to the Process_Data_From_ Master_ Attach a programming dongle to the downloader program. You will uP() function as shown in Figure 3. the competition port of the operator need these tools to compile and down- Also add the #include”AutoFlex.h” interface (instructions on how to make load your program to the robot. statement at the beginning of the file. your own are also available from the IFI website) and set the autonomous Adding Autoflex to 4) Open the main.c file. Add a call to switch to the open position. You are Your Existing Code the function rewind_autoflex_ now ready to start programming playback() to the main()function as your robot for autonomous operation. Adding AutoFlex to your existing shown in Figure 5. Also add the The FRCAutoFlexCode.hex program code is simple if all the calls to your #include"AutoFlex.h" statement at the records four inputs: joystick 1 x-axis, control functions (motor control, beginning of the file. joystick 1 y-axis, joystick 2 x-axis, and manipulator arm, etc.) are made from joystick 2 y-axis. the Default_Routine() function found FIGURE 4. Team 1675’s Aim High robot Click the trigger on the port 1 in the User_Routines.c file. would drive up to the goal and shoot joystick to start recording. You now You must do the following (refer most of its 10 balls through the hole. have 15 seconds to drive through your to the sample code provided): autonomous routine. After 15 seconds, the robot stops recording commands 1) Copy the following files to your even though it lets you keep driving. project folder, then open MPLAB and To replay what you just recorded, add them to your project: ‘close’ the autonomous switch on the a) AutoFlex.c dongle. Watch out! Your robot will b) Autoflex.h start to execute the code you just c VEX_eeprom.c recorded. The robot will play 15 d) VEX_eeprom.h seconds of commands and then stop until you open the autonomous 2) Open the user_routines_fast.c switch again. file. Add a call to the function Once you are satisfied with the autoflex_playback() to the user_ autonomous routine you’ve recorded, autonomous_code() function as place a jumper on the ‘digital input 1’ pins. This write protects your autonomous program from being accidentally erased if you click the trigger while driving around. FIGURE 3 That’s the basic operation. SERVO 11.2007 29 (1024/ number_of_inputs) - 1 = Web Links max_tenths_of_seconds. For exam- ple: (1024/4 inputs)-1 = 255, so For Autoflex files TIME_LIMIT could be set to 255 http://team1675.com/ tenths_of_seconds. (25.5 seconds). teamdownload.html // The length of the autonomous For competition routine in tenths of seconds port dongle #define TIME_LIMIT 150 www.ifirobotics.com/ FIGURE 5 oi.shtml d) You can assign which digital port you want to use for your WRITE_ 5) Configure Autoflex.h to reflect your //inputs on the line below. PROTECT jumper. If you don’t want robot system. Sections that you #define NUM_OF_INPUTS 4i to write protect your autonomous may want to consider changing include code or you have used up all your the following: b) You can determine what you want digital ports, re-define WRITE_ to use as the ‘Record Button.’ The PROTECT to ‘1.’ a) Determine how many inputs you default is port 1 trigger Button. want to capture and which ones. // if jumper in place then do not //add defines here to assign //define the mechanism that will //record (assuming jumper pulls pin //commands to user controls that //act as the record button. //low) // you want record/ //In this example port trigger is a #define WRITE_PROTECT \ #define AUTO_COMMAND1 p1_x //button on the OI. (rc_dig_in01) //left Joystick x // that you would press to the #define AUTO_COMMAND2 p1_y //forward position to start recording e) Since an FRC robot uses a //left Joystick y longer timing interval than VEX #define AUTO_COMMAND3 p2_y #define \ robots during autonomous opera- //right joystick y AUTO_BUTTON_REV_THRESH \ tion, uncomment the #define FRC 1 #define AUTO_COMMAND4 p2_x (unsigned char)100 // used by Vex line to adjust the timing if you are //right joystick x #define \ adding Autoflex to a FRC robot. //#define AUTO_COMMAND5 AUTO_BUTTON_FWD_THRESH \ //uncomment to add another input (unsigned char)154 // used by Vex No More Excuses //#define AUTO_COMMAND6 #define \ to Sit Idle! //uncomment to add another input AUTO_NEUTRAL_PWM_VALUE \ (unsigned char)127 When I attended FIRST Regional // Number of inputs we plan to competitions in Milwaukee, WI and //record #define AUTO_RECORD (p1_sw_trig) Cleveland, OH and the FIRST National // Default is set up to save 4 inputs. //port_1 trigger to start recording Championship in Atlanta, I was //You can save up to 6 surprised by how many robots sat idle // inputs. You can define two auto c) You can adjust the length of time during the autonomous segment of //command lines above. you want to record commands by the match. Our team started touting // then change the number of changing the TIME_LIMIT value. the benefits and simplicity of the Default is 150 tenths of a second Autoflex program there and enabled FIGURE 6. Autoflex was used to program (or 15 seconds). The maximum value several teams to compete during that a large claw-like manipulator during the of TIME_LIMIT depends on the 15 second period at the beginning of autonomous period at the beginning number of inputs you are trying the match.
Recommended publications
  • Team Mercury 1089
    TEAM MERCURY 1089 HIGHTSTOWN HIGH SCHOOL 2008-2009 Business Plan Table of Contents I. Executive Summary .................................................................................................................. 2 II. About FIRST ............................................................................................................................ 4 III. About the FIRST Robotics Competition .............................................................................. 5 IV. About Team Mercury............................................................................................................. 6 V. Team Purpose ........................................................................................................................... 7 VI. Team History .......................................................................................................................... 8 VII. Team Goals .......................................................................................................................... 10 Member Goals ........................................................................................................................... 10 Increasing Awareness of FIRST ............................................................................................... 11 Create partnerships with sponsors ............................................................................................ 12 Overall Organizational Goals ..................................................................................................
    [Show full text]
  • Stakeholders in Student Success
    Education…is a branch of that general work of enabling a great country to use its energies to the best advantage and to lift itself from generation to generation through the stages of unbroken progress. Woodrow Wilson, May 19, 1906, Cleveland, Ohio STAKEHOLDERS IN STUDENT SUCCESS: PUBLIC-PRIVATE PARTNERSHIP S Science, Technology, America, and the Global Economy Woodrow Wilson International Center for Scholars S TRENGTHENING K-12 E DUCATION One Woodrow Wilson Plaza 1300 Pennsylvania Avenue NW Washington, DC 20004-3027 A Report by Jacqueline Nader WWW.WILSONCENTER.ORG/STAGE Edited by Kent Hughes 16047WWICS_AGSPlacedCover-R2.indd 1 12/29/08 9:32:24 AM STAKEHOLDERS IN STUDENT SUCCESS: PUBLIC-PRIVATE PARTNERSHIPS STRENGTHENING K-12 EDUCATION A Report by Jacqueline Nader Edited by Kent Hughes 16047_Text--R1.indd i 12/24/08 3:47:15 AM Available from : Science, Technology, America, and the Global Economy Woodrow Wilson International Center for Scholars One Woodrow Wilson Plaza 1300 Pennsylvania Avenue NW Washington, DC 20004-3027 www.wilsoncenter.org/stage ISBN 1-933549-47-5 December 2008 Cover Photo: © JLP/Jose L. Pelaez/Corbiz 16047_Text--R2.indd ii 12/30/08 10:42:48 PM The Woodrow Wilson International Center for Scholars, established by Congress in 1968 and headquartered in Washington, D.C., is a living national memorial to President Wilson. The Center’s mission is to commemorate the ideals and concerns of Woodrow Wilson by providing a link between the worlds of ideas and policy, while fostering research, study, discussion, and collaboration among a broad spectrum of individuals concerned with policy and scholarship in national and international aff airs.
    [Show full text]
  • Notre Dame Robotics FIRST Team 1967 Business Plan 2015
    Notre Dame Robotics FIRST Team 1967 Business Plan 2015 Team 1967 Business Plan 1 Table of Contents ♠ Executive Summary ……………………………………………………………………………………………… 3 ♣ Introduction ………………………………………………………………………………… . 3 … ……… ♣ Mission Statement .. ………………………………………………………………………… ……… 3 ♣ Team Goals . ……………………………………………………………… ………………… ……… . 3 … ♠ About Us ……………………………………………………………………………………………………… 4 ……… ♣ FIRST and FRC . …………………………………………………………………………… …………… 4 ♣ Notre Dame High School .. .. 4 ……………… ………………………………………… …………… ♣ The Team . ………………………………………………………………………… ……………… . 5 …… ♣ Team History . ……………………………………………………………… ………………… …… . 5 … ♠ SWOT Analysis . ……………………………………………………………… ……………………………… . 8 …… ♣ Strengths . ……………………………………………………………… …………………… ... 8 ………… ♣ Weaknesses . ……………………………………………………………… ………………… . 8 ………… ♣ Opportunities . ……………………………………………………………… ……………… . 8 ………… ♣ Threats . ……………………………………………………………… ……………………… . 8 …………… ♠ Outreach .. …………………………………………………………………………………………… . 9 …………… … ♣ Impact on School .. …… ………………………………………… ……………………………… … 9 Team 1967 Business Plan 2 ♣ Impact on Community. .. ………………………………………… …………………………… … 10 ♣ FIRST Outreach ……………………………………………………………………………………… .. 11 ♠ Team Structure . …………………………………………………………………………… ………………… 12 …… ♣ Team Leadership . ………………………………………………………………………………… . 12 … ♣ Student Leaders . ……………………………………………………………………………………… 12 ♣ Committees ………………………………………………………………………………… . 13 …… …… ♠ Financial Plan . ………………………………………………………………………………… ………………… .. 15 ♣ Budget . …………………………………………………………………………………… … . 15 …… ……… ♥ Estimated Revenue .
    [Show full text]
  • Team Handbook Example
    Edina Robotics FIRST Team 1816 - The Green Machine Team Handbook Build Season 2016 Subject to periodic review, revised September 2015. Copyright 2006-2016, Edina Robotics FIRST Team 1816 – The Green Machine. Table of Contents TEAM OVERVIEW ................................................................................ 3 Team Mission Statement ..................................................................... 4 MEMBER REQUIREMENTS ................................................................. 4 Student Eligibility ................................................................................ 4 Code of Conduct .................................................................................. 4 Lettering ............................................................................................... 5 TEAM ORGANIZATION ........................................................................ 5 Description of Leadership, Subteams ................................................ 7 Team Organization – During Competitions ...................................... 13 FUNDING AND FINANCIALS.............................................................. 14 Sponsorship Levels .......................................................................... 14 SAFETY .............................................................................................. 15 SEASON CALENDAR ........................................................................ 16 TEAM TRAVEL ................................................................................... 17
    [Show full text]
  • Assessing Educational Needs of FIRST Robotics Competition Rookie Teams
    1 Assessing Educational Needs of FIRST Robotics Competition Rookie Teams An Interactive Qualifying Project Report Submitted to the faculty of Worcester Polytechnic Institute In partial fulfillment of the requirements for the Degree of Bachelor of Science By: Ryan Giovacchini Paul Heslinga Advisors: Taskin Padir Brad Miller October 2011 2 Abstract The rate at which students in the United States are pursuing and graduating with a degree in science, technology, engineering and mathematics (STEM) is declining steadily. Given the role of engineers in the world today; to meet the demand of society, there is a need to change this trend. FIRST, a not-for-profit organization is determined to fight this deviation by incorporating engineering through robotics competitions earlier in the lives of young students. The goal is to involve students in engineering, specifically the design and build of robots. This project is aimed at assessing the educational needs of students new to the FIRST Robotics Competition (FRC) and developing a set of requirements for an educational website. Using data collected by surveying students and mentors from the FRC community, this project provides recommendations for an online robotics learning resource designed to improve the retention rates of the competition through a support system for FRC Rookie teams. 3 Acknowledgements In addition to our advisors, we would like to thank everyone who took the time to fill out our survey and give us personal feedback and recommendations. We would like to extend our thanks to Professor Skorinko, for aiding us in attaining IRB approval. We are especially grateful for the contributions of the FIRST Team 2191 for giving us the opportunity to discuss the proposed website with our target audience.
    [Show full text]
  • 2011 Team Handbook
    Edina Robotics FIRST Team 1816 - The Green Machine Team Handbook Build Season 2011. Handbook subject to periodic review. Latest revision September 2010. Table of Contents Team History ........................................................................................................4 FIRST AWARDS ...................................................................7 TEAM AWARDS ...................................................................7 MEMBER REQUIREMENTS ................................................9 Code of Conduct ..................................................................................................9 Student Eligibility ................................................................................................9 Lettering and School Recognition ......................................................................9 Team Organization ............................................................................................10 BUSINESS FUNCTIONS ....................................................15 Build Functions ..................................................................................................16 Team Organization – During Competitions ....................................................17 FUNDING AND FINANCIALS ............................................18 Sponsorship Levels ............................................................................................18 SEASON CALENDAR...................................................................................... 20 TEAM TRAVEL
    [Show full text]
  • 2016 1902 Judges' Packet
    In the Section About Our Team About 1902 Our Communities Our Future About 4-H Exploding Bacon Robotics Club, Team 1902 Celebrating Our 11th Season FRC Students 31% female, 69% male 35 students from 11 schools plus homeschoolers In 5 counties: Orange, Seminole, Osceola, Lake & Volusia 50% of FRC students have previously been on an FLL team Mentors 8 dedicated college mentors: 7 of which are FIRST ALUMNI 71% Female Board Members Professional Mentors from - Walt Disney World, Comcast NBCUniversal, Lockheed Martin, and BAE Systems, wirecutter.com, and more… Mission Our mission is to inspire youth using 4-H principles along with the tenets of gracious professionalism to explore science and technology through a mentor based program, which develops leadership and life skills while encouraging innovation and creative solutions to engineering and technical challenges. 4-H Our 4-H relationship not only provides us with financial/liability support and non-profit status, but also allows us to accept students from any school district including homeschoolers without worry. This ties in with our original founding goal to create an active, successful team in which any student may join. Increase from last season Girls 17% to 31% Students from FLL 37% to 50% In the Section About Big Bacon Imagery & Branding Guidelines Big Bacon Theory of Image and Marketing From our beginning in 2006, when Exploding Bacon was founded with the intriguing name and iconic pig on the rocket logo, we have gained recognition throughout the FIRST community as well as our local community. Big Bacon Theory of Image and Marketing was developed to provide fellow FIRST Teams with helpful information to coordinate their marketing & imagery efforts and Chairman's materials.
    [Show full text]
  • MONKEY BUSINESS Monkeynews of the Lynbrook High School Robotics “Funky Business Monkeys,” FIRST Team #846
    S u m m e r 2011 MONKEY BUSINESS MonkeyNews of the Lynbrook High School Robotics “Funky Business Monkeys,” FIRST Team #846 In this issue P.1 A New Year, a New Adventure P.1 Championships at Anaheim P.2 A Summer on the Moon P.2 Beyond the Classroom P.3 A Blast From the Past Botball P.4 Ten Years of Lynbrook Robotics Championships at Anaheim By Diane Wang A New Year, a New Adventure t is easy for anyone to collect I ping pong balls and foam Welcome to the Lynbrook Robotics Team! Hi Team! blocks, and moving paper air- I hope you all enjoyed your summer va- Welcome to Lynbrook Robotics! In the planes across a table takes cation monkeying around and are eager to ex- past, our team has consisted of people with in- merely seconds to complete. pand your skills. Lynbrook Robotics wants to terests in math, writing, art and everything else However, Botball 2011 brought help you extend your scientific and mathemati- in between. Everyone, regardless of skill, has a a challenge for students: to cal knowledge beyond the classroom environ- place on our team. complete the same tasks using ment and apply them to our club. You can get The best chance to get involved is pre- only autonomously-run Lego involved immediately by helping us prepare this sented during build season. Our program is cen- robots. year’s robot for our first competition of the tered on the FIRST Robotics Competition, For the first four weeks of school year, CalGames, which requires us to summer, team members trav- this October.
    [Show full text]
  • Global Innovation Awards Team Innovation Descriptions
    2021 Team Innovations FIRST® LEGO® League ® FIRST Tech Challenge ® FIRST Robotics Competition 2021 Team Innovations firstinspires.org/global-innovation FIRST® LEGO® League Innovation Project 20 Finalists 40745 - Believe and Achieve Bots, USA Correction Coach Believe and Achieve Bots started out in FIRST LEGO League Explore, and is now in their third year as a FIRST LEGO League Challenge team. They love STEM activities and have enjoyed the learning experiences and teamwork throughout their journey. Their team is constructed upon a couple of different pillars, such as respecting each other, having fun, and including everyone. They support people on the autism spectrum and those who are less fortunate than others, with an additional goal this year of helping people be more active. The Correction Coach is a wearable, instant feedback device that helps indivuals improve their sports/activities by helping users to train and improve limb movements to learn sports and activities correctly. It achieves this by using a non-contact ultrasonic sensor and providing real-time feedback via light and a Bluetooth connected smartphone app with data acquisition. This can be used by users who want to learn activities and hobbies in the right way, develop muscle memory, and enhance their existing skills. Blazing Stars, USA UltraBlaze Blazing Stars as a team was formed in 2017 with four team members and one youth mentor. They chose the name Blazing Stars because it represents each member: vibrant, bright, alive, and unique. Since 2017, new team members have joined, bringing in new ideas and creativity to the table. As a team, they’ve learned skills from each other, such as leadership skills, programming skills, mechanical skills, social skills, empathy, and more! But most importantly, as a team, together they learned the value of friendship.
    [Show full text]
  • 1.7 First Robotics Competition Website
    Section Communication 1 Table of Contents 1 COMMUNICATION .................................................................................................................. 2 1.1 OVERVIEW.............................................................................................................................................2 1.2 FIRST - CONTACT INFORMATION ..................................................................................................2 1.3 TEAM SUPPORT....................................................................................................................................2 1.3.1 E-mails and Subject Lines...................................................................................................................2 1.3.2 Please Do Not Duplicate Efforts.........................................................................................................2 1.4 INNOVATION FIRST, INC. ..................................................................................................................2 1.5 NEW: THE FIRST STORE (PARTS)...................................................................................................3 1.6 GETTING ANSWERS TO YOUR COMPETITION QUESTIONS ..................................................3 1.7 FIRST ROBOTICS COMPETITION WEBSITE ................................................................................3 1.7.1 Team Website Links ...........................................................................................................................3 1.7.2 Team
    [Show full text]
  • Table of Contents
    Edina Robotics FIRST Team 1816 - The Green Machine Team Handbook Build Season 2013. Subject to periodic review. Latest revision 9/2012. Copyright 2006-2012 FIRST Team 1816. Table of Contents TABLE OF CONTENTS ....................................................... 2 TEAM OVERVIEW ............................................................... 3 Team Mission Statement ............................................................................... 4 Our Team History ......................................................................................... 4 FIRST Awards ............................................................................................. 11 1816 Team Awards ...................................................................................... 12 MEMBER REQUIREMENTS .............................................. 14 Code of Conduct .......................................................................................... 14 Student Eligibility ........................................................................................ 14 Lettering ...................................................................................................... 14 TEAM ORGANIZATION ..................................................... 17 Description of Leadership, Sub-Teams ....................................................... 17 Team Organization – During Competitions ................................................ 22 FUNDING AND FINANCIALS ............................................ 23 Sponsorship Levels ....................................................................................
    [Show full text]
  • The Game 1992 Maize Craze
    FIRST® Robotics Competition (FRC®) Game Descriptions 1992-2012 1992 - Maize Craze Four contestants vie in a round to see who can collect the highest point value total of tennis balls, return to home base, and defend their cache successfully. Each round is two minutes long. The game is played on a 16’ X 16’ square playing arena covered with 1-1/2” layer of whole corn kernels. 1993 - Rug Rage Contestants attempt to collect balls from either the playing field or their opponents’ goals, place them in their own goals, and defend them. There are five large air-filled kick balls each worth five points, and twenty smaller water-filled balls worth one point each. The winner is the team with the highest total point value of balls within their foal at the conclusion of a two minute match. In the case of a tie, the team with the most large balls wins. If still a tie, the team which collected their balls first wins. 1994 - Tower Power Contestants attempt to place as many of their soccer balls possible inside one of two goals. In each match, three-team alliances compete to place 12 balls of their team color inside either the high goal, worth 3 points, or in the low goal, worth one point per ball. The winner is the team that has the highest total point value of soccer balls within the two goals at the end of the two minute match. In the case of a tie, the team with more balls in the upper goal wins.
    [Show full text]