diff --git a/docs/pic/code_robot_definition.pdf b/docs/pic/code_robot_definition.pdf new file mode 100644 index 0000000..ad828fa Binary files /dev/null and b/docs/pic/code_robot_definition.pdf differ diff --git a/docs/pic/code_robot_definition.svg b/docs/pic/code_robot_definition.svg new file mode 100644 index 0000000..d111ee6 --- /dev/null +++ b/docs/pic/code_robot_definition.svg @@ -0,0 +1,56 @@ + + + + diff --git a/docs/pic/robot_image_e.png b/docs/pic/robot_image_e.png new file mode 100644 index 0000000..de2d1ed Binary files /dev/null and b/docs/pic/robot_image_e.png differ diff --git a/docs/position.pdf b/docs/position.pdf index c2d9663..3262420 100644 Binary files a/docs/position.pdf and b/docs/position.pdf differ diff --git a/docs/position.tex b/docs/position.tex index abdca1c..a23a0b5 100644 --- a/docs/position.tex +++ b/docs/position.tex @@ -13,10 +13,18 @@ % Optional: bessere Schrift \usepackage{lmodern} +\usepackage{caption} + +% Then in your document preamble +\captionsetup[figure]{font=smaller} + + \title{How to get a robot position from video images} \author{Christoph Kendel} \date{\today} + + \begin{document} \maketitle @@ -53,7 +61,7 @@ ArUcos are visable. \begin{figure}[h!] -\includegraphics[width=\linewidth]{pic/robot_image_a.png} +\includegraphics[width=\linewidth]{pic/robot_image_b.png} \caption{Video Capture with recognized Aruco markers} \end{figure} @@ -105,7 +113,7 @@ $$ \noindent -as I know the angle $\alpha$ (yellow triangle) from the printed geometry of the arm. The $x_{242}$ is calculated from all visible markers of the +as I know the angle $\alpha$ (yellow triangle) from the printed geometry of the arm. The $x_{226}$ is calculated from all visible markers of the sled and bizeps, as their markers are fixed in $x$ position. This $\alpha$ is calculated for all markers of the forearm. @@ -156,7 +164,7 @@ The direction $P \to M$ in combination with the forearm-direction results in th \hfill \includegraphics[height=0.26\linewidth]{pic/robot_hand_topView.pdf} \hfill {} -\caption{\small Hand with points to calculate the values for {\tt b, c, e}.} +\caption{ Hand with points to calculate the values for {\tt b, c, e}.} \end{figure} @@ -175,4 +183,19 @@ And only if the point $M$ lies in the plane of the rotation {\tt a} arround the The NodeJS Program calculates the angles and checks, if they are the ones at the moment represented by the system. +First try is to just hard-code all the relevant ArucoPoints. That seems to be ok, but it gets impossible to maintain. +After a week I dont recognize my own code. It's hard to make improvements, when you first have to re-think all those +small steps, when you have constantly to look up all positions of the markers. + +It seems to be a solution to save the geometry and all markers in one file. That can be edited, that can be improved. +And here I can save the relation between x,y, and the position of the Aruco Markers. Of course, at the moment +the geometry is still proitty much hard-coded. But i have some flexibility. And mainly: I can loop over {\sl all +Arucos on the Board} to find the coordinate system. Or I can loop over all Arucos that +attache to the ``arm1''. + +\begin{figure}[h!] +\includegraphics[width=\linewidth]{pic/code_robot_definition.pdf} +\caption{Robot Geometry in a {\tt .json} File} +\end{figure} + \end{document} \ No newline at end of file diff --git a/public/robot.json b/public/robot.json new file mode 100644 index 0000000..f410734 --- /dev/null +++ b/public/robot.json @@ -0,0 +1,26 @@ +{ + "Elements":["Board","Base","Arm1","Joint1","Arm2","Finger1","Finger2"], + "MarkerType":"DICT_4X4_250", + "Marker":[ + {"id":205,"on":"Board","position":[0.80, -0.090, 0.0]}, + {"id":208,"on":"Board","position":[0.50, -0.090, 0.0]}, + {"id":210,"on":"Board","position":[0.00, 0.0, 0.0]}, + {"id":211,"on":"Board","position":[0.20, 0.0, 0.0]}, + {"id":214,"on":"Board","position":[0.40, 0.0, 0.0]}, + {"id":215,"on":"Board","position":[0.20, -0.090, 0.0]}, + + {"id":200,"on":"Base","relPos":[-166, 6.5, 55]}, + {"id":201,"on":"Base","relPos":[-190, 97.5, 74.5]}, + {"id":204,"on":"Base","relPos":[-158.5,152.5,111]}, + + {"id":198,"on":"Arm1", "relPos":[-89.5,-160, 35]}, + {"id":229,"on":"Arm1", "relPos":[-89.5,-250, 35]}, + {"id":243,"on":"Arm1", "relPos":[-89.5,-285, 0]}, + + {"id":222,"on":"Joint1", "relPos":[0,0, -35]}, + {"id":226,"on":"Joint1", "relPos":[0,0, 35]}, + + {"id":218,"on":"Finger1","name":"A1","relPos":[-1.70,-25.14, 38.04]}, + {"id":222,"on":"Finger1","name":"B1","relPos":[-14.55, 0.84, 74.79]} + ] +} \ No newline at end of file