NXT Robotics Techniques Workshop 3 - 2010

advertisement
NXT Robotics Techniques
Workshop 3 - 2010
“Opening doors to the worlds of science and
technology for Oregon’s youth”
6/10/2010
NXT Robotics Techniques - 2010
1
AGENDA
•
•
•
•
•
•
•
•
•
General Robot Design
Navigation Design
Robot Characterization
Efficient Programming
Distance Sensor
Buoy Mission
Resources
Contacts
Next Steps
6/10/2010
NXT Robotics Techniques - 2010
2
General Robot Design
• Robot balance
– Pick up the 3 motor robot
– Where is the center of gravity?
•
•
•
•
keep CG vertical force inside wheelbase
Smart Move Incline mission – what happens to CG?
What happens with acceleration?
Starting torque lifts front end up with rear wheel drive
• Wheels – small, large, treads, skids, swivel – positives & negatives of each
- examples
• Gears – bevel, straight, worm, pulley – torque transfer - examples
• Beam & Pin structural design - examples
• Screen & control panel location
• Battery Access
• Mission Attachments – examples: fork lift, cow catcher
• Questions on general design?
6/10/2010
NXT Robotics Techniques - 2010
3
Navigation Design
• Sensors
– Why do we use sensors? – navigation
– How do we use sensors? – examples:
•
•
•
•
Light - stop on line
Touch?
Rotation?
Distance?
– Problems programming sensors
• Programming Tutorial, link on resource slide – have your team review
• Learn sensor’s useful range
–
–
–
–
distance sensor min-max range
rotation sensor angle
light sensor height, mounting angle, shading, robot speed
Light sensor green/black exercise, reflected light value, light threshold
• Read values from programming blocks, lower left corner
6/10/2010
NXT Robotics Techniques - 2010
4
Navigation Design
• Mission example:
– Pick up buoy, place in box
– park robot with light sensor on line
– We will do this mission later in class
– What kinds of navigation would you use on this
mission? LAB: brainstorm ideas
•1
•2
•3
6/10/2010
NXT Robotics Techniques - 2010
5
Navigation Errors
• Straight move – what errors could result?
– Linear error – buoy dropped in front of box
– Angular error – buoy dropped to left or right of
the box
• Test example: move 24 inches from starting
point
– Find pointer in kit, add to robot cow catcher
– Draw line on paper where pointer stops
– Repeat 5 times
6/10/2010
NXT Robotics Techniques - 2010
6
Robot Characterization
• Add position and
measurement guides
to cow-catcher
6/10/2010
NXT Robotics Techniques - 2010
7
Robot Characterization
• Write simple test program to make robot go
forward 24” – record linear & angular results
– LAB: Run this characterization now on your table
• Use blue tape for start line and paper for landing point
6/10/2010
NXT Robotics Techniques - 2010
8
Robot Characterization (field prep)
• Starting line with tick marks to align robot
• Graph paper at ending location to mark robot
stopping position
6/10/2010
NXT Robotics Techniques - 2010
9
Robot Characterization (collect data)
• Use measurement guide and program on
previous slides
• Run tests for 5-10 times
• Draw line on paper after
each run
6/10/2010
NXT Robotics Techniques - 2010
10
Robot Characterization (Analyze Data)
• Draw bounding box
around min and max
data points, 0.28” X and
1.9” Y in this example
from a workshop robot
• Identify min and max
stopping angle
6/10/2010
NXT Robotics Techniques - 2010
11
Navigation Influences
1.
2.
3.
4.
5.
6.
7.
8.
9.
Starting blocks – base position – base calibration - example
Speed and robot bounce – Why?
Battery charge – Why?
Move Block steering left-right
Tire size and third wheel position
Weight & balance
Rotation sensor in motors – 1 degree resolution
Gear slop
Software inside NXT
–
–
•

Slow one wheel down, the other slows
Result is S curve tracking
We can control 1-6 but not 7,8,9
Determine when to use dead reckoning vs. navigation



Use sensors and attachments to compensate for navigational errors
Examples: wide fork with long tines for buoy mission, back into wall for alignment
Don’t waste time debugging long, dead reckoning moves!
6/10/2010
NXT Robotics Techniques - 2010
12
Robot Characterization (next steps)
•
•
•
•
Run same experiments at various power settings
Run L-tests, inclined plane, other short missions
Use touch sensor to move around an object
Run mission tests when the Body Forward
challenge is available
– Your team will want to dive in and program all
missions
– decide which missions to do, then characterize
appropriate missions
– Keep a good lab notebook
6/10/2010
NXT Robotics Techniques - 2010
13
Robot Characterization (Questions)
• Characterize your robot then discuss with your team:
•
•
•
•
•
Did robot move expected distance? Why not?
What would worst case errors to be?
How do angular errors affect performance?
Are there ways to reduce the errors?
How can we work around the errors to achieve mission
success?
1.
2.
3.
• Questions on characterization?
6/10/2010
NXT Robotics Techniques - 2010
14
Efficient Programming
• Firmware & programs stored in flash ~ 125KB
– Each program ~ 0.1 KB overhead
– Move block ~ 5.1 KB, two ~5.8KB
• To determine memory usage
– Lower right corner – click NXT Window, Memory
6/10/2010
NXT Robotics Techniques - 2010
15
Efficient Programming
• Loops, My Blocks
– Create a program to move in a straight line then
turn 90 degrees
• Do this 4 times to create a square (square1 program)
– How can we change the program to make it more
efficient?
• Use a loop and execute move-then-turn – 4 times
(LoopSquare program)
• Check memory size, write down value
6/10/2010
NXT Robotics Techniques - 2010
16
Efficient Programming
• Create a My Block
– Add a Move block, a Wait for light sensor block , and a
Move block
• Set the first Move block to Duration: unlimited, and 50 % power
• Set the Orange Wait for Light Sensor to “less than” value of 45
• Set the second Move block to stop
–
–
–
–
Select all 3 blocks - hold shift key and click all blocks
Click Edit – Make A New My Block
Add a title in upper right corner, click Finish
Download and test your “Wait for Light Sensor” My Block
in a program
– Save your My Block for later use in Buoy Mission
– LAB: do this now
6/10/2010
NXT Robotics Techniques - 2010
17
Efficient Programming
• Show “light sensor” My Block with move-waitmove
• Create a program with 3 “light sensor” My Blocks
– Download the program to NXT
– Check NXT memory usage
• Create a program with 9 blocks
– (use move-wait-move etc.)
– Check NXT memory usage
– Is the My Block more efficient?
6/10/2010
NXT Robotics Techniques - 2010
18
Efficient Programming
• Show program MyBlockLightSensor
• My Block uses?
– Code reuse
– subroutines
– Move/turn
– Stop on black, stop on color (use a variable to
control the value of the light sensor)
– Line follow, left or right
– 3rd motor activity – raise, lower fork
6/10/2010
NXT Robotics Techniques - 2010
19
Efficient Programming
• Printing your program
– Print out your program using “file” “print” to
“html file”
– This action produces html and png files. You can
use the png file in your program documentation
– Printed programs are a requirement for
tournament judging
• Questions on programming?
6/10/2010
NXT Robotics Techniques - 2010
20
Distance Sensor
– Add a “Wait for Distance” block
– Program the robot to stop at 4 inches
– LAB: do this now
– This is the last sensor you will learn
1.
2.
3.
4.
6/10/2010
Rotation
Touch
Light
Distance
NXT Robotics Techniques - 2010
21
Mission Example: Buoy
• Start with the robot on blue line #1
• Move forward and pick up the buoy
• Deliver the buoy into box #2 at the end of the
field
• End the mission with the robot parked with
the light sensor on blue line #3
• Questions on the Buoy Mission?
• LAB: do this now
6/10/2010
NXT Robotics Techniques - 2010
22
Mission Example: Buoy
End here
s
Place
buoy
here
Start here
6/10/2010
NXT Robotics Techniques - 2010
23
Resources
• Tutorial, Dale Yocum
– Run tutorial: www.ortop.org/NXT_Tutorial/
– Requires Adobe Macromedia Shockwave player and high speed
connection
• http://nxtprograms.com/index1.html
– look for “castor bot” – contributed to Workshop 3 motor design
• Http://www.hightechkids.org/coach-library
– the Wiki of LEGO Robotics
• Robot Characterization, Dale Jordan
– www.ortop.org/Workshops - look in Workshop 3 materials
• Building Robots with LEGO Mindstorms NXT
– Authors: Ferrari, Ferrari, Astollo
6/10/2010
NXT Robotics Techniques - 2010
24
Contacts
• Cathy Swider – ORTOP & FLL Operational Partner for Oregon
– cathy_swider@ous.edu – 503-725-2920
• Jim Ryan
– james.r.ryan@intel.com – 971-215-6087
• Roger Swanson
– swanson@hevanet.com – 503-297-1824
• Dale Jordan
– dale.a.jordan@msn.com -503-805-9860
• Ken Cone
– kcone@hevanet.com – 503-415-1465
6/10/2010
NXT Robotics Techniques - 2010
25
Next Steps
• Register your team with FLL
• Share with your team
– These slides
– Mindstorms NXT Programming Tutorial
• By Dale Yocum – www.ortop.org/NXT_tutorial
– Build 2-3 test robot designs, then have your team
select a hybrid of best features
– Challenge the kids
• Make up your own exercises
• stress basics
• take good lab notes
6/10/2010
NXT Robotics Techniques - 2010
26
Parting thoughts
• From “All I really need to know (about creative thinking) I
learned by studying how children learn in Kindergarten.”
–
–
–
–
–
–
–
–
–
Start simple
Work on things that you like
If you have no clue what to do, fiddle around
Don’t be afraid to experiment
Find a friend to work with, share ideas
It’s OK to copy stuff (to give you an idea)
Keep your ideas in a sketch book
Build, take apart, rebuild
Lots of things can go wrong, stuck with it!
• Credit MIT
6/10/2010
NXT Robotics Techniques - 2010
27
Review & Questions
• Please give us your input – visit ortop.org/fll
or email: questions@ortop.org
– Let ORTOP know how we can improve the program
– Thanks for volunteering! Your efforts make learning
possible
– Disassemble robots BUT keep the following together:
•
•
•
•
•
•
6/10/2010
Castor mount (pages 11-18)
Light sensors (pages 24-27)
Touch sensor (pages 28-29)
Ultra-sonic sensor (pages 30-31)
Cowcatcher (pages 32-33)
Fork lift (pages 34-35)
NXT Robotics Techniques - 2010
28
Alternative Measurement Guide
6/10/2010
NXT Robotics Techniques - 2010
29
2010 Workshops Survey
• List 3 things or experiences you remember
from the three workshops
• What was the most fun?
• What was the least fun?
• What should be changed?
• Other comments?
• Please turn in you surveys
• Thanks for participating in FLL!
6/10/2010
NXT Robotics Techniques - 2010
30
Download