Universitat Hamburg

MIN-Fakultat

Department Informatik

- Introduction to Robotics

Introduction to Robotics

Jianwei Zhang

zhang@informatik.uni-hamburg.de

Universit

at Hamburg

Fakult

at f

ur Mathematik,Informatik und Naturwissenschaften

Department Informatik

Technische Aspekte Multimodaler Systeme

10.Mai 2013

J.Zhang

118

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Outline

General Information

Introduction

Coordinates of a manipulator

Kinematic equations

Inverse kinematics for manipulators

Trajectory planning

Generation of trajectories

Trajectories in multidimensional space

Cubic polynomials between two congurations

Linear function with parabolical intersections

Velocity calculation at the waypoints

Factors for time optimal motion - arc length

Factors for time optimal motion - curvature

J.Zhang

119

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Outline (cont.)

Factors for time optimal motion - motion time

Dynamical constraints for all joints

Diculties for the trajectory generation in cartesian space

Motion along a line

J.Zhang

120

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Trajectory planning

Trajectory planning

Problem:I'm at poit A and will move to point B.

How and in what time can the end position be achieved???

Solution:

I

Generate a possible trajectory,

I

Trajectory planning

J.Zhang

121

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Generating of possible trajectory

Denition of trajectory:

I

(Changeable) position of TCP and joint position respectively as

function of time

I

In most cases the discrete position (TCP or joint position) is

given with xed temporal distance (e.g.10 ms).

J.Zhang

122

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Generating of possible trajectory

Pre-conditions

I

The same methods should be applicable for the calculation of

cartesian trajectories for TCP as well as for the trajectories in

the joint space.

J.Zhang

123

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Generating of possible trajectory

Primitive approach (to receive B from A)

I

Set the position for the next time step (10 ms later) to B,

I

Possible for the simulation,doesn't work in reality.The moving

distance for a manipulator at the time of 10 ms is limited

(velocity limitation).

J.Zhang

124

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Generating of possible trajectory

Next best approach (to receive B from A)

I

The linear interpolation is used to devide the distance between

A and B into shorter distances with respect to maximal velocity

of the manipulator.

J.Zhang

125

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Generating of possible trajectory

Linear interpolation

J.Zhang

126

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Generating of possible trajectory

Linear interpolation

Problem:the physical constraints are violated

Contraints for the robot motion:

Joint velocity is limited (max.motor rotation speed)

Joint acceleration is also limited (max.motor torque)

Implicitly thess contraints are valid for the motion in cartesian

space

The robot dynamics (joint moments resulting from the robot motion)

aects the boundary condition,too.Solution:dynamical trajectory

planning,advanced optimization methods,current topic of research.

J.Zhang

127

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Generating of possible trajectory

Next best approach (to receive B from A)

I

Limitation of joint velocities and accelerations

I

Two dierent methods

I

trapezoidal interpolation,

I

polynomial interpolation.

J.Zhang

128

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Trapezoidal and polynomial interpolation

J.Zhang

129

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Generating of possible trajectory

Trapezoidal interpolation

I

Consider joint velocities and accelerations contraints

I

Optimal time usage (movements with maximal acceleration and

velocity)

I

Acceleration is not dierentiable (the jerk is not continuous;

jerk:derivation of acceleration)

I

Start and end velocity equals 0 (disadvantageous for combining

dierent trajectories),can be improved through polynomial

interpolation.

J.Zhang

130

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Generating of possible trajectory

Trapezoidal interpolation

I

Diculties with multidimensional trapezoidal interpolations

I

dierent running time for joints (or cartesian dimension);

I

dierent velocity and acceleration contraints

I

consequence:dierent\time swich points"

I

from acceleration to continuous velocity,

I

from continuous velocity to deceleration.

I

consequence:moving along the line in joint and cartesian space

respectively is impossible

Solution

I

Normalization to the slowest joint

I

Using the jerk and the arrival time of the slowest joint instead of

its velocity.

J.Zhang

131

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Trapezoidal interpolation

Normalization to the slowest joint

J.Zhang

132

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Trapezoidal interpolation

Normalization to the slowest joint

J.Zhang

133

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Generating of possible trajectory

Polynomial interpolation

I

Consider velocity and acceleration boundary conditions

(Calculation of extremum and time scaling for the trajectory)

I

Not optimal time usage (maximal acceleration or velocity will

be achieved only at one point inside the trajectory)

I

Acceleration dierentiable (the jerk is continuous;;\smooth

trajectory";interesting only in the theory - for momentum

control)

I

Start- and end velocity can be dierent from 0

(advantageous for combining dierent trajectories

J.Zhang

134

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Trajectory generation

Polynomial interpolation

I

Approach:in most cases a polynom with a degree of 3.(Spline;

cubic spline) or 5.,Calculation of coecient with respect to

boundary constraints.

I

three-degree polynomial:allows us to consider 4 boundary

constraints (only velocities)

J.Zhang

135

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Trajectory generation

I

fth-degree polynomial:allows us to consider 6 boundary

constraints (velocity and acceleration)

I

e.g.f(x) = a1 x5 + a2 x4 + a3 x3 + a4 x2 + a5 x + a6

I

boundary conditions for start (x=0) and end (x=1):

I

f(0) = 0,f (1) = 1,//ptoper f (0) = A,

I

f (1) = B,see below

I

f'(0) = vStart,f'(1) = vGoal

I

f"(0) = aStart,f"(1) = aGoal

I

t:\formal"time from the interval between [0;1]

I

\Proper"position interpolation P(t) = Af(t) + B(1-t)

J.Zhang

136

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

Trajectory generation

Polynomial interpolation

J.Zhang

137

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

\Pick-and-Place"- operation and its boundary constraints

(via points:waypoints)

J.Zhang

138

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning Introduction to Robotics

\Pick-and-Place"- operation and it's boundary constraints

(a)\Pick":position (is given),velocity and acceleration (is given,

0 in normal case)

(b)\Lift-o":continuous motion via waypoints

(c)\Set-down":similar to (b)

(d)\Place":similar to (a)

J.Zhang

139

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Generation of trajectories Introduction to Robotics

Generation of trajectories - I

Task:

Calculate,interpolate or approximate the necessary trajectory with

lots of continuous functions related to time for moving the robot

from start to goal point.The start and goal points can be specied

in cartesian or joint space.

Two possible solutions:The trajectories are generated in

I

cartesian space:

I

near to the task specication

I

advantageous for collision avoidance

J.Zhang

140

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Generation of trajectories Introduction to Robotics

Generation of trajectories - II

I

joint space:

I

the planned trajectory can be immediately applied

I

the calculation of inverse kinematics is unnecessary

I

joint physical contraints can be considered

J.Zhang

141

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Trajectories in multidimensional space Introduction to Robotics

Trajectories in multidimensional space

The changes in position,velocity and acceleration of all joints are

analyzed over a certain period of time.The trajectory with i DOF

is a parameterized function q

i

(t) with values in its motion region.

The trajectory of the robot with n DOF is then a vector of q

i

(t)

with one common parameter:

q(t) = [q

1

(t);q

2

(t);:::;q

n

(t)]

T

A trajectory is C

k

-continuous,if all derivations up to k-th

(inclusively) exist and are continuous.

A trajectory is smooth,if it is C

2

-continuous (minimum).

J.Zhang

142

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Trajectories in multidimensional space Introduction to Robotics

Remarks on generation of trajectories

I

The rst derivation of trajectory related to the time is the

velocity

I

The second derivation of trajectory related to the time is the

acceleration

I

The third derivation of trajectory related to the time is the jerk

J.Zhang

143

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Trajectories in multidimensional space Introduction to Robotics

Remarks on generation of trajectories

I

The smoothest curves are calculated via innite,often

dierentiable functions.

e.g.e

x

,sin x,

and

log x (for x > 0).

I

The polynomials are suitable for the interpolation (oscillations

caused by an order that is too high).

I

Piecewise polynomials with specied order are applicable:

cubic polynomial,Splines,B-Splines etc.

J.Zhang

144

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Cubic polynomials between two congurations Introduction to Robotics

Cubic polynomials between two congurations - I

If the start and end velocity is 0 then:

(0) =

0

(t

f

) =

f

_

(0) = 0

_

(t

f

) = 0

J.Zhang

145

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Cubic polynomials between two congurations Introduction to Robotics

Cubic polynomials between two congurations - I

four constraints )a fourth-degree polynomial:

(t) = a

0

+a

1

t +a

2

t

2

+a

3

t

3

J.Zhang

146

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Cubic polynomials between two congurations Introduction to Robotics

Cubic polynomials between two congurations - II

The solution:

a

0

=

0

a

1

= 0

a

2

=

3

t

2

f

(

f

0

)

a

3

=

2

t

3

f

(

f

0

)

J.Zhang

147

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Cubic polynomials between two congurations Introduction to Robotics

Cubic polynomials for a trajectory with waypoints

The positions of waypoints are given.Only the velocities between

the waypoints are dierent from 0:

_

(0) =

_

0

_

(t

f

) =

_

f

The solution:

a

0

=

0

a

1

=

_

0

J.Zhang

148

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Cubic polynomials between two congurations Introduction to Robotics

Cubic polynomials for a trajectory with waypoints

a

2

=

3

t

2

f

(

f

0

)

2

t

f

_

0

1

t

f

_

f

a

3

=

2

t

3

f

(

f

0

) +

1

t

2

f

(

_

f

+

_

0

)

J.Zhang

149

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Linear function with parabolical intersections Introduction to Robotics

Linear function with parabolical intersections

t

b

=

h

b

t

h

t

b

J.Zhang

150

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Linear function with parabolical intersections Introduction to Robotics

Linear function with parabolical intersections

b

=

0

+

1

2

t

2

b

If t = 2t

h

then:

t

2

b

tt

b

+(

f

0

) = 0

t

b

=

t

2

q

2

t

2

4

(

f

0

)

2

The acceleration contraint is:

4(

f

0

)

t

2

J.Zhang

151

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Velocity calculation at the waypoints Introduction to Robotics

Velocity calculation at the waypoints

I

Manual specication based on cartesian linear and angle

velocity for the tool frame;

I

Automatical calculation in cartesian or joint space with the

help of heuristics;

I

Automatical choosing of the parameteres in the case where

the acceleration at the waypoints is continuous.

J.Zhang

152

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Factors for time optimal motion - arc length Introduction to Robotics

Factors for time optimal motion - arc length

The curve in the n-dimensional K space is given

q(t) = [q

1

(t);q

2

(t);:::;q

n

(t)]

T

then the arc length can be dened as follows:

s =

Z

t

0

j _q(t)j dt

where j _q(t)j is the eucledean norm of vector dq(t)=dt and is

labeled as a ow velocity along the curve.

The following two points are given p

0

= q(t

s

) und p

1

= q(t

z

),

J.Zhang

153

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Factors for time optimal motion - arc length Introduction to Robotics

Factors for time optimal motion - arc length

then the arc length L between p

0

and p

1

the integral:

L =

Z

L

0

ds =

Z

t

z

t

s

j _q(t)j dt

"

The trajectory parameters should be calculated in the way

that the arc length L has the shortest possible value.\

J.Zhang

154

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Factors for time optimal motion - curvature Introduction to Robotics

Factors for time optimal motion - curvature

At rst the unit vector of the curve q(t) can be dened as follows:

U =

dq(t)

ds

=

dq(t)=dt

ds=dt

=

_q(t)

j

_

q(t)j

If the s as the parameter of the arc length and U as the unit vector

are given,the curvature of curve q(t) can be dened:

(s) = j

dU

ds

j

If the parameter t,the rst derivation of _q = dq(t)=dt and the

second derivation of q = d _q(t)=dt for the curve q(t) are given,

then the arc length can be calculated from the following

representation:

J.Zhang

155

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Factors for time optimal motion - curvature Introduction to Robotics

Factors for time optimal motion - curvature

(t) =

j

_

q

qj

j _q

3

j

=

(

_

q

2

q

2

(

_

q

q)

2

)

1=2

j _qj

3=2

where

_

q

q is the cross product and

_

q

q is the dot product of

_

q

and q.

The bending energy of a smooth curve q(t) over the intervall

t 2 [0;T] is dened as

E =

Z

L

0

(s)

2

ds =

Z

T

0

(t)

2

j _q(t)j dt

where (t) is the curvature of q(t).

"

The bending energy E of a trajectory should be as small as

possible under consideration of the arc length.\

J.Zhang

156

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Factors for time optimal motion - motion time Introduction to Robotics

Factors for time optimal motion - motion time

If

u

i

= t

i +1

t

i

is the needed time for motion in the segment q

i

.

The total motion time is:

T =

n1

X

i =1

u

i

J.Zhang

157

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Dynamical constraints for all joints Introduction to Robotics

Dynamical constraints for all joints

The borders for the minimum motion time for the trajectory q

i

j

(t)

are dened over a dynamical parameter of all joints.

For the joint i this kind of constraint can be described as follows:

j _q

i

j

(t)j _q

i

max

jq

i

j

(t)j q

i

max

ju

i

j

(t)j u

i

max

J.Zhang

158

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Dynamical constraints for all joints Introduction to Robotics

Dynamical constraints for all joints

where i (i = 1;:::;n) is a joint number,and j (j = 1;:::;m)

represent a number of a trajectory part.

u

i

is the moment of force for the joint i and can be calculated

from the dynamical equation (motion equation).

_q

i

max

,q

i

max

and u

i

max

represent the important parameters of the

dynamical capacity of the robot.

J.Zhang

159

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Diculties for the trajectory generation in cartesian space Introduction to Robotics

Diculties for the trajectory generation in cartesian space

I

Waypoints cannot be arrived

I

The velocities in the vicinity of singular congurations are too

high

I

Start and end congurations can be arrived at,but they

depend on dierent solutions.

J.Zhang

160

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Motion along a line Introduction to Robotics

Motion along a line < w

0

;w

1

>

The following algorithm should create a smallest set of waypoints

in the joint space with the given value > 0.Therefore the

deviation between the trajectory and the given line < w

0

;w

1

>

must be smaller then .

Algorithm(Bounded

Deviation)

1.Calculation of possible congurations q

0

;q

1

aus w

0

;w

1

with

the help of equations of the inverse kinematics.

2.Calculation of the center in joint space:

q

m

=

q

0

+q

1

2

J.Zhang

161

Universitat Hamburg

MIN-Fakultat

Department Informatik

Trajectory planning - Motion along a line Introduction to Robotics

Motion along a line < w

0

;w

1

>

3.Calculation of the corresponding point of q

m

in the workspace

with usage of direct kinematics:

w

m

= W(q

m

)

4.Calculation of the center in the workspace:

w

M

=

w

0

+w

1

2

5.If the deviation jjw

m

w

M

jj ,then cancel;else add the w

M

as node point between w

0

and w

1

.

6.Recursive application of the algorithm for two new segments

(w

0

;w

M

) und (w

M

;w

1

).

J.Zhang

162

## Comments 0

Log in to post a comment