introduction to lego rcx robotics and robot sumo workshop day 3 cj chung associate professor of...
TRANSCRIPT
![Page 1: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/1.jpg)
Introduction to LEGO RCX robotics and Robot Sumo
Workshop Day 3
CJ ChungAssociate Professor of Computer ScienceLawrence Technological University
![Page 2: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/2.jpg)
Workshop Third Day
Improved Sumo program Mini Competition Tips and Ideas to improve your Robot! Advanced Topics in RCX code (optional) Team Pictures Planning
![Page 3: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/3.jpg)
Review: Basic Sumo
Repeat the following forever: Go forward until the edge Backward slightly (in Big block) Turn right
Problems? Same behavior all the time! Touch sensor was not used
![Page 4: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/4.jpg)
Improving the Sumo program
Introduce a random wait value for turning Introduce a touch sensor watcher –
whenever the bumper is hit, change the direction
![Page 5: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/5.jpg)
Improved Sumo Program
If your opponent is pushingYour back, then change yourdirection
Random between 0.5 ~ 1.2 seconds
![Page 6: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/6.jpg)
Mini Sumo Competition 1
Without Unknown Problem Every team will compete with every other team Team picture time!!!
Team 1 Team 2 Team 3 Team 4 Team 5
Team 1 X X X X X
Team 2 X X X X
Team 3 X X X
Team 4 X X
Team 5 X
![Page 7: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/7.jpg)
Team Picture
The team picture will be printed on your personal certificate
Please submit the following for each team: Team name Team member first and last name Team member grade Team member gender
![Page 8: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/8.jpg)
Mini Sumo Competition 2
With Unknown Problem: The robot must wait until touch sensor is pressed Wait 5 seconds, then start to move
You cannot use the previous way using a touch sensor watcher! Why? Whenever the touch sensor is pressed, the robot will spin…
Team 1 Team 2 Team 3 Team 4 Team 5
Team 1 X X X X X
Team 2 X X X X
Team 3 X X X
Team 4 X X
Team 5 X
![Page 9: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/9.jpg)
Better Program for the competition 2
A nested loop Repeat Until that
will terminate the loop immediately when the termination condition is met
UnknownProblemsolution
![Page 10: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/10.jpg)
Is this a perfect program?
No, there are still some problems One example:
• The robot detects the edge line.• Move backward.• Turn right around 90 degrees.• Then the robot must see the outside of the ring which is very dark!!!
![Page 11: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/11.jpg)
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 IR and light sensor
![Page 12: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/12.jpg)
Ideas to increase weight of your Robot
What is the max weight of each division? Add more Lego blocks, 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
![Page 13: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/13.jpg)
Ideas to increase friction of your Robot
Use rubber bands Add more wheels later for Worlds
![Page 14: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/14.jpg)
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
![Page 15: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/15.jpg)
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
![Page 16: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/16.jpg)
Make sure the Power!
RCX power level: 1 ~ 7 Voltage of your batteries should be
around 9V How to check the voltage level
In RIS, click on Settings LTU will provide fresh batteries for all the
teams on the competition day
![Page 17: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/17.jpg)
Changing the shape of the Robot
Make it sturdy Front part may need some changes (After
the school qualifier)
![Page 18: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/18.jpg)
Height of the robot matters?
Consider the “center of gravity”
![Page 19: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/19.jpg)
Ideas using 2 Touch Sensors
A touch sensor –front leftAnother 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
![Page 20: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/20.jpg)
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
![Page 21: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/21.jpg)
![Page 22: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/22.jpg)
![Page 23: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/23.jpg)
Implementing Proximity Sensor to detect opponent (optional)
Use a Lego Light sensor and Infrared message sending capability of RCX
RCX is continuously sending IR messages Using another light sensor facing forward,
measure fluctuations in the light intensity that is reflected from objects
The higher the fluctuation, the closer the robot is to an object
![Page 24: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/24.jpg)
How to detect the light fluctuation??
You need to store previous sensor reading(s)
Compare with current reading If the difference is more than threshold
value, some thing is in front!
![Page 25: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/25.jpg)
preval becomes the value of Light 3
preval = preval + 3
If the current light sensorreading is greater than (previous value + 3), then some thing is close.
![Page 26: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/26.jpg)
Sumo with proximity sensor
Repeat forever: Scan until find the opponent Go forward until the edge Backward slightly Turn right
![Page 27: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/27.jpg)
My Blocks (optional topic)
![Page 28: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 3 CJ Chung Associate Professor of Computer Science Lawrence Technological University](https://reader033.vdocument.in/reader033/viewer/2022061306/55148431550346b0158b59a5/html5/thumbnails/28.jpg)
Opening a saved program (optional)
Never use File | Open! There is a bug involving MyCommands
Use Main Menu | Program | Vault