()
| 35 | |
| 36 | |
| 37 | def main(): |
| 38 | print(__file__ + " start!!") |
| 39 | # way points |
| 40 | x = np.array([-1.0, 3.0, 4.0, 2.0, 1.0]) |
| 41 | y = np.array([0.0, -3.0, 1.0, 1.0, 3.0]) |
| 42 | sn = 100 # sampling number |
| 43 | |
| 44 | rx, ry = bspline_planning(x, y, sn) |
| 45 | |
| 46 | # show results |
| 47 | plt.plot(x, y, '-og', label="Waypoints") |
| 48 | plt.plot(rx, ry, '-r', label="B-Spline path") |
| 49 | plt.grid(True) |
| 50 | plt.legend() |
| 51 | plt.axis("equal") |
| 52 | plt.show() |
| 53 | |
| 54 | |
| 55 | if __name__ == '__main__': |
no test coverage detected