40
ORTOP NXT Robotics Techniques Workshop 2012 “Opening doors to the worlds of science and technology for Oregon’s youth” 6/22/12 NXT Robotics Techniques 2012 1

ORTOP

  • Upload
    tyrone

  • View
    36

  • Download
    0

Embed Size (px)

DESCRIPTION

ORTOP. NXT Robotics Techniques Workshop 2012 “Opening doors to the worlds of science and technology for Oregon’s youth”. Goals. Audience: Rookie and experienced coaches and mentors Build confidence using more advanced navigation techniques Gain experience with 3 motor robot and missions - PowerPoint PPT Presentation

Citation preview

Page 1: ORTOP

ORTOP

NXT Robotics TechniquesWorkshop 2012

“Opening doors to the worlds of science and technology for Oregon’s youth”

6/22/12 NXT Robotics Techniques 2012 1

Page 2: ORTOP

Goals

• Audience: Rookie and experienced coaches and mentors

• Build confidence using more advanced navigation techniques

• Gain experience with 3 motor robot and missions

• You should have already attended NXT workshops I & II and/or coached a team in 2011 tournament

6/22/12 NXT Robotics Techniques 2012 2

Page 3: ORTOP

Instructor Contacts

6/22/12 NXT Robotics Techniques 2012 3

Page 4: ORTOP

Agenda• Robot Design

– Building strong structures– Gears– Motors

• Navigation– Going straight– Turning accurately

• Sensors– Light sensor and calibration– Distance sensor

• Mission Planning & The Buoy Mission• Next Steps

6/22/12 NXT Robotics Techniques 2012 4

Page 5: ORTOP

Robot Design

• What engineering problems are we trying to solve?– Understanding each mission– Building a robot to move objects around on a playing field– Other ideas?

• Observe workshop robot noting:– Complexity– Sensors – location with respect to wheels– Control panel– Beam & pin structural design– What differences exist between this robot design and

others you have seen?

6/22/12 NXT Robotics Techniques 2012 5

Page 6: ORTOP

Engineering Design Process

Define theProblem

Research theProblem

Develop Possible Solutions

Choose the Best Solution

Create a Prototype

Test and Evaluate

Communicate

Redesign

6/22/12 NXT Robotics Techniques 2012 6

Page 7: ORTOP

Building Strong Structures

– Note: parts are all pinned together using Technic pins & beams

– Here are three cross bracing examples• Note: 3-4-5 Pythagorean theorem

– Ref: Minnesota High Tech Kids • http://www.hightechkids.org/for-teams/coaches-

library – 2 inch drop test

6/22/12 NXT Robotics Techniques 2012 7

Page 8: ORTOP

Gears

• Gears– Spur Gear (show example)

• instructor holds beam• class person turns axles and feels torque on other axle• tactile feedback = learning about gears and torque

– Gear Ratio and Speed• turn the large gear one complete turn• How may revolutions does the small gear turn?• Is gear ratio the same as the ratio of gear teeth?

6/22/12 NXT Robotics Techniques 2012 8

Page 9: ORTOP

Gears

• Gears & Pulleys– Worm Gears (show example)

• one way transfer of power

– Crown & Bevel Gears• turn 90 degrees

– Spur Gears• change direction & change torque

– Note gears used on workshop robot fork lift

6/22/12 NXT Robotics Techniques 2012 9

Page 10: ORTOP

Robot Design

• Three motor base– Level, square– Screen location

• Attachments– Soda can pusher– Fork

6/22/12 NXT Robotics Techniques 2012 10

Page 11: ORTOP

Robot Design• Mission Attachments– Measure all mission items– Grabbers – e.g. to catch food factor truck & trailer– Pushers/pullers – e.g. food factor fish– Caribiners /hooks - locks onto item– Carts – for collecting or delivering mission items– Use of 3rd motor – for a grabber or fork lift– Can we group missions together using one attachment?

• Mission Planning– Use a chart/drawings to show attachments used on each

mission, more on this topic in the next segment.– Any questions on robot design?

6/22/12 NXT Robotics Techniques 2012 11

Page 12: ORTOP

ORTOP FLL Workshop 3Navigation

Sometimes the robot does not go where you want it to. Has this ever happened to you?In this segment, let’s explore basic robot move and turn accuracy.Here is an example mission…

6/22/12 NXT Robotics Techniques 2012 12

Page 13: ORTOP

Mission: Insert Stent into Artery

Moves:•Start box to ball•Turn left 40 deg•Ball to black line•Turn left 70 deg•Follow black line for 5 sec•Can this mission run successfully 5 times??•What factors influence move and turn accuracy?

6/22/12 NXT Robotics Techniques 2012 13

Page 14: ORTOP

Navigation• Let’s do a simple “Going Straight” lab

test to understand how the robot moves:– Tape down 2 pieces of paper on the table,

2 feet apart– Draw a starting line on one paper– Create a simple program to move 2 feet

then stop– Run speeds at 20, 50, 90

– Use a “soda can pusher” or similar attachment on the front of the robot

– Run test 5-10 times– Mark a large dot where front

“can pusher” arm stops– Begin test now

6/22/12 NXT Robotics Techniques 2012 14

Page 15: ORTOP

Navigation• Going Straight test:

– Run test 5-10 times, record results– Draw box around landing points– What does the box tell us?

• Goal: To understand how the robot moves – its accuracies and inaccuracies

• We can then compensate for inaccuracies with other techniques– Examples: use a wide fork for the

buoy mission, or a wide soda can pusher

6/22/12 NXT Robotics Techniques 2012 15

Page 16: ORTOP

Navigation

• Theory - The S curve inaccuracy:– A Move block rotates both wheels to

the programmed position using built-in rotation sensors as feedback

– If one wheel slows down, the other wheel slows down, causing the robot to move in a lazy S curve

• Did you observe this in your going straight lab tests?

6/22/12 NXT Robotics Techniques 2012 16

Page 17: ORTOP

Navigation

• Compensation for navigational errors – “reset to zero”

• Use mechanical means– Angled corners (back into a corner)– Wall follower (wheel)– Back against a wall

• Use sensors– Light & touch to “reset to zero” and

re-establish the exact robot location

6/22/12 NXT Robotics Techniques 2012 17

Page 18: ORTOP

Navigation

• Variables that affect going straight:– Starting box position– Speed– Battery charge– Tire size– Motor friction, gear backlash (Google these terms)– NXT software tries to keep both wheels moving at

same rate– What is distinct about the last two variables?

6/22/12 NXT Robotics Techniques 2012 18

Page 19: ORTOP

Navigation

• Turning Accuracy– Lets review two types of turns

• Spin Turn– Position Move block slider all

the way to the LEFT or RIGHT– A spin turn uses 2 wheels, one

forward, one backward - robot “spins” around center point between the wheels

<<<Move block slider >>>

6/22/12 NXT Robotics Techniques 2012 19

Page 20: ORTOP

Navigation

• One Wheel Turn– Use Move block, turn one motor off– One wheel moves, one is stationary –

robot turns around the stationary wheel

• Which turn is more accurate?• Where could we use the spin turn?

One wheel turned off

6/22/12 NXT Robotics Techniques 2012 20

Page 21: ORTOP

Navigation

• Extra Credit– Program a move-turn sequence– Use “spin” turns and “one-wheel” turns– Place a pencil mark where robot stops– Run program 5-10 times and collect data

• Variables– Left-right error– Turn angle error– Any more variables?

6/22/12 NXT Robotics Techniques 2012 21

Page 22: ORTOP

Navigation• Review:– Use navigation and “reset to zero” to know where

robot is at all times– Understand variables and how they influence robot

movement. We learned left-right moves are less accurate than front-back moves.

– Long dead reckoning moves are ok, if robot/attachments can compensate for move inaccuracies, e.g.• Width of can pusher, width of buoy pickup fork• Backing into wall or corner to re-align robot

• Go for simple & sufficient solution

6/22/12 NXT Robotics Techniques 2012 22

Page 23: ORTOP

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

• Teams sometimes give up on sensors because they seem complex and don’t seem to work in a predictable manner

• But, we all use the built-in rotation sensors in the motors to tell us the number of rotations/degrees

• Let’s explore the light sensor to help us navigate on the playing field

6/22/12 NXT Robotics Techniques 2012 23

Page 24: ORTOP

Sensors

• Let’s take a detailed look at the light sensor (LS)– Connect LS to NXT brick – use port 3– Create a program to turn on LS and read values,

use yellow LS icon, add a 5 sec wait to keep the LS on for a few seconds while you read values

– Read LS values: click LS icon, read value in LS control panel

– Mount the LS about 3/8 inch from the mat and observe Black, Green, and White values

6/22/12 NXT Robotics Techniques 2012 24

Page 25: ORTOP

Sensors• Let’s look at LS-to-mat distance & record some data:– Mount LS on the robot about 1/8” from the mat– Record Black, Green, & White values– Move the LS to 3/8” from the mat, record values– How does the distance affect LS values?– As the robot moves, it bounces. Which distance do you

think would work best, and why?

LS # _____ Black Green White Calculated trigger point

1/8” from mat

3/8” from mat

6/22/12 NXT Robotics Techniques 2012 25

Page 26: ORTOP

Sensors• Now let’s record some more data:– Use your hand to cover the LS to simulate a dark room– Record Black, Green, & White values– Trigger point is halfway between white & black, we will

come back to this calculation– What does this tell us about LS performance in various

room lighting conditions?Black Green White Calculated

trigger point

LS-1 uncovered

LS-1 covered

6/22/12 NXT Robotics Techniques 2012 26

Page 27: ORTOP

Sensors

• Theory: Light sensor returns values of reflected light– E.g. white = 63

– Trigger point (programmed) = • (( white – black) / 2) + black

– black = 34

– Trigger point example: ((63-34) / 2) + 34 = – Take a minute and calculate trigger points on previous

slides

6/22/12 NXT Robotics Techniques 2012 27

Page 28: ORTOP

Sensors• Now lets use what we learned in a program..• Theory: sensor “wait until” program action (orange hour glass icons)

• Program example:– Runs the Move block,– Waits on the Light Sensor block, Until sensor trigger point is crossed,– Continues to the next program step

• What does this program do?• What is the purpose of

the third block?

• Note:– Don’t forget to select

less than< or greater than>on the control panel

– –

W63

B33

Trigger point

6/22/12 NXT Robotics Techniques 2012 28

Page 29: ORTOP

Sensors• Data from 7 light sensors - uncalibrated, room light on • What trigger point would we use to stop on black? On green?

6/22/12 NXT Robotics Techniques 2012 29

Page 30: ORTOP

Sensors• Calibration: A process to compensate for varying lighting

conditions• Data from two light sensors – uncalibrated, calibrated

6/22/12 NXT Robotics Techniques 2012 30

Page 31: ORTOP

Sensors• Example: Light Sensor Calibration Blocks

– Program Steps:•Turn on light sensor•Say “white”•Wait 3 seconds to position sensor over white area•Sample and store the “white” value•Say “Black”•Wait 3 seconds to position sensor over black area•Sample and store the “black” value•Wait 1 second and end the program

– Why is this important?•Calibrating the light sensor provides widest range of values between white and black, making it easier to use the sensor in a variety of lighting conditions

6/22/12 NXT Robotics Techniques 2012 31

Page 32: ORTOP

Sensors• Using the internal calibration program• Connect NXT brick to your computer, and make sure MINDSTORMS is running.• Verify the NXT is properly connected, click “NXT Window” in lower right corner of

screen, click “Scan” and “Connect” and “Close”• On the upper left corner, click “Tools” and “Calibrate Sensors”• To Un-calibrate the NXT:

– Click “Port3”, “Default”, and “Refresh”. • Important: If you calibrate one of the workshop robots, please “un-calibrate” it before

leaving class.• To Calibrate, do the following:

– Select the light sensor and the port the sensor is connected to. Then click the Calibrate button. This will download a small program to the NXT and run it automatically.

– On the NXT’s screen you will see text that reads “Min Value:”. Point the light sensor towards a material or spot that represents what the light sensor should measure as dark. Press the orange Enter button on the NXT.

– Next you will see text that reads “Max Value:”. Point the light sensor towards a material or spot that represents the brightest location the sensor will encounter during the program. Press the orange Enter button again. Calibration is complete.

– Caution: After Calibration, read light sensor values from the Light Sensor program block to determine trigger points. Do not use NXT View function, View gives incorrect values for calibrated light sensors.

6/22/12 NXT Robotics Techniques 2012 32

Page 33: ORTOP

Sensors• Extra Credit – The Color Light Sensor

• See Color Sensor Block “?” for programming details• Detects color(s) within a defined range• Also works as black & white light sensor• Our tests show it works better for detecting black lines• Color sensor does not require calibration when detecting colors• Review how to set “stop on black” • Example:• Turn on B motor• “Wait until” color red• Stop B motor

• Use Color Lamp Block – for turning on/off RGB lamps

6/22/12 NXT Robotics Techniques 2012 33

Page 34: ORTOP

Sensors• Mounting LS on the robot:– Front center – detect line or follow line to target– If LS is too close to turning center, then robot wobbles– Distance to the mat, shoot for about 3/8” to avoid false

triggers with small bumps in mat– room light influence, LS is buried inside robot or out in

open• Extra Credit:– What changes to the LS mounting would you recommend?– When could we use two sensors?

– Review LS help sections in NXT-G

6/22/12 NXT Robotics Techniques 2012 34

Page 35: ORTOP

Sensors• Homework assignment:– Add a “Wait for Distance” block– Program the robot to stop at 4 inches– Shape and texture of target object is important

• This completes the four sensors:1. Rotation2. Touch3. Light4. Distance• Questions on Sensors?

6/22/12 NXT Robotics Techniques 2012 35

Page 36: ORTOP

ORTOP FLL Workshop 3The Buoy Mission

In this segment:•Use a Mission Planning Sheet•Plan moves, turns, & attachments•Program the robot•Win the points!

s

6/22/12 NXT Robotics Techniques 2012 36

Page 37: ORTOP

The Buoy Mission• Engineering Problem: – Pick up and carry the buoy from its current position,– Place it in the box at the end of the mission board,– Park the robot on the blue finish line

• Note the box has a fence in front, so to score points you must lift the buoy over the fence and into the box. Extra credit points for detecting the fence using the distance sensor.

• First, write a mission plan (moves, turns & attachments), then write a program to execute your plan

6/22/12 NXT Robotics Techniques 2012 37

Page 38: ORTOP

Mission Planning Sheet

Mission(s):______________________________________ Maximum Score: _________ Program

Name: __________________Memory size: ____ Time to run: _____________

Plan Overview: ___________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

Starting Position:__________________________________________________________

________________________________________________________________________

Sensors Used (Port): __________(___), __________(___), __________(___) __________(___),

__________(___), __________(___)

Navigation Details:________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

6/22/12 NXT Robotics Techniques 2012 38

Page 39: ORTOP

Buoy Mission

6/22/12 NXT Robotics Techniques 2012 39

s

End here

Place buoy here

Start here

Page 40: ORTOP

Next Steps• Register your team with FLL• Share with your team

– NXT Robotics Techniques slides– Mindstorms NXT Tutorial (Dale Yocum)

• www.ortop.org/NXT_Tutorial – Build and test 2-3 robot designs, then have your team select a hybrid of

best features– Project resource video: Google FLL project dvd, should find:

www.youtube.com/watch?v=LFBBnyz8syM• Challenge the kids!

– Make up your own exercises – stress basics and repeatability

• Fill out workshops survey, let us know highlights, lowlights, changes, keeps www.ortop.org/workshopsurvey/

• Good Luck and thanks for being a coach/mentor!

6/22/12 NXT Robotics Techniques 2012 40