3
EXAMPLES
14
the differential motion. The result, after application of a simple proportional gain, is the
joint space motion required to correct the Cartesian error. The robot is modelled by an
integrator as a simple rate control device, or velocity servo.
This example also demonstrates the use of the
fkine
block for forward kinematics and the
T2xyz
block which extracts the translational part of the robot's Cartesian state for plotting
on the XY plane.
This demonstration is very similar to the numerical method used to solve the inverse kine-
matics problem in
ikine
.
To run this demo first create a robot object in the workspace,typically by using the
puma560
command, then start the simulation using Simulation/Start option from the model toolbar.
>> puma560
>> demo5
3.6
Image-based visual servoing
The Simulink model,
demo6
, shown in Figure 7, demonstrates image-based visual servoing
(IBVS)[5]. This is quite a complex example that simulates not only the robot but also a
camera and the IBVS algorithm. The camera is assumed to be mounted on the robot's end-
effector and this coordinate is passed into the camera block so that the relative position of
the target with respect to the camera can be computed. Arguments to the camera block
include the 3D coordinates of the target points. The output of the camera is the 2D image
plane coordinates of the target points. The target points are used to compute an image
Jacobian matrix which is inverted and multiplies the desired motion of the target points on
the image plane. The desired motion is simply the difference between the observed target
points and the desired point positions. The result is a velocity screw which drives the robot
to the desired pose with respect to a square target.
When the simulation starts a new window, the camera view, pops up. We see that initially
the square target is off to one side and somewhat oblique. The image plane errors are
mapped by an image Jacobian into desired Cartesian rates, and these are futher mapped by a
Image-based visual servo control
desired camera velocity
uv
J
visual
Jacobian
146.1
visjac
condition
Puma 560
plot
MATLAB
Function
pinv
6.998
manip jac condition
J
n
Puma 560
q
J
jacobn
J
-1
J
Ji
ijacob
q
T
Puma 560
fkine
274
feature error
norm
85.07
107.89
112.87
109.40
108.90
80.92
81.10
80.81
feature error
feature
error
256 456
456 456
456 256
256 256
desired
image plane
coordinates
MATLAB
Function
cond()
T
uv
camera
1
s
Rate
controlled
robot
axes
Matrix
Multiply
Matrix
Multiply
Image-based visual servo control
pic
08-Apr-2002 11:31:20
MATLAB
Function
MATLAB
Function
MATLAB
Function
-0.10
0.21
0.28
-0.32
-0.00
0.04
-0.01
Cartesian velocity dmd
6
q
6
6
6
q
[6x6]
[6x6]
[6x6]
6
[4x2]
[4x2]
[4x2]
[4x4]
[8x6]
[8x6]
[8x6]
[4x2]
[6x8]
[4x2]
8
8
8
8
8
feature vel
[6x6]
6
6
6
6
6
Figure 7: Robotics Toolbox example
demo6
, image-based visual servoing.