Mechanism


By Prof. Seungchul Lee
http://iai.postech.ac.kr/
Industrial AI Lab at POSTECH

Table of Contents

1. Examples of Mechanical DesignĀ¶

Computational Design of Mechanical Characters by Disney Research Group

InĀ [1]:
%%html
<iframe 
width="560" height="315" src="https://www.youtube.com/embed/DfznnKUwywQ" frameborder="0" allowfullscreen></iframe>

Art Studentā€™s 407-Piece Hand-Carved Wooden Clock Literally Writes The Time

InĀ [3]:
%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/WEbmYp5VVcw" frameborder="0" allowfullscreen></iframe>
InĀ [3]:
%%html
<iframe 
width="420" height="315" src="https://www.youtube.com/embed/0gjyVqwrf3E" frameborder="0" allowfullscreen>
</iframe>
InĀ [4]:
%%html
<iframe 
width="560" height="315" src="https://www.youtube.com/embed/rPGpOyIOwd8" frameborder="0" allowfullscreen>
</iframe>
InĀ [5]:
%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/jYHawaGL90o" frameborder="0" allowfullscreen></iframe>

KinematicsĀ¶

  • Kinematics refers generally to the study of robot geometry

  • Given a configuration of a robot (e.g., settings to joint angles), how does this affect the position of its parts?

  • For a desired position of the robot end-effector, are there joint angles that achieve this position?

2. Two-link planar robot (SCARA)Ā¶

InĀ [6]:
%%html
<iframe 
width="560" height="315" src="https://www.youtube.com/embed/eX2a9kr7tFM" frameborder="0" allowfullscreen>
</iframe>
$$\begin{align*} \theta_1, \theta_2&: \text{joint angles of robot (configuration space, joint space)}\\ \\ l_1,l_2&: \text{length of each link (robot parameters)}\\ \\ x,y&: \text{position of end effector (task space)}\\ \\ \end{align*} $$

$\implies$ kinematics is how we move back and forth between these represenations



  • position of "elbow" $x_0, y_0$
$$ \begin{align*} x_0 &= l_1 \cos\theta_1\\ y_0 &= l_1 \sin\theta_1\\ \end{align*} $$
  • So, position of end effector $x,y$ $$ \begin{align*} x &= l_1 \cos\theta_1 + l_2 \cos(\theta_1 + \theta_2)\\ y &= l_1 \sin\theta_1 + l_2 \sin(\theta_1 + \theta_2)\\ \end{align*} $$
  • Given $x,y$, can we find $\theta_1, \theta_2$ that achieve this position ?

    $$ \begin{align*} \theta_2 & = \pm \cos^{-1} \left( \frac{x^2 + y^2 -l_1^2 - l_2^2}{2l_1 l_2} \right) \\ \theta_1 & = \tan^{-1} \left( \frac{y}{x} \right) - \sin^{-1}\left( \frac{l_2 \sin \theta_2}{x^2 + y^2} \right) \end{align*} $$

  • why does $\theta_2$ have two values?

(do not worry about the above equations and their derivation)

Velocity of robot end effector with respect to joint anglesĀ¶

In addition to the relationship between the joint angles and the end-effector configuration, one often makes use of the relationship between the joint and end-effector velocities.

  • chain rule $$ \begin{align*} \frac{dx}{dt} &= -l_1 \omega_1 \sin\theta_1 - l_2 (\omega_1 + \omega_2) \sin(\theta_1 + \theta_2)\\ \frac{dy}{dt} &= l_1 \omega_1 \cos\theta_1 + l_2 (\omega_1 + \omega_2) \cos(\theta_1 + \theta_2)\\ \end{align*} $$ where $\omega_1 = \frac{d \theta_1}{dt}$ and $\omega_2 = \frac{d \theta_2}{dt}$
  • But, it is very tedious. Any other intuitive ways to think ?


$$ \begin{align*} \upsilon_2 &= \upsilon_1 + \upsilon_{2/1} \\ \\ \text{where}\\ \upsilon_1 &= \begin{bmatrix} l_1 \cos \theta_1 \\ l_1 \sin \theta_1 \\ 0\end{bmatrix} \times \begin{bmatrix} 0 \\ 0 \\ \omega_1\end{bmatrix} \\ \upsilon_{2/1} &= \begin{bmatrix} l_2 \cos (\theta_1 + \theta_2) \\ l_2 \sin(\theta_1 + \theta_2) \\ 0\end{bmatrix} \times \begin{bmatrix} 0 \\ 0 \\ \omega_1 + \omega_2\end{bmatrix} \end{align*} $$
InĀ [7]:
L1 = 1;
L2 = 1;
theta1 = 15*pi/180;
theta2 = 30*pi/180;

omega1 = 0.5;
omega2 = 0.1;

r1 = [L1*cos(theta1) L1*sin(theta1) 0]';
r21 = [L2*cos(theta1 + theta2) L2*sin(theta1 + theta2) 0]';
r2 = r1 + r21;

v1 = cross([0 0 omega1]', r1);
v21 = cross([0 0 omega1 + omega2]', r21);

v2 = v1 + v21;

plot([0,r1(1)],[0,r1(2)],'k-o'), hold on
plot([r1(1), r2(1)],[r1(2), r2(2)],'k-o')
plot([r1(1), r1(1) + v1(1)],[r1(2), r1(2) + v1(2)],'r-o')
plot([r2(1), r2(1) + v21(1)],[r2(2), r2(2) + v21(2)],'b-o')
plot([r2(1), r2(1) + v1(1)],[r2(2), r2(2) + v1(2)],'r-o')
plot([r2(1), r2(1) + v2(1)],[r2(2), r2(2) + v2(2)],'m-o'), hold off

axis equal, xlim([0 2.5]), grid on
Out[7]:

Reachable space or workspaceĀ¶

the workspace of a manipulator is defined as the set of all end-effector configurations which can be reached by some choice of joint angles.

  • We will use processing to visually demonstrate workspace of the end-effector of a SCARA robot

  • Processing is an open source programming language and integrated development environment (IDE) built for the electronic arts, new media art, and visual design communities with the purpose of teaching the fundamentals of computer programming in a visual context

  • processing download and installation

  • do not need to undertand the following processing code

InĀ [1]:
%%processing

int L1 = 100;
int L2 = 50;

ArrayList<PVector> ppoints = new ArrayList<PVector>();
ArrayList<PVector> mpoints = new ArrayList<PVector>();
int i = 0;

void setup() {
  size(500, 500);
  background(255);
  calpp();
  smooth();
}

void draw() {
  background(255);
  translate(width/2, height/2);

  if (i >= ppoints.size()) {
    i = 0;
  } else {

    for (int j = 0; j <= i; j++) {
      PVector temp = ppoints.get(j);
      if (abs(i-j) < 100) {
        fill(150, map(abs(i-j), 0, 100, 255, 50));
      } else {
        fill(150, 50);
      }
      noStroke();
      ellipse(temp.x, temp.y, 10, 10);
    }

    PVector p1 = mpoints.get(i);
    PVector p2 = ppoints.get(i);
    stroke(0);
    fill(0);
    ellipse(0, 0,5,5);
    ellipse(p1.x, p1.y,5,5);
    ellipse(p2.x, p2.y, 10, 10);
  
    strokeWeight(5);
    line(p1.x, p1.y, p2.x, p2.y);
    line(0, 0, p1.x, p1.y);

    i++;
  }
}


void calpp() {
  int t1 = 0;
  while (t1 < 360) {

    PVector p1 = new PVector(L1*cos(radians(-t1)), L1*sin(radians(-t1)));
    int t2 = 0;
    while (t2 < 360) {

      PVector p2 = new PVector(L2*cos(radians(-t2)), L2*sin(radians(-t2)));
      ppoints.add(PVector.add(p1, p2));
      mpoints.add(p1);

      t2 = t2+10;
    }
    t1 = t1+15;
  }
}

Degree of freedomĀ¶

  • the minimum number of independent parameters that define its configuration

2. Slider-Crank MechanismĀ¶

  • Functions

    • rotation $\rightarrow$ translation

    • translation $\rightarrow$ rotation


  • position
$$ \begin{align*} (l_1 \sin \theta)^2 + (x-l_1 \cos \theta)^2 = l_2^2 \implies& x^2 - 2l_1\cos \theta \, x + l_1^2 -l_2^2 = 0\\ \\ x & = l_1 \cos \theta \pm \sqrt{l_1^2 \cos^2 \theta - l_1^2 + l_2^2} \\ & = l_1 \cos \theta \pm \sqrt{l_2^2 - l_1^2\sin^2\theta}\\ & = l_1\left( \cos \theta \pm \sqrt{\left( \frac{l_2}{l_1}\right)^2 - \sin^2\theta} \right) \end{align*} $$


Question: think about how to geometrically find position $x$

  • velocity $$ \frac{dx}{dt} = \frac{d}{dt} \left[ l_1\left( \cos \theta \pm \sqrt{\left( \frac{l_2}{l_1}\right)^2 - \sin^2\theta} \right) \right] \implies \text{looks complicated}$$

Instantaneous centerĀ¶

  • the point fixed to a body undergoing planar movement that has zero velocity at a particular instant of time. At this instant, the velocity vectors of the trajectories of other points in the body generate a circular field around this point which is identical to what is generated by a pure rotation.


  • velocity of the slider-crank mechanism
    $$\begin{align*} \upsilon_B = l_1 \omega_1 & = \left( \frac{x}{\cos \theta} -l_1\right) \omega_{I}\\ \\ \upsilon_C & = x \tan \theta \, \omega_{I} \\ & = x\tan \theta \frac{l_1 \omega_1}{\frac{x}{\cos \theta} - l_1} \end{align*}$$

3. Four-bar linkageĀ¶

$$ \begin{align*} l_1 \cos \theta_1 + l_2 \cos (\theta_1 + \theta_2) + l_3 \cos (\theta_1 + \theta_2 + \theta_3) + l_4 \cos(\theta_1 + \theta_2 + \theta_3 + \theta_4) = 0\\ l_1 \sin \theta_1 + l_2 \sin (\theta_1 + \theta_2) + l_3 \sin (\theta_1 + \theta_2 + \theta_3) + l_4 \sin(\theta_1 + \theta_2 + \theta_3 + \theta_4) = 0\\ \theta_1 + \theta_2 + \theta_3 + \theta_4 + \pi = 0 \end{align*} $$
  • 4 unknowns + 3 constraints $\rightarrow$ 1 DOF (one of $\,\theta_1,,\theta_2, \,\theta_3, \,\theta_4\,$ will be provided as input)

  • it is possible to compute, but will be nasty

  • geometric approach with an instantaneous center
    $$\text{position}$$ $$\text{velocity}$$
InĀ [9]:
%%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')