Performance of Robotics and Servo Mechanism

This definition implies that a device can only be called ainvisible to a light sensor. Therefore, it may be harder
“robot” if it contains a movable mechanism,(less reliable) to detect darker objects this way than
influenced by sensing, planning, and actuation andlighter ones. In the case of object distance, lighter
control components. It does not imply that a minimumobjects that are farther away will seem closer than
number of these components must be implemented indarker objects that are not as far away. This gives
software, or be changeable by the “consumer”you an idea of how the physical world is
who uses the device; for example, the motion behaviorpartially-observable. Even though we have useful
can have been hard-wired into the device by thesensors, we do not have complete and completely
manufacturer.accurate information.
  
So, the presented definition, as well as the rest of the    Another source of noise in light sensors is
material in this part of the Book, covers not justambient light. The best thing to do is subtract the
“pure” robotics or only “intelligent” robots,ambient light level out of the sensor reading, in order to
but rather the somewhat broader domain of roboticsdetect the actual change in the reflected light, not the
and automation. This includes “dumb” robotsambient light. How is that done? By taking two (or
such as: metal and woodworking machines,more, for higher accuracy) readings of the detector,
“intelligent” washing machines, dish washers andone with the emitter on, and one with it off, and
pool cleaning robots, etc. These examples all havesubtracting the two values from each other. The result
sensing, planning and control, but often not in individuallyis the ambient light level, which can then be subtracted
separated components. For example, the sensing andfrom future readings. This process is called sensor
planning behavior of the pool cleaning robot have beencalibration. Of course, remember that ambient light
integrated into the mechanical design of the device, bylevels can change, so the sensors may need to be
the intelligence of the human developer.calibrated repeatedly.
  
Robotics is, to a very large extent, all about systemBreak-beam Sensors
integration, achieving a task by an actuated mechanical 
device, via an “intelligent” integration of    We already talked about the idea of
components, many of which it shares with otherbreak-beam sensors. In general, any pair of compatible
domains, such as systems and control, computeremitter-detector devices can be used to produce such
science, character animation, machine design, computera sensors:
vision, artificial intelligence, cognitive science, an incandescent flashlight bulb and a photocell
biomechanics, etc. In addition, the boundaries of red LEDs and visible-light-sensitive photo-transistors
robotics cannot be clearly defined, since also its or infra-red IR emitters and detectors
“core” ideas, concepts and algorithms are being 
applied in an ever increasing number ofShaft Encoding
“external” applications, and, vice versa, core 
technology from other domains (vision, biology,Shaft encoders measure the angular rotation of an
cognitive science or biomechanics, for example) areaxle providing position and/or velocity info. For
becoming crucial components in more and moreexample, a speedometer measures how fast the
modern robotic systems.wheels of a vehicle are turning, while an odometer
 measures the number of rotations of the wheels.
This part of the WEBook makes an effort to define 
what exactly is that above-mentioned core material ofIn order to detect a complete or partial rotation, we
the robotics domain, and to describe it in a consistenthave to somehow mark the turning element. This is
and motivated structure. Nevertheless, this chosenusually done by attaching a round disk to the shaft, and
structure is only one of the many possiblecutting notches into it. A light emitter and detector are
“views” that one can want to have on theplaced on each side of the disk, so that as the notch
robotics domain.passes between them, the light passes, and is
 detected; where there is no notch in the disk, no light
In the same vein, the above-mentionedpasses.
“definition” of robotics is not meant to be 
definitive or final, and it is only used as a roughIf there is only one notch in the disk, then a rotation is
framework to structure the various chapters detected as it happens. This is not a very good idea,
 since it allows only a low level of resolution for
Components of robotic systemsmeasuring speed: the smallest unit that can be
 measured is a full rotation. Besides, some rotations
 might be missed due to noise.
  
 Usually, many notches are cut into the disk, and the
 light hits impacting the detector are counted. (You can
 see that it is important to have a fast sensor here, if
 the shaft turns very quickly.)
  
This figure depicts the components that are part of allAn alternative to cutting notches in the disk is to paint
robotic systems. The purpose of this Section is tothe disk with black (absorbing, non-reflecting) and white
describe the semantics of the terminology used to(highly reflecting) wedges, and measure the
classify the chapters in the WEBook: “sensing”,reflectance. In this case, the emitter and the detector
“planning”, “modeling”, “control”, etc.are on the same side of the disk.
  
The real robot is some mechanical deviceIn either case, the output of the sensor is going to be a
(“mechanism”) that moves around in thewave function of the light intensity. This can then be
environment, and, in doing so, physically interacts withprocesses to produce the speed, by counting the
this environment. This interaction involves thepeaks of the waves.
exchange of physical energy, in some form or another. 
Both the robot mechanism and the environment canNote that shaft encoding measures both position and
be the “cause” of the physical interactionrotational velocity, by subtracting the difference in the
through “Actuation”, or experience theposition readings after each time interval. Velocity, on
“effect” of the interaction, which can bethe other hand, tells us how fast a robot is moving, or if
measured through “Sensing”.it is moving at all. There are multiple ways to use this
 measure:
Robotics as an integrated system of control interacting measure the speed of a driven (active) wheel
with the physical world. use a passive wheel that is dragged by the robot
 (measure forward progress)
Sensing and actuation are the physical ports through 
which the “Controller” of the robot determinesWe can combine the position and velocity information
the interaction of its mechanical body with the physicalto do more sophisticated things:
world. As mentioned already before, the controller can, move in a straight line
in one extreme, consist of software only, but in the rotate by an exact amount
other extreme everything can also be implemented in 
hardware.Note, however, that doing such things is quite difficult,
 because wheels tend to slip (effector noise and error)
Within the Controller component, several sub-activitiesand slide and there is usually some slop and backlash
are often identified:in the gearing mechanism. Shaft encoders can provide
 feedback to correct the errors, but having some error
Modelling. The input-output relationships of all controlis unavoidable.
components can (but need not) be derived from 
information that is stored in a model. This model canQuadrature Shaft Encoding
have many forms: analytical formulas, empirical look-up 
tables, fuzzy rules, neural networks, etc.So far, we've talked about detecting position and
 velocity, but did not talk about direction of rotation.
The name “model” often gives rise to heatedSuppose the wheel suddenly changes the direction of
discussions among different research “schools”,rotation; it would be useful for the robot to detect that.
and the WEBook is not interested in taking a stance in 
this debate: within the WEBook, “model” is to beAn example of a common system that needs to
understood with its minimal semantics: “anymeasure position, velocity, and direction is a computer
information that is used to determine or influence themouse. Without a measure of direction, a mouse is
input-output relationships of components in thepretty useless. How is direction of rotation measured?
Controller.” 
 Quadrature shaft encoding is an elaboration of the
The other components discussed below can all havebasic break-beam idea; instead of using only one
models inside. A “System model” can be usedsensor, two are needed. The encoders are aligned so
to tie multiple components together, but it is clear thatthat their two data streams coming from the detector
not all robots use a System model. The “Sensingand one quarter cycle (90-degrees) out of phase, thus
model” and “Actuation model” contain thethe name "quadrature". By comparing the output of the
information with which to transform raw physical datatwo encoders at each time step with the output of the
into task-dependent information for the controller, andprevious time step, we can tell if there is a direction
vice versa.change. When the two are sampled at each time step,
 only one of them will change its state (i.e., go from on
Planning. This is the activity that predicts the outcometo off) at a time, because they are out of phase.
of potential actions, and selects the “best” one.Which one does it determines which direction the shaft
Almost by definition, planning can only be done on theis rotating. Whenever a shaft is moving in one direction,
basis of some sort of model.a counter is incremented, and when it turns in the
 opposite direction, the counter is decremented, thus
Regulation. This component processes the outputs ofkeeping track of the overall position.
the sensing and planning components, to generate an 
actuation setpoint. Again, this regulation activity could orOther uses of quadrature shaft encoding are in robot
could not rely on some sort of (system) model.arms with complex joints (such as rotary/ball joints;
 think of your knee or shoulder), Cartesian robots (and
The term “control” is often used instead oflarge printers) where an arm/rack moves back and
“regulation”, but it is impossible to clearly identifyforth along an axis/gear.
the domains that use one term or the other. The 
meaning used in the WEBook will be clear from theModulation and Demodulation of Light
context. 
 We mentioned that ambient light is a problem because
Scales in robotic systemsit interferes with the emitted light from a light sensor.
 One way to get around this problem is to emit
The above-mentioned “components” descriptionmodulated light, i.e., to rapidly turn the emitter on and off.
of a robotic system is to be complemented by aSuch a signal is much easier and more reliably
“scale” description, i.e., the following systemdetected by a demodulator, which is tuned to the
scales have a large influence on the specific contentparticular frequency of the modulated light. Not
of the planning, sensing, modelling and controlsurprisingly, a detector needs to sense several
components at one particular scale, and hence also onon-flashes in a row in order to detect a signal, i.e., to
the corresponding sections of the WEBook.detect its frequency. This is a small point, but it is
 important in writing demodulator code.
Mechanical scale. The physical volume of the robot 
determines to a large extent the limites of what canThe idea of modulated IR light is commonly used; for
be done with it. Roughly speaking, a large-scale robotexample in household remote controls.
(such as an autonomous container crane or a space 
shuttle) has different capabilities and control problemsModulated light sensors are generally more reliable
than a macro robot (such as an industrial robot arm), athan basic light sensors. They can be used for the
desktop robot (such as those “sumo” robotssame purposes: detecting the presence of an object
popular with hobbyists), or milli micro or nano robots.measuring the distance to a nearby object (clever
Spatial scale. There are large differences betweenelectronics required, see your course notes)
robots that act in 1D, 2D, 3D, or 6D (three positions and 
three orientations).Infra Red (IR) Sensors
  
Time scale. There are large differences betweenInfra red sensors are a type of light sensors, which
robots that must react within hours, seconds,function in the infra red part of the frequency
milliseconds, or microseconds.spectrum.  IR sensors consist are active sensors:
 they consist of an emitter and a receiver.  IR sensors
Power density scale. A robot must be actuated inare used in the same ways that visible light sensors
order to move, but actuators need space as well asare that we have discussed so far: as break-beams
energy, so the ratio between both determines someand as reflectance sensors.  IR is preferable to visible
capabilities of the robot.light in robotics (and other) applications because it
 suffers a bit less from ambient interference, because it
System complexity scale. The complexity of a robotcan be easily modulated, and simply because it is not
system increases with the number of interactionsvisible.
between independent sub-systems, and the control 
components must adapt to this complexity.IR Communication
  
Computational complexity scale. Robot controllers areModulated infra red can be used as a serial line for
inevitably running on real-world computing hardware, sotransmitting messages. This is is fact how IR modems
they are constrained by the available number ofwork. Two basic methods exist:
computations, the available communication bandwidth, bit frames (sampled in the middle of each bit;
and the available memory storage.assumes all bits take the same amount of time to
 transmit)
Obviously, these scale parameters never apply bit intervals (more common in commercial use;
completely independently to the same system. Forsampled at the falling edge, duration of interval
example, a system that must react at microsecondsbetween sampling determines whether it's a 0 or 1)
time scale can not be of macro mechanical scale or 
involve a high number of communication interactionsUltrasonic Distance Sensing
with subsystems. 
 As we mentioned before, ultrasound sensing is based
Background sensitivityon the time-of-flight principle. The emitter produces a
 sonar "chirp" of sound, which travels away from the
Finally, no description of even scientific material is eversource, and, if it encounters barriers, reflects from
fully objective or context-free, in the sense that it isthem and returns to the receiver (microphone). The
very difficult for contributors to the WEBook toamount of time it takes for the sound beam to come
“forget” their background when writing theirback is tracked (by starting a timer when the "chirp" is
contribution. In this respect, robotics has, roughlyproduced, and stopping it when the reflected sound
speaking, two faces: (i) the mathematical andreturns), and is used to compute the distance the
engineering face, which is quite “standardized” insound traveled. This is possible (and quite easy)
the sense that a large consensus exists about thebecause we know how fast sound travels; this is a
tools and theories to use (“systems theory”),constant, which varies slightly based on ambient
and (ii) the AI face, which is rather poorly standardized,temperature.
not because of a lack of interest or research efforts, 
but because of the inherent complexity ofAt room temperature, sound travels at 1.12 feet per
“intelligent behaviour.” The terminology andmillisecond. Another way to put it that sound travels at
systems-thinking of both backgrounds are significantly0.89 milliseconds per foot. This is a useful constant to
different, hence the WEBook will accomodate sectionsremember.
on the same material but written from various 
perspectives. This is not a “bug”, but aThe process of finding one's location based on sonar
“feature”: having the different views in theis called echolocation. The inspiration for ultrasound
context of the same WEBook can only lead to asensing comes from nature; bats use ultrasound
better mutual understanding and respect.instead of vision (this makes sense; they live in very
 dark caves where vision would be largely useless). Bat
Research in engineering robotics follows the bottom-upsonars are extremely sophisticated compared to
approach: existing and working systems are extendedartificial sonars; they involve numerous different
and made more versatile. Research in artificialfrequencies, used for finding even the tiniest fast-flying
intelligence robotics is top-down: assuming that a set ofprey, and for avoiding hundreds of other bats, and
low-level primitives is available, how could one applycommunicating for finding mates.
them in order to increase the “intelligence” of a                          
system. The border between both approaches shiftsSpecular Reflection
continuously, as more and more “intelligence” is 
cast into algorithmic, system-theoretic form. ForA major disadvantage of ultrasound sensing is its
example, the response of a robot to sensor input wassusceptibility to specular reflection (specular reflection
considered “intelligent behaviour” in the latemeans reflection from the outer surface of the object).
seventies and even early eighties. Hence, it belongedWhile the sonar sensing principle is based on the sound
to A.I. Later it was shown that many sensor-basedwave reflecting from surfaces and returning to the
tasks such as surface following or visual tracking couldreceiver, it is important to remember that the sound
be formulated as control problems with algorithmicwave will not necessarily bounce off the surface and
solutions. From then on, they did not belong to A.I. any"come right back." In fact, the direction of reflection
more.depends on the incident angle of the sound beam and
 the surface. The smaller the angle, the higher the
 probability that the sound will merely "graze" the
 surface and bounce off, thus not returning to the
Robotics Technologyemitter, in turn generating a false long/far-away
 reading. This is often called specular reflection,
Most industrial robots have at least the following fivebecause smooth surfaces, with specular properties,
parts:tend to aggravate this reflection problem. Coarse
 surfaces produce more irregular reflections, some of
Sensors, Effectors, Actuators, Controllers, andwhich are more likely to return to the emitter. (For
common effectors known as Arms.example, in our robotics lab on campus, we use sonar
 sensors, and we have lined one part of the test area
Many other robots also have Artificial Intelligence andwith cardboard, because it has much better sonar
effectors that help it achieve Mobility.reflectance properties than the very smooth wall
 behind it.)
This section discusses the basic technologies of a 
robot. Click one of the links above or use theIn summary, long sonar readings can be very
navigation bar menu on the far right.inaccurate, as they may result from false rather than
 accurate reflections. This must be taken into account
Robotics Technology - Sensorswhen programming robots, or a robot may produce
 very undesirable and unsafe behavior. For example, a
Most robots of today are nearly deaf and blind. robot approaching a wall at a steep angle may not
Sensors can provide some limited feedback to thesee the wall at all, and collide with it!
robot so it can do its job.  Compared to the senses 
and abilities of even the simplest living things, robotsNonetheless, sonar sensors have been successfully
have a very long way to go.used for very sophisticated robotics applications,
 including terrain and indoor mapping, and remain a very
The sensor sends information, in the form of electronicpopular sensor choice in mobile robotics.
signals back to the cfontroller.  Sensors also give the 
robot controller information about its surroundings andThe first commercial ultrasonic sensor was produced
lets it know the exact position of the arm, or the stateby Polaroid, and used to automatically measure the
of the world around it.distance to the nearest object (presumably which is
Sight, sound, touch, taste, and smell are the kinds ofbeing photographed). These simple Polaroid sensors
information we get from our world.  Robots can bestill remain the most popular off-the-shelf sonars (they
designed and programmed to get specific informationcome with a processor board that deals with the
that is beyond what our 5 senses can tell us. Foranalog electronics). Their standard properties include:
instance, a robot sensor might "see" in the dark, detect 
tiny amounts of invisible radiation or measure32-foot range
movement that is too small or fast for the human eye 
to see.30-degree beam width
  sensitivity to specular reflection
Here are some things sensors are used for: shortest distance return
  
Physical PropertyPolaroid sensors can be combined into phased arrays
 Technologyto create more sophisticated and more accurate
 sensors.
Contact Bump, Switch 
Distance Ultrasound, Radar, Infra RedOne can find ultrasound used in a variety of other
Light Level Photo Cells, Camerasapplications; the best known one is ranging in
Sound Level microphonessubmarines. The sonars there have much more
Strain Strain Gaugesfocused and have longer-range beams. Simpler and
Rotation Encodersmore mundane applications involve automated
Magnetism Compasses"tape-measures", height measures, burglar alarms, etc.
Smell Chemical 
Temperature Thermal, Infra RedMachine Vision
Inclination Inclinometers, Gyroscope 
Pressure Pressure GaugesSo far, we have talked about relatively simple sensors.
Altitude AltimetersThey were simple in terms of processing of the
 information they returned. Now we turn to machine
    Sensors can be made simple and complex,vision, i.e., to cameras as sensors.
depending on how much information needs to be 
stored.  A switch is a simple on/off sensor used forCameras, of course, model biological eyes. Needless to
turning the robot on and off.  A human retina is asay, all biological eyes are more complex than any
complex sensor that uses more than a hundred millioncamera we know today, but, as you will see, the
photosensitive elements (rods and cones).  Sensorscameras and machine vision systems that process
provide information to the robots brain, which can betheir perceptual information, are not simple at all! In fact,
treated in various ways.  For example, we can simplymachine vision is such a challenging topic that it has
react to the sensor output: if the switch is open, if thehistorically been a separate branch of Artificial
switch is closed, go. Intelligence.
  
Levels of ProcessingThe general principle of a camera is that of light,
 scattered from objects in the environment (those are
    To figure out if the switch is open or closed, youcalled the scene), goes through an opening ("iris", in the
will need to measure the voltage going through thesimplest case a pin hole, in the more sophisticated
circuit, that's electronics.  Now lets say that you havecase a lens), and impinging on what is called the image
a microphone and you want to recognize a voice andplane. In biological systems, the image plane is the
separate it from noise; that's signal processing.  Nowretina, which is attached to numerous rods and cones
you have a camera, and you want to take the(photosensitive elements) which, in turn, are attached to
pre-processed image and now you need to figure outnerves which perform so-called "early vision", and then
what those objects are, perhaps by comparing thempass information on throughout the brain to do
to a large library of drawings; that's computation. "higher-level" vision processing. As we mentioned
Sensory data processing is a very complex thing tobefore, a very large percentage of the human (and
try and do but the robot needs this in order to have aother animal) brain is dedicated to visual processing, so
"brain".  The brain has to have analog or digitalthis is a highly complex endeavor.
processing capabilities, wires to connect everything, 
support electronics to go with the computer, andIn cameras, instead of having photosensitive rhodopsin
batteries to provide power for the whole thing, in orderand rods and cones, we use silver halides on
to process the sensory data.  Perception requires thephotographic film, or silicon circuits in charge-coupled
robot to have sensors (power and electronics),devices (CCD) cameras. In all cases, some information
computation (more power and electronics, andabout the incoming light (e.g., intensity, color) is detected
connectors (to connect it all). by these photosensitive elements on the image plane.
  
Switch SensorsIn machine vision, the computer must make sense out
 of the information it gets on the image plane. If the
 Switches are the simplest sensors of all.  Theycamera is very simple, and uses a tiny pin hole, then
work without processing, at the electronics (circuit)some computation is required to compute the
level.  Their general underlying principle is that of anprojection of the objects from the environment onto
open vs. closed circuit.  If a switch is open, no currentthe image plane (note, they will be inverted). If a lens is
can flow; if it is closed, current can flow and beinvolved (as in vertebrate eyes and real cameras),
detected.  This simple principle can (and is) used in athen more light can get in, but at the price of being
wide variety of ways.focused; only objects a particular range of distances
 from the lens will be in focus. This range of distances
Switch sensors can be used in a variety of ways:is called the camera's depth of field.
 contact sensors: detect when the sensor has 
contacted another object (e.g., triggers when a robotThe image plane is usually subdivided into equal parts,
hits a wall or grabs an object; these can even becalled pixels, typically arranged in a rectangular grid. In a
whiskers)typical camera there are 512 by 512 pixels on the
 limit sensors: detect when a mechanism has movedimage plane (for comparison, there are 120 x 10^6
to the end of its rangerods and 6 x 10^6 cones in the eye, arranged
 shaft encoder sensors: detects how many times ahexagonally). Let's call the projection on the image
shaft turns by having a switch click (open/close) everyplane the image.
time the shaft turns (e.g., triggers for each turn, allowing 
for counting rotations)The brightness of each pixel in the image is
 proportional to the amount of light directed toward the
   There are many common switches: buttoncamera by the surface patch of the object that
switches, mouse switches, key board keys, phoneprojects to that pixel. (This of course depends on the
keys, and others.  Depending on how a switch isreflectance properties of the surface patch, the
wired, it can be normally open or normally closed. position and distribution of the light sources in the
This would of course depend on your robot'senvironment, and the amount of light reflected from
electronics, mechanics, and its task.  The simplest yetother objects in the scene onto the surface patch.) As
extremely useful sensor for a robot is a "bump switch"it turns out, brightness of a patch depends on two
that tells it when it's bumped into something, so it cankinds of reflections, one being specular (off the
back up and turn away. Even for such a simple idea,surface, as we saw before), and the other being
there are many different ways of implementation.diffuse (light that penetrates into the object, is
 absorbed, and then re-emitted). To correctly model light
Light Sensorsreflection, as well as reconstruct the scene, all these
 properties are necessary.
Switches measure physical contact and light sensors 
measure the amount of light impacting a photocell,Let us suppose that we are dealing with a black and
which is basically a resistive sensor.  The resistancewhite camera with a 512 x 512 pixel image plane. Now
of a photocell is low when it is brightly illuminated, i.e.,we have an image, which is a collection of those
when it is very light; it is high when it is dark.  In thatpixels, each of which is an intensity between white and
sense, a light sensor is really a "dark" sensor.  Inblack. To find an object in that image (if there is one,
setting up a photocell sensor, you will end up using thewe of course don't know a priori), the typical first step
equations we learned above, because you will need to("early vision") is to do edge detection, i.e., find all the
deal with the relationship of the photocell resistanceedges. How do we recognize them? We define
photo, and the resistance and voltage in youredges as curves in the image plane across which
electronics sensor circuit.  Of course since you will bethere is significant change in the brightness.
building the electronics and writing the program to 
measure and use the output of the light sensor, youA simple approach would be to look for sharp
can always manipulate it to make it simpler and morebrightness changes by differentiating the image and
intuitive.  What surrounds a light sensor affects itslook for areas where the magnitude of the derivative
properties.  The sensor can be  shielded andis large. This almost works, but unfortunately it
positioned in various ways.  Multiple sensors can beproduces all sorts of spurious peaks, i.e., noise. Also,
arranged in useful configurations and isolate them fromwe cannot inherently distinguish changes in intensities
each other with shields.due to shadows from those due to physical objects.
 But let's forget that for now and think about noise.
Just like switches, light sensors can be used in manyHow do we deal with noise?
different ways: 
 We do smoothing, i.e., we apply a mathematical
Light sensors can measure:procedure called convolution, which finds and eliminates
 light intensity (how light/dark it is)the isolated peaks. Convolution, in effect, applies a filter
 differential intensity (difference between photocells)to the image. In fact, in order to find arbitrary edges in
 break-beam (change/drop in intensity)the image, we need to convolve the image with many
 filters with different orientations. Fortunately, the
Light sensors can be shielded and focused in differentrelatively complicated mathematics involved in edge
waysdetection has been well studied, and by now there are
 standard and preferred approaches to edge detection.
Their position and directionality on a robot can make a 
great deal of difference and impactOnce we have edges, the next thing to do is try to
 find objects among all those edges. Segmentation is
Polarized lightthe process of dividing up or organizing the image into
 parts that correspond to continuous objects. But how
"Normal" light emanating from a source isdo we know which lines correspond to which objects,
non-polarized, which means it travels at all orientationsand what makes an object? There are several cues
with respect to the horizon.  However, if there is awe can use to detect objects:
polarizing filter in front of a light source, only the light 
waves of a given orientation of the filter will passWe can have stored models of line-drawings of
through.  This is useful because now we canobjects (from many possible angles, and at many
manipulate this remaining light with other filters; if wedifferent possible scales!), and then compare those
put it through another filter with the same characteristicwith all possible combinations of edges in the image.
plane, almost all of it will get through.  But, if we use aNotice that this is a very computationally intensive and
perpendicular filter (one with a 90-degree relativeexpensive process. This general approach, which has
characteristic angle), we will block all of the light. been studied extensively, is called model-based vision.
Polarized light can be used to make specialized 
sensors out of simple photocells; if you put a filter inWe can take advantage of motion. If we look at an
front of a light source and the same or a different filterimage at two consecutive time-steps, and we move
in front of a photocell, you can cleverly manipulatethe camera in between, each continuous solid objects
what and how much light you detect. (which obeys physical laws) will move as one, i.e., its
 brightness properties will be conserved. This hives us a
Resistive Position Sensorshint for finding objects, by subtracting two images from
 each other. But notice that this also depends on
    We said earlier that a photocell is a resistiveknowing well how we moved the camera relative to
device.  We can also sense resistance in response tothe scene (direction, distance), and that nothing was
other physical properties, such as bending.  Themoving in the scene at the time. This general approach,
resistance of the device increases with the amount itwhich has also been studied extensively, is called
is bent.  These bend sensors were originallymotion vision.
developed for video game control (for example, 
Nintendo Powerglove), and are generally quite useful. We can use stereo (i.e., binocular stereopsis, two eyes
Notice that repeated bending will wear out thecameras/points of view). Just like with motion vision
sensor.  Not surprisingly, a bend sensor is much lessabove, but without having to actually move, we get
robust than light sensors, although they use the sametwo images, which we can subtract from each other, if
underlying resistive principle.we know what the disparity between them should be,
 i.e., if we know how the two cameras are organized
Potentiometerspositioned relative to each other.
  
    These devices are very common for manualWe can use texture. Patches that have uniform
tuning; you have probably seen them in some controlstexture are consistent, and have almost identical
(such as volume and tone on stereos).  Typicallybrightness, so we can assume they come from the
called pots, they allow the user to manually adjust thesame object. By extracting those we can get a hint
resistance.  The general idea is that the deviceabout what parts may belong to the same object in
consists of a movable tap along two fixed ends.  Asthe scene.
the tap is moved, the resistance changes.  As you 
can imagine, the resistance between the two ends isWe can also use shading and contours in a similar
fixed, but the resistance between the movable partfashion. And there are many other methods, involving
and either end varies as the part is moved.  Inobject shape and projective invariants, etc.
robotics, pots are commonly used to sense and tune 
position for sliding and rotating mechanisms.Note that all of the above strategies are employed in
 biological vision. It's hard to recognize unexpected
Biological Analogsobjects or totally novel ones (because we don't have
 the models at all, or not at the ready). Movement helps
All of the sensors we described exist in biologicalcatch our attention. Stereo, i.e., two eyes, is critical, and
systemsall carnivores use it (they have two eyes pointing in the
 same direction, unlike herbivores). The brain does an
Touch/contact sensors with much more precision andexcellent job of quickly extracting the information we
complexity in all speciesneed for the scene.
  
Bend/resistance receptors in muscles Machine vision has the same task of doing real-time
 vision. But this is, as we have seen, a very difficult task.
Reflective OptosensorsOften, an alternative to trying to do all of the steps
 above in order to do object recognition, it is possible to
    We mentioned that if we use a light bulb insimplify the vision problem in various ways:
combination with a photocell, we can make a 
break-beam sensor. This idea is the underlying principleUse color; look for specifically and uniquely colored
in reflective optosensors: the sensor consists of anobjects, and recognize them that way (such as stop
emitter and a detector. Depending of the arrangementsigns, for example)
of those two relative to each other, we can get two 
types of sensors:Use a small image plane; instead of a full 512 x 512
 reflectance sensors (the emitter and the detectorpixel array, we can reduce our view to much less, for
are next to each other, separated by a barrier; objectsexample just a line (that's called a linear CCD). Of
are detected when the light is reflected off them andcourse there is much less information in the image, but
back into the detector)if we are clever, and know what to expect, we can
 break-beam sensors (the emitter and the detectorprocess what we see quickly and usefully.
face each other; objects are detected if they interrupt 
the beam of light between the emitter and theUse other, simpler and faster, sensors, and combine
detector)those with vision. For example, IR cameras isolate
 people by body-temperature. Grippers allow us to
    The emitter is usually made out of a light-emittingtouch and move objects, after which we can be sure
diode (an LED), and the detector is usually athey exist.
photodiode/phototransistor. 
 Use information about the environment; if you know
    Note that these are not the same technology asyou will be driving on the road which has white lines,
resistive photocells. Resistive photocells are nice andlook specifically for those lines at the right places in the
simple, but their resistive properties make them slow;image. This is how first and still fastest road and
photodiodes and photo-transistors are much fasterhighway robotic driving is done.
and therefore the preferred type of technology. 
 Those and many other clever techniques have to be
What can you do with this simple idea of lightemployed when we consider how important it is to
reflectivity? Quite a lot of useful things:"see" in real-time. Consider highway driving as an
 object presence detectionimportant and growing application of robotics and AI.
 object distance detectionEverything is moving so quickly, that the system must
 surface feature detection (finding/following markersperceive and act in time to react protectively and
tape)safely, as well as intelligently.
 wall/boundary tracking 
 rotational shaft encoding (using encoder wheels withNow that you know how complex vision is, you can
ridges or black & white color)see why it was not used on the first robots, and it is
 bar code decodingstill not used for all applications, and definitely not on
 simple robots. A robot can be extremely useful without
    Note, however, that light reflectivity depends onvision, but some tasks demand it. As always, it is critical
the color (and other properties) of a surface. A lightto think about the proper match between the robot's
surface will reflect light better than a dark one, and asensors and the task.
black surface may not reflect it at all, thus appearing