# Move two wheeled robot from one point to another

The inner circle represents the potential path of the left wheel, and the outer the potential path of the right. The circle in between represents the "midpoint" between these two circles.

Given $A_L, A_R, A_N$ and $B_N$, I need to determine $d_L$ and $d_R$.

Here's what I've got so far:

$$\frac{d_L}{2\pi \cdot \overline {OA_L}} = \frac{d_R}{2\pi \cdot \overline {OA_R}}$$

Where $\overline {OA_L}$ and $\overline {OA_R}$ are the radii of the inner and outer circles respectively.

-

2
I feel like the title of your question was not chosen well; the question itself is simply a geometry question. – Greg Martin Sep 27 '11 at 0:16

## 3 Answers

Assuming all you have are the positions of $A_L$, $A_R$, $A_N$, and $B_N$, that is, you don't even know where $O$ is in advance, this is a cute little geometry problem.

As $A_N$ and $B_N$ are at the same distance from $O$, the latter lies on the perpendicular bisector of the line segment $A_NB_N$. Also, it's clear from the picture that $O$ must lie on the line $A_LA_R$. This fixes the position of $O$. Then you can use Ilmari's answer to find the lengths of the arcs $d_L$ and $d_R$.

For an analytical solution, let $\vec u = \vec A_L - \vec A_R$ and $\vec v = \vec B_N - \vec A_N$. As $O$ lies on the line through $A_N$ parallel to $\vec u$, we can write $\vec O = \vec A_N + c \vec u$ for some scalar $c$. Also, as $O$ is equidistant from $A_N$ and $B_N$, we have $\lVert \vec O - \vec A_N \rVert^2 = \lVert \vec O - \vec B_N \rVert^2$. Substituting $\vec O = \vec A_N + c\vec u$ and using $\lVert \vec x \rVert^2 = \vec x \cdot \vec x$ for any $\vec x$, we get $$(c \vec u) \cdot (c \vec u) = (c \vec u - \vec v)\cdot(c \vec u - \vec v),$$ so $$c = \frac12 \frac{\vec v \cdot \vec v}{\vec u \cdot \vec v}$$ Finally, as $OA_NB_N$ is an isosceles triangle with sides $\lVert c \vec u \rVert$, $\lVert c \vec u \rVert$, and $\lVert \vec v \rVert$, the angle $\theta$ at $O$ satisfies $$2 \sin \frac\theta2 = \frac{\lVert \vec v \rVert}{\lVert c \vec u \rVert},$$ so $$\theta = 2 \sin^{-1} \frac{\lVert \vec v \rVert}{2\lVert c \vec u \rVert} = 2 \sin^{-1} \frac{\vec u \cdot \vec v}{\lVert \vec u \rVert \lVert \vec v \rVert}$$ and that should be you everything you need to compute the quantities in Ilmari's answer.

-

Let $\theta = \angle AOB$ in radians. Then $d_L = \theta r_L$ and $d_R = \theta r_R$, where $r_L$ and $r_R$ are the radii of the inner and outer circles respectively.

-

How do I determine what $\theta$ is? Or $r_L$, for that matter. I've only got $A_L, A_R, A_N$ and $B_N$. – muntoo Aug 27 '11 at 21:14
– Ilmari Karonen Aug 27 '11 at 21:30

If $\alpha$ is the angle $(\overrightarrow{OA_L},\overrightarrow{OB_L})$, $R_L$ the radius of the inner circle, then the length of the chord $A_L A_R$ is $$2 R_L \sin{\alpha \over 2}$$

The sinus can be obtained from the cosinus. $$\sin{\alpha \over 2} = \pm \sqrt{1-\cos \alpha \over 2}$$ And the cosinus from the scalar product : $$\cos \alpha = \frac{\overrightarrow{OA_L} \cdot \overrightarrow{OB_L}}{||\overrightarrow{OA_L}|| ||\overrightarrow{OB_L}||} = \frac{\overrightarrow{OA_L} \cdot \overrightarrow{OB_L}}{R_L^2}$$ The same can be done for the outer circle.

Edit : If you do not know $O$, you can compute it as the intersection of the two lines $(A_L B_L)$ and $(A_R B_R)$. It will also give you $R_L$ as the distance between $O$ and $A_L$.

Also, if $\alpha$ is small, you can use approximations like the post of Ilmari Karonen.

-
– muntoo Aug 27 '11 at 21:25
I have added the definition of $R_L$, thank you. The two bars are the norm of a vector. – alex_reader Aug 27 '11 at 21:30

1
I read the question as asking for the lengths of the arcs from $A_L$ to $B_L$ and $A_R$ to $B_R$, not of the chords. For that, my answer is exact. As you note, though, for small angles the chord and arc lengths are approximately the same. – Ilmari Karonen Dec 26 '11 at 6:29
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 65, "mathjax_display_tex": 8, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9322402477264404, "perplexity_flag": "head"}