%
%  2004/Lecture notes/Lecture9/lecture9.tex
%
\documentclass[pdf,mmoll,slideColor%,colorBG
]{prosper}
\RequirePackage{color}

\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,natbib}
%\usepackage[T1,noTS1]{mathtime}
\SetMathAlphabet{\mathbf}{normal}{\encodingdefault}{ptm}{b}{n}
\usepackage{subfigure}
\usepackage{rotating}
\usepackage{graphicx}
%\usepackage[dvips]{color}
\usepackage{epsfig}
\graphicspath{{../figs/}}

\newcommand{\ee}{\end{equation}} 
\newcommand{\be}{\begin{equation}} 
\newcommand{\ec}{\end{center}} 
\newcommand{\bc}{\begin{center}} 
\newcommand{\eea}{\end{eqnarray}} 
\newcommand{\bea}{\begin{eqnarray}} 
%\newcommand{\sumprime}{\mathop{{\sum}'}} 
\newcommand{\bd}{\begin{description}} 
\newcommand{\ed}{\end{description}} 
\newcommand{\bi}{\begin{itemize}} 
\newcommand{\ei}{\end{itemize}} 
\newcommand{\pa}{\partial} 
\newcommand{\hor}{\left(\frac{h}{R_0}\right)} 

\newcommand{\code}[0]{\ttfamily}
\newcommand{\co}[0]{\hbox{c}}
\newcommand{\si}[0]{\hbox{s}}
\newcommand{\pprime}[0]{\prime\prime}
\newcommand{\ppprime}[0]{\prime\prime\prime}
\newcommand{\conv}{\operatorname{conv}}
\newcommand{\pos}{\operatorname{pos}}
\newcommand{\lin}{\operatorname{lin}}
\newcommand{\vertop}{\operatorname{vert}}
\newcommand{\spanop}{\operatorname{span}}
\newcommand{\supp}{\operatorname{supp}}
\newcommand{\intoper}{\operatorname{int}}
\newcommand{\half}{\operatorname{half}}
\newcommand{\rad}{\operatorname{rad}}
\newcommand{\diam}{\operatorname{diam}}
\newcommand{\push}{\operatorname{push}}
\newcommand{\sqz}{\operatorname{sqz}}
\newcommand{\sgn}{\operatorname{sgn}}
%\renewcommand{\Re}{\Bbb{R}}
\renewcommand{\Re}{\mathbf{R}}
\newcommand{\vv}[1]{\mathbf{#1}}
\newcommand{\uu}[1]{\hat {\vv #1}}
\newcommand{\defterm}[1]{\textbf{#1}}
\newcommand{\rot}{\operatorname{rot}}

\newcommand{\btimes}{\times}
\newcommand{\bomega}{\omega}

 
\newcommand{\bis}{\begin{itemstep}} 
\newcommand{\eis}{\end{itemstep}} 

\makeatletter
\define@key{PDF}{Movie}{\pdf@addtoks{#1}{Movie}}
\define@key{PDF}{Activation}{\pdf@addtoks{#1}{Activation}}
\newcommand{\moviewithpreview}[3]{% args: width, preview, movie
   \pdfmark[{\includegraphics[width=#1]{#2}}]{%
   pdfmark=/ANN,Subtype=/Movie,Movie=<< /F (#3) >>,%
   Activation=<< /ShowControls true /Mode /Repeat >>}}
\newcommand{\movie}[3]{% args:width, height, movie
   \pdfmark[{\hbox to #1 {\vbox to #2 { }}}]{%
   pdfmark=/ANN,Subtype=/Movie,Movie=<< /F (#3) /Poster true >>,%
   Activation=<< /ShowControls true /Mode /Repeat >>}}
\makeatother

\title{9.  Representing constraint}
\subtitle{ Mechanics of Manipulation}
\author{Matt Mason}
\institution{Carnegie Mellon}
\email{matt.mason@cs.cmu.edu \\
http://www.cs.cmu.edu/\symbol{"7E}mason}
\slideCaption{Lecture 9. \hfill Mechanics of Manipulation }

\begin{document}

\maketitle

%=======================================================================
%
% SLIDE 2
%

\begin{slide}[R]{Lecture 9.  Representing constraint.}
\vspace{-0.5in}
\includegraphics[height=3.0in]{TOC9}
\end{slide}

%=======================================================================
%
% SLIDE 3
%
%

\begin{slide}[R]{Outline.}

\begin{trivlist}
\item Constraint using contact screw and reciprocal product.
\item Repelling, reciprocal, contrary.
\item Relation to Reuleaux.
\item Examples.
\end{trivlist}

\end{slide}


%=======================================================================
%
% SLIDE 4
%
%
\begin{slide}[R]{Remember Reuleaux's method?}
\begin{minipage}[t]{6cm}
  \begin{trivlist}
  \item[]Perpendicular to constraint divides plane into positive IC's,
    negative IC's, and IC's of either sign.
  \item[]Doesn't extend to three dimensions.
  \item[]Great for humans, bad for computers.
  \item[]Sometimes equations are better than pictures.
  \end{trivlist}
\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[height=3cm]{unilat}
\end{figure}\end{minipage}
\end{slide}

%=======================================================================
%
% SLIDE 5
%
%
\begin{slide}[R]{First order model of constraint}
\begin{minipage}[t]{6cm}
\begin{trivlist}
\item[]Let $\uu u$ be contact normal, inward pointing
\item[]Let $p$ be contact point in the constrained body
\item[]Let $\vv v_p$ be the velocity of the point $p$.  
\item[]Then we write the bilateral velocity constraint as
\begin{equation*}
        \uu u \cdot \vv v_p = 0
\end{equation*}
and unilateral velocity constraint as
\begin{equation*}
        \uu u \cdot \vv v_p \geq 0
\end{equation*}
\end{trivlist}
\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[height=3cm]{cscrew}
\end{figure}\end{minipage}
\end{slide}

%=======================================================================
%
% SLIDE 6
%
%
\begin{slide}[R]{Constraint using screw coordinates}
\begin{trivlist}
\item[]
Let $(\vv \bomega, \vv v_0)$ be screw coordinates of body velocity
\item[]Then velocity of $\vv p$ is
\begin{equation*}
        \vv v_p = \vv v_0 + \vv \bomega \btimes \vv p
\end{equation*}
\item[]We write the kinematic constraint
\begin{equation*}
        \uu u \cdot (\vv v_0 + \vv \bomega \btimes \vv p) \geq 0
\end{equation*}
\item[]Distribute dot product, play with triple product $\ldots$
\begin{equation*}
        \uu u \cdot \vv v_0 + ( \vv p \btimes \uu u ) \cdot \vv \bomega \geq 0
\end{equation*}
\item[]Reciprocal product!
\end{trivlist}

\end{slide}

%=======================================================================
%
% SLIDE 6 1/2
%
%

\begin{slide}[R]{Contact screw}
\begin{trivlist}
\item[]
Define \defterm{contact screw} to be
Pl\"ucker coordinates of the contact normal 
\begin{equation*}
        ( \vv c, \vv c_0 ) = ( \vv u, \vv p \btimes \uu u )
\end{equation*}
\item[] Write the kinematic constraint as
\begin{equation*}
        (\vv c, \vv c_0) * (\vv \bomega, \vv v_0 ) \geq 0
\end{equation*}
\end{trivlist}

\end{slide}

%=======================================================================
%
% SLIDE 7
%
%
\begin{slide}[R]{Reciprocal, contrary, repelling}
\begin{trivlist}
\item[] Definition 3.3: A pair of screws is \defterm{reciprocal},
  \defterm{contrary}, or \defterm{repelling}, if their reciprocal
  product is zero, negative, or positive, respectively.
\item[]Bilateral constraint: velocity screw $(\omega,\vv v_0)$ and
  contact screw $(\vv c, \vv c_0)$ must be \emph{reciprocal}:
\begin{equation*}
        (\vv c, \vv c_0) * (\vv \bomega, \vv v_0 ) = 0
\end{equation*}
\item[]Unilateral constraint: velocity screw $(\omega,\vv v_0)$ and
  contact screw $(\vv c, \vv c_0)$ must be \emph{reciprocal or
    repelling}:
\begin{equation*}
        (\vv c, \vv c_0) * (\vv \bomega, \vv v_0 ) \geq 0
\end{equation*}
\end{trivlist}
\end{slide}

%=======================================================================
%
% SLIDE 8
%
%
\begin{slide}[R]{Connection to Reuleaux's method}
\begin{minipage}[t]{6cm}
\begin{trivlist}
\item The contact screw $(\vv c, \vv c_0)$ is a zero-pitch screw---the
  Pl\"ucker coordinates of the contact normal.
\item For a planar motion of the $\uu x$-$\uu y$ plane, the body
  velocity twist $(\bomega, \vv v_0)$ is also a zero-pitch screw---a
  pure rotation.
\item $(\bomega, \vv v_0)$ is the Pl\"ucker coordinates of the rotation
  axis perpendicular to the $\uu x$-$\uu y$ plane.
  
\item Contact normal and directed rotation axis must be reciprocal or
  repelling.  Directed rotation axis must point down ($-$) if it's to
  the right of the contact normal, and up ($+$) if it's to the left of
  the contact normal.

\end{trivlist}
\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\vspace{6cm}
Copy the figure from the board
\end{minipage}
\end{slide}

%=======================================================================
%
% SLIDE 9
%
%
\overlays{5}{
\begin{slide}[R]{Ex 2:  Screw coordinates of planar motions.}
\begin{minipage}[t]{6cm}
\begin{trivlist}
\item[]  Choose three bilateral constraints aligned with the 
$\uu z$ axis.  
\item[]The screw coordinates for the 
constraints are: 
\begin{align*} 
        (\vv s_1, \vv s_{01}) = &\fromSlide{2}{ ( 0, 0, 1, 0, 0, 0 )} \\
        (\vv s_2, \vv s_{02}) = &\fromSlide{3}{ ( 0, 0, 1, 0, -1, 0 )} \\ 
        (\vv s_3, \vv s_{03}) = & \fromSlide{4}{( 0, 0, 1, 1, 0, 0 )} 
\end{align*} 
\fromSlide{5}{

\item[]Let the twist be given by 
\begin{equation*} 
        (\vv t, \vv t_0) = (t_1, t_2, t_3, t_4, t_5, t_6 ) 
\end{equation*} }
\end{trivlist}

\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{pcon}
\end{figure}
\end{minipage}
\end{slide}}

%=======================================================================
%
% SLIDE 10
%
%
\begin{slide}[R]{Ex 2:  Form reciprocal products.}
\begin{minipage}[t]{6cm}
  \begin{trivlist}
  \item[] The twist must be reciprocal to $(\vv s_1, \vv s_{01})$:
    \begin{equation*} 
        t_6 = 0 
      \end{equation*} 
    \item[] $\ldots$ to $(\vv s_2, \vv s_{02})$: 
      \begin{equation*} 
        t_6 - t_2 = 0 
      \end{equation*} 

    \item[] $\ldots$ and to $(\vv s_3, \vv s_{03})$: 
      \begin{equation*} 
        t_6 + t_1 = 0 
      \end{equation*} 
    \item[]  Thus the twist must be of the form 
      \begin{equation*} 
        (\vv t, \vv t_0) = (0, 0, t_3, t_4, t_5, 0)  \label{eq:pltwist} 
      \end{equation*} 

    \end{trivlist}

\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{pcon}
\end{figure}
\end{minipage}
\end{slide}

%=======================================================================
%
% SLIDE 11
%
%
\begin{slide}[R]{Ex 2:  Interpreting the answer}
  \begin{trivlist}
  \item[]The twist must be of the form
\begin{equation*} 
        (\vv t, \vv t_0) = (0, 0, t_3, t_4, t_5, 0)  \label{eq:pltwist} 
\end{equation*} 
\item[]To get the pitch:
\[        p = \frac{\vv t \cdot \vv t_0}{\vv t \cdot \vv t} = 0 
\]
\item[]The direction vector $(0,0,t_3)$ is parallel to $\uu z$
\item[]The point closest to the origin is
\begin{align*} 
  \frac{ \vv t \btimes \vv t_0}{\vv t \cdot \vv t}
  &= ( - t_5 t_3, t_4 t_3, 0) / t_3^2 \\
  &= ( - t_5 / t_3, t_4 / t_3)
\end{align*} 
\item[]So the twist represents the rotation center using homogeneous
  coordinates.  As a special case, when $t_3 = 0$, we obtain a pure
  translational velocity $(t_4, t_5, 0)$.
\end{trivlist}
\end{slide}


%=======================================================================
%
% SLIDE 12
%
%
\overlays{2}{
\begin{slide}[R]{Ex 1:  Squeezing the corners of a cube}
\begin{minipage}[t]{6cm}
\begin{trivlist}\item[]We will consider the simpler bilateral problem
\begin{align*}
  (\vv s_1, \vv s_{01} ) &= \fromSlide{2}{(1, 0, 0, 0, 1, 0) }          \\
  (\vv s_2, \vv s_{02} ) &= \fromSlide{2}{(0, -1, 0, 1, 0, 0)   }        \\
  (\vv s_3, \vv s_{03} ) &= \fromSlide{2}{(0, 0, -1, 0, 0, 0)}           \\
  (\vv s_4, \vv s_{04} ) &= \fromSlide{2}{(-1, 0, 0, 0, 0, -1)}          \\
  (\vv s_5, \vv s_{05} ) &= \fromSlide{2}{(0, 1, 0, 0, 0, 1)}            \\
  (\vv s_6, \vv s_{06} ) &= \fromSlide{2}{(0, 0, 1, -1, -1, 0)}
\end{align*}

\fromSlide{2}{
\item[]Let $(\vv t, \vv t_0)$ be a differential twist.  Reciprocal
  with respect to $(\vv s_1, \vv s_{01})$
\begin{equation*}
                t_4 + t_2  = 0 
\end{equation*}}

\end{trivlist}

\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{concube}
\end{figure}
\end{minipage}
\end{slide}}


%=======================================================================
%
% SLIDE 13
%
%
\begin{slide}[R]{Ex 1:  Solving the constraint equations}
\begin{minipage}[t]{6cm}
\begin{trivlist}\item[]Reciprocal to all 6 contact screws:
\begin{equation*}
        \begin{array}{ccccccc}
                t_4 & &  &  & + t_2 &  & = 0 \\
                & - t_5 &  & + t_1 &  & & = 0 \\
                &  & - t_6 &  &  &  & = 0 \\
                - t_4 & &  &  &  & - t_3 & = 0 \\
                &  t_5 &  &  &  & + t_3 & = 0 \\
                &  & t_6 & - t_1 & - t_2 &  & = 0 \\
        \end{array}
\end{equation*}

\item[]
The solutions are of the form
\begin{equation*}
        (\vv t, \vv t_0) = k (1, -1, -1, 1, 1, 0)
\end{equation*}
\end{trivlist}

\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{concube}
\end{figure}
\end{minipage}
\end{slide}

%=======================================================================
%
% SLIDE 13 1/2
%
%
\begin{slide}[R]{Ex 1:  Interpreting the solution}
\begin{minipage}[t]{6cm}
\begin{trivlist}
\item
The solutions are of the form
\begin{equation*}
        (\vv t, \vv t_0) = k (1, -1, -1, 1, 1, 0)
\end{equation*}
\item[]Pitch:  $\vv t \cdot \vv t_0 / \vv t \cdot \vv t = 0$.
\item[]Point on line closest to origin:  $\vv t \btimes \vv t_0 / \vv
  t \cdot \vv t  = \qquad $ 
\item[]Direction vector: $\vv t = (1, -1, -1)$.
\item[]I.e., as expected, the diagonal of the cube.
\end{trivlist}

\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{concube}
\end{figure}
\end{minipage}
\end{slide}


%=======================================================================
%
% SLIDE last
%

\begin{slide}[R]{Next: Cspace transform and motion planning.}
% \vspace{-0.5in}
\includegraphics[height=3.0in]{TOC10}
\end{slide}
\end{document}



\end{document}
