Plot arrow.
(x, y, yaw, length=1.0, width=0.5, fc="r", ec="k")
| 57 | |
| 58 | |
| 59 | def plot_arrow(x, y, yaw, length=1.0, width=0.5, fc="r", ec="k"): |
| 60 | """Plot arrow.""" |
| 61 | if not isinstance(x, float): |
| 62 | for (ix, iy, iyaw) in zip(x, y, yaw): |
| 63 | plot_arrow(ix, iy, iyaw) |
| 64 | else: |
| 65 | plt.arrow(x, y, length * cos(yaw), length * sin(yaw), |
| 66 | fc=fc, ec=ec, head_width=width, head_length=width, alpha=0.4) |
| 67 | # plt.plot(x, y) |
| 68 | |
| 69 | |
| 70 | def plot_car(x, y, yaw): |