%
%  2004/Lecture notes/Lecture5/lecture5.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{5.  Nonholonomic 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 5. \hfill Mechanics of Manipulation }

\begin{document}

\maketitle


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

\begin{slide}[R]{Lecture 5.  Nonholonomic constraint.}
\vspace{-0.5in}
\includegraphics[height=3.0in]{TOC5}
\end{slide}

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

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

\begin{itemize}
\item An example:  the unicycle.
\item Integrable and nonintegrable constraints
\item Vector fields and distributions
\item Frobenius's theorem
\end{itemize}

\end{slide}


%=======================================================================
%
% SLIDE 4
%
%
\begin{slide}[R]{Holonomic does not mean unconstrained!!!}

\begin{itemize}
\item Holonomic means the constraints can be written as equations independent of $\dot q$
\[
        f(q,t) = 0
\]
\item A mobile robot with no constraints is holonomic.

\item A mobile robot capable of arbitrary planar velocities is holonomic.

\item A mobile robot capable of only translations is holonomic.

\end{itemize}

\end{slide}

%========================================================================
%
% SLIDE 5
%
%

\begin{slide}[R]{Unicycle constraint}

\begin{minipage}[t]{6cm}
The unicycle cannot move sideways.  Let
\[
        \dot{\vv{q}} = \left(\begin{array}{c}\dot x \\ \dot y \\ \dot\theta \end{array}\right)
\]
and let
\[
        \vv{w}_1 =  \left(\sin\theta, - \cos\theta, 0 \right)
\]
so the constraint is written $\vv{w}_1 \dot{\vv q} = 0$.
\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{unicycle.eps}
\end{figure}
\end{minipage}
\end{slide}


%========================================================================
%
% SLIDE 6
%
%
\overlays{2}{
\begin{slide}[R]{Unicycle freedom}
\begin{minipage}[t]{6cm}
The unicycle can move in two directions, expressed by defining
\[
        \vv{g}_{1}(\vv q) = \left(\begin{array}{c} 0 \\ 0 \\ 1 
                                \end{array}\right),
        \vv{g}_{2}(\vv q) = \left(\begin{array}{c} \cos\theta \\ \sin\theta \\ 0
                                \end{array}\right)      
\]
and noting that the unicycle's motion can be expressed as
\[
        \dot{\vv q} = u_1 \vv g_1 + u_2 \vv g_2
\]
where $u_1$ and $u_2$ are arbitrary reals.  They are the \emph{controls}.\\[12pt]
So, how many DOFs does the unicycle have?  \fromSlide{2}{\emph{THREE!!!}}
\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{unicycle.eps}
\end{figure}
\end{minipage}
\end{slide}}

%=======================================================================
%
% SLIDE 7
%
%

\begin{slide}[R]{Unsteered cart constraint and freedom}

\begin{minipage}[t]{6cm}
The unsteered cart cannot turn, and cannot move sideways.  Let
\[
        \vv{w}_1 =  \left(\sin\theta, - \cos\theta, 0 \right), \vv{w}_2 = \left(0, 0, 1\right)
\]
so the two constraints are written $\vv{w}_1 \dot{\vv q} = 0$, $\vv{w}_2 \dot{\vv q} = 0$.
Expanding the products:
\begin{eqnarray*}
\dot x \sin\theta - \dot y \cos\theta = 0 \\
\dot\theta = 0
\end{eqnarray*}
These can be integrated:
\begin{eqnarray*}
\theta = \theta_0 \\
(x - x_0) \sin\theta_0 - (y - y_0) \cos\theta_0  = 0
\end{eqnarray*}
\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{cart1.eps}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=4cm]{cart2.eps}
\end{figure}
\end{minipage}
\end{slide}

%=======================================================================
%
% SLIDE 8
%
%

\begin{slide}[R]{Unicycle versus cart}

\begin{minipage}[t]{6cm}
\begin{itemize}
\item Unicycle.
\begin{itemize}
\item  One velocity constraint.
\item Three freedoms.
\end{itemize}
\item Unsteered cart
\begin{itemize}
\item Two velocity constraints.
\item \emph{Integrable}.  Equivalent to two configuration constraints.
\item One freedom.
\end{itemize}
\end{itemize}
System is nonholonomic if the constraint \emph{cannot} be written in the form
$f(q,t)=0$.
\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{unicycle.eps}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=4cm]{cart1.eps}
\end{figure}
\end{minipage}
\end{slide}
%=======================================================================
%
% SLIDE 8
%
%

\begin{slide}[R]{How can you tell?}

\begin{minipage}[t]{6cm}
How can you tell whether a velocity constraint is integrable?
\begin{enumerate}
\item  Try to integrate it for a while.
\item  Determine whether the DOFs were reduced.
\item Lie brackets!!!  (Frobenius's theorem)
\end{enumerate}
\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{unicycle.eps}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=4cm]{cart1.eps}
\end{figure}
\end{minipage}
\end{slide}

%=======================================================================
%
% SLIDE 9
%
%

\begin{slide}[R]{Pfaffian constraints}

A set of $k$ \defterm{Pfaffian constraints} are of the form
\[
        \vv w_{i}(\vv q) \dot {\vv q} = 0, i = 1 \ldots k
        \]
where the $\vv w_{i}$ are linearly independent row vectors, and 
$\dot{\vv q}$ is a column vector. \\[12pt]

All the velocity constraints we have considered for the unicycle and the cart
are Pfaffian.
\end{slide}

%=======================================================================
%
% SLIDE 10
%
%

\begin{slide}[R]{Vector fields}
\begin{minipage}[t]{6cm}
A \defterm{vector field}
is a smooth map
\[
        f(\vv q): \mathbf{C} \mapsto \mathbf{T}_{\vv q}\mathbf{C}
        \]
from configurations $\vv q$ to velocity vectors $\dot{\vv q}$. \\[12pt]
\emph{Note:}  In differential geometry ``vector'' sometimes means
specifically ``velocity vector''.
\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{f1}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=4cm]{f2}
\end{figure}
\end{minipage}
\end{slide}

%=======================================================================
%
% SLIDE 11
%
%

\begin{slide}[R]{Distributions}
\begin{minipage}[t]{6cm}
A \defterm{distribution}
is a smooth map assigning a linear subspace of 
$\mathbf{T}_{\vv q}\mathbf{C}$ to each configuration $\vv{q}$ of 
$\mathbf{C}$. \\[12pt]
\emph{Example:}  The linear span of $\vv g_1$ and $\vv g_2$. \\[12pt]
Recall that for the unicycle
\[
        \vv{\dot q} = u_1 \vv g_1 + u_2 \vv g_2
\]
for $u_1, u_2 \in \mathbf{R}$.  So the figure shows the feasible velocities for
every $\vv q$. \\ [12pt]
(Well, it only shows a circular patch where it should show a whole plane at every $\vv q$.)
\end{minipage}
\hfill
\begin{minipage}[t]{4cm}
\begin{figure}[h!]
\includegraphics[width=4cm]{distribution}
\end{figure}
\end{minipage}
\end{slide}

%=======================================================================
%
% SLIDE 12
%
%

\begin{slide}[R]{Regular distributions and Lie brackets}
\begin{itemize}
\item[]A distribution is \defterm{regular} if its dimension is constant over 
the configuration space.

\item[] Let $\vv{f}$, $\vv{g}$ be two vector fields on $\mathbf{C}$.  Define the 
\defterm{Lie bracket}
$[\vv{f}, \vv{g}]$ to be the vector field
\[
        \frac{\partial \vv{g}}{\partial \vv{q}} \vv{f} 
        - \frac{\partial \vv{f}}{\partial \vv{q}} \vv{g}
        \]

\end{itemize}
What is this thing written $\frac{\partial \vv{g}}{\partial \vv{q}} $ or 
$\frac{\partial \vv{f}}{\partial \vv{q}} $?  Matrix.  Each column is partial of velocity w.r.t. configuration variable.
\end{slide}

%=======================================================================
%
% SLIDE 13
%
%

\begin{slide}[R]{Lie brackets, example.}
%\begin{minipage}[t]{6cm}
Let's take the Lie bracket $[\vv{g}_{1}, \vv{g}_{2}]$.
\begin{align*}
        \frac{\partial \vv{g}_{1}}{\partial \vv{q}}
        & = \left(\begin{array}{ccc} 0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0
          \end{array}\right) \\
        \frac{\partial \vv{g}_{2}}{\partial \vv{q}}
        & = \left(\begin{array}{ccc} 0 & 0 & - \sin\theta \\
            0 & 0 & \cos\theta \\
            0 & 0 & 0
          \end{array}\right)
\end{align*}
For the new vector field defined by the Lie bracket we obtain
\begin{align*}
  \vv{g}_{3} & = [\vv{g}_{1}, \vv{g}_{2}]
               = \frac{\partial \vv{g}_{2}}{\partial \vv{q} } \vv{g}_{1}
               - \frac{\partial \vv{g}_{1}}{\partial \vv{q} } \vv{g}_{2} \\
  & = \begin{pmatrix} -\sin\theta \\ \cos\theta \\ 0
  \end{pmatrix}
\end{align*}

\end{slide}

%=======================================================================
%
% SLIDE 14
%
%

\begin{slide}[R]{Lie brackets example continued}
\[
        \vv{g}_{3}  = \begin{pmatrix} -\sin\theta \\ \cos\theta \\ 0
                            \end{pmatrix}
\]
Physically, $\vv g_3$ moves sideways.  It is linearly independent of $\vv g_1$ and $\vv g_2$,
and it violates the constraint $\vv w_1$. \\ [12pt]

What is its physical significance?  Given two vector fields $\vv{f}$ and $\vv{g}$,
\begin{enumerate}
\item
        Follow $\vv{f}$ for some time $\epsilon$;

\item
        Follow $\vv{g}$ for $\epsilon$;
        
\item
        Follow $-\vv{f}$ for $\epsilon$;
        
\item
        Follow $-\vv{g}$ for $\epsilon$.
        
\end{enumerate}
In the limit as $\epsilon$ approaches zero, the result of the above motion approaches the Lie bracket $[\vv f, \vv g]$.  The Lie bracket could have been called ``parallel parking product''.

\end{slide}

%================================================================
%
% SLIDE 15
%
%

\begin{slide}[R]{Involutive distribution}
\begin{itemize}
\item
A distribution is \defterm{involutive}
if it is closed under Lie bracket 
operations.

\item
The \defterm{involutive closure}
of a distribution $\Delta$ is the 
closure $\overline \Delta$ of the distribution under Lie bracketing.
\end{itemize}

\end{slide}


%=======================================================================
%
% SLIDE 15
%

\begin{slide}[R]{Frobenius's theorem}
Theorem 2.8 (Frobenius's theorem):

A regular distribution is integrable if and only if it is involutive.


Proof: 
\begin{itemize}
\item[]To prove that an integrable distribution is involutive, take the Taylor series expansion of
the parallel parking maneuver as a function of $\epsilon$.  The second order terms are Lie brackets!  If the distribution is involutive, the Lie brackets must also be contained in the distribution.

\item[]To prove that involutive distributions are integrable $\ldots$
$\square$
\end{itemize} \quad \\[12pt]
nonholonomic $\leftrightarrow$ parallel parking helps
\end{slide}


%=======================================================================
%
% SLIDE 15
%

\begin{slide}[R]{Next:  Axis angle. Rodrigues's theorem. Rotation matrices. Euler angles.}
\vspace{-0.5in}
\includegraphics[height=3.0in]{TOC6}
\end{slide}
\end{document}



\end{document}
