1

enter image description here

I want to find the position of a robot using single tire model while rotating. I am assuming robot is moving along a circle. I know its radius, length or arc and starting point of arc. This time arc direction is clockwise but it could also be anti-clock wise. Can someone explain how can I find ?

  • Clarify what is for you the position. An easy answer would be $P={l \over r}$ if for you the position coincides with $\theta$ – N74 Mar 17 '16 at 21:08
  • @N74, position is in cartesian coordinates. I have position of starting arc in (x,y) and I need (x1,y1) of final point. – TonyParker Mar 18 '16 at 08:40
  • If you need cartesian coordinates for the end point you also need the heading at the starting point or the position of the rotation center. – N74 Mar 19 '16 at 11:06

4 Answers4

1

Thanks @Mick A, @Narasimham and other people for helping. As it is robotic motion so in most cases it between (0-180 degrees). I have starting point coordinates, the radius of virtual circle along with robot moving and angle. So I am using simple polar coordinates. to find next point.

                       θ  =  S/r
                       x1 =  r*cos(θ) + x
                       y1 =  r*sin(θ) + y
1

Since I wasn't satisfied with the answers I saw here. Here is my approach. Let's say we have the current point on the circle $(P_x,P_y)$ and some circle centred at $(C_x,C_y)$ (which is unknown for now).

I know from polar coordinates that

$$\cases{P_x = C_x + r\cos(\phi)\\ P_y = C_y + r\sin(\phi)}\tag{1}$$

If I want to find another point on this circle $D_x,D_y$ I can also say:

$$\cases{D_x = C_x + r\cos(\theta+\phi)\\D_y = C_y + r\sin(\theta+\phi)}\tag{2}$$

Here $\phi$ is the angle to my first point and $\theta$ is the angle between my first and second point. However, since I only care about relative locations I can set $\phi=0$ and now:

From $(1)$,

$$\cases{P_x = C_x + r\\ P_y = C_y}\tag{1*}$$

From $(2)$,

$$\cases{D_x = C_x + r\cos(\theta)\\ D_y = C_y + r\sin(\theta)}\tag{2*}$$

Then substituting $(1*)$ into $(2*)$ I get:

$$\cases{D_x = P_x - r + r\cos(\theta)\\ D_y = P_y + r\sin(\theta)}$$

where again, this theta can be back computed from the arc length $S$ as $$\theta = \frac Sr$$

Notice that now I don't care about the location of the circle centre (and it doesn't matter).

rld
  • 11
  • 1
0

I assume the circle is centred at $(0,0)$. Firstly, the angle $\theta_0$ from the positive $x$-axis to the line segment $(0,0)$ to $(x,y)$. Since $(x,y)$ can be anywhere on the circle, we allow $-\pi\lt\theta_0\leq\pi$. Then we have,

$$\theta_0 = \begin{cases} \pi/2, & \text{if $x=0,\; y\gt 0$} \\ -\pi/2, & \text{if $x=0,\; y\lt 0$} \\ \tan^{-1}(y/x), & \text{if $x\gt 0$} \\ \tan^{-1}(y/x)+\pi, & \text{if $x\lt 0,\;y\gt 0$} \\ \tan^{-1}(y/x)-\pi, & \text{if $x\lt 0,\;y\lt 0$}. \\ \end{cases}$$

The angle of rotation is $\theta=l/r$. Say we have $l\gt 0$ for anti-clockwise and $l\lt 0$ for clockwise. Then the new coordinates $(x_1,y_1)$ are:

\begin{align} x_1 &= r\cos(\theta_0+\theta) \\ y_1 &= r\sin(\theta_0+\theta). \end{align}

Mick A
  • 10,208
0

EDIT1:

Given $\varphi= \theta$ used symbol and arclength we can find circle coordinates.

Assume wlog origin as the start point...instead of $(x,y).$ Also you should know the initial direction, else you cannot take off to the end or future traveled points $(x_1,y_1)$ of the robot, much less determine it, because initial slope is essential to solving this problem. $\theta$ is a variable, $\varphi$ is central angle at point $(x_1,y_1).$ Also projected the distance along arbitrary x-axis

$$h = r \sin \alpha = \dfrac{l \sin \alpha }{\varphi} \tag 1 $$ should be computed to start with.

$$r=\dfrac{l}{\varphi} \tag 2 $$

Updating answer. Symbol $ \theta $ used here for counter-clockwise rotation of radius vector $\rho$ around the origin and $\varphi$ is rotation around center of circle.

At any point, the segment length $2h$ subtends angle $\alpha$ at the circumference. Using Law of sines

$$ \dfrac{\rho}{\sin (\theta+\alpha)}=\dfrac{2h}{\sin \alpha} \tag 3$$

enter image description here

we directly compute

$$ (x_1,y_1)=\dfrac{2h \sin (\theta+\alpha)}{\sin \alpha }\cdot(\cos \theta,\sin \theta) \tag4$$

Isometric input

The given data $\varphi,l, r $ are isometric invariants, so it is included in the answer for more instruction. Anglw $ \alpha$ as an arbitrary Euclidean motion. It is supplied as an initial condition for integration.

smax = 25.; al = -0.6; r = 5;
circ = {PH'[s] == 1/r, PH[0] == -ArcTan[3/4], Y'[s] == Sin[PH[s]], 
   X'[s] == Cos[PH[s]], X[0] == 0, Y[0] == 0};
NDSolve[circ, {X, Y, PH}, {s, 0, smax}];
{x[t_], y[t_], ph[s_]} = {X[t], Y[t], PH[s]} /. First[%];
ParametricPlot[{x[s], y[s]}, {s, .0, smax}, PlotLabel -> Kreis, 
 GridLines -> Automatic, AspectRatio -> Automatic, 
 PlotStyle -> {Blue, Thick}]
Plot[Tooltip[{ph[s], x[s], y[s]}], {s, .0, smax}, 
 PlotLabel -> Circle_Coords, GridLines -> Automatic, 
 AspectRatio -> Automatic]

In the above given program any l=smax can be set to change an Endpoint.

enter image description here

Narasimham
  • 40,495
  • As noted in a comment, the question has insufficient information. In my opinion, the extra piece of information required by this answer, $\alpha,$ is the most likely to be available in the given application. To complete this answer, I would say how to find $\theta.$ Since the angle between a chord and a tangent at one end of the chord is half the intercepted arc, we have $\theta + \alpha = \frac12\varphi,$ where $\alpha$ is known and Equation $(2)$ implies $\varphi = l/r.$ Solve for $\theta.$ – David K Jan 25 '21 at 13:27
  • Thanks indeed for the summary. I also added motions of a rigid circle in isometry with arbitrary initial conditions hoping for an approach to first fundamental form. Regards. – Narasimham Jan 26 '21 at 08:39