Cartesian Control
- Analytical inverse kinematics can be difficult
to derive
- Inverse kinematics are not as well suited for
small differential motions
- Let’s take a look at how you use the
Jacobian to control Cartesian position
Cartesian Control Analytical inverse kinematics can be difficult - - PowerPoint PPT Presentation
Cartesian Control Analytical inverse kinematics can be difficult to derive Inverse kinematics are not as well suited for small differential motions Lets take a look at how you use the Jacobian to control Cartesian position
to derive
small differential motions
Jacobian to control Cartesian position
Let’s control the position (not orientation) of the three link arm end effector:
1
q
2
q
3
q
x y z
1
z
1
x
1
y
2
z
2
x
2
y
3
z
3
y
3
x
1
l
2
l
3
l
( ) ( ) ( ) ( )
+ − + − + − + − + − =
23 3 23 3 2 2 23 1 3 23 3 2 2 1 23 3 2 2 1 23 1 3 23 3 2 2 1 23 3 2 2 1
c l c l c l s c l c l c l s c l c l c s c l c l c l c c l c l s J
2 1
−
1 2 1
We can use the same strategy that we used before:
However, this only works if the Jacobian is square and full rank…
1 −
J
+ ) (q FK
d
x x q x δ q δ +
d
q q
joint ctlr joint position sensor
1
q
2
q
3
q
x y z
1
z
1
x
1
y
2
z
2
x
2
y
3
z
3
y
3
x
1
l
2
l
3
l
−
1 2 1
linearly independent, or
Cartesian space, or
What if you want to control the two- dimensional position of a three-link manipulator?
x y
1
q
z
2
q
3
q
x
1
y
1
y
2
x
2
x
3
y
3
1
l
2
l
3
l
( )
1 1 12 2 1 1 123 3 12 2 1 1 1 1 12 2 1 1 123 3 12 2 1 1
( )
3 2 1
Two equations of three variables each… This is an under-constrained system of equations.
same EFF velocity.
If the Jacobian is not a square matrix (or is not full rank), then the inverse doesn’t exist…
x y
1
q
z
2
q
3
q
x
1
y
1
y
2
x
2
x
3
y
3
1
l
2
l
3
l
We are looking for a matrix such that:
#
We have:
#
Two cases:
Generalized inverse:
that minimizes s.t.
s.t. Is minimized
This condition must be met when is at a minimum subject to Psuedoinverse definition: (underconstrained) Given a desired twist, , find a vector of joint velocities, , that satisfies while minimizing x y
1
q
z
2
q
3
q
x
1
y
1
y
2
x
2
x
3
y
3
1
l
2
l
3
l
T
d
Use lagrange multiplier method:
z z
Minimize subject to :
Minimize joint velocities
T
2 1
z z
T q
q
T T
T
Minimize Subject to
So, the pseudoinverse calculates the vector of joint velocities that satisfies while minimizing the squared magnitude
calculates the least-squares solution.
T
T
1 −
1 −
I won’t say why, but if is full rank, then is invertible
T
JJ
T
T T
1 −
1 # −
T T JJ
#
The pseudoinverse can be calculated using two different equations depending upon the number of rows and columns:
1 # −
T T JJ
Underconstrained case (if there are more columns than rows (m<n))
T T
1 # −
Overconstrained case (if there are more rows than columns (n<m))
1 # −
If there are an equal number of rows and columns (n=m) These equations can only be used if the Jacobian is full rank;
Singular value decomposition decomposes a matrix as follows:
T
T
U V J
n
=
1 1 1 1 #
3 2 1
σ σ σ σ
For an under-constrained matrix, is a diagonal matrix of singular values:
T
1 # −
T n
V U J =
3 2 1
σ σ σ σ
# #
# # T T
Moore-Penrose conditions:
#
# # #
# #
T =
T # #
Generalized inverse: satisfies condition 1 Reflexive generalized inverse: satisfies conditions 1 and 2 Pseudoinverse: satisfies all four conditions 1. 2. 3. 4. Other useful properties of the pseudoinverse:
#
+ ) (q FK
d
x x q x δ q δ +
d
q q
joint ctlr joint position sensor
Procedure for controlling position:
err
err err
err v
#
#
+ ) (q FK
d
R
c
R q ω q δ +
d
q q
joint ctlr joint position sensor
How does this strategy work for orientation control?
angular velocity to use in ?
d
c
#
d T c cd
#
+ ) (q FK
d
R
c
R q q δ +
d
q q
joint ctlr joint position sensor
You can’t do this:
pretend that they are an angular velocity:
φθψ
#
φθψ
φθψ
Remember that in general:
φθψ ω
x y
1
q
z
2
q
3
q
x
1
y
1
y
2
x
2
x
3
y
3
1
l
2
l
3
l
If you really want to multiply the angular Jacobian by the derivative of an Euler angle, you have to convert to the “analytical” Jacobian: Gimbal lock: by using an analytical Jacobian instead of the angular velocity Jacobian, you introduce the gimbal lock problems we talked about earlier into the Jacobian – this essentially adds “singularities” (we’ll talk more about that in a bit…)
A
ω φθψ φθψ =
ω θ θ φ φ θ φ φ ω φθψ
A A
For ZYZ Euler angles
x y
1
q
z
2
q
3
q
x
1
y
1
y
2
x
2
x
3
y
3
1
l
2
l
3
l
The easiest way to handle this Cartesian
error in axis-angle format
ω
Axis angle delta rotation Procedure for controlling rotation:
pseudoinverse:
err
err err
err
ω #
Why does axis angle work?
( )
( ) ( ) ( ) ( ) ( )
θ θ
2
k S k
axis angle
b b b
Compare this to the definition of angular velocity: The solution to this FO diff eqn is:
( )t
S t b
b
ω ω =
Therefore, the angular velocity gets integrated into an axis angle representation
The story of Cartesian control so far: 1. 2.
#
Here’s another approach:
err T err x
2 1
T err
T
T T err
( )
err T
( )
err T v
Start with a squared position error function (assume the poses are represented as row vectors) Gradient descent: take steps proportional to in the direction of the negative gradient.
ref err
Position error:
the current end effector reference frame:
The same approach can be used to control orientation:
ref curr T
ω
ref currk
So, evidently, this is the gradient of that
error function.
gradient
err T err x
2 1
( )
err T x
What gives?
transpose?
T
#
They do different things:
possible
trajectory
relevant twist is)
The pseudoinverse moves the end effector in a straight line path toward the goal pose using the least squared joint velocities.
reference twist
Cartesian space
d
x The transpose moves the end effector toward the goal position
Cartesian space
in joint space
d
x
Up until now, we’ve used the Jacobian in the twist equation,
Interestingly, you can also use the Jacobian in a statics equation:
Cartesian wrench:
force moment (torque) Joint torques
It turns out that both wrenches and twists can be understood in terms of a representation of displacement known as a screw.
product:
( )
T
T
Work in Cartesian space Work in joint space Conservation of energy:
T T
Incremental work (virtual work)
T T
T T
T T
vs Wrench-twist duality:
Note that twist can be represented in different reference frames:
b b b
k k k
1 2
b b
Consider two reference frames attached to the same rigid body:
1
b 2
b 12 1 1 2
b b b
1 2
b b
1
b 2
b 12 1 1 2
b b b
( )
1 1 12 2 2
b b b b
( )
1 1 1 1 12 2 2 2 2
b b T b T b
1 1 1 2 12 1 1 2 1 2 2 2
Twist in frame 2 Twist in frame 1
Wrench can also be represented in different reference frames:
b b b
k k k 1
b 2
b
Use the virtual work argument to derive the relationship:
1
b 2
b
1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2
T T
1 1 1 1 1 1 1 1 1 1 1 1 1 2 12 1 1 2 1 2 2 2 2 2
T T
T T
1 1 1 1 1 2 12 1 1 2 1 2 2 2 2 2
2 2 2 2 2 1 2 1 12 1 2 1 1 1 1 1
Use a 6-axis load cell bisecting the second link to calculate wrenches at the end effector (the tip of the last link)
6 axis load cell
3
l 2
2
l
3
q
eff
− = 1
3 3 3 3
c s s c Rsensor
eff
− − = 2 2
3 2 3 2 3
s l c l l rsensor
eff
eff
sensor
sensor
sensor sensor sensor sensor sensor eff sensor eff sensor eff eff sensor eff eff eff eff eff
,
6 axis load cell
3
l 2
2
l
3
q
eff
x
eff
y
sensor
x
sensor
y − − − − + − =
sensor sensor sensor sensor eff eff eff eff
m f s l c l c l s l c s c l l s c s l c s s c m f 1 2 2 2 2 1
2 3 2 2 3 2 3 3 3 3 3 3 3 2 3 3 3 3 2 3 3 3 3