---
# System prepended metadata

title: Motion PLanning
tags: [Robot id, ' Overall', ' Motion Planning']

---

---
tags: Robot id, Overall, Motion Planning
---

Motion PLanning
===



## <font size = 5>Scurve</font>

<img src =https://i.imgur.com/XGCsMcc.png class = "ph_8">

### Acceleration
<img src = https://i.imgur.com/Yo4L1I0.png class = "ph_6">

各時間點加速度


| Time        | Acceleration                 |
|:----------- | ---------------------------- |
| $t_1>t$     | $a(t)=Kt$                    |
| $t_2≥t>t_1$ | $a(t)=Kt_1$                  |
| $t_3≥t>t_2$ | $a(t)=Kt_1-K(t-t_2 )$        |
| $t_4≥t>t_3$ | $a(t)=0$                     |
| $t_5≥t>t_4$ | $a(t)=-K(t-t_4 )$            |
| $t_6≥t>t_5$ | $a(t)=-K(t_5-t_4)$           |
| $t_7≥t>t_6$ | $a(t)=-K(t_5-t_4 )+K(t-t_6)$ |



各時間點加速度
- $a(t_1 )=Kt_1$
- $a(t_2)=Kt_1$
- $a(t_3 )=0$
- $a(t_4 )=0$
- $a(t_5 )=-K(t_5-t_4)$
- $a(t_6 )=-K(t_5-t_4)$
- $a(t_7 )=-K(t_5-t_4 )+K(t_7-t_6)$

  
### Velocity
| Time        | Velocity                 |
|:----------- | ---------------------------- |
| $t_1>t$     | $v(t)=1/2 Kt^2$                    |
| $t_2≥t>t_1$ | $v(t)=-1/2 Kt_1^2+Kt_1 t$                  |
| $t_3≥t>t_2$ | $v(t)=-1/2 Kt_1^2-1/2 Kt_2^2+Kt*t_2+Kt_1 t-1/2 Kt^2$        |
| $t_4≥t>t_3$ | $v(t)=-1/2 Kt_1^2-1/2 Kt_2^2-1/2 Kt_3^2+Kt_1 t_3+Kt_2 t_3$                     |
| $t_5≥t>t_4$ | $v(t)=-1/2 Kt_1^2-1/2 Kt_2^2-1/2 Kt_3^2-1/2 Kt_4^2$$+Kt_1 t_3+Kt_2 t_3+Kt*t_4-1/2 Kt^2$            |
| $t_6≥t>t_5$ | $v(t)=-1/2 Kt_1^2-1/2 Kt_2^2-1/2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