Kinematska Kontrola
Kinematska Kontrola
Kinematska Kontrola
1D point mass, damping & oscillation, PID, general dynamic systems, Newton-Euler, joint space control, reference trajectory following, optimal operational space control, car system equation, path-nding for non-holonomic systems, control-based sampling, Dubins curves
So far we always assumed we could arbitrarily set the next robot state qt+1 (or an arbitrary velocity q t ). What if we cant? Examples: An air plane ying: You cannot command it to hold still in the air, or to move straight up. A car: you cannot command it to move side-wards. Your arm: you cannot command it to throw a ball with arbitrary speed (force limits). A torque controlled robot: You cannot command it to instantly change velocity (innite acceleration/torque). What all examples have in comment: One can set controls ut (air planes control stick, cars steering wheel, your muscles activations, torque/voltage/current send to a robots motors) But these controls only indirectly inuence the dynamics of state, xt+1 = f (xt , ut )
2/42
Dynamics
The dynamics of a system describes how the controls ut inuence the change-of-state of the system xt+1 = f (xt , ut ) The notation xt refers to the dynamic state of the system: e.g., joint positions and velocities xt = (qt , q t ). f is an arbitrary function, often smooth
3/42
Dynamics
The dynamics of a system describes how the controls ut inuence the change-of-state of the system xt+1 = f (xt , ut ) The notation xt refers to the dynamic state of the system: e.g., joint positions and velocities xt = (qt , q t ). f is an arbitrary function, often smooth We dene a nonholonomic system as one with differential constraints: dim(ut ) < dim(xt ) Not all degrees of freedom are directly controllable
3/42
Outline
We discuss three basic examples: 1D point mass A general dynamic robot A non-holonomic car model We discuss how previous methods can be extended to the dynamic/non-holonomic case: inverse kinematics control optimal operational space control trajectory optimization trajectory optimization RRTs RRTs with special tricks
4/42
State x(t) = (q (t), q (t)) is described by: position q (t) R velocity q (t) R The controls u(t) is the force we apply on the mass point The system dynamics is: q (t) = u(t)/m
5/42
6/42
6/42
7/42
cos(t))
7/42
cos(t))
7/42
1 0.5 0 -0.5 -1 0 2 4 6 8 10 12
cos(x)
14
8/42
9/42
q (t) = q + b e
10/42
2 4mK Kd p 2m
2 4mK /2m in : Kd p
has imaginary part 2 2 oscillating with frequency Kp /m Kd /4m q (t) = q + beKd /2m t ei
2 /4m2 t Kp /mKd
2 Kd > 4mKp
2 = 4mKp Kd
11/42
12/42
1 Kp /m
, ,
Kp = m/2 Kd = 2m/
damping ratio = Kd
4mKp
Kd 2m
13/42
u = Kp (q q ) + Kd (q q ) + Ki
s=0
(q (s) q (s)) ds
This is not a linear control law (not linear w.r.t. (q, q )) Analytically solving the euqation is hard! (no explicit discussion here)
14/42
u = Kp (q q ) + Kd (q q ) + Ki
s=0
(q q (s)) ds
PID control Proportional Control (Position Control) f Kp (q q ) Derivative Control (Damping) f Kd (q q ) (x = 0 damping) Integral Control (Steady State Error) t f Ki s=0 (q (s) q (s)) ds
15/42
16/42
17/42
is positive denite intertia matrix (can be inverted forward simulation of dynamics) are the centripetal and coriolis forces are the gravitational forces are the joint torques
Computing M and F
M (q ) q + F (q, q ) = u Recall: We have an algorithm to compute all positions and orientations given q : TW i (q ) = TW A TAA (q ) TA B TB B (q ) TB C TC C (q ) TC i
19/42
Computing M and F
M (q ) q + F (q, q ) = u Recall: We have an algorithm to compute all positions and orientations given q : TW i (q ) = TW A TAA (q ) TA B TB B (q ) TB C TC C (q ) TC i This can be extended easily to compute also: linear velocities vi angular velocities wi linear accelerations v i angular accelerations w i for any link i in the robot (via forward propagation; see geometry notes for details).
19/42
Newton-Euler (roughly)
focussing at the ith link: Newtons equation expresses the force acting at the center of mass for an accelerated body: fi = mv i Eulers equation expresses the torque acting on a rigid body given an angular velocity and angular acceleration: ui = Ii w + w Iw Idea of Newton-Euler algorithm Force and torque balance at every link Recursion through all links
20/42
Newton-Euler (roughly)
focussing at the ith link: Newtons equation expresses the force acting at the center of mass for an accelerated body: fi = mv i Eulers equation expresses the torque acting on a rigid body given an angular velocity and angular acceleration: ui = Ii w + w Iw Idea of Newton-Euler algorithm Force and torque balance at every link Recursion through all links Bottom line: There exist algorithms to efciently compute M (q ) and F (q, q ) for any dynamic state (q, q ).
20/42
21/42
21/42
This is a standard and very convenient heuristic to track a reference trajectory when the robot dynamics are known: All joints will exactly behave like a 1D point particle around the reference trajectory! 21/42
22/42
note: y =
d y dt
d (J q ) dt
q q = Jq + J = JM -1 (u F ) + J
23/42
(C T = H -1 T (T H -1 T )-1 ) This generalizes the good old q =J y to the dynamic case, taking account also of intrinsic forces (coriolis and . gravity) and J
24/42
25/42
Operational space control: Let the system behave as if we could directly apply 1D point mass behavior to the endeffector.
25/42
26/42
Car example
x State q = y
v Controls u =
Sytem equation
Car example
The car is a non-holonomic system: not all DoFs are controlled, dim(u) < dim(q ) We have the differential constraint q : x sin y cos = 0 A car cannot move directly lateral!
28/42
Car example
The car is a non-holonomic system: not all DoFs are controlled, dim(u) < dim(q ) We have the differential constraint q : x sin y cos = 0 A car cannot move directly lateral!
General denition of a differential constraint: For any given state x, let Ux be the tangent space that is generated by controls: Ux = {x : x = f (x, u), u U } (non-holonomic dim(Ux ) < dim(x)) The elements of Ux are elements of Tx subject to additional differential constraints.
28/42
This is generated with a PRM in the state space q = (x, y, ) ignoring the differntial constraint.
29/42
The path respects differential constraints. Each step in the path corresponds to setting certain controls.
30/42
31/42
32/42
J. Barraquand and J.C. Latombe. Nonholonomic Multibody Robots: Controllability and Motion Planning in the Presence of Obstacles. Algorithmica, 10:121-155, 1993.
car parking
33/42
car parking
34/42
with a trailer
36/42
37/42
Metrics
Standard/Naive metrics: Comparing two 2D rotations/orientations 1 , 2 SO(2): a) Euclidean metric between ei1 and ei2 b) d(1 , 2 ) = min{|1 2 |, 2 |1 2 |} Comparing two congurations (x, y, )1,2 in R2 : Eucledian metric on (x, y, ei ) Comparing two 3D rotations/orientations r1 , r2 SO(3): Represent both orientations as unit-length quaternions r1 , r2 R4 : d(r1 , d2 ) = min{|r1 r2 |, |r1 + r2 |} where | | is the Euclidean metric. (Recall that r1 and r1 represent exactly the same rotation.)
38/42
Metrics
Standard/Naive metrics: Comparing two 2D rotations/orientations 1 , 2 SO(2): a) Euclidean metric between ei1 and ei2 b) d(1 , 2 ) = min{|1 2 |, 2 |1 2 |} Comparing two congurations (x, y, )1,2 in R2 : Eucledian metric on (x, y, ei ) Comparing two 3D rotations/orientations r1 , r2 SO(3): Represent both orientations as unit-length quaternions r1 , r2 R4 : d(r1 , d2 ) = min{|r1 r2 |, |r1 + r2 |} where | | is the Euclidean metric. (Recall that r1 and r1 represent exactly the same rotation.)
Ideal metric: Optimal cost-to-go between two states x1 and x2 : Use optimal trajectory cost as metric This is as hard to compute as the original problem, of course!! Approximate, e.g., by neglecting obstacles.
38/42
Dubins curves
Dubins car: constant velocity, and steer [, ] Neglecting obstacles, there are only six types of trajectories that connect any conguration R2 S1 : {LRL, RLR, LSL, LSR, RSL, RSR} annotating durations of each phase: {L R L , , R L R , L Sd L , L Sd R , R Sd L , R Sd R } with [0, 2 ), (, 2 ), d 0
39/42
Dubins curves
By testing all six types of trajectories for (q1 , q2 ) we can dene a Dubins metric for the RRT and use the Dubins curves as controls!
40/42
Dubins curves
By testing all six types of trajectories for (q1 , q2 ) we can dene a Dubins metric for the RRT and use the Dubins curves as controls! Reeds-Shepp curves are an extension for cars which can drive back. (includes 46 types of trajectories, good metric for use in RRTs for cars)
40/42
Summary
We discuss 3 examples for dynamic/non-holonomic systems: 1D point mass We learnt about PID and the corresponding damped/oscilatory trajectories General robot dynamics M (q ) q + C (q, q ) q + G(q ) = u We learnt how to follow a reference trajectory q0:T (joint space approach) We learnt about optimal operational space control and following a task space trajectory y0:T (operational space control) A car We learnt about path nding under differential constraints This generalizes also to path nding for dynamic robots (see LaValles Planning Algorithms)
41/42
Summary
We discuss 3 examples for dynamic/non-holonomic systems: 1D point mass We learnt about PID and the corresponding damped/oscilatory trajectories General robot dynamics M (q ) q + C (q, q ) q + G(q ) = u We learnt how to follow a reference trajectory q0:T (joint space approach) We learnt about optimal operational space control and following a task space trajectory y0:T (operational space control) A car We learnt about path nding under differential constraints This generalizes also to path nding for dynamic robots (see LaValles Planning Algorithms) We did not talk about trajectory optimization. But the general principle is obvious from slide 23: f (u0:T ) = t ||ut ||2 H + t (xt ) t (xt ) where xt depends on the controls u0:t-1 , and t (xt ) can be any task vector containing positional (as in the kinematic case) or velocity-type task error.
41/42
Summary
State general notation Kinematic control 1D Point mass General dynamic system Car x x=q q x= q q x= q x q = y
v u=
Only kinematic control has dim(u) = dim(x), all others dim(u) < dim(x)
42/42