Download presentation
Presentation is loading. Please wait.
Published byTheodore Perkins Modified over 9 years ago
1
Introduction to LEGO NXT robotics and Robot Sumo – Sept 20, 2008 Douglas G. Czinder IEEE SEM R&A Chairperson chair@semrobotics.org Professor Keith Bozin kbozin@greaybox.com CJ Chung, Ph.D. Associate Professor and Director of Robofest chung@LTU.edu Lawrence Technological University
2
This program is possible thanks to: a grant from The Chrysler Foundation the Southeastern Michigan Chapter of the IEEE Robotics & Automation Society
3
Workshop Schedule – Sept 20, 2008 9:30 – 10:00 Continental Breakfast (provided) 10:00 – 10:20 Intro to Lego NXT & Robofest 10:20 – 11:00 Basic NXTG programming 11:00 - 11:15 Break 11:15 - 12:30 Programming with Sensors 12:30 - 1:30 Lunch (provided) 1:30 - 2:15 Programming with Sensors (cont’d) 2:15 – 2:30 Break 2:30 – 3:00 Basic Sumo Program 3:00 – 3:30 Improved Sumo Program 3:30 – 4:00 Mini Competition
4
Introduction to Robotics What is a true robot? autonomous robot with an on board computer Mechanical, electrical, and computational components Six fundamental components of a robot A brain or brains – computer Body: physical chasses that holds other pieces Actuators: motors, hydraulic pistons, pneumatics Sensors Power sources Communication mechanism
5
What is Robofest? 100% Autonomous Affordable Challenging: Unknown problem No direct adult help allowed during the competition Qualifiers and a World Championship Various categories including Robot Sumo Two divisions: 5 th – 9 th grade: Jr. Division 9 th – 12 th grade: Sr. Division
6
RoboSumo Push the other robot out of the Sumo ring
7
Specifications Junior DivisionSenior Division Sumo ring diameter77 cm (30 inches)122 cm (48 in) Maximum robot mass 1kg (2.2 lbs)2 kg (4.4 lbs) Maximum robot width and length 23 cm (9 inches)30 cm (11.75 inches) Maximum robot height no limit30 cm (11.75 inches) Robot type Any; Lego Mindstorms or NXT recommended. any
8
Why Sumo? The most popular robot competition in the world Integrator in Science Education – Math, Logic, Computers, Mechanics, and Physics Good for rookie teams Fun Motivator
9
Unknown Problem in Robofest Sumo How to start is unknown Need sensor(s) Teams must bring a computer to program the unknown parts
10
Introduction to Lego NXT Brain – RCX micro computer Body: Lego Technic pieces Actuators: up to 3 motors Sensors: Light, Touch, Ultrasonic, Sound, etc. Power source: 9V (six AA batteries or rechargeable battery pack) Communication mechanism: USB or Blue Tooth
11
Introduction to “SB2 (Sumo Bot 2)” Left motor: A Right motor: C Touch: 1 Light: 3 Ultra Sonic (distance): 4
12
Introduction to NXTG Programming Please go through Getting Started and Software Overview after this class
13
First NXT program: Go forward for 2 sec. and stop Let’s name the program first Click on Go >> button You’ll see a programming palette (canvas)
14
First NXT program using SB1: Go forward for 2 sec. and stop (2/3) Click on Move button Drag and drop the move block to the canvas
15
First NXT program using SB2: Go forward for 2 sec. and stop (3/3) Change parameters for the Move Port Direction Steering Power Duration Next Action Block Configuration Panel
16
How to run your first program (1/2)
17
How to run your 1 st program (2/2) If “Found New Hardware” pops up, just follow the instruction Click on “Download” button Recommended to un-plug the cable from the Bot Press the orange button 4 times (Turn on, My files, Software files, Run your program entitled go2stop)
18
How to rerun the program Check the program name on the LCD Press the orange button just once again
19
How to stop the program Gray button
20
First NXT Program: Go forward for 2 sec. and stop (Review)
21
Do not forget: Save your programs Meaningful file (program) names Use comments
22
2 nd Program: ForwardBack 1. Go Forward 2 rotations 2. Wait 3 seconds, then 3. Backward 1 rotation
23
Go Forward 2 rotations, Wait 3 seconds then Backward 1 rotation – ForwardBack
24
Making Turns (Instructor Slide) Turn left Spin left Face left Left wheel Right wheel Left wheelRight wheel Left wheelRight wheel stop Objective Challenge the students to think about how a turn is made Two ways to turn using one motor (demonstrate by turning with your leg) Demonstrate advantage of turning by spinning
25
Making Turns Turn left Spin left Face left Left wheelRight wheel Left wheelRight wheel Left wheelRight wheel stop
26
Forward 2 rotations, Turn Left 90 Degrees, and Forward 2 rotations Turn90Left – Using a Motor Block!
27
Forward 2 rotations, Turn Left 90 Degrees, and Forward 2 rotations – Turn90Left
28
How do we make to turn 90 degrees? Timer? Trial errors Let’s do the math!!! Width of the robot: 14 cm Diameter of the wheel: 5.5 cm Perimeter of the wheel: 5.5 cm x pi = 17.27 Travel distance needed: (14 x 2 x pi) / 4 = 21.98 cm Number of rotations needed? 21.98 / 17.27 = 1.2727 14 cm
29
Programming with Sensors Programming with Touch Sensor Light Sensor Ultrasonic Sensor Repeat Basic Sumo Program
30
Start-Touch Wait until the touch sensor is pressed; Then start the robot to go forward Stop after a second
31
Start-Light Locate the robot in the middle of the ring Wait until the light sensor detects very bright (lantern) light Then start the robot to go forward Stop after a second
32
Start-Light
33
Stop-Touch Go straight until the bumper is hit then stop
34
Stop-Edge Go straight until the white edge of the ring Then stop
35
Loop To repeat a sequence of code Until Elapsed time Number of repetitions Sensor condition is met Logic becomes true Forever
36
Say “Yes” – 10 times
37
Make the robot move around in the ring – Basic Sumo (Sumo0) Repeat the following forever: Go forward until the edge Backward slightly Spin right
38
Sumo0
39
First Sumo Competition Some matches Ask students to list ideas to improve the Sumo robot
40
Improved Sumo Program Improved Sumo program Unknown Problem Mini Competition Tips and Ideas to improve your Robot!
41
Program for the Mini Competition Press “Shift” to connect parallel sequence beams
42
Ideas to improve your SumoBot Improve (debug) your program! Applying Theories learned in Physical Science Mass, Newton’s laws Friction Gearing Wheel size Power level Detecting the opponent (can be done later) Touch sensor US sensor(s)
43
Ideas to increase weight of your Robot What is the max weight of each division? Add more Lego technic pieces, if you have some at home Add Coins, Used Batteries, or others – make a holder using cardboards Put your team name on the robot. An idea: make a team flag
44
Ideas to increase friction of your Robot Use rubber bands Add more wheels later for Worlds
45
Gearing Ideas Use gear train to increase gear ratio Considering resources, this is not allowed for the school qualifier The winner from the school qualifier may consider this idea later
46
Changing Wheels? Using bigger wheels Considering resources, this is not allowed for the school qualifier The winner from the school qualifier may consider this idea later
47
Make sure the Power! Default power level is 75% Fully charge your battery!!! How to check the voltage level? See the icon on the LCD
48
Changing the shape of the Robot Make it sturdy Front part may need some changes (After the school qualifier)
49
Height of the robot matters? Consider the “center of gravity”
50
Ideas using 2 Touch Sensors A touch sensor –front left Another touch sensor – front right If left sensor is pressed – turn left and push hard If right sensor is pressed – turn right and push hard If both left and right sensors are pressed, push straight hard
51
What is next? - Meet with your teacher at least twice before the school qualifier Improve your programs Add stuff for the max possible weight for your robot Review what you have learned for the unknown problem. If you do not solve the unknown problem, you lose automatically Signed Media Release form must be ready before the qualifying competition date at your school
52
Online Resources www.ortop.org/NXT_Tutorial: a great tutorial on how to program in NXTG www.ortop.org/NXT_Tutorial nxtasy.org: with more information than you could ever want about LEGO robots and programming; a great place to ask questions nxtasy.org
53
End of Today’s Workshop Contact us with any questions: Douglas G. Czinder IEEE SEM R&A Chairperson chair@semrobotics.org Professor Keith Bozin kbozin@greaybox.com CJ Chung, Ph.D. Associate Professor and Director of Robofest chung@LTU.edu
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.