Upload
elfrieda-mckenzie
View
218
Download
0
Tags:
Embed Size (px)
Citation preview
Copyright 2002 (c) 2002 Howie Choset
Introduction to
ROBOTICS
Images of samplerobots and robottechnologies
Images of samplerobots and robottechnologies
Images of samplerobots and robottechnologies
Images of samplerobots and robottechnologies
Images of samplerobots and robottechnologies
Images of samplerobots and robottechnologies
Copyright 2002 (c) 2002 Howie Choset
?robot: (noun) …
Insert image here
What is a robot?
Copyright 2002 (c) 2002 Howie Choset
ROBOTICSWith Your Host: Prof. Howie Choset
Background Image of Quiz Show
Copyright 2002 (c) 2002 Howie Choset
Image of Quiz Show
Image of Quiz Show
Image of Quiz Show
Image of Quiz Show
Image of Quiz Show
Image of Quiz Show
Image of Quiz Show
Image of Quiz Show
The Categories Are…..
Control Mechanisms Mechanics
SensorsMotion
PlanningPerception
Image of Quiz Show
Computer Science
Electrical Engineering
Mechanical Engineering
Copyright 2002 (c) 2002 Howie Choset
Combining these fields we can create a system that can
SENSE
PLAN
ACT
Copyright 2002 (c) 2002 Howie Choset
Challenges
• Terrain (Locomotion and Navigation)
• Obstacles (Motion Planning)
• Low-Level Sensors (Control/Perception)
• Vision (Control/Perception)
• Manipulation (Kinematics)
• Power
Copyright 2002 (c) 2002 Howie Choset
Robotic Locomotion
Copyright 2002 (c) 2002 Howie Choset
Design Tradeoffs with Mobility Configurations
• Maneuverability• Controllability• Traction• Climbing ability• Stability• Efficiency• Maintenance• Environmental impact• Navigational considerations
Copyright 2002 (c) 2002 Howie Choset
Differential Drive
Where D represents the arc length of the center of the robotfrom start to finish of the movement.
Pictures from “Navigating Mobile Robots:Systems and Techniques” Borenstein, J.
Copyright 2002 (c) 2002 Howie Choset
Differential Drive (continued)
Advantages:• Cheap to build• Easy to implement• Simple design
Disadvantages:• Difficult straight line motion
Copyright 2002 (c) 2002 Howie Choset
Problem with Differential Drive: Knobbie Tires
Changing diameter makes for uncertainty in dead-reckoning error
Pictures from “Navigating Mobile Robots:Systems and Techniques” Borenstein, J.
Copyright 2002 (c) 2002 Howie Choset
Skid Steering
Advantages:•Simple drive system
Disadvantages:•Slippage and poor odometry results•Requires a large amount of power to turn
Copyright 2002 (c) 2002 Howie Choset
Synchro Drive
Advantages:•Separate motors for translation and
rotation makes control easier•Straight-line motion is guaranteed mechanically
Disadvantages:•Complex design and implementation
Pictures from “Navigating Mobile Robots:Systems and Techniques” Borenstein, J.
Copyright 2002 (c) 2002 Howie Choset
Distributed Actuator Arrays:Virtual Vehicle
• Modular Distributed Manipulator System• Employs use of Omni Wheels
Copyright 2002 (c) 2002 Howie Choset
Omni Wheels
Advantages:•Allows complicated motions
Disadvantages:•No mechanical constraints to require straight-line motion•Complicated implementation
Pictures from “Navigating Mobile Robots:Systems and Techniques” Borenstein, J.
Copyright 2002 (c) 2002 Howie Choset
Tricycle
Advantages:•No sliding
Disadvantages:•Non-holonomic planning required
Pictures from “Navigating Mobile Robots:Systems and Techniques” Borenstein, J.
Copyright 2002 (c) 2002 Howie Choset
Ackerman Steering
Advantages:Simple to implement•Simple 4 bar linkage controls
front wheels
Disadvantages:•Non-holonomic planning required
Pictures from “Navigating Mobile Robots:Systems and Techniques” Borenstein, J.
Copyright 2002 (c) 2002 Howie Choset
Articulated Drive:Nomad
Advantages:•Simple to implement except for turning mechanism
Disadvantages:•Non-holonomic planning is required
Copyright 2002 (c) 2002 Howie Choset
Mobile Robot Scale
Copyright 2002 (c) 2002 Howie Choset
Framewalker: Jim2
Advantages:•Separate actuation of translationand rotation•Straight-line motion is guaranteedmechanically
Disadvantages:•Complex design and implementation•Translation and rotation are excusive
Copyright 2002 (c) 2002 Howie Choset
SNAKE ROBOTS: Many DOF’s• Thread through tightly
packed volumes• Redundancy• Minimally invasive• Enhanced mobility• Multi-functional
Thanks to Robin Murphy
Copyright 2002 (c) 2002 Howie Choset
Hyper-redundant Mechanism Applications (Choset)
Thread through tightly packed volumes accessing locations that people and conventionally machinery cannot and in a non-invasive surgical manner
Bio-terrorist Sample Recovery
Urban Search and Rescue
Bridge and Bomb Inspection
Urban Reconnaissance
Robots bypass the danger and expedite the process of recovering bio-terrorist materials. Snake robots are needed to reach in and around implements commonly found in urban environments, I.e., be able to reach into a coffee cup
Reaching through the internals of tightly packed structures to locate points of failure without having to disassemble, thereby expediting the operation and making it safer
Acquire information about the enemy hiding in the many nooks and crannies the urban arena provides. This bypasses the dangerous current mode where our military blindly maneuvers until they blunder onto the enemy. Here the enemy decides when the battle begins.
Copyright 2002 (c) 2002 Howie Choset
Basic tasks: locomotionLinear progression/Rectilinear
Biological Snakes Robotic Snakes
•Burdick and Chirikjian, Yim
•Anchors at sites - travel backwards•Symmetric movement in axial direction•Anteroposterior flexible skin •Momentum is conserved as the snake travels at a fairly constant speed/little drag
•C. GansEnergy efficient (esp. friction surfaces)Low wiggle volume
Copyright 2002 (c) 2002 Howie Choset
Basic tasks: locomotionLateral undulation
Biological Snakes Robotic Snakes•Propulsion by summing the longitudinal resultants of posterolateral forces•Momentum is conserved•Efficiency* increases with lower sliding friction•Used for traversing flat clear ground with some irregularities
Gans•Hirose, Osrtowski, Miller, Haith
Gans
•*Energy Efficiency compared to tetrapods
•Jayne – comparable
•Gans/Chodrow&Taylor – more
•High endurance
Copyright 2002 (c) 2002 Howie Choset
Basic tasks: locomotionConcertina
Biological Snakes Robotic Snakes
•Uses static friction•Energy inefficient (7X)* due to stop and go movement•Tree climbers use some form of concertina
*Jayne
Concertina in 3DHirose
Gans
Copyright 2002 (c) 2002 Howie Choset
Basic tasks: locomotion
• Side winding
• Wheel
• Burrowing
• Climbing
• Swimming Osrtowski
•Energy•Terrain resolution•Step
Demonstration on new mechanism: locomotion (2d) and climbing (3d)
Wheel is good
Copyright 2002 (c) 2002 Howie Choset
Legged Robots
Advantages:•Can traverse any terrain a human can
Disadvantages:•Large number of degrees of freedom•Maintaining stability is complicated
Are legs better than wheels?
Image of leggedhumanoid robot
Copyright 2002 (c) 2002 Howie Choset
What is Motion Planning?
• Determining where to go
Copyright 2002 (c) 2002 Howie Choset
Overview
• The Basics– Motion Planning Statement– The World and Robot– Configuration Space– Metrics
• Path Planning Algorithms– Start-Goal Methods– Map-Based Approaches– Cellular Decompositions
• Applications– Coverage
Copyright 2002 (c) 2002 Howie Choset
The World consists of...
• Obstacles– Already occupied spaces of the world– In other words, robots can’t go there
• Free Space– Unoccupied space within the world– Robots “might” be able to go here– To determine where a robot can go, we need to discuss
what a Configuration Space is
Copyright 2002 (c) 2002 Howie Choset
Motion Planning Statement
If W denotes the robot’s workspace,
And Ci denotes the i’th obstacle,
Then the robot’s free space, FS, is defined as:
FS = W - ( Ci )
And a path c C0 is c : [0,1] FS
where c(0) is qstart
and c(1) is qgoal
Copyright 2002 (c) 2002 Howie Choset
Example of a World (and Robot)
Obstacles
Free Space
Robot
x,y
Copyright 2002 (c) 2002 Howie Choset
Start-Goal Algorithm:Lumelsky Bug Algorithms
Copyright 2002 (c) 2002 Howie Choset
Lumelsky Bug Algorithms
• Unknown obstacles, known start and goal.
• Simple “bump” sensors, encoders.
• Choose arbitrary direction to turn (left/right) to make all turns, called “local direction”
• Motion is like an ant walking around:
– In Bug 1 the robot goes all the way around each obstacle encountered, recording the point nearest the goal, then goes around again to leave the obstacle from that point
– In Bug 2 the robot goes around each obstacle encountered until it can continue on its previous path toward the goal
Copyright 2002 (c) 2002 Howie Choset
Configuration Space: Accommodate Robot Size
Obstacles
Free Space
Robot(treat as point object)x,y
Copyright 2002 (c) 2002 Howie Choset
The Configuration Space
• What it is– A set of “reachable” areas constructed from
knowledge of both the robot and the world
• How to create it– First abstract the robot as a point object. Then,
enlarge the obstacles to account for the robot’s footprint and degrees of freedom
– In our example, the robot was circular, so we simply enlarged our obstacles by the robot’s radius (note the curved vertices)
Copyright 2002 (c) 2002 Howie Choset
Configuration Space: the robot has...
• A Footprint– The amount of space a robot occupies
• Degrees of Freedom– The number of variables necessary to fully
describe a robot’s configuration in space• You’ll cover this more in depth later• fun with non-holonomic constraints, etc
x,y
Copyright 2002 (c) 2002 Howie Choset
Start-Goal Algorithm:Potential Functions
Copyright 2002 (c) 2002 Howie Choset
Potential Function Equations
Copyright 2002 (c) 2002 Howie Choset
Basics: Metrics
• There are many different ways to measure a path:
• Time
• Distance traveled
• Expense
• Distance from obstacles
• Etc…
Copyright 2002 (c) 2002 Howie Choset
Local Minimum Problem with the Charge Analogy
Copyright 2002 (c) 2002 Howie Choset
The Wavefront Planner
• A common algorithm used to determine the shortest paths between two points– In essence, a breadth first search of a graph
• For simplification, we’ll present the world as a two-dimensional grid
• Setup:– Label free space with 0– Label start as START– Label the destination as 2
Copyright 2002 (c) 2002 Howie Choset
Representations
• World Representation– You could always use a large region and distances
– However, a grid can be used for simplicity
Copyright 2002 (c) 2002 Howie Choset
Representations: A Grid
• Distance is reduced to discrete steps– For simplicity, we’ll assume distance is uniform
• Direction is now limited from one adjacent cell to another– Time to revisit Connectivity (Remember Vision?)
Copyright 2002 (c) 2002 Howie Choset
Representations: Connectivity
• 8-Point Connectivity • 4-Point Connectivity– (approximation of the L1 metric)
Copyright 2002 (c) 2002 Howie Choset
The Wavefront Planner: Setup
Copyright 2002 (c) 2002 Howie Choset
The Wavefront in Action (Part 1)
• Starting with the goal, set all adjacent cells with “0” to the current cell + 1– 4-Point Connectivity or 8-Point Connectivity?– Your Choice. We’ll use 8-Point Connectivity in our example
Copyright 2002 (c) 2002 Howie Choset
The Wavefront in Action (Part 2)
• Now repeat with the modified cells– This will be repeated until no 0’s are adjacent to cells
with values >= 2• 0’s will only remain when regions are unreachable
Copyright 2002 (c) 2002 Howie Choset
The Wavefront in Action (Part 3)
• Repeat again...
Copyright 2002 (c) 2002 Howie Choset
The Wavefront in Action (Part 4)
• And again...
Copyright 2002 (c) 2002 Howie Choset
The Wavefront in Action (Part 5)
• And again until...
Copyright 2002 (c) 2002 Howie Choset
The Wavefront in Action (Done)
• You’re done– Remember, 0’s should only remain if unreachable
regions exist
Copyright 2002 (c) 2002 Howie Choset
The Wavefront, Now What?
• To find the shortest path, according to your metric, simply always move toward a cell with a lower number
– The numbers generated by the Wavefront planner are roughly proportional to their distance from the goal
Twopossibleshortest
pathsshown
Copyright 2002 (c) 2002 Howie Choset
Wavefront (Overview)
• Divide the space into a grid.
• Number the squares starting at the start in either 4 or 8 point connectivity starting at the goal, increasing till you reach the start.
• Your path is defined by any uninterrupted sequence of decreasing numbers that lead to the goal.
Copyright 2002 (c) 2002 Howie Choset
Map-Based Approaches: Roadmap Theory
• Properties of a roadmap:– Accessibility: there exists a collision-free
path from the start to the road map
– Departability: there exists a collision-free path from the roadmap to the goal.
– Connectivity: there exists a collision-free path from the start to the goal (on the roadmap).
a roadmap exists a path exists Examples of Roadmaps
– Generalized Voronoi Graph (GVG)– Visibility Graph
Copyright 2002 (c) 2002 Howie Choset
Roadmap: GVG
• A GVG is formed by paths equidistant from the two closest objects
• Remember “spokes”, start and goal
• This generates a very safe roadmap which avoids obstacles as much as possible
Copyright 2002 (c) 2002 Howie Choset
Voronoi Diagram: Metrics
Copyright 2002 (c) 2002 Howie Choset
Voronoi Diagram (L2)
Note the curved edges
Copyright 2002 (c) 2002 Howie Choset
Voronoi Diagram (L1)
Note the lack of curved edges
Copyright 2002 (c) 2002 Howie Choset
Roadmap: Visibility Graph
• Formed by connecting all “visible” vertices, the start point and the end point, to each other
• For two points to be “visible” no obstacle can exist between them– Paths exist on the perimeter of obstacles
• In our example, this produces the shortest path with respect to the L2 metric. However, the close proximity of paths to obstacles makes it dangerous
Copyright 2002 (c) 2002 Howie Choset
The Visibility Graph in Action (Part 1)
• First, draw lines of sight from the start and goal to all “visible” vertices and corners of the world.
start
goal
Copyright 2002 (c) 2002 Howie Choset
The Visibility Graph in Action (Part 2)
• Second, draw lines of sight from every vertex of every obstacle like before. Remember lines along edges are also lines of sight.
start
goal
Copyright 2002 (c) 2002 Howie Choset
The Visibility Graph in Action (Part 3)
• Second, draw lines of sight from every vertex of every obstacle like before. Remember lines along edges are also lines of sight.
start
goal
Copyright 2002 (c) 2002 Howie Choset
The Visibility Graph in Action (Part 4)
• Second, draw lines of sight from every vertex of every obstacle like before. Remember lines along edges are also lines of sight.
start
goal
Copyright 2002 (c) 2002 Howie Choset
The Visibility Graph (Done)
• Repeat until you’re done.
start
goal
Copyright 2002 (c) 2002 Howie Choset
Visibility Graph Overview
• Start with a map of the world, draw lines of sight from the start and goal to every “corner” of the world and vertex of the obstacles, not cutting through any obstacles.
• Draw lines of sight from every vertex of every obstacle like above. Lines along edges of obstacles are lines of sight too, since they don’t pass through the obstacles.
• If the map was in Configuration space, each line potentially represents part of a path from the start to the goal.
Copyright 2002 (c) 2002 Howie Choset
Cell Decompositions: Trapezoidal Decomposition
• A way to divide the world into smaller regions• Assume a polygonal world
Copyright 2002 (c) 2002 Howie Choset
Cell Decompositions: Trapezoidal Decomposition
• Simply draw a vertical line from each vertex until you hit an obstacle. This reduces the world to a union of trapezoid-shaped cells
Copyright 2002 (c) 2002 Howie Choset
Applications: Coverage
• By reducing the world to cells, we’ve essentially abstracted the world to a graph.
Copyright 2002 (c) 2002 Howie Choset
Find a path
• By reducing the world to cells, we’ve essentially abstracted the world to a graph.
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Find a path
• With an adjacency graph, a path from start to goal can be found by simple traversal
start goal
Copyright 2002 (c) 2002 Howie Choset
Applications: Coverage
• First, a distinction between sensor and detector must be made
• Sensor: Senses obstacles
• Detector: What actually does the coverage
• We’ll be observing the simple case of having an omniscient sensor and having the detector’s footprint equal to the robot’s footprint
Copyright 2002 (c) 2002 Howie Choset
Cell Decompositions: Trapezoidal Decomposition
• How is this useful? Well, trapezoids can easily be covered with simple back-and-forth sweeping motions. If we cover all the trapezoids, we can effectively cover the entire “reachable” world.
Copyright 2002 (c) 2002 Howie Choset
Applications: Coverage
• Simply visit all the nodes, performing a sweeping motion in each, and you’re done.
Copyright 2002 (c) 2002 Howie Choset
Conclusion: Complete Overview
• The Basics– Motion Planning Statement– The World and Robot– Configuration Space– Metrics
• Path Planning Algorithms– Start-Goal Methods
• Lumelsky Bug Algorithms• Potential Charge Functions• The Wavefront Planner
– Map-Based Approaches• Generalized Voronoi Graphs• Visibility Graphs
– Cellular Decompositions => Coverage
• Done with Motion Planning!
Copyright 2002 (c) 2002 Howie Choset
What Is a Sensor?
• Anything that detects the state of the environment.
• Yep. You’ve already used sensors before in the Braitenburg lab.
• Vision systems and positioning devices are often treated separately from sensors.
Copyright 2002 (c) 2002 Howie Choset
Some types of Sensors:
• Ladar (laser distance and ranging)
• Sonar
• Radar
• Infra-red
• Light sensing
• Heat sensing
• Touch sensing
Copyright 2002 (c) 2002 Howie Choset
How to Choose a Sensor:There are four main factors to consider in choosing a sensor.
1) Cost: sensors can be expensive, especially in bulk.
2) Environment: there are many sensors that work well and predictably inside, but that choke and die outdoors.
3) Range: Most sensors work best over a certain range of distances. If something comes too close, they bottom out, and if something is too far, they cannot detect it. Choose a sensor that will detect obstacles in the range you need.
4) Field of View: depending upon what you are doing, you may want sensors that have a wider cone of detection. A wider “field of view” will cause more objects to be detected per sensor, but it also will give less information about where exactly an object is when one is detected.
Copyright 2002 (c) 2002 Howie ChosetSolar Cell
Digital Infrared Ranging
Compass
Touch Switch
Pressure Switch
Limit Switch
Magnetic Reed Switch
Magnetic Sensor
Miniature Polaroid Sensor
Polaroid Sensor Board
Piezo Ultrasonic Transducers
Pyroelectric Detector
Thyristor
Gas Sensor
Gieger-MullerRadiation Sensor
Piezo Bend Sensor
Resistive Bend Sensors
Mechanical Tilt Sensors
Pendulum Resistive Tilt Sensors
CDS Cell Resistive Light Sensor
Hall EffectMagnetic Field
Sensors
Compass
IRDA Transceiver
IR Amplifier Sensor
IR ModulatorReceiverLite-On IR
Remote Receiver
Radio ShackRemote Receiver
IR Sensor w/lens
GyroAccelerometer
IR Reflection Sensor
IR Pin Diode
UV Detector
Metal Detector
Copyright 2002 (c) 2002 Howie Choset
Intensity Based Infrared
• Easy to implement (few components)• Works very well in controlled environments• Sensitive to ambient light
time
volt
age
timevo
ltag
e
Increase in ambient light raises DC bias
Copyright 2002 (c) 2002 Howie Choset
Modulated Infrared
http://www.hvwtechnologies.comhttp://www.digikey.com
• Insensitive to ambient light• Built in modulation decoder (typically 38-40kHz)• Used in most IR remote control units ( good for communications)• Mounted in a metal faraday cage• Cannot detect long on-pulses• Requires modulated IR signal
limiter demodulatorbandpass filteramplifier
comparatorintegrator
600us 600us
Input
Output
Copyright 2002 (c) 2002 Howie Choset
Digital Infrared Ranging
position sensitive device (array of photodiodes)
Optical lenses
Modulated IR beam
• Optics to covert horizontal distance to vertical distance• Insensitive to ambient light and surface type • Minimum range ~ 10cm • Beam width ~ 5deg• Designed to run on 3v -> need to protect input• Uses Shift register to exchange data (clk in = data out)• Moderately reliable for ranging
+5voutputinput
gnd
1k 1k
Copyright 2002 (c) 2002 Howie Choset
Polaroid Ultrasonic Sensor
•
Mobile Robot Electric Measuring Tape
Focus for Camerahttp://www.robotprojects.com/sonar/scd.htm
Copyright 2002 (c) 2002 Howie Choset
Theory of Operation
• Digital Init• Chirp
– 16 high to low– -200 to 200 V
• Internal Blanking• Chirp reaches object
– 343.2 m/s– Temp, pressure
• Echoes– Shape– Material
• Returns to Xducer• Measure the time
Copyright 2002 (c) 2002 Howie Choset
Beam Pattern
Not Gaussian!!
Copyright 2002 (c) 2002 Howie Choset
(Naïve) Sensor Model
Copyright 2002 (c) 2002 Howie Choset
Problem with Naïve Model
Copyright 2002 (c) 2002 Howie Choset
Certainty Grid Approach
Combine info withBayes Rule (Morevac and Elfes)
Copyright 2002 (c) 2002 Howie Choset
Arc Transversal Method
• Uniform Distribution on Arc
• Consider Transversal Intersections
• Take the Median
Copyright 2002 (c) 2002 Howie Choset
Mapping Example
Copyright 2002 (c) 2002 Howie Choset
Creative Uses:
• Sharp IR sensors are very accurate and operate well over a large range of distances proportional to the size of a lego robot. However, they have almost no spread. This can cause a robot to miss an obstacle because of a narrow gap. One solution is to make the sensor pan.
• One could also use a light sensor to detect obstacles indoors. Inside, there tend to be lights at many angles and locations. Thus, around the edges of most obstacles, a slight shadow will be cast. A light sensor could detect this shadow and thus the associated object. Warning: this could be a very fickle design.
• Touch sensors can have their spread increased with large bumpers, and can be used for wall following to implement bug2. They are also dirt cheap.
Copyright 2002 (c) 2002 Howie Choset
Computer Vision
Copyright 2002 (c) 2002 Howie Choset
Optics
• Focal length– Length f of projection through lens on image
plane
• Inversion– Projection on image plane is inverted
f
Image planeObject
Copyright 2002 (c) 2002 Howie Choset
Projection on the image plane
• Size of an image on the image plane is inversely proportional to the distance from the focal point
h’h
f
d
f
h
d
h
Focal point
h’
h fd
f
h
d
h
Focal point
By conceptually moving the image plane, we can eliminate the negative sign
Image plane
Image plane
Copyright 2002 (c) 2002 Howie Choset
Move to three dimensions
• Similarity holds when three dimensions are considered
x
y
z
Image plane
f
(x,y,z)
(x’,y’,z’)
z
z
y
y
f
x
x
x
Copyright 2002 (c) 2002 Howie Choset
Perspective
• 1 Point Perspective– Using similar triangles, it is possible to determine the
relative sizes of objects in an image
– Given a calibrated camera (predetermine a mathematical relationship between size on the image plane and the actual object)
f
Image planeObject
Copyright 2002 (c) 2002 Howie Choset
Preliminary Math: Trigonometry
• Pythagorean Theorem– a2 + b2 = c2
• Law of sines
• Law of cosinescba
sinsinsin
cos2222 abbac
Copyright 2002 (c) 2002 Howie Choset
Images
• Discrete representation of a continuous function– Pixel: Picture Element – cell of constant color in a digital image
– An image is a two dimensional array of pixels– Pixel: numeric value representing a uniform portion of an image
• Grayscale– All pixels represent the intensity of light in an image, be it red, green, blue,
or another color • Like holding a piece of transparent colored plastic over your eyes
– Intensity of light in a pixel is stored as a number, generally 0..255 inclusive
• Color– Three grayscale images layered on top of eachother with each layer
indicating the intensity of a specific color light, generally red, green, and blue (RGB)
– Third dimension in a digital image
Copyright 2002 (c) 2002 Howie Choset
Images
• Resolution– Number of pixels across in horizontal– Number of pixels in the vertical– Number of layers used for color
• Often measured in bits per pixel (bpp) where each color uses 8 bits of data
– Ex: 640x480x24bpp
• Binary images: Two color image– Pixel is only one byte of information– Indicates if the intensity of color is above or below
some nominal value– Thresholding
Copyright 2002 (c) 2002 Howie Choset
Grayscale vs. Binary image
Grayscale Binary threshold
Copyright 2002 (c) 2002 Howie Choset
Thresholding
• Purpose– Trying to find areas of high color intensity– Highlights locations of different features of the image (notice
Mona’s eyes)– Image compression, use fewer bits to encode a pixel
• How done– Decide on a value – Scan every pixel in the image
• If it is greater than , make it 255• If it is less than , make it 0
– Picking a good • Often 128 is a good value to start with• Use a histogram to determine values based on color frequency
features
Copyright 2002 (c) 2002 Howie Choset
Histogram
• Measure the number of pixels of different values in an image.
• Yields information such as the brightness of an image, important color features, possibilities of color elimination for compression
• Thresholding– Make pixels above a value one color and values below
that value a different color– Binary threshold often used to transform a grayscale
image into black and white– Also usable for compression and feature extraction
Copyright 2002 (c) 2002 Howie Choset
Mona’s Histogram
0 255
Copyright 2002 (c) 2002 Howie Choset
Connectivity• Two conventions on considering two pixels next
to eachother
• To eliminate the ambiguity, we could define the shape of a pixel to be a hexagon
8 point connectivityAll pixels sharing a side or corner are considered adjacent
4 point connectivityOnly pixels sharing a side are considered adjacent
Copyright 2002 (c) 2002 Howie Choset
Object location - Segmentation
• One method of locating an object is through the use of a wave front
• Wavefront– Assume a binary image with values of 0 or 1
– 1. Choose 1st pixel with value 1, make it a 2
– 2. For each neighbor, if it is also a 1, make it a 2 as well
– 3. Repeat step two for each neighbor until there are no neighbors with value 1
– 4. All pixels with a value 2 are are a continuous object
Copyright 2002 (c) 2002 Howie Choset
Edge detection• Scanline: one row of pixels in an image• Take the first derivative of a scanline
• The derivative becomes nonzero when an edge (pixels change values) is encountered
Copyright 2002 (c) 2002 Howie Choset
Implementing 1st derivative edge detection digitally
• Derivative is defined as• With a scan line, the run (x – c) is 1, and the rise
(f(x) – f(c)) is B[m+1] – B[m]• This becomes
where I is the resulting image of edges
• This is really just a dot product of the vector [-1 1] repeated each pixel in the resulting image
cx
cfxf
cx
)()(lim
][1]1[1][ mBmBmI
11]1[][][ mBmBmI
Copyright 2002 (c) 2002 Howie Choset
More Math: Convolution
• This operation of moving a mask across an image has a name, called convolution
• In order to mathematically apply a filter to a signal, we must use convolution– If you know laplace transforms, this is a
multiplication in the laplace domain
Copyright 2002 (c) 2002 Howie Choset
Convolution: Analog
dττthτxty
)()()(
Given a symetric h (common in image processing), simplifies to
dττhτxty
)()()(
h(t) = [-1 1]
Move across the signal x (possibly a scanline in an image)
Copyright 2002 (c) 2002 Howie Choset
Convolution: Digital
k
knhkxny ][][][
More useful in image processing on a digital computerx[n] is a pixel in an image, y[n] is the resulting pixel
0 2 2 0 1 1 3 0 1 1
40 2 2 0 1 1 3
0 1 1
0 2 2 0 1 1 3
0 1 14 2
1.
2.
Copyright 2002 (c) 2002 Howie Choset
Convolution example, cont
4 2 10 2 2 0 1 1 3
0 1 13.
4 2 1 20 2 2 0 1 1 3
0 1 14.
4 2 1 2 40 2 2 0 1 1 3
0 1 15.
Copyright 2002 (c) 2002 Howie Choset
Convolution: Two-dimensional
• Rotate your mask 180 degrees about the origin• Do the same dot product operation, this time using
matrices instead of vectors• Repeat the dot product for every pixel in the resulting
image• In the boundary case around the edges of the image there
are two options– extend the original image out using the pixel values at the edge– Make the resulting image y smaller than the original and don’t
compute pixels where the mask would extend beyond the edge of the original
0 0
),(),(),( 0000m n
nnmmhnmxnmy
Copyright 2002 (c) 2002 Howie Choset
Convolution: Summary
• Analog
• Digital
• Two dimensional, digital
0 0
),(),(),( 0000m n
nnmmhnmxnmy
dττthτxty
)()()(
k
knhkxny ][][][
Copyright 2002 (c) 2002 Howie Choset
Filters, Masks, Transforms
• Edge detection– Wide masks
• Smoothing
• Object detection
Copyright 2002 (c) 2002 Howie Choset
An Introduction to Robot Kinematics
Renata Melamud
Copyright 2002 (c) 2002 Howie Choset
Kinematics studies the motion of bodies
Copyright 2002 (c) 2002 Howie Choset
An Example - The PUMA 560
The PUMA 560 has SIX revolute jointsA revolute joint has ONE degree of freedom ( 1 DOF) that is
defined by its angle
1
23
4
There are two more joints on the end effector (the gripper)
Copyright 2002 (c) 2002 Howie Choset
Other basic joints
Spherical Joint3 DOF ( Variables - 1, 2, 3)
Revolute Joint1 DOF ( Variable - )
Prismatic Joint1 DOF (linear) (Variables - d)
Copyright 2002 (c) 2002 Howie Choset
We are interested in two kinematics topics
Forward Kinematics (angles to position)What you are given: The length of each link
The angle of each joint
What you can find: The position of any point (i.e. it’s (x, y, z) coordinates
Inverse Kinematics (position to angles)What you are given: The length of each link
The position of some point on the robot
What you can find: The angles of each joint needed to obtain that position
Copyright 2002 (c) 2002 Howie Choset
Quick Math ReviewDot Product: Geometric Representation:
A
Bθ
cosθBABA
Unit VectorVector in the direction of a chosen vector but whose magnitude is 1.
B
BuB
y
x
a
a
y
x
b
b
Matrix Representation:
yyxxy
x
y
xbaba
b
b
a
aBA
B
Bu
Copyright 2002 (c) 2002 Howie Choset
Quick Matrix Review
Matrix Multiplication:
An (m x n) matrix A and an (n x p) matrix B, can be multiplied since the number of columns of A is equal to the number of rows of B.
Non-Commutative MultiplicationAB is NOT equal to BA
dhcfdgce
bhafbgae
hg
fe
dc
ba
Matrix Addition:
hdgc
fbea
hg
fe
dc
ba
Copyright 2002 (c) 2002 Howie Choset
Basic TransformationsMoving Between Coordinate Frames
Translation Along the X-Axis
N
O
X
Y
VNO
VXY
Px
VN
VO
Px = distance between the XY and NO coordinate planes
Y
XXY
V
VV
O
NNO
V
VV
0
PP x
P
(VN,VO)
Notation:
Copyright 2002 (c) 2002 Howie Choset
NX
VNO
VXY
PVN
VO
Y O
NO
O
NXXY VPV
VPV
Writing in terms of XYV NOV
Copyright 2002 (c) 2002 Howie Choset
X
VXY
PXY
N
VNO
VN
VO
O
Y
Translation along the X-Axis and Y-Axis
O
Y
NXNOXY
VP
VPVPV
Y
xXY
P
PP
Copyright 2002 (c) 2002 Howie Choset
oV
nV
θ)cos(90V
cosθV
sinθV
cosθV
V
VV
NO
NO
NO
NO
NO
NO
O
NNO
NOV
o
n Unit vector along the N-Axis
Unit vector along the N-Axis
Magnitude of the VNO vector
Using Basis VectorsBasis vectors are unit vectors that point along a coordinate axis
N
VNO
VN
VO
O
n
o
Copyright 2002 (c) 2002 Howie Choset
Rotation (around the Z-Axis)X
Y
Z
X
Y
N
VN
VO
O
V
VX
VY
Y
XXY
V
VV
O
NNO
V
VV
= Angle of rotation between the XY and NO coordinate axis
Copyright 2002 (c) 2002 Howie Choset
X
Y
N
VN
VO
O
V
VX
VY
Unit vector along X-Axisx
xVcosαVcosαVV NONOXYX
NOXY VV
Can be considered with respect to the XY coordinates or NO coordinatesV
x)oVn(VV ONX (Substituting for VNO using the N and O components of the vector)
)oxVnxVV ONX ()(
))
)
(sinθV(cosθV
90))(cos(θV(cosθVON
ON
Copyright 2002 (c) 2002 Howie Choset
Similarly….
yVα)cos(90VsinαVV NONONOY
y)oVn(VV ONY
)oy(V)ny(VV ONY
))
)
(cosθV(sinθV
(cosθVθ))(cos(90VON
ON
So….
)) (cosθV(sinθVV ONY )) (sinθV(cosθVV ONX
Y
XXY
V
VV
Written in Matrix Form
O
N
Y
XXY
V
V
cosθsinθ
sinθcosθ
V
VV
Rotation Matrix about the z-axis
Copyright 2002 (c) 2002 Howie Choset
X1
Y1
N
O
VXY
X0
Y0
VNO
P
O
N
y
x
Y
XXY
V
V
cosθsinθ
sinθcosθ
P
P
V
VV
(VN,VO)
In other words, knowing the coordinates of a point (VN,VO) in some coordinate frame (NO) you can find the position of that point relative to your original coordinate frame (X0Y0).
(Note : Px, Py are relative to the original coordinate frame. Translation followed by rotation is different than rotation followed by translation.)
Translation along P followed by rotation by
Copyright 2002 (c) 2002 Howie Choset
O
N
y
x
Y
XXY
V
V
cosθsinθ
sinθcosθ
P
P
V
VV
HOMOGENEOUS REPRESENTATIONPutting it all into a Matrix
1
V
V
100
0cosθsinθ
0sinθcosθ
1
P
P
1
V
VO
N
y
xY
X
1
V
V
100
Pcosθsinθ
Psinθcosθ
1
V
VO
N
y
xY
X
What we found by doing a translation and a rotation
Padding with 0’s and 1’s
Simplifying into a matrix form
100
Pcosθsinθ
Psinθcosθ
H y
x
Homogenous Matrix for a Translation in XY plane, followed by a Rotation around the z-axis
Copyright 2002 (c) 2002 Howie Choset
Rotation Matrices in 3D – OK,lets return from homogenous repn
100
0cosθsinθ
0sinθcosθ
R z
cosθ0sinθ
010
sinθ0cosθ
Ry
cosθsinθ0
sinθcosθ0
001
R z
Rotation around the Z-Axis
Rotation around the Y-Axis
Rotation around the X-Axis
Copyright 2002 (c) 2002 Howie Choset
1000
0aon
0aon
0aon
Hzzz
yyy
xxx
Homogeneous Matrices in 3D
H is a 4x4 matrix that can describe a translation, rotation, or both in one matrix
Translation without rotation
1000
P100
P010
P001
Hz
y
x
P
Y
X
Z
Y
X
Z
O
N
A
O
N
ARotation without translation
Rotation part: Could be rotation around z-axis, x-axis, y-axis or a combination of the three.
Copyright 2002 (c) 2002 Howie Choset
1
A
O
N
XY
V
V
V
HV
1
A
O
N
zzzz
yyyy
xxxx
XY
V
V
V
1000
Paon
Paon
Paon
V
Homogeneous Continued….
The (n,o,a) position of a point relative to the current coordinate frame you are in.
The rotation and translation part can be combined into a single homogeneous matrix IF and ONLY IF both are relative to the same coordinate frame.
xA
xO
xN
xX PVaVoVnV
Copyright 2002 (c) 2002 Howie Choset
Finding the Homogeneous MatrixEX.
Y
X
Z
J
I
K
N
OA
T
P
A
O
N
W
W
W
A
O
N
W
W
W
K
J
I
W
W
W
Z
Y
X
W
W
W Point relative to theN-O-A frame
Point relative to theX-Y-Z frame
Point relative to theI-J-K frame
A
O
N
kkk
jjj
iii
k
j
i
K
J
I
W
W
W
aon
aon
aon
P
P
P
W
W
W
1
W
W
W
1000
Paon
Paon
Paon
1
W
W
W
A
O
N
kkkk
jjjj
iiii
K
J
I
Copyright 2002 (c) 2002 Howie Choset
Y
X
Z
J
I
K
N
OA
TP
A
O
N
W
W
W
k
J
I
zzz
yyy
xxx
z
y
x
Z
Y
X
W
W
W
kji
kji
kji
T
T
T
W
W
W
1
W
W
W
1000
Tkji
Tkji
Tkji
1
W
W
W
K
J
I
zzzz
yyyy
xxxx
Z
Y
X
Substituting for
K
J
I
W
W
W
1
W
W
W
1000
Paon
Paon
Paon
1000
Tkji
Tkji
Tkji
1
W
W
W
A
O
N
kkkk
jjjj
iiii
zzzz
yyyy
xxxx
Z
Y
X
Copyright 2002 (c) 2002 Howie Choset
1
W
W
W
H
1
W
W
W
A
O
N
Z
Y
X
1000
Paon
Paon
Paon
1000
Tkji
Tkji
Tkji
Hkkkk
jjjj
iiii
zzzz
yyyy
xxxx
Product of the two matrices
Notice that H can also be written as:
1000
0aon
0aon
0aon
1000
P100
P010
P001
1000
0kji
0kji
0kji
1000
T100
T010
T001
Hkkk
jjj
iii
k
j
i
zzz
yyy
xxx
z
y
x
H = (Translation relative to the XYZ frame) * (Rotation relative to the XYZ frame) * (Translation relative to the IJK frame) * (Rotation relative to the IJK frame)
Copyright 2002 (c) 2002 Howie Choset
The Homogeneous Matrix is a concatenation of numerous translations and rotations
Y
X
Z
J
I
K
N
OA
TP
A
O
N
W
W
W
One more variation on finding H:
H = (Rotate so that the X-axis is aligned with T)
* ( Translate along the new t-axis by || T || (magnitude of T))
* ( Rotate so that the t-axis is aligned with P)
* ( Translate along the p-axis by || P || )
* ( Rotate so that the p-axis is aligned with the O-axis)
This method might seem a bit confusing, but it’s actually an easier way to solve our problem given the information we have. Here is an example…
Copyright 2002 (c) 2002 Howie Choset
What is an INS?
• Position (dead reckoning)
• Orientation (roll, pitch, yaw)
• Velocities
• Accelerations
Copyright 2002 (c) 2002 Howie Choset
Sampling of INS Applications
Image of dynamic stabilized personal vehicle
Image of autonomous vehicle
Copyright 2002 (c) 2002 Howie Choset
Accelerometers
Copyright 2002 (c) 2002 Howie Choset
Accelerometers
Proof Mass
d1d2
Fixed fingers
Moving finger
Suspension Springs
• F = ma
(Newton’s 2nd Law)
• F = kx
(Hooke’s Law)
Copyright 2002 (c) 2002 Howie Choset
Accelerometers
Proof Mass
d1d2
Fixed fingers
Moving finger
Suspension Springs
• C = ε0A/d
(parallel-plate capacitor)– ε0 = permitivity constant
Voltage Capacitance Surface Area and distance Spring displacement Force Acceleration
Integrate to get velocity and displacement
• Q = CV
Copyright 2002 (c) 2002 Howie Choset
Gyroscopes
Copyright 2002 (c) 2002 Howie Choset
Gyroscopes How does it maintain angular orientation?
Disk on an axis Disk stationary Disk rotating
Red pen indicates applied force
Copyright 2002 (c) 2002 Howie Choset
Gyroscopes – Precession
As green force is applied to axis of rotation, red points will attempt to move in blue directions
These points rotate and continue to want to move in the same direction causing precession
Rotating around red axis, apply a moment around axis coming out of paper on red axis
Copyright 2002 (c) 2002 Howie Choset
Gyroscopes – Gimbaled • Rotor Axle wants to keep pointing in the same
direction
• Mounting in a set of gimbals allows us to measure the rotation of the body
Copyright 2002 (c) 2002 Howie Choset
Gyroscopes – MEMS
• Coriolis effect – “fictitious force” that acts upon a freely moving object as observed from a rotating frame of reference
Copyright 2002 (c) 2002 Howie Choset
Gyroscopes – MEMS • Comb drive fingers can be actuated by applying
voltage
• Coriolis effect induces motion based on rotation
• Capacitive sensors (similar to accelerometers) detect the magnitude of this effect and therefore the rotation
Tuning Fork Gyroscope Vibrating Ring Gyroscope
Copyright 2002 (c) 2002 Howie Choset
Fiber Optic Gyroscope (FOG)
= attitude rate, 1 = laser light source, 2 = beamsplitter, 3 = wound optical fiber, 4 = photosensor.
DSP 4000
turret, antenna, and optical stabilization systems
Copyright 2002 (c) 2002 Howie Choset
GPS – Global Positioning System
• Constellation 27 satellites in orbit
• Originally developed by U.S. military
• Accuracy ~ 10 m
• 3D Trilateration
Copyright 2002 (c) 2002 Howie Choset
GPS – 2D Trilateration
AB
CYou are here
50 mi75 mi
30 mi
Copyright 2002 (c) 2002 Howie Choset
GPS – 3D Trilateration• Location of at least three satellites
(typically 4 or more)
• Distance between receiver and each of those satellites
– Psudo-random code is sent via radio waves from satellite and receiver
– Since speed of radio signal is known, the lag time determines distance
Copyright 2002 (c) 2002 Howie Choset
GPS – Improvements • Some sources of error
– Earth’s atmosphere slows down signal
– Radio signal can bounce off large objects
– Misreporting of satellite location
• Differential GPS (DGPS)– Station with known location calculates receiver’s inaccuracy
– Broadcasts signal correction information
– Accuracy ~ 10 m
Copyright 2002 (c) 2002 Howie Choset
GPS – Improvements
• WAAS (Wide Area Augmentation System)– Similar to DGPS
– Geosynchronous Earth Orbiting satellites instead of land based stations
– Accuracy ~ 3 m
Image of GPS navigation device
Copyright 2002 (c) 2002 Howie Choset
Encoders
Copyright 2002 (c) 2002 Howie Choset
Encoders – Incremental
LED Photoemitter
Photodetector
Encoder disk
Copyright 2002 (c) 2002 Howie Choset
Encoders - Incremental
Copyright 2002 (c) 2002 Howie Choset
Encoders - Incremental
• Quadrature (resolution enhancing)
Copyright 2002 (c) 2002 Howie Choset
Encoders - Absolute
4 Bit Example
More expensive
Resolution = 360° / 2N
where N is number of tracks
Copyright 2002 (c) 2002 Howie Choset
Pros and ConsPros Cons
Accelerometer Inexpensive, small
Integration drift error
Gyroscope Large selection Integration drift error
GPS No drift Data at 1 Hz
Encoders Inexpensive Slip
Copyright 2002 (c) 2002 Howie Choset
F o r w a r d K i n e m a t i c s
Copyright 2002 (c) 2002 Howie Choset
The Situation:You have a robotic arm that
starts out aligned with the xo-axis.You tell the first link to move by 1 and the second link to move by 2.
The Quest:What is the position of the end
of the robotic arm?
Solution:1. Geometric Approach
This might be the easiest solution for the simple situation. However, notice that the angles are measured relative to the direction of the previous link. (The first link is the exception. The angle is measured relative to it’s initial position.) For robots with more links and whose arm extends into 3 dimensions the geometry gets much more tedious.
2. Algebraic Approach Involves coordinate transformations.
Copyright 2002 (c) 2002 Howie Choset
X2
X3Y2
Y3
1
2
3
1
2 3
Example Problem: You are have a three link arm that starts out aligned in the x-axis. Each
link has lengths l1, l2, l3, respectively. You tell the first one to move by 1 , and so on as the diagram suggests. Find the Homogeneous matrix to get the position of the yellow dot in the X0Y0 frame.
H = Rz(1 ) * Tx1(l1) * Rz(2 ) * Tx2(l2) * Rz(3 )
i.e. Rotating by 1 will put you in the X1Y1 frame. Translate in the along the X1 axis by l1. Rotating by 2 will put you in the X2Y2 frame. and so on until you are in the X3Y3 frame.
The position of the yellow dot relative to the X3Y3 frame is(l1, 0). Multiplying H by that position vector will give you the coordinates of the yellow point relative the the X0Y0 frame.
X1
Y1
X0
Y0
Copyright 2002 (c) 2002 Howie Choset
Slight variation on the last solution:Make the yellow dot the origin of a new coordinate X4Y4 frame
X2
X3Y2
Y3
1
2
3
1
2 3
X1
Y1
X0
Y0
X4
Y4
H = Rz(1 ) * Tx1(l1) * Rz(2 ) * Tx2(l2) * Rz(3 ) * Tx3(l3)
This takes you from the X0Y0 frame to the X4Y4 frame.
The position of the yellow dot relative to the X4Y4 frame is (0,0).
1
0
0
0
H
1
Z
Y
X
Notice that multiplying by the (0,0,0,1) vector will equal the last column of the H matrix.
Copyright 2002 (c) 2002 Howie Choset
More on Forward Kinematics…
Denavit - Hartenberg Parameters
Copyright 2002 (c) 2002 Howie Choset
Denavit-Hartenberg Notation
Z(i - 1)
X(i -1)
Y(i -1)
( i - 1)
a(i - 1 )
Z i Y i
X i a i
d i
i
IDEA: Each joint is assigned a coordinate frame. Using the Denavit-Hartenberg notation, you need 4 parameters to describe how a frame (i) relates to a previous frame ( i -1 ).
THE PARAMETERS/VARIABLES: , a , d,
Copyright 2002 (c) 2002 Howie Choset
The Parameters
Z(i - 1)
X(i -1)
Y(i -1)
( i - 1)
a(i - 1 )
Z i Y i
X i a i d i
i
You can align the two axis just using the 4 parameters
1) a(i-1)
Technical Definition: a(i-1) is the length of the perpendicular between the joint axes. The joint axes is the axes around which revolution takes place which are the Z(i-1) and Z(i) axes. These two axes can be viewed as lines in space. The common perpendicular is the shortest line between the two axis-lines and is perpendicular to both axis-lines.
Copyright 2002 (c) 2002 Howie Choset
a(i-1) cont...
Visual Approach - “A way to visualize the link parameter a(i-1) is to imagine an expanding cylinder whose axis is the Z(i-1) axis - when the cylinder just touches the joint axis i the radius of the cylinder is equal to a(i-1).” (Manipulator Kinematics)
It’s Usually on the Diagram Approach - If the diagram already specifies the various coordinate frames, then the common perpendicular is usually the X(i-1) axis. So a(i-1) is just the displacement along the X(i-1) to move from the (i-1) frame to the i frame.
If the link is prismatic, then a(i-1) is a variable, not a parameter. Z(i - 1)
X(i -1)
Y(i -1)
( i - 1)
a(i - 1 )
Z i Y i
X i a i d i
i
Copyright 2002 (c) 2002 Howie Choset
2) (i-1)
Technical Definition: Amount of rotation around the common perpendicular so that the joint axes are parallel.
i.e. How much you have to rotate around the X(i-1) axis so that the Z(i-1) is pointing in
the same direction as the Zi axis. Positive rotation follows the right hand rule.
3) d(i-1)
Technical Definition: The displacement along the Zi axis needed to align the a(i-1) common perpendicular to the ai common perpendicular.
In other words, displacement along the
Zi to align the X(i-1) and Xi axes.
4) i Amount of rotation around the Zi axis needed to align the X(i-1) axis with the Xi
axis.
Z(i - 1)
X(i -1)
Y(i -1)
( i - 1)
a(i - 1 )
Z i Y i
X i a i d i
i
Copyright 2002 (c) 2002 Howie Choset
The Denavit-Hartenberg Matrix
1000
cosαcosαsinαcosθsinαsinθ
sinαsinαcosαcosθcosαsinθ
0sinθcosθ
i1)(i1)(i1)(ii1)(ii
i1)(i1)(i1)(ii1)(ii
1)(iii
d
d
a
Just like the Homogeneous Matrix, the Denavit-Hartenberg Matrix is a transformation matrix from one coordinate frame to the next. Using a series of D-H Matrix multiplications and the D-H Parameter table, the final result is a transformation matrix from some frame to your initial frame.
Z(i -
1)
X(i -1)
Y(i -1)
( i - 1)
a(i -
1 )
Z i Y
i X
i
a
i
d
i i
Put the transformation here
Copyright 2002 (c) 2002 Howie Choset
3 Revolute Joints
i (i-1) a(i-1) di
i
0 0 0 0 0
1 0 a0 0 1
2 -90 a1 d2 2
Z0
X0
Y0
Z1
X2
Y1
Z2
X1
Y2
d2
a0 a1
Denavit-Hartenberg Link Parameter Table
Notice that the table has two uses:
1) To describe the robot with its variables and parameters.
2) To describe some state of the robot by having a numerical values for the variables.
Copyright 2002 (c) 2002 Howie Choset
Z0
X0
Y0
Z1
X2
Y1
Z2
X1
Y2
d2
a0 a1
i (i-1) a(i-1) di
i
0 0 0 0 0
1 0 a0 0 1
2 -90 a1 d2 2
1
V
V
V
TV2
2
2
000
Z
Y
X
ZYX T)T)(T)((T 12
010
Note: T is the D-H matrix with (i-1) = 0 and i = 1.
Copyright 2002 (c) 2002 Howie Choset
1000
0100
00cosθsinθ
00sinθcosθ
T 00
00
0
i (i-1) a(i-1) di
i
0 0 0 0 0
1 0 a0 0 1
2 -90 a1 d2 2
This is just a rotation around the Z0 axis
1000
0000
00cosθsinθ
a0sinθcosθ
T 11
011
01
1000
00cosθsinθ
d100
a0sinθcosθ
T22
2
122
12
This is a translation by a0 followed by a rotation around the Z1 axis
This is a translation by a1 and then d2 followed by a rotation around the X2 and Z2 axis
T)T)(T)((T 12
010
Copyright 2002 (c) 2002 Howie Choset
I n v e r s e K i n e m a t i c s
From Position to Angles
Copyright 2002 (c) 2002 Howie Choset
A Simple Example
1
X
Y
S
Revolute and Prismatic Joints Combined
(x , y)
Finding :
)x
yarctan(θ
More Specifically:
)x
y(2arctanθ arctan2() specifies that it’s in the
first quadrant
Finding S:
)y(xS 22
Copyright 2002 (c) 2002 Howie Choset
2
1
(x , y)
l2
l1
Inverse Kinematics of a Two Link Manipulator
(x , y)
l 2
l1
l 2l
1
Copyright 2002 (c) 2002 Howie Choset
The Geometric Solution
l1
l2
2
1
(x , y) Using the Law of Cosines:
21
22
21
22
21
22
21
22
212
22
122
222
2arccosθ
2)cos(θ
)cos(θ)θ180cos(
)θ180cos(2)(
cos2
ll
llyx
ll
llyx
llllyx
Cabbac
2
2
22
2
Using the Law of Cosines:
x
y2arctanα
αθθ
yx
)sin(θ
yx
)θsin(180θsin
sinsin
11
22
2
22
2
2
1
l
c
C
b
B
x
y2arctan
yx
)sin(θarcsinθ
22
221
l
Redundant since 2 could be in the first or fourth quadrant.
Redundancy caused since 2 has two possible values
Copyright 2002 (c) 2002 Howie Choset
21
22
21
22
2
2212
22
1
211211212
22
1
211212
212
22
12
1211212
212
22
12
1
2222
2
yxarccosθ
c2
)(sins)(cc2
)(sins2)(sins)(cc2)(cc
yx)2((1)
ll
ll
llll
llll
llllllll
The Algebraic Solution
l1
l2
2
1
(x , y)
21
21211
21211
1221
11
θθθ(3)
sinsy(2)
ccx(1)
)θcos(θc
cosθc
ll
ll
Only Unknown
))(sin(cos))(sin(cos)sin(
))(sin(sin))(cos(cos)cos(
:
abbaba
bababa
Note
Copyright 2002 (c) 2002 Howie Choset
))(sin(cos))(sin(cos)sin(
))(sin(sin))(cos(cos)cos(
:
abbaba
bababa
Note
)c(s)s(c
cscss
sinsy
)()c(c
ccc
ccx
2211221
12221211
21211
2212211
21221211
21211
lll
lll
ll
slsll
sslll
ll
We know what 2 is from the previous slide. We need to solve for 1 . Now we have two equations and two unknowns (sin 1 and cos 1 )
2222221
1
2212
22
1122221
221122221
221
221
2211
yx
x)c(ys
)c2(sx)c(
1
)c(s)s()c(
)(xy
)c(
)(xc
slll
llllslll
lllll
sls
ll
sls
Substituting for c1 and simplifying many times
Notice this is the law of cosines and can be replaced by x2+ y2
22
222211
yx
x)c(yarcsinθ
slll