# How do I compute the translation and rotation velocities of a robot

I am stuck at computing the translation and rotation of a robot moving onto an ellipse given by:

$$p(t) =(m) + \cos(t)∗a + \sin(t)*b$$

where m = center of ellipse and the two axes a (horizontal) and b (vertical).

At the moment I am using derivation $$p'(t)$$ for calculating the translation, like

$$p'(t)_x = -\sin(t)*a \\ p'(t)_y = \cos(t)*b$$

$$p'(t) = \sqrt{p'(t)_x^2 + p'(t)_y^2}$$

and rotation velocity, with

$$p''(t)_x = -\cos(t)*a \\ p''(t)_y = -\sin(t)*b$$

$$p''(t) = \frac{p'(t)_x p''(t)_y - p''(t)_x p'(t)_y}{ (p'(t)_x)^2 + (p'(t)_y)^2}$$

(see formula)

However, the robot is just moving in strange curls instead of an ellipse. If anyone needs the full code just say so.

$$\omega = \dot{\phi} = \frac{\dot{d_x}\ddot{d_y} - \ddot{d_x}\dot{d_y}}{\dot{d_x}^2+\dot{d_y}^2}$$

• Welcome to Robotics, mojado. I'm not sure where you're getting these equations from, so please edit your question to include the source that you're using for what you've given. To be clear, I'm worried for you that you're basing your work on the parametric equations for an ellipse, which take a similar $a*\cos(t)$, $b*\sin(t)$ form. In those equations, though, $t$ is not time, it's the eccentric anomaly, so you can't use a derivative of $\sin(t)$, for example, as speed. – Chuck Nov 21 '18 at 18:26
• Please edit your question to include some more background, such as what you're trying to do with your calculations. It's not clear if you're trying to calculate speeds to get a robot to move along an elliptical path, or if you're trying to calculate the path to do something like inverse kinematics, etc. A diagram would help a lot, to show us what your definitions and conventions are, how you've formulated your equations, etc. – Chuck Nov 21 '18 at 18:30

$$p(t) = (m) + cos(t)*a + sin(t)*b$$ the $$t$$ doesn't represent the time but the eccentric anomaly. But from this equation you can create a matrix for $$t\epsilon [0,2\pi]$$ and calculate the points on the eclipse from the equations
$$x = a*cos(t)$$ , $$y = b*sin(t)$$ then you have $$(x,y)$$ points and by setting a specific time that you want to go from one point to another you can find the velocities $${\Delta x\over \Delta t} , {\Delta x\over \Delta t}$$. Not the best way to do it, but it is something.