\documentclass[a4paper,11pt]{article}

% Zeichencodierung für deutsche Umlaute
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

% Grafiken einbinden
\usepackage{graphicx}

% Deutsche Sprache (Datum, Trennungen, etc.)
\usepackage[ngerman]{babel}

% Optional: bessere Schrift
\usepackage{lmodern}

\title{How to get  a robot position  from video image}
\author{Christoph Kendel}
\date{\today}

\begin{document}

\maketitle

\section{Intro}

My Robot-Arm does not have homing switches. I want to use WebCams and Aruco--Markers to get the position of each joint. This way
I can get the position as well as double--check the position while working under load. 

I work with Arucos. With my low resolution WebCam I can get reliable positions (when using two cams). But the angle resolution is not usable.
So I have to calculate the angle of each element from the relative positions of the markers.

\section{Angles}

\subsection{Bizeps {\bf \tt   y}}

To find the angle of the bizeps (upper arm) there are different options, depending on the angle-of-view and which
ArUcos are visable.


\vspace{2mm}

\noindent
\includegraphics[width=\linewidth]{pic/robot_image_a.png}

\vspace{2mm}

\noindent
The calculation is based on two approaches: Position of the Markers 243 etc on the one hand, and relative position 198  $\leftrightarrow$ 229 on the other hand.

\noindent
\begin{minipage}{0.39\linewidth}
Several ways to calculate {\tt y}: 
\begin{itemize}
\item 229 $\leftrightarrow$ 198 $\tan(y) = \frac{\Delta z}{\Delta y} $
\item From $y_{\rm Axis}$ and the positions of 243, 229, 198 (each position on its own) we can calculate  $\tan(y+\delta)$
	with a known $\delta$ from the geometry.

Thus we get {\tt y}
\end{itemize}
\end{minipage}\hfill
\begin{minipage}{0.6\linewidth}
\includegraphics[width=\linewidth]{pic/robot_sideView_measurements.pdf}
\end{minipage}

\vspace{2mm}

\noindent
Each availiable (if marker is visible) approach to calculate {\tt y} is done, and the mean is calculated. We can check if they deviate too much, and give
warnings.

\subsection{Ellbow -- Rotation}

At the ellbow there is a motor that turns the forearm arround. Depending on which Arucus are visible, the position {\tt a} of the motor can be calculated:

\begin{itemize}
\item {\tt x} of 223  or  ...
\end{itemize}
%
%
the
{\tt y} and {\tt z} position of 223 etc can't be used, as it depends on the angle of the forearm and the angle of the bizeps. Thus is it less reliable.  (Although it would be a nice
thing to use as a double--check).

\subsection{Forearm}





\end{document}