robot kinematics - frank dellaert

30
CS 3630 Robot Kinematics: Planar Arms

Upload: others

Post on 04-Jun-2022

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Robot Kinematics - Frank Dellaert

CS 3630

Robot Kinematics:Planar Arms

Page 2: Robot Kinematics - Frank Dellaert

Robot Armsβ€’ A robot arm (aka serial link manipulator) consists of a series of rigid

links, connected by joints (motors), each of which has a single degree of freedom.β€’ Revolute Joint: Single degree of freedom is rotation about an axis.

β€’ Prismatic joint: Single degree of freedom is translation along an axis.

Revolute Joint Prismatic Joint

Page 3: Robot Kinematics - Frank Dellaert

Describing Serial Link Armsβ€’ Number the links in sequence. β€’ For a robot with 𝑛 joints:

β€’ Base (which does not move) is Link 0.β€’ End-effector (tool) is attached to Link 𝑛.β€’ Joint 𝑖 connects Link 𝑖 βˆ’ 1 to Link 𝑖‒ We define the joint variable π‘žπ‘– for joint 𝑖 as:

π‘žπ‘– = α‰πœƒπ‘– if joint 𝑖 is revolute

𝑑𝑖 if joint 𝑖 is prismatic

Two-link Planar Arm: β€’ 𝑛 = 2, β€’ both links are always coplanar (no rotation

out of the plane). β€’ π‘ž1 = πœƒ1, π‘ž2 = πœƒ2

Page 4: Robot Kinematics - Frank Dellaert

Manipulator Kinematicsβ€’ Kinematics describes the position and motion of a robot, without

considering the forces required to cause the motion.

β€’ Forward Kinematics: Given the value for each joint variable, π‘žπ‘– ,determine the position and orientation of the end-effector (gripper, tool) frame.

The basic idea: ➒Assign lots of coordinate frames,

and express these frames in terms of the joint variables, π‘žπ‘–.

Page 5: Robot Kinematics - Frank Dellaert

General Approachβ€’ Each link is a rigid body.

β€’ We know how to describe the position and orientation of a rigid body:β€’ Attach a coordinate frame to the body.

β€’ Specify the position and orientation of the coordinate frame relative to some reference frame.

β€’ If two links, say link 𝑖 βˆ’ 1 and link 𝑖 are connected by a single joint, then the relationship between the two frames can be described by a homogeneous transformation matrix 𝑇𝑖

π‘–βˆ’1 which will depend only on the value of the joint variable!

Page 6: Robot Kinematics - Frank Dellaert

Homogeneous Transformations

π‘·πŸŽ

1= π‘ΉπŸ

πŸŽπ‘·πŸ + π’…πŸŽ

1=

π‘ΉπŸπŸŽ π’…πŸŽ

02 1π‘·πŸ

1

We can simplify the equation for coordinate transformations by augmenting the vectors and matrices with an extra row:

෨𝑃0 = 𝑇10 ෨𝑃1

෨𝑃0 = π‘·πŸŽ

1, ෨𝑃1 = π‘·πŸ

1

βž’π“πŸπŸŽ is called a homogeneous transformation matrix

➒ ෩𝐏𝟎 are the homogeneous coordinates for 𝐏𝟎

Page 7: Robot Kinematics - Frank Dellaert

Composition of Transformations

π‘₯0

𝑦1

𝑦2

𝑦0π‘₯1

π‘₯2

𝑃

෨𝑃1 = 𝑇21 ෨𝑃2

෨𝑃0 = 𝑇10 ෨𝑃1

From our previous results, we know:

෨𝑃0 = 𝑇10𝑇2

1 ෨𝑃2

෨𝑃0 = 𝑇20 ෨𝑃2

𝑇20 = 𝑇1

0𝑇21

But we also know:

𝑇10

𝑇21

𝑇20

This is the composition law for homogeneous transformations.

Page 8: Robot Kinematics - Frank Dellaert

What about robot arms??

𝑇10

𝑇21

𝑇20

β€’ Attach a coordinate frame to each link of the robot!

β€’ Frame 0 is attached to Link 0, which is merely the fixed mounting point to the environment.

β€’ Now, the trick is to express π‘‡π‘–π‘–βˆ’1 as a function

of πœƒπ‘–

Page 9: Robot Kinematics - Frank Dellaert

A special case

π‘₯0

𝑦1

𝑦2𝑦0

π‘₯1

π‘₯2

𝑇21 =

cosπœƒ2 βˆ’sin πœƒ2 π‘Ž2 cos πœƒ2sin πœƒ2 cos πœƒ2 π‘Ž2 sin πœƒ20 0 1

𝑇10 =

cos πœƒ1 βˆ’sin πœƒ1 π‘Ž1 cos πœƒ1sin πœƒ1 cos πœƒ1 π‘Ž1 sin πœƒ10 0 1

πœƒ1

πœƒ2π‘Ž1 π‘Ž2

π‘‡π‘–π‘–βˆ’1 =

cos πœƒπ‘– βˆ’sin πœƒπ‘– 0sin πœƒπ‘– cos πœƒπ‘– 00 0 1

1 0 π‘Žπ‘–0 1 00 0 1

=cos πœƒπ‘– βˆ’sin πœƒπ‘– π‘Žπ‘– cos πœƒπ‘–sin πœƒπ‘– cos πœƒπ‘– π‘Žπ‘– sin πœƒπ‘–0 0 1

Suppose the axis π‘₯𝑖 is collinear with the origin of Frame 𝑖 βˆ’ 1:β€’ π‘₯1 is collinear with the origin of Frame 0β€’ π‘₯2 is collinear with the origin of Frame 1

Use this to simplify link coordinate frames!

Page 10: Robot Kinematics - Frank Dellaert

Assigning Coordinate Frames to Links

β€’ Frame 0 (the base frame) has its origin at the center of Joint 1 (on the axis of rotation).

β€’ Frame 𝑖 is rigidly attached to Link 𝑖, and has it’s origin at the center of Joint 𝑖 + 1.

β€’ The π‘₯𝑖-axis is collinear with the origin of Frame 𝑖 βˆ’ 1.

β€’ The link length, π‘Žπ‘– is the distance between the origins of Frames 𝑖 and 𝑖 βˆ’ 1.

β€’ The homogeneous transformation that relates adjacent frames is given by:

π‘‡π‘–π‘–βˆ’1 =

cos πœƒπ‘– βˆ’sin πœƒπ‘– π‘Žπ‘– cos πœƒπ‘–sin πœƒπ‘– cos πœƒπ‘– π‘Žπ‘– sin πœƒπ‘–0 0 1

Page 11: Robot Kinematics - Frank Dellaert

Assigning Link Frames

πœƒ1 is the angle from π‘₯0to π‘₯1

β€’ π‘₯1 is collinear with the origin of Frame 0

π‘₯0

𝑦0

π‘₯1

π‘₯2 is collinear with the origin of Frame 1

π‘₯2

πœƒ2 is the angle from π‘₯1to π‘₯2

β€’ Frame 𝑛 is the end-effector frame. It can be attached to link 𝑛 in any manner that is convenient.

β€’ In this case, 𝑛 = 2, so Frame 2 is the end-effector frame.

Page 12: Robot Kinematics - Frank Dellaert

The Forward Kinematic Mapβ€’ The forward kinematic map gives the position and orientation of the

end-effector frame as a function of the joint variables:

𝑇𝑛0 = 𝐹(π‘ž1, … , π‘žπ‘›)

β€’ For the two-link planar arm, we have

𝑇20 =

cos πœƒ1 βˆ’sin πœƒ1 π‘Ž1 cos πœƒ1sin πœƒ1 cos πœƒ1 π‘Ž1 sin πœƒ10 0 1

cos πœƒ2 βˆ’sin πœƒ2 π‘Ž2 cos πœƒ2sin πœƒ2 cos πœƒ2 π‘Ž2 sin πœƒ20 0 1

=cos(πœƒ1+πœƒ2) βˆ’ sin(πœƒ1+πœƒ2) π‘Ž1 cos πœƒ1 + π‘Ž2 cos(πœƒ1+πœƒ2)sin(πœƒ1+πœƒ2) cos(πœƒ1+πœƒ2) π‘Ž1 sin πœƒ1 + π‘Ž2 sin(πœƒ1+πœƒ2)

0 0 1

Page 13: Robot Kinematics - Frank Dellaert

Simple Geometry…

πœƒ2

π‘Ž1 cos πœƒ1

π‘Ž1 sin πœƒ1π‘Ž2 cos(πœƒ1+πœƒ2)

π‘Ž2 sin(πœƒ1+πœƒ2)

πœƒ1

πœƒ1 + πœƒ2

Page 14: Robot Kinematics - Frank Dellaert

Simple Geometry…

πœƒ1 + πœƒ2

π‘Ž1 cos πœƒ1

π‘Ž1 sin πœƒ1π‘Ž2 cos(πœƒ1+πœƒ2)

π‘Ž2 sin(πœƒ1+πœƒ2)

𝑇20 =

cos(πœƒ1+πœƒ2) βˆ’ sin(πœƒ1+πœƒ2) π‘Ž1 cos πœƒ1 + π‘Ž2 cos(πœƒ1+πœƒ2)sin(πœƒ1+πœƒ2) cos(πœƒ1+πœƒ2) π‘Ž1 sin πœƒ1 + π‘Ž2 sin(πœƒ1+πœƒ2)

0 0 1

Page 15: Robot Kinematics - Frank Dellaert

Three-Link Planar Arm π‘₯3𝑦3

𝑇30 =

𝐢123 βˆ’π‘†123 π‘Ž1𝐢1 + π‘Ž2𝐢12 + π‘Ž3𝐢123𝑆123 𝐢123 π‘Ž1𝑆1 + π‘Ž2𝑆12 + π‘Ž3𝑆1230 0 1

𝑇30 =

cosπœ™ βˆ’ sinπœ™ 𝑋𝑒sinπœ™ cosπœ™ π‘Œπ‘’0 0 1

𝐢123 = cos πœƒ1 + πœƒ2 + πœƒ3 , etc.

(𝑋𝑒 , π‘Œπ‘’)

πœ™

We can parameterize the end effector frame by (𝑿𝒆, 𝒀𝒆, 𝝓)

Page 16: Robot Kinematics - Frank Dellaert

About the Forward Kinematic Map

β€’ For the two-link arm, we can position the end-effector origin anywhere in the arm’s workspace: two inputs (πœƒ1, πœƒ2) and two β€œoutputs” (𝑋𝑒 , π‘Œπ‘’).

β€’ For the three-link arm, we can position the end-effector origin anywhere in the arm’s workspace, and we can choose the orientation of the frame: three inputs (πœƒ1, πœƒ2, πœƒ3) and three β€œoutputs” (𝑋𝑒 , π‘Œπ‘’ , πœ™).

β€’ Suppose we had a four-link arm?β€’ Infinitely may ways to achieve a desired end-effector configuration (𝑋𝑒 , π‘Œπ‘’ , πœ™).

Page 17: Robot Kinematics - Frank Dellaert

More General Robot Arms

β€’ With a bit of work, this can be generalized to arbitrary robot arms.

β€’ We shall not do this bit of work in CS3630.

Page 18: Robot Kinematics - Frank Dellaert

Motion Control

β€’ Trajectory following is important

β€’ Spray-painting

β€’ Sealing

β€’ Welding

β€’ Three main approaches:

β€’ Trajectory replay

β€’ Joint-space Motion Control

β€’ Cartesian Motion Control

Image by Roboguru

Page 19: Robot Kinematics - Frank Dellaert

Trajectory Replay

β€’ Teaching by demonstration

β€’ Define a set of waypoints by β€œshowing” the robot

β€’ Similar to keyframe animation in graphics

β€’ Still need to interpolate between waypoints

Page 20: Robot Kinematics - Frank Dellaert

RRR example

β€’ End-effector == frame 3

Page 21: Robot Kinematics - Frank Dellaert

RRR example, cont’d

β€’ Multiply 3 matrices

β€’ Note R in upper left

β€’ Check orientation!

Page 22: Robot Kinematics - Frank Dellaert

Proportional Feedback Control

β€’ Feedback law:

β€’ At every time step:β€’ Calculate joint space error

β€’ Increase of decrease proportional to et

β€’ Kp is proportional gain parameter

Page 23: Robot Kinematics - Frank Dellaert

Proportional Feedback Control

β€’ Properties:β€’ Closer to goal -> smaller steps

β€’ Automatically reverses sign if we overshoot

β€’ Generalizes to vector-valued control

β€’ Value of Kp really matters: β€’ too high: overshoot

β€’ too low: slow convergence

β€’ Special case of PID control

https://arduinoplusplus.wordpress.com/2017/06/21/pid-control-experiment-tuning-the-controller/

Page 24: Robot Kinematics - Frank Dellaert

The Manipulator Jacobian

β€’ Velocity of end-effector if we move any given joint?

β€’ Given by arrows:

β€’ R=joint 1

β€’ G=joint 2

β€’ B=joint 3

Page 25: Robot Kinematics - Frank Dellaert

Jacobian = linear map

β€’ Linear relationship between joint space velocity and cartesian velocity (pose space!)

β€’ J is 3xn matrix:

β€’ Each Ji(q) column corresponds to arrow.

β€’ Partial derivative of pose wrt qi

Page 26: Robot Kinematics - Frank Dellaert

Worked Example: RRR manipulator

β€’ Remember:

β€’ Extracting x, y, theta:

β€’ So what is Jacobian???

Page 27: Robot Kinematics - Frank Dellaert

Worked Example: RRR manipulator

β€’ x, y, theta:

β€’ Jacobian:

Page 28: Robot Kinematics - Frank Dellaert

Cartesian Motion Control

β€’ Convert direction in cartesian space to direction in joint space

β€’ Yields straight-line paths

Page 29: Robot Kinematics - Frank Dellaert

How do we convert?

β€’ We want a straight line!

β€’ Calculate (scaled) direction of the line

β€’ Error in cartesian space:

β€’ Then, simple proportional control:

Small print: we have to take care when subtracting angles, as they are not unique

Page 30: Robot Kinematics - Frank Dellaert

Summary

1. Forward Kinematics is just multiplying transforms

2. We went through an RRR Worked Example

3. Joint-Space Motion Control creates paths that minimize distance in joint space

4. The Manipulator Jacobian provides a relationship between cartesian and joint-space velocities/displacements

5. Cartesian Motion Control exploits this relationship to provide predictable paths in cartesian space