MCPcopy Index your code
hub / github.com/AtsushiSakai/PythonRobotics / bspline_planning

Function bspline_planning

PathPlanning/BSplinePath/bspline_path.py:17–34  ·  view source on GitHub ↗
(x, y, sn)

Source from the content-addressed store, hash-verified

15
16
17def bspline_planning(x, y, sn):
18 t = range(len(x))
19 x_tup = si.splrep(t, x, k=N)
20 y_tup = si.splrep(t, y, k=N)
21
22 x_list = list(x_tup)
23 xl = x.tolist()
24 x_list[1] = xl + [0.0, 0.0, 0.0, 0.0]
25
26 y_list = list(y_tup)
27 yl = y.tolist()
28 y_list[1] = yl + [0.0, 0.0, 0.0, 0.0]
29
30 ipl_t = np.linspace(0.0, len(x) - 1, sn)
31 rx = si.splev(ipl_t, x_list)
32 ry = si.splev(ipl_t, y_list)
33
34 return rx, ry
35
36
37def main():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected