Institute for Personal Robots in Education -- One Year On - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

Institute for Personal Robots in Education -- One Year On

Description:

Dr. Jay Summet, Georgia Institute of Technology. IPRE Pilot ... Build a Robo Cockroach. Challenge 1: Is there Life on Mars? 'Mars' is the center of the room ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 39
Provided by: computi221
Category:

less

Transcript and Presenter's Notes

Title: Institute for Personal Robots in Education -- One Year On


1
Myro Tutorial
The Institute for Personal Robots in
Education Prof. Doug Blank, Bryn Mawr
College Dr. Jay Summet, Georgia Institute of
Technology
2
IPRE Pilot Hardware KitFeaturing Parallaxs
Scribbler
  • 6 Light sensors
  • 7 IR sensors
  • Stall sensor
  • Speaker
  • 5 LEDs
  • 2 motors
  • Bluetooth wireless
  • Camera
  • Gamepad

3
Using Myro
  1. Install software on any computer (Mac, Linux, or
    Windows)
  2. Establish Bluetooth connection (via a Serial
    port)
  3. Start Python
  4. Load Myro
  5. Initialize connection with robot
  6. Have fun!

4
1. Install software
Myro
5
2. Serial Connection over Bluetooth (com4)
Serial Bluetooth Adapter
Myro
USB Bluetooth Adapter
6
3. Start Python (IDLE)
7
4. Load Myro
  • gtgtgt from myro import

8
5. Initialize connection to robot
  • gtgtgt from myro import
  • gtgtgt init(com4)
  • gtgtgt

9
6. Have Fun!
  • gtgtgt gamepad()

10
Gamepad controls
  • Pad Action
  • ------ -------
  • Left/Right turnLeft() and turnRight()
  • Up/Down forward() and backward()
  • Button Action
  • ------ -------
  • 1 takePicture()
  • 2 beep(.25, 523)
  • 3 beep(.25, 587)
  • 4 beep(.25, 659)
  • 5 speak('Hello. My name is Scribby.')
  • 6 speak('Ouch! I'm a sensitive
    robot.')
  • 7 speak('I'm hungry.')
  • 8 speak('Good bye, for now.') and
    stop()

11
Manual Control
  • gtgtgt from myro import
  • Myro, (c) 2008 Institute for Personal Robots in
    Education
  • See http//www.roboteducation.org/ for more
    information
  • Version 2.6.5, ready!
  • gtgtgt init()
  • Waking robot from sleep...
  • Hello, I'm Scribby!
  • gtgtgt gamepad()

6
5
3
7
8
Forward
2
4
Left
Right
Back
1
12
Lets get Personal!
  • Name your robot
  • gtgtgt setName(Fifi)
  • gtgtgt setName(Robbie)
  • gtgtgt setName(Toaster)
  • gtgtgt setName(Bob)

13
Challenges
  1. Is there Life on Mars?
  2. Build a Dancing Robot
  3. Build a Robo Cockroach

14
Challenge 1Is there Life on Mars?
  • Mars is the center of the room
  • There is a picture of an alien in the mountains
  • Manually drive your robot to Mars
  • Photograph the specimen
  • Is there life on mars?

15
Its alive!
16
Challenge 2Build a Dancing Robot
www.blogguelph.com
17
Movement
  • forward(speed, seconds)
  • gtgtgt forward(1, 2.3)
  • backward(speed, seconds)
  • gtgtgt backward(.5, 4.6)
  • turnLeft(speed, seconds)
  • gtgtgt turnLeft(1, .3)
  • turnRight(speed, seconds)
  • gtgtgt turnRight(1, .6)

18
Dancing
  • gtgtgt forward(1, 1.4)
  • gtgtgt turnLeft(1, .3)

19
Dancing
  • gtgtgt forward(1, 1.4)
  • gtgtgt turnLeft(1, .3)
  • gtgtgt forward(1, 1.4)
  • gtgtgt turnLeft(1, .3)

20
Square Dancing
  • gtgtgt forward(1, 1.4)
  • gtgtgt turnLeft(1, .3)
  • gtgtgt forward(1, 1.4)
  • gtgtgt turnLeft(1, .3)
  • gtgtgt forward(1, 1.4)
  • gtgtgt turnLeft(1, .3)
  • gtgtgt forward(1, 1.4)
  • gtgtgt turnLeft(1, .3)

21
range()
  • gtgtgt range(4)
  • 0, 1, 2, 3
  • gtgtgt for i in range(4)
  • print Hi
  • Hi!
  • Hi!
  • Hi!
  • Hi!

22
range()
  • gtgtgt for i in range(4)
  • forward(1, 1.4)
  • turnLeft(1, .3)

23
Making Noise
  • beep(duration, freq1)
  • gtgtgt beep(.5, 880)
  • gtgtgt beep(.5, 440)
  • beep(duration, freq1, freq2)
  • gtgtgt beep(1, 440, 880)

24
Making Noise
  • speak(any string)
  • gtgtgt speak(Hello world!)
  • gtgtgt speak(Whats up, Doctor Jay?)
  • getVoices()
  • gtgtgt getVoices()
  • setVoice(Name)
  • gtgtgt setVoice(Fred)

25
Making Noise
  • playSong( makeSong(string))
  • gtgtgt playSong(makeSong(a 1 c 1/8))
  • gtgtgt playSong(makeSong(c4 1 d3 1 a5 1))

26
Putting it all together
  • Instead of entering the commands one at a time,
    we can put them all together into a program
  • From the IDLE menu, select File -gt New Window
  • Name it by selecting File -gt Save asfrom the
    new window
  • Name it Dance.py

27
Python
  • Looks like English
  • Indentation matters
  • Interactive
  • Easy to learn, but powerful

28
Dance.py
  • for i in range(10)
  • forward(1, 2)
  • backward(1, 2)
  • for i in range(3)
  • beep(.25, 200)
  • beep(.25, 400)
  • beep(.25, 800)
  • beep(.25, 1600)

29
Dance.py
  • for i in range(10)
  • forward(1, 2)
  • backward(1, 2)
  • for i in range(3)
  • beep(.25, 200)
  • beep(.25, 400)
  • beep(.25, 800)
  • beep(.25, 1600)

To run your program, select Run -gt Run
Module from the new window menu
30
Myro control
  • wait(seconds)
  • gtgtgt wait(.5)
  • for seconds in timer(10) do something for
    10 seconds
  • while timeRemaining(20)
  • do something for 20 seconds

31
Robot Bling
  • gtgtgt setLEDBack(1)
  • gtgtgt setLEDBack(0)

32
Camera
  • gtgtgt picture takePicture()
  • gtgtgt show(picture)

33
Challenge 3Build a Robo Cochroach
  • If you see light, run

34
Robot Sensors
35
Senses
  • getLight()- left, center, right
  • getBright() - left, center, right
  • getIR() - left, right
  • getObstacle() - left, center, right

36
Reading the Light Sensors
Light sensors
  • getLight(left)
  • getLight(center)
  • getLight(right)
  • getLight()
  • 657, 1453, 1025

37
Python functions
  • def functionName(arg1, arg2value)
  • print hello world!, arg1, arg2
  • this is a comment
  • functionName(1)

38
Thank you for your time!
For more information see www.roboteducation.org
Write a Comment
User Comments (0)
About PowerShow.com