Title: Python Robotics: An Environment for Exploring Robotics Beyond LEGOs
1Python Robotics An Environment for Exploring
RoboticsBeyond LEGOs
- Douglas Blank
- Bryn Mawr College, USA
- dblank_at_cs.brynmawr.edu
- Lisa Meeden
- Swarthmore College, USA
- meeden_at_cs.swarthmore.edu
- Deepak Kumar
- Bryn Mawr College, USA
- dkumar_at_mojo.brynmawr.edu
2NSF CCLI Grant
- Beyond LEGOs Hardware, Software, and Curriculum
for the Next Generation Robot Laboratory.
DUE-0231363. - Principal Investigators
- Douglas Blank, Bryn Mawr College
- Kurt Konolige, SRI International
- Deepak Kumar, Bryn Mawr College
- Lisa Meeden, Swarthmore College
- Holly Yanco, U. Mass.-Lowell
3Why pay attention?
If...
- you don't have a PhD in robotics...
- but, would be interested in teaching a robotics
course... - and, could use a mentor, and some funding to help
buy a sophisticated robot... - or, wonder what robotics is like Beyond LEGOS...
...then stick around
4Pyro Project An Overview
- Motivation
- Project in context
- Details something for everybody
- Sophisticated, medium-cost robots
- Impact
- Conclusion
5"Programming with a Purpose"
- Bryn Mawr and Swarthmore Colleges
- Small, liberal arts schools
- Interdisciplinary biased (geo and bio
informatics, cognitive science, visualization,
scientific modeling, etc) - Research biased
6"Robotics wouldn't work in our department."
- Karel, Jeroo, LOGO, Alice, hunting the wumpus,
etc all robot control problems - We are not "roboticists" in the traditional
sense we're interested in intelligence (our "big
idea", the "purpose") - Push the big ideas in so that they are the
motivations for learning to program and "doing"
computer science
7"Ok, LEGOs will do just fine."
- LEGO limitations? "Only your imagination"
- Limited sensors. Vision is a great motivation to
study 2D arrays, but requires a camera. - More complex models require more memory and
faster CPU (for example, neural networks,
developing area maps, planning, etc) - Real AI and robotics research opportunities
8Real RoboticsReal Painful Robotics
- Sophisticated, medium-cost robotics are now
available (ActivMedia, iRobot, K-Team, and many
more) however - Vertical learning curve
- Use their proprietary programming environment and
control software, or write your own - Control software usually tightly integrated to a
particular framework
9Pyro Python Robotics
- Core written in Python
- Set of libraries and objects in Python
- API and GUI
- Open Source
- Easy for beginners to pick up
- Extendible
10Pyro Architecture
11What is Python?
- 10 years old developed with learners in mind
- Clean syntax Interpreted, but fast
- Supports multiple styles of programming
(procedural, event oriented, threads, object
oriented, and some functional) - Support for most of the modern standards (XML,
SOAP, OpenGL, HTTP, etc, etc, etc, etc, etc)
through libraries
12from math import sqrt class Point def
__init__(self, myX, myY) self.x myX
self.y myY def distance(self,
otherPoint) return sqrt( (self.x -
otherPoint.x) 2 (self.y
- otherPoint.y) 2 ) class Line def
__init__(self, pointA, pointB) self.a
pointA self.b pointB self.dist
pointA.distance( pointB ) p1 Point(5, 6) p2
Point(11, 23) line1 Line(p1, p2) print "Line
is ", line1.dist, "meters long."
Python Example
Note - No curly braces, just indentation -
First argument is "this" - Constructor has
funny name __init__ - Automatic typing - Also
supports easy multiple inheritance
13Pyro Example
from pyro.brain import Brain from random import
random from time import sleep class
SimpleBrain(Brain) def step(self)
robot self.getRobot() left
robot.get('range', 'value', 'left')1
right robot.get('range', 'value', 'right')1
front robot.get('range', 'value',
'front')1 print "left", left, "front",
front, "right", right if (left lt 1 and
right lt 1) robot.move(0, .2)
elif (right lt 1) robot.move(0,
.2) elif (left lt 1)
robot.move(0, -.2) elif (front lt 1)
if random() lt .5 robot.move(0,
.2) else robot.move(0,
-.2) else robot.move(.2, 0)
14Sophisticated, medium-priced Robots
15Pyro could work with vastly Different Types of
Robots
16Pyro could work with vastly Different Types of
Robots
17Khepera from K-Team
- Hocky-puck sized
- Tethered
- Requires small area
- Delicate
- 8 Infrared/8 Light
- Fixed camera
- From 1.2k - 3k
18Pioneer2 from ActivMedia
- From 30 - 70 lbs.
- On-board PC
- Needs bigger area
- Robust
- 16 sonar
- PTZ camera
- From 1k - 20k
19Khepera with Camera
60x40
20A Pyro-based Curriculum
- Direct control
- Logic
- Subsumption
- Introduction
- Reactive control
- Behavior-based
- Vision
- Learning
- Mapping
- Multi-robot communication
21Pyro Support Libraries/Objects
- Backpropagation neural networks
- Self-organizing maps
- Fuzzy logic, behavior blending
- Vision library
- Camera objects, with Pan-Tilt-Zoom
- Evolutionary systems
22Prototype XRCL
- Extensible Robot Control Language
- XML plus C
- All the complexity of C and XML combined
- Multiple levels of parse errors
- Different comment syntax for different areas
- Too difficult for novice programmers (and expert
programmers!)
23Pyro PerformanceUpdates per second
- Bare brain with console
- Bare brain with OpenGL 3D
- ANN with 3D
- Fuzzy logic 3D
- Many ANNs Vision 3D
- 10,000 / second
- 1,000 / second
- 200 / second
- 20 / second
- lt 1 / second
24Issues
- Open source software is dynamic
- Pyro depends on many independent open source
components (Python, Image Library, OpenGL, SWIG,
Numeric, ...) - Interdisciplinary connections require few
prerequisites - Sophisticated robots are still relatively
expensive
25Acknowledgments
- Thanks to
- Ananya Misra
- Evan Moses
- Daniel Sproul
- Cassandra Telenko
emergent.brynmawr.edu
This work was supported in part by a grant from
the 2002 Bryn Mawr-Haverford-Swarthmore Mellon
Tricollege Fellowship program