EV3 Software EV3 Robot Workshop

Slides:



Advertisements
Similar presentations
Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Advertisements

Introduction to LEGO RCX robotics and Robot Sumo
RCX Workshop Day 2 Programming with Touch Sensor Light Sensor Repeat CJ Chung Associate Professor of Computer Science Lawrence Technological University.
Each team has their own: a.Laptop computer b.LEGO NXT robot c.USB cable d.Light paper on the table to test the robot Sit Down in Teams of 2.
Getting started with LEGO NXT Mindstorms software This is intended to be a short introduction to the LEGO Mindstorms software and programming the LEGO.
EV3 Workshop Curriculum Developed by Joe DeRose, Ph.D.
Graphical RobotC NXT (EV3) Robot Workshop 2015 Instructor: Dr. Fred Brauchler Assistant: Chris Parker 2/7/2015Lawrence Technological University1.
Navigating the BOE-BOT
Mingo County Shewey Science Academy: NXT Training.
Available at: – Program Optical Quad Encoders in Autonomous Mode Program optical quad encoders in autonomous mode.
Diameter, Circumference, and Rotational Sensors Robotics Academy All Rights Reserved.
EV3 Software EV3 Robot Workshop 2015
EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Robotics Day4.
1 ©2006 INSciTE Lab Two Task: Make the program from Lab One (Move forward 5 rotations and turn right 90 degrees) into a MyBlock.
LEGO Mindstorms NXT Programming We will be using the Common Palette for our Robots This is how you download your program onto the brick Drag and drop a.
Robotics Enrichment class Mr. Bosworth. Goals of Class Learn how to build a basic robot that performs various functions Learn how to program robot to.
Have FUN!!! Demo the power of robotics to: –improve problem solving skills –utilize math skills –develop an “engineering mindset” –improve communication/teamwork.
Introduction to LEGO NXT 6 hour course. Introductions You Your Expectations.
ORTOP WORKSHOP 3 ROBOT NAVIGATION & MISSIONS ORTOP WORKSHOP 3 ROBOT NAVIGATION & MISSIONS.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
Droids Robotics Workshop
Application of Math and Science Principles Creating a robot that moves a specified distance straight ahead and Creating a robot that turns a specified.
Maze Challenge Maze Challenge activity > TeachEngineering.org
Autonomous Robot Project Lauren Mitchell Ashley Francis.
Measured Turns Introductory Presentation. Opening Activity In the Right Face Activity, we made our robot turn right using the program below.
Simple Pi Challenge! Pi = 3.14 Diameter = 5.6 cm Distance Robot Travels in 1 Rotation = 3.14 * 5.6 cm 3.14 * 5.6 = cm Circumference = Pi * Diameter.
Minds and Computers 3.1 Preview Spin left motor Spin right motor Wait until the motors have spun two rotations Stop left motor Stop right motor What five.
EV3 Workshop Oct 3, 2015 Instructor: Chris Cartwright
Motors and Sound Troubleshooting Tips. © H-CCS Problem 1 Why can’t I download my program to the RCX?
Negative Power or Negative Rotation makes robot go backwards. But if both are negative, the robot will go forward! Move Steering Block.
By Droids Robotics Line Followers: Basic to Proportional ADVANCED EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 4/5/
Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions.
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Using Sensor Data and Port View.
ROBOTC Software EV3 Robot Workshop
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
ROBOTC Software EV3 Robot Workshop Lawrence Technological University.
Lesson 1: Motors and Sound Programming Solutions.
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON COLOR LINE FOLLOWER MY BLOCK WITH INPUTS: MOVE FOR DISTANCE.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
Lego Mindstorm Robots 9797 kit.  Students will learn how to identify how to detect a change in a condition.  Students will learn where and how to identify.
LOGICFUSION’S HANDS-ON ROBOTICS EV3 LEVEL 2! Welcome to.
Calculating Rotations for Turns
VEX IQ Curriculum Smart Machines Lesson 09 Lesson Materials:
ORTOP Workshop 3 Robot Navigation & Missions
BEGINNER PROGRAMMING LESSON
BEGINNER EV3 PROGRAMMING Lesson
Robo-Math How Far? The Distance a Robot Travels in One Rotation of the Motor = The Circumference of the Wheel Circumference (of the Wheel) = Diameter (of.
Squaring or Aligning on a Line
By Sanjay and Arvind Seshan
Touch Sensor.
Measured Turns.
Introductory Presentation
BEGINNER PROGRAMMING LESSON
Sensors Training.
Robot Programming Computer Literacy S2.
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
Beginner Programming Lesson
Line Followers: Basic to Proportional
EV3 Programming guide to “Following”
Maze Challenge Maze Challenge activity > TeachEngineering.org
Line Followers: Basic to Proportional
Introduction to programming consistent results
BEGINNER PROGRAMMING LESSON
Robotics Week 3 beginning wheel control
Compiled from various Internet sources Presented by Mr. Hatfield
Lego MINDSTORMS EV3.
BEGINNER PROGRAMMING LESSON
Getting started with LEGO EV3 Mindstorms software
Presentation transcript:

EV3 Software EV3 Robot Workshop Instructor: Assistants: Lawrence Technological University

Course Overview 2015 Robofest competition RoboGolf SPbot introduction Using the SPbot to solve the RoboGolf challenge

2016 Robofest competition Video overview Key tasks https://www.youtube.com/watch?v=bgDL4n1xs3U&feature=youtu.be Key tasks Find the edge of the table Follow the edge of the table Find a putting green Find the golf ball Aim for the hole Mathematics to locate the center hole Rotate the robot to putt Putt the golf ball

2016 Robofest competition Please note that putting the golf balls is beyond the scope of this workshop

LEGO EV3 robot used – SPbot Right Motor: C Touch Sensor EV3 Computer Sonar Sensor Color Sensor 1 Left Motor: B Color Sensor 2

Remember the connections! Left Motor connects to B Right Motor connects to C If your motors are upside down forward will be backwards in your program Color sensor 1 connects to port no. 1 Color sensor 2 connects to port no. 2 Touch sensor connects to port no. 3 Sonar sensor connects to port no. 4 Please note that the retail version of EV3 comes with an infrared sensor, not a sonar sensor.

EV3 Versions Used Examples use EV3 Educational Version 1.1.1 or Home Edition Version 1.1.1 EV3 Firmware version: V1.06H PowerPoint and all example programs are available at robofest.net under Tech Resources

Other EV3 Versions LEGO offers a home edition of the EV3 software It is free to download and use Limited sensors enabled You can download blocks for additional sensors Download at http://www.lego.com/en-us/mindstorms/downloads/download-software/

Find the edge of the table Task 0 Find the edge of the table

Task 0: Example Solutions Using wait block Using loop block

Brick Overview

Follow the edge of the table Task 1 Follow the edge of the table

Follow The Edge Of The Table Use the zig-zag method to follow the edge of the table Edge following is also referred to as line following We need to determine when the robot is on or off the table Right Edge Left Edge Table

Follow The Edge Of The Table Get color sensor values to determine when the robot is on or off the table and putting green. We will use the color sensor in Reflective Light Intensity mode. Color Sensor 1 Color Sensor 2 Off table = ______ (10) On green = ______ (20) On table = ______ (60) On table = ______ (60) Color Sensor Readings

Follow The Edge Of The Table Light sensor settings example Off table = 10 On table = 60 Median threshold = (10+60)/2 = 35 Two cases Light sensor reading > 35. On table. Light sensor reading < 35. Off table.

Simple Line Following Algorithm Right side Program: LineFollowZZ.ev3 YouTube: https://youtu.be/3UIdveO7fT4

How to improve our line following algorithm Zig-zag method can cause a bumpy response To improve the response, you can use a 3-level line follower (concept shown below) Off Table On Table Off Table On Table

Task 2 Find a putting green

Find A Putting Green One method of finding a putting green requires two color sensors Sensor 1 used to follow the edge of the table Sensor 2 used to locate the putting green General idea Follow the edge of the table until the second color sensor detects a putting green

Find A Putting Green Recall our line following program LineFollowZZ Let’s modify the program to stop when the robot reaches the putting green Using this program, the robot will line follow continuously. How can we make the robot stop when it reaches a putting green?

Find A Putting Green Right side Program: LineFollowZZStop.ev3 YouTube: https://youtu.be/7uajAXAZjqo

Task 3 Find the golf ball

Find The Golf Ball General idea Let’s assume we located the putting green and we know where the golf ball is on the green relative to the edge of the green How can we begin to position our robot to putt?

Find The Golf Ball Example Robot Follow the edge of the putting green a distance “m” This will position the robot in line with the golf ball Robot m m = 11 cm for the Junior Division. What about the Senior Division?

Find The Golf Ball How to find “m” given n/m From the diagram of the putting green we have Let’s assume that n/m = X (X is known) Now we can solve for m 𝑛+𝑚=22 cm 𝑛 𝑚 =𝑋 → 𝑛=𝑚∗𝑋 𝑛+𝑚=𝑚∗𝑋+𝑚=𝑚 𝑋+1 =22 cm 𝑚= 22 cm 𝑋+1

Find The Golf Ball One solution Approach Tools needed Follow the edge of the putting green until we reach the position of the ball Approach Let’s modify LineFollowZZStop.ev3 to stop at the location of the ball Tools needed Line following Measure distance traveled

Measure Distances Determine how far the robot travels moving forward for 2 seconds Compute distance traveled by measuring the number of rotations of the wheel Distance

Measure Distances Use the wheel geometry PI = 3.14 Circumference = Dia × PI Diameter = 2 × Radius Radius How can use this information?

Measure Distances For each rotation of the wheel, the robot will travel (Wheel Diameter) x (PI) Distance = (Wheel Diameter) x (PI) x (# Rotations) Distance = (5.5 cm) x (PI) x (# Rotations) Distance = (17.28 cm) x (# Rotations) Program: MeasureDistance.ev3 YouTube: https://youtu.be/g-8ocEIlxPQ

Aligning The Robot With The Golf Ball Proposed method: Compute the distance to travel along the edge of the putting green Compute the number of rotations required to travel that distance Find the edge of the putting green Reset motor rotation sensor Follow the edge of the putting green Stop the robot when the desired number of rotations is reached

Aligning The Robot With The Golf Ball Example Putting green dimensions m = 11 cm, n = 11 cm Number of rotations Distance = (Wheel Diameter) x (PI) x (# Rotations) Solve for (# Rotations) Distance (# Rotations) = (Wheel Diameter) x (PI) 11 cm (# Rotations) = = 0.64 rotations (5.5 cm) x (PI)

Aligning The Robot With The Golf Ball Line follow a desired distance Program: LineFollowDistance.ev3 YouTube: https://youtu.be/BfzXMNbnC_k

Task 4 Aim for the hole

Aim for the hole We will review a few methods to aim for the hole Method 1: Search for the flag pole Scan using the sonar senor Method 2: Compute the location of the hole Mathematically determine the location of the hole Step 1 Determine the angle we must rotate to aim the robot towards the golf hole Step 2 Rotate the robot the determined amount Method 3: Determine the location using trial and error Here we find the hole by rotating the robot different amounts in an attempt to find the correct orientation

Method 1: Scan For Hole Here we are going to have the robot spin until it “sees” the center hole flag with the sonar sensor Program: SpinSearch.ev3 YouTube: https://youtu.be/GQg6tLZamsE

Method 2: Mathematical Approach Using this approach we can calculate how far to rotate the robot to face the center hole We complete this in two steps Step 1 Determine the angle we must rotate to aim the robot towards the golf hole Step 2 Rotate the robot the determined amount

Determine The Rotation Angle We can use geometry to determine the location of the hole r s t Robot

Determine The Rotation Angle We can use trigonometry to determine the location of the hole and aim the robot r si𝑛 𝜃= 𝑟 𝑡 s 𝑐𝑜𝑠 𝜃= 𝑠 𝑡 θ t Robot tan 𝜃= 𝑟 𝑠 𝜃=atan 𝑟 𝑠

Determine The Rotation Angle Use an advanced math block to compute the necessary rotation angle Assume the following r = 40 cm s = 30 cm 40 36.87° 30 50 53.13° Program: TrigMath.ev3 YouTube: https://youtu.be/DVFz0_Sf8tg

Rotate The Robot To Putt We need to rotate the robot θ degrees to aim the robot at the golf hole Starting Position Rotated Position Robot Robot θ

Rotate The Robot To Putt We will use the spin feature to turn the robot θ degrees When the robot spins, the wheel path is a circle centered between the wheels The diameter is the track width of the robot Robot Robot Robot

Rotate The Robot To Putt For an example, let’s spin the robot 90 deg Robot track width = 16.2 cm The circumference of the robot’s path C = PI * D = 3.14 x 16.2 cm = 50.87 cm The circumference of the robot’s wheel C = PI * D = 3.14 x 5.5 cm = 17.27 cm 90 degrees is ¼ of the circle. The robot travels D = ¼ x 50.87 cm = 12.72 cm How rotations to travel 12.72 cm? # Rot = Distance / (Wheel Circumference) # Rot = 12.72 cm / 17.27 cm = 0.74

Rotate The Robot To Putt Spinning robot example Robot width = 16.2 cm Wheel Diameter = 5.5 cm Circumference = 17.27cm Number of rotations # 𝑅𝑒𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛𝑠 = 𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑇𝑟𝑎𝑣𝑒𝑙𝑒𝑑 𝑊ℎ𝑒𝑒𝑙 𝐶𝑖𝑟𝑐𝑢𝑚𝑓𝑒𝑟𝑒𝑛𝑐𝑒 # 𝑅𝑒𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛𝑠 = 12.72 𝑐𝑚 17.27 𝑐𝑚 =0.74 𝑟𝑜𝑡𝑎𝑡𝑖𝑜𝑛𝑠

Rotate The Robot To Putt We can use one block to spin the robot Program: Spin90.ev3 YouTube: https://youtu.be/mIBylTRqA9Y

Task 5 Putt the golf ball

Putt The Golf Ball Again, this task is beyond the scope of this course However, your robot should be in position to putt the ball in the center hole Remember, you can only hit the golf ball once and only with the wooden block putter

My Blocks Solving the Robofest Game challenge will typically require a fairly large EV3 program (around 100 blocks is not unreasonable) Very large programs can be difficult to understand, navigate and use To alleviate this issue, the EV3 software has a My Block Builder to create custom blocks that can replace sections of your program

My Blocks For example, let’s assume you have a section code that completes the following: Move forward until the edge of the table is found with color sensor 1, then stop After stopping, rotate the robot 90 degrees The code may look like this My blocks will allow us to convert this to a single block

My Blocks Creating a My Block Select the section to convert Go to Tools -> My Block Builder Enter the block name, description and select icon Hit Finish 3 This creates a My Block called FindEdge that will be located in the My Blocks Pallet 4

Putting It All Together In this course we learned how to Find the edge of the table Follow the edge of the table Find a putting green Find the golf ball Aim for the hole Putt the golf ball

Little Robots, Big Missions Questions? chung@LTU.edu