Presentation is loading. Please wait.

Presentation is loading. Please wait.

EV3 Software EV3 Robot Workshop 2015

Similar presentations


Presentation on theme: "EV3 Software EV3 Robot Workshop 2015"— Presentation transcript:

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

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

3 2015 Robofest competition Video overview Key tasks
Key tasks Measure the height of the rectangular shape Compute location of pin 3 & 4 Follow the edge of the table Find the bowl zone Find a set of pins Bowl a tennis ball Return home

4 2015 Robofest competition Please note that bowling the tennis balls are outside the scope of this workshop

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

6 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 connects to port no. 1 Touch sensor connects to port no. 2 Sonar sensor connects to port no. 4 Please note that the retail version of EV3 uses an infrared sensor, not a sonar sensor.

7 EV3 Versions Used Examples use EV3 Educational Version or EV3 Home Edition 1.1.0 EV3 Firmware version: V1.06H PowerPoint and all example programs are available at robofest.net under Tech Resources: EV3 RoboFest Workshop Sp2015.pptx RoboBowlWorkshop.ev3

8 Free EV3 Software Download
LEGO offers a home edition of the EV3 software It is free to download and use, but has some limitations No experiments Limited built-in sensor support You can download all sensor blocks Main download page:

9 Move forward and stop when the rectangular shape is reached
Task 0 Move forward and stop when the rectangular shape is reached

10 Task 0: Example Solutions
Using wait block Using loop block

11 Measure the height of the rectangle Watch the YouTube videos at:
Task 1 Measure the height of the rectangle Watch the YouTube videos at: (MeasureDistance) (MeasureRectangle)

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

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

14 Measure Distances For each rotation of the wheel, the robot will travel (Wheel Diameter) x (PI) Distance = (Wheel Diameter) x (PI) x (# Rotations) Distance = (55 mm) x (PI) x (# Rotations) Distance = x (# Rotations) Program: MeasureDistance.ev3

15 Measure The Rectangle Height
One method could be: Go forward until the black rectangle is found Reset motor rotation sensor Go until the end of the rectangle is found Read the motor rotations Compute the distance traveled

16 Measure The Rectangle Height
Example of measuring the rectangle height Program: MeasureRectangle.ev3

17 Compute the location of pin 3 & 4
Task 2 Compute the location of pin 3 & 4

18 EV3 Mathematical Operations
We can use math blocks to compute the location of pins 3 & 4 For example, assume How can we compute this using our robot? mm

19 EV3 Mathematical Operations
We can use simple math blocks Assumes that x = 200mm Program: SampleMath1.ev3

20 EV3 Mathematical Operations
Here is another approach using advanced blocks Program: SampleMath2.ev3

21 Follow the edge of the table Watch the YouTube videos at:
Task 3 Follow the edge of the table Watch the YouTube videos at: (LineFollowZZ)

22 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

23 Follow The Edge Of The Table
Get color sensor values to determine when the robot is on or off the table. We will use the color sensor in Reflective Light Intensity mode. Off table = ______ On table = ______ On foil = ______ Color Sensor Reading

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

25 Simple Line Following Algorithm
Right side Program: LineFollowZZ.ev3

26 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

27 Watch the YouTube videos at:
Task 4 Find the bowl zone Watch the YouTube videos at: (LineCrossing)

28 Find The Bowl Zone Assuming that the robot is in the no-bowl zone, we must enter the bowl zone in order to bowl a tennis ball to knock down pins One method for finding the bowl zone is reach and cross the black line that separates the bowl zone and no bowl zone This concept is called line crossing

29 Line Crossing How can we use our robot to detect lines?
Travel straight and look…. Off Line = waiting to cross line On Line = reached line Off Line = crossed line Crossing Lines

30 Line Crossing Sample approach Program: LineCrossing.ev3

31 Watch the YouTube videos at:
Task 5 Find a set of pins Watch the YouTube videos at: (TravelDistance) (SpinSearch)

32 Find A Set Of Pins Couple methods Line follow for a given distance
Spin until the pins are detected with the sonar sensor

33 Line Follow For A Given Distance
First, we need to know how far to go Let’s assume that the robot must travel 30 cm How many wheel rotations is 30 cm? Distance = (Wheel Diameter) x (PI) x (# Rotations) Solve for # Rotations…. # Rotations = Distance / [ (Wheel Diameter) x (PI) ] For our robot… # Rotations = 30 cm / [ (5.5 cm) x (PI) ] = 1.74 rotations

34 Follow A Line A Given Distance
Example solution Program: TravelDistance.ev3

35 Spin And Search Here we are going to have the robot spin until it “sees” the pins with the sonar sensor Program: SpinSearch.ev3

36 Task 6 Bowl a tennis ball

37 Bowl A Tennis Ball Again, this task is outside the scope of this workshop However, your robot should be in position to deliver a tennis ball if the previous tasks were completed successfully

38 Watch the YouTube videos at:
Task 7 Return home Watch the YouTube videos at: (FindHome)

39 Return Home One method to have the robot return home is to line follow until home base is detected Using the same principal as line detection, we can determine the threshold for detecting home base On table / off home base = 40 On home base = 60 Median threshold = (40+60)/2 = 50

40 Return Home Two cases Light sensor reading > 50. On home base.
Light sensor reading < 50. Off home base. Program: FindHome.ev3

41 Putting It All Together
In this course we learned how to Measure the height of the rectangular shape Compute location of pin 3 & 4 Follow the edge of the table Find the bowl zone Find a set of pins Return home

42 Little Robots, Big Missions
Questions?


Download ppt "EV3 Software EV3 Robot Workshop 2015"

Similar presentations


Ads by Google