1 / 53

Introduction to LEGO NXT robotics and Robot Sumo – Sept 20, 2008

Introduction to LEGO NXT robotics and Robot Sumo – Sept 20, 2008. Lawrence Technological University. 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.

yates
Download Presentation

Introduction to LEGO NXT robotics and Robot Sumo – Sept 20, 2008

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to LEGO NXT robotics and Robot Sumo – Sept 20, 2008 Lawrence Technological University 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

  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: • 5th – 9th grade: Jr. Division • 9th – 12th grade: Sr. Division

  6. RoboSumo Push the other robot out of the Sumo ring

  7. Specifications

  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 1st 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. 2nd Program: ForwardBack • Go Forward 2 rotations • Wait 3 seconds, then • 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 • 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 stop Left wheel Right wheel Left wheel Right wheel stop Left wheel Right wheel

  25. Making Turns • Turn left • Spin left • Face left stop Left wheel Right wheel Left wheel Right wheel stop Left wheel Right wheel

  26. Turn90Left – Using a Motor Block! • Forward 2 rotations, • Turn Left 90 Degrees, • and Forward 2 rotations

  27. Forward 2 rotations, Turn Left 90 Degrees, and Forward 2 rotations – Turn90Left

  28. 14 cm Number of rotations needed? 21.98 / 17.27 = 1.2727 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

  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

More Related