Title: Introduction to Robotics
1Introduction to Robotics
- Monica LaPoint
- http//www-users.cs.umn.edu/mlapoint
- University of Minnesota Computer Science
- BDPA Youth Conference 2002
2Presentation Objectives
- Overview of Robotics
- Robot components
- Our Demobot's features
- Demobot programming
- Demonstration of obstacle avoidance program
- Next Steps and Wrap up
3OverviewWhat is a robot?
4OverviewWhat is a robot?
- "A reprogrammable, multifunctional manipulator
designed to move material, parts, tools, or
specialized devices through various programmed
motions for the performance of a variety of
tasks" - Robot Institute of America, 1979
5OverviewWhat is a robot?
- "A reprogrammable, multifunctional manipulator
designed to move material, parts, tools, or
specialized devices through various programmed
motions for the performance of a variety of
tasks" - Robot Institute of America, 1979 - An automatic device that performs functions
normally ascribed to humans or a machine in the
form of a human. - Webster's Dictionary
6Overview What is a robot? (cont'd)
- Robots are a collection of systems that work
together to accomplish a common function - Robotics is the study of partially or completely
autonomous machines (means with little or no
human interaction) - Typical systems include controller, actuators,
sensors and tools for communicating and
programming
7OverviewHow are robots used?
- Industrial robots do tasks that are hazardous or
menial
8OverviewHow are robots used?
- Industrial robots do tasks that are hazardous or
menial - Exploratory robots explore environments that are
inhospitable to humans such as space, military
targets or areas of search and rescue operations
9OverviewHow are robots used?
- Industrial robots do tasks that are hazardous or
menial - Exploratory robots explore environments that are
inhospitable to humans such as space, military
targets or areas of search and rescue operations - Assistive robots help handicapped individuals by
assisting with daily tasks including wheelchair
navigation and feeding
10Example robots
11Robot componentsController
- Central processing unit (CPU) is the brains of
the robot - Includes
- Actual microprocessor chip
- Memory
- Inputs and outputs for motor and sensor control
- Generally understands machine language, much like
assembly
12Robot componentsActuators and effecters
- Actuators and effecters are physical components
that act on the environment - Actuators and effecters create
- Manipulators move objects in the environment
(robotic arms) - Locomotors move the robot in the environment
(wheels and legs) - Motors and gears drive the manipulators and
locomotors
13Robot componentsSensors
- Sensors gather and feed information about the
world back to the CPU to make decisions - Sensors are usually analog or digital
- Sensors
- Sonar detects obstacles before touching them
- Temperature and light can orient the robot to
the type of environment or impending failures - GPS global positioning systems
- Vision camera that feeds images to robot for
processing
14Robot componentsCommunications/programming tools
- Programs executed by robots must be downloaded
to memory.
15Robot componentsCommunications/programming tools
- Programs executed by robots must be downloaded
to memory. - The tools
- Compile programs from a programming language into
machine language, a format that CPUs understand - Communicate instructions to robot
16Robot componentsCommunications/programming tools
- Programs executed by robots must be downloaded
to memory. - The tools
- Compile programs from a programming language into
machine language, a format that CPUs understand - Communicate instructions to robot
- Often communication takes place via a serial or
IR connection
17Meet Demobot
- Component Overview
- CPU Handyboard from MIT
- Mechanics and sensors Lego Mindstorms from Lego
- Communication Interactive C from Newton Labs
18Demobot's CPU
- Handyboard developed by MIT
- Contains
- Motorola 68HC11 8-bit micro processor
- 32K of system memory
- Outputs for 4 motors numbered 0 through
- Inputs for analog and digital sensors
- LCD screen
- Popular for competitions and research
19MIT Handyboard
20Demobot's mechanics
- Uses two motors for rear left and right wheel
- Motors receive power via connections to the
handyboard - When power is applied to the motor, the motor
spins forward - The motor is moved backwards by reversing the
power - When power is turned off, the motor stops
21Connecting motors to handyboard
22Demobot's sensors
- Two touch sensors on the front that will tell us
when we have hit something - Touch sensors are located in the front left and
right (Why?) - Each have digital output, either a 1 or a 0
- Connect to digital ports 7 and 8
23Touch sensors
24Demobot's communicationInteractive C
- Interactive C is an interpreted version of C
- Handyboard languages
- Compiles C and assembly languages
- Java version is available
- Compiles and runs C commands or functions on the
handyboard immediately - Compiles and downloads programs to the handyboard
for later execution
25Demobot programmingGetting Demobot ready for
programs
- The handyboard must be initialized every time it
is powered up - Initialization includes
- Setting up memory
- Loading basic routines called libraries
26Interactive C
27Demobot programmingUseful Interactive C functions
- When the power is turned on, if a function named
main has been downloaded, it will automatically
run - Other useful C functions
- start_button() tells us when the start button has
been pressed - printf(hello) will print the string hello to
the LCD screen - Sleep(float) will pause the program for an
indicated number of seconds
28Demobot programmingMoving the robot
- How can we start the motor via the handyboard?
- Special Interactive C commands for motors
- fd(motor number) moves motor forward
- bk(motor number) moves motor backward
- off(motor number) turns motor off
29Demobot programmingSample code
- void main()
- printf(Press start\n) lt what do these two
lines do? - while (!start_button())
- fd(0) fd(1)
- printf(Forward\n)
- sleep(2.)
- bk(0) bk(1)
- printf(Backwards\n)
- sleep(2.)
- off(0) off(1)
- printf(Stopping\n)
-
30Demonstration of motor
31Demobot programmingGetting sensor information
- Special Interactive C commands for digital
sensors - digital(digital port number) returns integer
- For touch sensors
- 0 means no pressure (switch is open)
- 1 means we have bumped against something (switch
is closed)
32Demobot programmingSample codes
- void main()
-
- printf(Press start\n)
- while (!start_button())
- printf(Waiting for a bump\n)
- while (digital(7) 0
- digital(8) 0)
- printf(I've been bumped\n)
33Demonstration of sensors
34Example application Overview
- Goal Translate the sensor information into
movement commands - Program
- Move the robot forward until an object is sensed
in its path - Once an obstacle has sensed, move backwards and
turn for 2 seconds to move away from the object
and continue moving forward - Stop when the stop button is pressed
35Example application code
- void main()
-
- printf(Press start\n)
- while (!start_button())
- while (!stop_button())
- if (!stop_button())
- fd(0) fd (1)
- printf(Looking...\n)
- while (digital(7) 0
- digital(8) 0
- !stop_button())
- printf(I hit something...backing up\n)
- bk(0) fd(1)
- sleep(2.)
- fd(0) fd (1)
- / if not stop button /
- / while not stop button /
/ stop button has been pushed /
printf(Stopping\n) off(0) off(1) / end
of main /
36DemonstrationObstacle avoidance program
37Resources for experimentation
- Programming robots via freely available
simulators - www.robocup.com - can be used from Windows or
Unix - Low and mid cost robotics kits that can get you
started - Lego Invention System 2 - www.mindstorms.com(200)
- Fischertechnik building system -
www.techeducation.com - Handyboard - www.handyboard.com (200-300)
- Robotics Kits - www.acroname.com
38Resources for further study
- Organizations
- www.firstlegoleague.org
- http//www.aaai.org/AITopics/html/robots.html
- http//www.robotmag.com/robotics/t-mini-faq.html
- Books
- Robotic Explorations by Fred G Martin (ISBN
0-13-089568-7)
39Questions
- Presentation and resources available at
http//www-users.cs.umn.edu/mlapoint