SUPERQUEST FALL 2015: OREGON VEX IDEA FACTORY Mid Willamette Education Consortium
Oregon VEX League Sponsors Mid-Willamette Education Consortium
West High Map B105 B128 VEX Robotics A116 B107 Entrance Commons Lunch/ 3D Printing
Approximate Schedule Computer Lab 9:30 Welcome VEX Program Overview 10:00 Best Practices Drive Trains Shooters Gathering Students will be available to help your teams get going throughout the event. 11:00 Referee Training Videos 12:00 Lunch 1:00 Best Practices Programming your robot: Autonomous, Driver Control, Competition Template 2:00 Open Lab, Skills Challenges, Scrimmage Matches if robots are available. 2:00 Practice Matches/Skills Challenge/Technical Inspections 4:30 Lab Closes
9:30 Welcome Introductions Name, School, Experience VEX Nothing But Net
Overview: VEX Qualifying Tournaments Stand-Alone Qualifying Tournaments of 16 32+ teams Most cost $25/team, hosts set the fees Teams are encouraged to compete in two to four Qualifying Tournaments. Register at www.robotevents.com Teams that win Qualifying Tournaments advance to the State Championship. Excellence Award Winner All teams on the Winning Alliance Design Award Winner (If 25+ teams in the Qualifying tournament) Teams that participate in at least two Qualifying Tournaments also qualify for the State Championship. Wait List
Overview: VEX Schedule for Oregon 12/5/2015 West Salem HS: 32 Teams 12/12/2015 Lost River HS (Merrill, OR) 12/19/2015 Toledo HS (Toledo, OR) 28 Teams 1/16/2016 Willamette HS (Eugene, OR) 32 Teams 1/29/2016 West Salem HS Friday Night: 24 Teams 1/30/2016 West Salem HS Saturday: 32 Teams 2/6/2016 Dallas HS: 32 Teams 2/13/2016 Redmond HS 2/27 2/28/2016 State Championship: Sandy HS: 60 Teams 4/20-4/123/2016 VEX World Championship Louisville, KY 450 High School Teams, 150 Middle School Teams.
Qualifying Event Schedule / Info. Typically 5 Randomly Selected Qualifying matches Teams are ranked by their performance Win/Loss Record Strength of Schedule (Sum of scores of losing alliances for your matches) Alliances are selected (The number of alliances may vary depending on the number of teams participating) Start at the top seeded team Alliances of 2-3 teams are selected and they stay together throughout the elimination rounds. First alliance to win two matches advances, losing alliance is eliminated. Awards Ceremony
Oregon State Championship Planning for up to 60 VEX Teams Saturday / Sunday event. Typically 9 qualifying rounds After Qualifying Rounds Platinum Division The top 8 Alliances are Selected and Compete in the Platinum Division. The Winning Alliance teams are the State Champions Gold Division The remaining teams have the opportunity to compete in the Gold Division. The Winning Alliance teams are the Gold Division Champions.
Overview: Advancement to Worlds Oregon has Four High School Slots The three teams on the Platinum Division Winning Alliance The Excellence Award Winner If a team double qualifies, then the slot is giving to the next robot: Highest Programming Skills Score over the course of the year Highest Robot Skills Score over the course of the year Back and forth between Programming and Robot Skills to fill in the positions Oregon has one Middle School Only Slot Excellence Award Winner
Judged Awards Given at Events Judges Team that deserves special recognition for efforts leading up to, and during, the event Sportsmanship Team that is extremely courteous and most enthusiastic throughout the event Design (Engineering Notebook Required) Team with a professional design approach (i.e. Engineering Notebooks!) Excellence (Engineering Notebook Required) Overall top honor in the VEX Robotics Competition based on Rank after Qualifying Rounds Rank in Programming Skills Rank in Robot Skills Awards where they were considered as finalists
Overview: Changes Safety glasses need to be worn in the pits and at the field at tournaments. Referee Training Safety Video State Championship a Saturday/Sunday event At West Salem Events teams will turn in their engineering notebooks when checking in at the events.
Drive Trains simplerobotics.org Referee Training Video: Before the Match Drive Train Samples Show robots from Teams Simple Robotics Comparison
Skid Turn: Two Wheel Drive 2 wheel drive - This type of drive has only two wheels driven each wheel, driven by at least one motor A K A 2 wheel tank.(... ) Pros- simple to build very flexible Not easy to push from side if traditional wheels are used Cons more difficult to control than other options the non driven wheels take weight off of the drive wheels - limited power in the drivetrain Summary: Good for starters
Skid Turn: 4-6 Wheel Drive Pros : Relatively Simple: Common at Competitions relatively simple to build can utilize multiple motors used by many strong teams Not easy to push from side if traditional wheels are used Cons: if gears are used the distance between drive shafts are determined by the gears used multiple motors draw more current and use up motor ports on controller Can be more difficult to repair and more components to fail all the drive wheels need to be close to the same size or they will fight with one another Summary: Strong, relatively simple
Example: Four Omni Wheels
Omnis Outside, Traction Middle
Another Omni Outside Traction Middle
Close up
Six Omni Wheels, Back Four Powered
Track System Pros pivot point is at the center of the drive system can use only 2 drive motors or multiple motors extra traction treads are available ( P/N: 276-2214) able to climb over field obstacles Cons Slick: the standard track lacks traction on some surfaces Slow: the distance traveled per rotation is limited by the size of the drive sprocket ( note some teams have used the larger high strength chain sprockets, P/N: 276-2252 as drive sprockets to over come this limitation.) Summary: Looks cool and can climb, but vulnereable
Sack Attack Track Bot
Nerf Tank Gun
Mascot
Holonomic: Robots that can go sideways
Pros can move in 2 different planes (front to back and sided to side), plus pivot very hard to trap in a corner very effective for lining up with game pieces Cons requires a motor for each drive wheel need driver training multiple motors draw more current and use up motor ports on controller does not climb field obstacles well Mecanum
Mecanum
Mecanum
Mecanums in back, Omni in Front
X-Drive
X-Drive
X-Drive
H-Drive
H - Drive
H - Drive
Swerve Wheels Pros agile! can climb field obstacles Cons: requires a motor for each wheel and motors to activate the swerve action complex most designs have a higher center of gravity Summary: Very agile, very complex and requires extra parts. Make sure to give yourself time and resources if you are to implement this option.
Swervebot
Tips for Drive Systems Always support drive shafts on two points (gears, sprockets, track drive sprockets, wheels). Always use Delrin bearings flats ( P/N : 276-1209 ) when placing a drive shaft through a metal structure. Always have a shaft collar ( P/N: 276-2010 ) orientated so as to hold the drive shaft into the motor. Check that no gears, sprockets, drive chains, or wheels are rubbing against a surface that will cause additional friction to drive system. This can be tested by spinning the drive system without the motor attached.
More Tips It is a good practice to test the motors before attaching them to the drive system. Try to orientate motor screws for easy access because they have a tendency to loosen up after use. Use the high strength stainless steel (6-32) motor screws they are less likely to strip. When using 6 or 8 wheel drive systems it is advantageous to have the center wheels lower or a slightly larger size than the end wheels
More Drive Train Tips Large wheels are faster (all else equal) and provide less torque Smaller wheels accelerate quicker but have a slower top speed. Smaller wheels can be placed closer to the corners With skid turn designs, short-wide designs are easier to turn than long-narrow
Sample Shooters.
Two-Wheel Shooter
One- Wheeled Shooter
One-Wheeled Shooter
Catapult Shooter
Pin Ball Shooter
Some Gathering Options
Hands:
Claws/Hands Pros and Cons Advantages Relatively simple to build Requires a low to medium torque application. Disadvantages- Usually can only hold one item at a time Summary: Great start and good for manipulating one item at a time.
Conveyor Belts Conveyer belts- These manipulators can be used to lift objects or move them horizontally. They consist of the tank tread kit or chain from the high strength or regular sprocket sets. Can combine with Tank Tread Upgrade kit for flaps. Many times the conveyer belt is integrated into a roller claw. All conveyer belts require at least one motor to activate
Conveyor Belts Pros and Cons Advantages Can move objects horizontally or lift them vertically. Requires a low to medium torque application. Disadvantages- Takes up a large volume on the robot, can raise the center of gravity of the robot Summary: More complex than a claw, but lets you control more than one scoring element at a time.
Accumulators
Side Gatherer
Referee Training Videos https://www.youtube.com/user/vexroboticstv
Pushing, Pinning and Trapping Robust drivetrains are important. Referee Training Pinning and Trapping More drivetrain samples.
Referee Training: Human Interaction Link to Human Interaction Video
Referee Training: Tipping, Entanglement & Damage Link to Video
Referee Training: Disqualification and Disablements Link to Video
Referee Training: Possession Link to Video
Referee Training: Specialized Field Zones and Associated Rules Link to Video
Referee Video: Causing Opponents to Violate a Rule Link to Video
Referee Training: Scoring Rules Link to Video
Referee Video: Scoring a Match Link to Video
12:00 Lunch Thank you Oregon Computer Science Teachers Association!!
Programming: Autonomous Programming Autonomous Discussion Setting up and naming the Motors Look at two commands that will be enough to get your robot up and moving. Open up RobotC
Programming: Make sure RobotC is ready for Cortex Go to Robot -> Platform Type -> VEX 2.0 Cortex
Make Sure it is in the Real-World Robot -> Compiler Target -> Physical Robot
Configuring the Robot: Focus on Motors Robot -> Motors and Sensors Setup Select the motor Currently can only purchase 393 Motors, also modify for internal gearing (high speed, turbo speed) Naming Convention Rules Style Start with a letter No spaces, punctuation or reserved words (blue) Describes what it represents First letter is lowercase otherwordsstartwithuppercaseletters For these motors leftmotor clawmotor armmotor rightmotor
1) Select the Motors tab. 2) Name the motor in the desired port. Motors and Sensors Setup Page 3) Use the pull down menus to select the motor. 4) One drivetrain motor will probably need to be reversed so the robot does not go in circles. 5) Select the side for drive motors. 6) Complete the setup for the remaining motors. 7) Click on Apply to remember the changes.
Code the setup creates pre-processor directives
Now we can start looking at RobotC motor[motorname] = motorpower; wait1msec(milliseconds);
Vocabulary // Comment task main() motor[] motorb. motorc {} wait10msec() ; = Header Code Compile Download Run {} Marks the begin and end of a block of code wait1msec(2000); The robot continues what it was doing for (2000) milliseconds. Two seconds in this case. What do you think this code will do? Code Break. Create an autonomous that has your robot move! The Header // In front of the line makes this line a comment /* */ for multiple line comments. task main() Marks the beginning of the instructions for the Robot. RobotC Is CaSe SeNsItIvE! ; is used to mark the end of a command. motor[motorb] = 127; motor[] Used to select the motor. rightmotor = This represents the place where the motor is attached. motor[port10] = 127; does the same thing. = 127; 127 = full power -127 = Reverse 0 = stop
Adding a Sensor: Configure and Name 1) Robot -> Motors and Sensors Setup 2) Select the VEX Cortex Digital Sensors 1-12 Tab 3) Name the Sensor. (Same rules as for motors.) - Start with a letter - No spaces or punctuation -no reserved words - should describe the sensor 4) Apply / OK
Go forward until the touch sensor is touched. #pragma config(sensor, in1, touchsensor, sensortouch) Plug a touch sensor into port 1. task main() { wait1msec(2000); //Robot waits for 2000 milliseconds while(sensorvalue(touchsensor) == 0) // 0 == not touched, 1 == touched } { motor[port2] = 63; //Motor on port2 is run at half (63) power forward motor[port3] = 63; //Motor on port3 is run at half (63) power forward } motor[port2] = 0; motor[port3] = 0;
Programming: Remote Control
Programming Remote Control Ch4 Right = 127 Middle = 0 Left = -127 Ch3 Up = 127 Middle = 0 Down = -127 Ch2 Up= 127 Middle = 0 Down = -127 Ch1 Right = 127 Middle = 0 Left = -127
Example Using the Remote Values to Drive the Motors Physical Robot Virtual World
Joystick Mapping: Physical <- Ch4 -> Up - Ch3 - Dn <- Ch1 -> Up - Ch2 - Dn Channel Left/Down Middle Right/Up vexrt[ch1] -127 0 127 vexrt[ch2] -127 0 127 vexrt[ch3] -127 0 127 vexrt[ch4] -127 0 127 Joystick Mapping: Virtual //Place before task main() #pragma x 1 y 1 debuggerwindows( joysticksimple ); #include JoystickDriver.c ; Channel Left/Down Middle Right/Up //Place inside the loop prior to joystick. joystick.joy1_x2-127 0 127 Command joystick.joy1_y2-127 0 127 getjoysticksettings(joystick); joystick.joy1_y1-127 0 127 x 2 y 2 Note: If you copypaste these into your progra m, you will need to retype in the. joystick.joy1_x1-127 0 127
Online Time: Configure the motors and code the following Physical Robot Virtual World Configure the motors tied to ports on the Cortex: leftmotor, port 1 reversed rightmotor, port 10.
Robot Creeping? Y1 and Y2 values might not go exactly to 0 when you release the buttons which can cause your robot to creep. Can correct this in the code. Pseudo Code If the joystick reading is close to 0, say +/- 20 Give a 0 power value to the motor Else Give the joystick reading to the motor
A Little RobotC Math to Help RobotC Function Description Example abs() Finds the absolute value of a number float x; x = abs(5-10); pow() sqrt() Calculates a power float x; x = pow(10,3); //Calculates and returns 10^3 Finds the square root of a number float x; x = sqrt(8);
Using a variable to make threshold changes easier Physical: Getting Rid of the Creep Using the abs command to simplify the condition. if (vexrt[ch3] >(-threshold)) && (vexrt[ch3] < (threshold)) Executes Would this give line of the code same when results. the above condition is true. Executes the commands in the else when the above condition is false. Do the same for the rightmotor
Virtual Getting Rid of the Creep Add the pragma directive and include file. If you copy and paste from the PowerPoint you will need to retype in the. Add the getjoysticksettings(joystick); command. Replaced vexrt(ch3) with joystick.joy1_y1 Replaced vexrt(ch2) with joystick.joy1_y2
More Control Options To fight motors timing out, you can modify the drive code to lower the power sent to the motors. Go half-power Create an equation that maps remote input to output. Had some math wizzes that used a 5 th degree polynomial to provide more control when going slow. Can put together a bunch of stepped if elses to give different power values for different ranges of input values.
No Creep, Half Power Half Power
No Creep Half Power: Virtual Online Time: Test it on the Utilities -> Huge Table Half Power
Buttons Learning Objectives Be able to use the buttons to control motors on your robot. Complete challenges that incorporate buttons.
Joystick Buttons: Physical Buttons return a value of 1 when pushed and 0 when not pushed Button Description Example 5U Top button on back left vexrt[btn5u] 5D Bottom button, back left vexrt[btn5d] 6U Top button, back right vexrt[btn6u] 6D Bottom button, back right vexrt[btn6d] 7U Button 7 up vexrt[btn7u] 7D Button 7 down vexrt[btn7d] 7R Button 7 right vexrt[btn7r] 7L Button 7 left vexrt[btn7l] 8U Button 8 up vexrt[btn8u] 8D Button 8 down vexrt[btn8d] 8R Button 8 right vexrt[btn8r] 8L Button 8 left vexrt[btn8l]
Using the buttons to control the arm motor First we need to go to Motors and Sensors setup to configure the arm and claw motor. Clawbot Arm: Port 7 Claw: Port 6 Robot -> Motors and Sensors setup 1) Name and set the claw and arm motors. 2) Reverse the Arm Motor for Virtual Clawbot. Might need to reverse for physical robot also. 3) Click Apply and OK when finished.
Looking at Arm Control using buttons: Pseudo-Code If button 6U is pushed raise the arm (Send a signal of 127) Else if button 6D is pushed Lower the arm (Send a signal of -127) Else Stop the arm (Send a signal of 0)
Looking at the Arm: Pseudo-Code to Code If button 6U is pushed raise the arm (Send a signal of 127) Else if button 6D is pushed Lower the arm (Send a signal of -127) Else Stop the arm (Send a signal of 0) Style Note: Indent between the {} to make the code easier to read.
Virtual World Buttons joy1btn(9 ) joy1btn(1 0) joy1btn(1 ) joy1btn(6 ) joy1btn(8 ) joy1btn(5 ) joy1btn(7 ) Mode joy1btn(1 1) joy1btn(1 2) joy1btn(4 ) joy1btn(3 ) joy1btn(2 ) joy1_tophat 7 0 1 6-1 2 5 4 3
Joystick Buttons Virtual World Buttons return a value of 1 when pushed and 0 when not pushed, except the TopHat. Button Description Example 1 Left joy1btn(1) 2 Bottom joy1btn(2) 3 Right joy1btn(3) 4 Top joy1btn(4) 5 Back, top left joy1btn(5) 6 Back, top right joy1btn(6) 7 Back, bottom left joy1btn(7) 8 Back, bottom right joy1btn(8) 9 Small button, top left joy1btn(9) 10 Small button, top right joy1btn(10) joy1_toph at 7 0 1 6-1 2 5 4 3 11 Left joystick button joy1btn(11) 12 Right joystick button joy1btn(12) TopHat Returns values -1 (Not pushed) or 0, 1, 7 depending on which part is pushed. joystick.joy1_tophat
Back to the Arm Movement Pseudo-Code but for Virtual Remote If button 6 is pushed raise the arm (Send a signal of 127) Else if button 8 is pushed Lower the arm (Send a signal of -127) Else Stop the arm (Send a signal of 0)
Arm Pseudo-Code to Code: Virtual World If button 6 is pushed raise the arm (Send a signal of 127) Else if button 8 is pushed Lower the arm (Send a signal of -127) Else Stop the arm (Send a signal of 0)
Where does this code go? Since you want the robot to continually check for the buttons being pressed, it needs to go inside the while(true) loop.
Online Time: Test Arm Movement Implement the code for the arm movement and test it in the Virtual or Real World. Try to use what you have learned to program the Claw motor as well using the back left buttons. Test your robot on the Huge Table.
Any problems? Arm floating down when button not pushed? How can you combat this? Arm didn t move
Claw Motor Virtual Pseudo Code If the back, top, left button is pushed Close the claw (127) Else if the back-bottomleft button is pushed Open the claw (-127) Else Leave the claw (0) Physical
Online Time Complete and test the drive code with the Anti-Creep code Test to see if the code works in the Utility -> Huge Table In the Virtual Worlds go to the Remote Control Tab Bull in the Ring: Knocking out cans in < 10 sec Minefield Challenge: Clearing the table of bad mines while not disturbing others Robo Slalom I: Driving through a course. A good time to practice refining remote to controller mapping to make driving more accurate Round up: How many laps can you complete in one minute? The code will need to stop you from driving!
Simple Sample Joystick task main() { } while (1 == 1) { } //Creates and infinite loop motor[rightmotor] = vexrt(ch2); //The right motor is set to //equal the value transmitted by //Ch2 (y-axis of the right joystick) motor[port3] = vexrt(ch3); //The motor in port3 is set to equal //the value transmitted by Ch3 //(y-axis of the left joystick)
Dual Joystick task main() { while (true) { motor[port1] = vexrt(ch2); motor[port2] = vexrt(ch3); motor[port3] = vexrt(ch2xmtr2); //Reading the second remote motor[port4] = vexrt(ch3xmtr2); } }
Competition Template Open Competition Template File -> New -> Competition Template Copy Autonomous code into Template Copy Driver Controlled Code into Template Test using Competition Switch
2:00 Technical Inspection/ Practice Matches Technical Inspection/ Practice Matches Robot Skills (Official if team is registered) One robot, all elements, one minute Practice 2v2 Matches 2v2, 15 Second Autonomous. 1:45 Driver Controlled Programming Skills (Official if team is registered) One robot, all elements, one minute
4:15 Clean up Thanks for coming 4:30 Closing
VEX Schedule for Oregon 11/15/2014 VEX Tournament Phoenix, High School 12/6/2014 VEX Tournament at West Salem 12/13/2014 VEX Skills Challenge Event at North Marion 1/10/2015 VEX Tournament at Evergreen Space Museum 1/24/2015 VEX Tournament at West Salem 2/7/2015 VEX Tournament at Dallas High School 2/14/2015 VEX Tournament at Sandy High School 2/21/2015 VEX Tournament at Redmond High School 2/28/2015 VEX Tournament at Dallas HS 3/6-3/7/2015 VEX State Championship: North Marion High Winning Alliance, Excellence and Robot Design Advance to Worlds Middle School Excellence Winner advances to Worlds 4/15-4/18/2015 VEX World Championship Louisville, KY
References www.simplerobotics.org http://curriculum.vexrobotics.com/curriculum