PowerPoint Slides - Oregon Robotics Tournament and Outreach

advertisement
ORTOP Workshop 3 - Robot Design
Robot Design, Navigation & Missions
1
Workshop 3 Goals
Move your team up the
ladder in navigational skills,
and to increase their
understanding and use of
sensors
•
Provide tools to help give
feedback to team
members and guide their
instruction
•
Questions from
Workshops 1 or 2?
2
Introduction
Workshop 3 Methodology
•
Explore a problem
Run a hands-on experiment
Get kids’ heads wrapped around a problem
Explain how it works
Show important aspects of the problem
Add background information and knowledge
Apply knowledge
Solve a more complex problem with what you now know
To help clarify concepts - Discussion
•
•
•
Convince yourself
Convince a friend
Convince a skeptic
3
Agenda
Going Straight
Making predictable moves
Moves - lab experiment
Background information on inaccuracies
Compensation for errors - attachments!
Turning
Making predictable turns
Turns - lab experiment
Gyro turns - lab experiment
Color and light sensor
Reading values from the color / light sensor
Detecting color areas & inaccuracies
Buoy mission - putting it all together
Mission planning
Using dead reckoning
Using sensors
4
Going Straight
How do we make the robot go
straight?
What if your were driving your car and it wobbled
from side to side down the road?
What if your car always pulled to the right or to the
left?
5
Going Straight
Experiment: move 2ft, stop, run 4-5x
Program the robot to move 2 feet and stop
Tape 2 pieces of paper about 2 feet apart
Start the robot at exactly the same location for each
run using front axles and rear ball as markers
Indicate where the robot stops by marking the two
front forks and rear ball
Run 4-5 times at speeds of 20, 50, & 100 recording
data for each run
Notice if the robot wobbles
Draw a box around the stopping points to show X
and Y position error zones
Notice if speed affects where the robot stops
Go! 15 min.
6
Going Straight
S curve inaccuracy & wobble
Motor rotation sensors
Inside each motor is a rotation sensor, similar to a
speedometer / odometer in a car. The sensor provides
wheel rotation and speed feedback to the Move
Steering software in the EV3.
•
•
If one wheel slows, the Move Steering block senses
the change and slows the other wheel, causing the
robot to wobble and veer left or right.
The robot may stop or coast depending on selection
of check or X
7
Going Straight
Team discussion:
Does the robot stop at different X (side-side) and Y
(front-back) points?
How does speed affect the X and Y position?
What might happen if the robot stops on a black
line, at different speeds?
Be careful about speeding up runs and changing Y
endpoints!
8
Going Straight
Compensation for navigational
errors
Angled corners (back into a corner)
Wall follower wheels
Back against a wall
Width of attachment! (e.g. buoy fork)
9
Going Straight
Use a starting block from base
10
Navigation
Going straight variables
What are the variables that affect going straight?
1. software that senses wheel rotation
2.
3.
4.
11
Going Straight
Variables that affect going straight
Starting box position, affect on X and Y stopping
points
Speed, affect on stopping point
Battery charge, affect on speed
Tire size and axle flex and mounting
Motor friction, gear backlash (Google these terms)
EV3 software tries to keep both wheels moving at
same speed - S curve inaccuracy
What is distinct about the last two variables?
Any questions about going straight?
12
Turning
2 wheel “spin” turn
on for degrees
steering slider all the way right or left
speed medium
wheel rotation 180 degrees to turn the robot ~
90 degrees (depends on wheel size)
brake when finished
Accuracy of a 90 deg spin turn:
tends toward a normal distribution,
SD 1.9 to 3.5 degrees
Lab: discuss in your team
& program spin turn
13
Turning
1 wheel turn
on for rotations
medium speed
wheel rotation 360 degrees to turn the
robot ~ 90 degrees (depends on wheel
size)
brake when finished
14
Turning
Gyro sensor spin turn
reset Gyro sensor
Move Steering block - B&C on for rotations
steering slider all the way right
medium speed
Wait - Gyro sensor compare angle >= 78 degrees
brake B&C when finished
15
Turning
Gyro sensor spin turn
Run the following program in a loop
Change the => to = and observe results
Why turn 78 degrees?
Accuracy of a 90 deg Gyro turn:
Gyro reading average ~ 91 deg,
turn angle distributed greater than the programmed angle,
SD is 1.5 to 2 degrees
Lab: Discuss in your team & program a Gyro turn
Any final questions on turning?
16
Programming Help
Programming
Help
Help tab at top
Show Context Help highlight a program
block, then click
Context Help
Show EV3 Help takes you to top level
EV3 help - help files
are on your computer
17
Memory
Memory
Management
Open Memory Browser
Shows projects & memory
allocation
18
Buoy Mission
Buoy
Mission no sensors
Move N from
base to black
line, turn CW,
Move E to black
line and pick up
the buoy
Move S, place
the buoy
between the
black lines
Go: 15 min.
19
Sensors
Now that we know how to move and turn with some precision,
lets take a look at sensors
Sensors we can use in FLL:
touch, light, rotation, distance, gyro
Teams sometimes give up on sensors because they seem
complex and don’t seem to work in a predictable manner
Most teams feel comfortable with the built-in rotation sensors in
the motors to determine the number of rotations/degrees
In this segment we’ll explore the light/color sensor in more detail
to help us navigate on the playing field
20
Sensors
Threshold Value Calculation
From Workshop 1 Lab:
Light Sensor returns value of RED reflected light
e.g. white = 62
Threshold Value (less than) <
(white - black) / 2 + black
black = 31
Example: (62 - 31) / 2 + 31 = ?
Take a minute to visualize the threshold value, and
discuss in your teams. Does your answer make
sense?
21
Sensors
Light sensor variables
Sensor-to-mat distance - let’s record some data:
Elevate the robot rear ball so the sensor is about 1/8” from the
mat
Record black, green, & white values:
- using EV3 VIEW function
- also verify values on computer screen
Level the robot so the sensor to 3/8” from the mat, record
values
As the robot moves it bounces, which distance do you think
would work best, and why? Discuss with your team
Black
Green
White
1/8” from mat
3/8” from mat
22
Sensors
Color sensor variables
Incorrect color sensing - let’s record some data:
Using the color cube, record values for blue, green, red,
yellow - hold the sensor about 3/8 inch from the cube
Record black, red, green, blue, white values from the
white board
Team discussion: what does this tell us about color
sensor performance with various shades of color?
Black
Red
Green
Blue
Yellow
color
cube
mat
values
23
White
Sensors
Setting up the color sensor
Wait for Color Sensor
Compare
Color
Then select color(s) you want to detect
The colored dot indicated selected colors
24
Sensors
Detecting a black line with the color sensor
Block by block, what does this program do? (Convince yourself,
convince a teammate...)
1.
2.
3.
4.
5.
Any final questions on the color sensor?
25
Information
Mission planning
26
Buoy Mission
Buoy
Mission color
sensor
Move N from
base, detect
black line, turn
CW
Move E, detect
black line, pick
up the buoy
Move S, place
the buoy
between the
black lines
27
Line Follow
Extra credit: Line Following - is really
edge following
Steer to black, wait for _____
Steer to white, - wait for _____
Follows left edge of black line
Loop
Go ahead and write a program to do this
28
B
C
Line Follow
Line following - breaking out of the loop
Time
(# of loops)
(Sensor input)
workshop 4 covers loops more thoroughly
Discuss line following in your team
Help all team members to understand line following
Judges will ask “Explain how this works, and
What happens if...”
B
29
C
Information
simple line follower with left sensor stop on blue
robot steers to blue line, then away
note speed, zigzag & approach angle
30
Review
Help your teams focus on moves, turns and
repeatability
By breaking missions down to basic moves and turns
By identifying error zones
By compensating for errors with attachments, positioning and sensors
By encouraging your team to make evidence based decisions
Help your team learn about robot behavior
Ask a simple question to focus their attention on a problem
Let them experiment with the problem - hands-on
Provide technical background information such as how to run an
experiment or program a loop
Get the team to use what they know to solve a complex problem
Review what they have learned, quiz them to make sure they
understand the problem and their solution - next slide has more on
questions...
31
Quiz
How does the EV3 software know when to stop
the robot?
1. With an internal GPS
2. By counting wheel rotations
3. By measuring light values
What causes the side-to-side wobble?
1. Move block software
2. Changes in light sensor values
3. The weight of the light sensor on one side
Ask quiz questions at the end of a segment or team meeting to help you
understand the team’s overall knowledge
32
Project
Using Scientific Inquiry in your team FLL Project:
Forming a Question or Hypothesis
What are the robot move and turn accuracies?
Learn to ask questions that can be investigated
Designing an Investigation
Run 2ft straight move, then turn 90 deg
Run test 5x @ 50% speed
Collecting and Presenting Data
Use pen & ruler to mark where robot lands
Analyzing and Interpreting Results
Be able to defend your conclusions
Ref: Oregon Department of Education - 2009 science standards
33
Take Home Message
Help your team discover and use scientific
processes to understand robot moves and
behavior
Ask formative assessment questions to help you
as coach assess where your team is, and what is
needed to move them forward
Resources:
Scientific Inquiry: Oregon Department of Education ~ Inquiry
http://forums.usfirst.org/forumdisplay.php?24-FIRST-LEGO-League
join the FIRST Forum, search forum for help, e.g. color sensor
Winning Design!: LEGO Mindstorms NXT by James J. Trobaugh
34
Download