Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of...

24
Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University

Transcript of Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of...

Page 1: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Introduction to LEGO RCX robotics and Robot Sumo

Workshop Day 1

CJ Chung

Associate Professor of Computer Science

Lawrence Technological University

Page 2: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

This program is possible thanks to:

a grant from Detroit Auto Dealers Association (DADA) Charitable Foundation Fund,

which is a fund of the Community Foundation for Southeast Michigan.

For more details, check out a press release at: http://www.ltu.edu/news/detail.asp?ContentId=F43D8217-293D-480E-B657-54392CB1171A

Page 3: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Schedule

First Workshop Day (3 hours) Second Workshop Day (3 hours) Third Workshop Day (2 hours) Meetings with your school staff/teachers

to improve your sumoBot (3 hours x 2 meetings suggested)

Official Competition at your school to select one team to advance to the World Robofest Championship on April 26. Guests will be invited.

Page 4: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Workshop First Day (3 hours)

Introduction to Robotics Introduction to Robofest and Robot Sumo Introduction to Lego Mindstorms and RCX Introduction to RCX Code programming

using RIS (Robotics Invention System) 2.0 Basic programs

Motors Wait

Page 5: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

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

Page 6: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

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

Page 7: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

RoboSumo

Push the other robot out of the Sumo ring

Page 8: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Specifications

  Junior Division Senior Division

Sumo ring diameter 77 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 limit 30 cm (11.75

inches)

Robot type Any;Lego Mindstorms or NXT

recommended. any

Page 9: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

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

Page 10: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Unknown Problem in Robofest Sumo

How to start is unknown Need sensor(s) Teams must bring a computer to program

the unknown parts

Page 11: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Introduction to Lego Mindstorms

Born in USA at MIT RJ: Roverbot Jr.

Brain – RCX micro computer

Body: Lego pieces Actuators: up to 3

motors Sensors: Light, touch,

etc. Power source: 9V (six

AA batteries) Communication

mechanism: IR

Left motor: ARight motor: CLight sensor on Port No. 1Touch sensor on Port No. 2

Page 12: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Introduction to RCX Code Programming

RIS (Robotics Invention System) 2.0 Dag and drop program blocks: Power, Wait, Repeat,

Sensors, “Yes or No”, and My Blocks How to create the first program:

Click on Create a user account Watch movie or press “enter” to skip it Click on “Program”, instead of Missions Check to skip the tutorials Click on “Program” again Click on “Freestyle” – You will see the program

canvas!

Robotics Invention System 2.0.lnk

Page 13: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

First Program: Go forward for 2 seconds and stop

=

Page 14: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Very Important!!!!!

“Cover your robot and IR tower when you download programs”

Save your programs File Names should be meaningful Use logbook and comment

Page 15: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Power Commands

On On For: On + Wait + Off Off

Coast Brake

Set Power: Min 1 ~ Max 8 Set Direction:

Reverse Direction: Not recommended to use. Use Set Direction instead.

Page 16: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

ForwardBack

Go Forward for 2 seconds, Wait 3 seconds then Backward for 2 seconds

Page 17: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

ForwardBack

Page 18: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Making Turns

Turn left

Spin left

Face left

Left wheel Right wheel

Left wheel Right wheel

Left wheel Right wheel

stop

stop

Page 19: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Go forward for 2 seconds, Turn Left 90 degrees, and Go forward for 2 seconds

Turn 90 left

Page 20: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Turn 90 left

?

Page 21: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Spin 720 right

Go forward for a second, Spin right two times (720 degrees), Go forward for a second

90o720o

Page 22: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Spin 720 Right

?

Page 23: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Class Mission

A simple maze

Introduction to loops

box

box

Page 24: Introduction to LEGO RCX robotics and Robot Sumo Workshop Day 1 CJ Chung Associate Professor of Computer Science Lawrence Technological University.

Additional Mission, if time available

Introduction to loops: Making 100 beep sounds