# Path planning for a unicycle

I am having some troubles understanding a concept regarding the path planning for a unicycle. Suppose I want to plan a path that brings a unicycle from the origin to the point $$\begin{pmatrix} 1\\ 1\\ \frac{\pi }{2} \end{pmatrix}$$.

The way I operate is the following:

Since we are considering a path planning, we can consider the geometric kinematic model of a unicycle:

$${x}'= cos\theta \cdot \tilde{v}$$

$${y}'= sin\theta \cdot \tilde{v}$$

$${\theta }'=\tilde{\omega }$$

and to solve this problem we exploit the fact that x and y are flat outputs. So we can use third order polynomials to define the path with the parameter $$s\in [0,1]$$. After, we define the boundary conditions:

$$x(0) = x_{i} = 0$$

$$x(1) = x_{f} = 1$$

$${x}'(0)= cos\theta _{i}=k$$

$${x}'(1)= cos\theta _{f}=0$$

and the same for y:

$$y(0) = y_{i} = 0$$

$$y(1) = y_{f} = 1$$

$${y}'(0)= cos\theta _{i}=0$$

$${y}'(1)= cos\theta _{f}=k$$

and now we can define the polynimials:

$$x(s)=(k-2)s^{3}+(3-2k)s^{2}+ks$$

$$y(s)=(k-2)s^{3}+(3-k)s^{2}$$

the first derivatives:

$${x}'(s)=3(k-2)s^{2}+2(3-2k)s+k$$

$${y}'(s)=3(k-2)s^{2}+2(3-k)s$$

the second derivatives:

$${x}''(s)=6(k-2)s+2(3-2k)$$

$${y}''(s)=6(k-2)s+2(3-k)$$

at this point to find the evolution of $$\theta$$ is :

$$\theta = atan2\left \{ {y}(s)',{x}(s)' \right \}$$

Now, my question is : What values do we have to put inside the $$atan2$$ ? So, in particular, how do I compute $${y}(s)'$$ and $${x}(s)'$$ manually without using a program?

• You have your equation for $x'$ and $y'$, And I think that you mean $\theta ' (s) = atan2(x'(s) ,y'(s))$ and you calculate $x', y'$ for a specific $s \in[0,1]$ – nionios Oct 31 '19 at 12:30