Skip to content

CubicSpline

python_motion_planning.curve_generation.cubic_spline.CubicSpline

Bases: Curve

Class for cubic spline generation.

Parameters:

Name Type Description Default
step float

Simulation or interpolation size

required

Examples:

Python Console Session
>>> from python_motion_planning.curve_generation import CubicSpline
>>>     points = [(0, 0, 0), (10, 10, -90), (20, 5, 60)]
>>> generator = CubicSpline(step)
>>> generator.run(points)

run(points)

Running both generation and animation.

Parameters:

Name Type Description Default
points list[tuple]

path points

required

spline(x_list, y_list, t)

Running both generation and animation.

Parameters:

Name Type Description Default
x_list list[tuple]

path points x-direction

required
y_list list[tuple]

path points y-direction

required
t list

parameter

required

Returns:

Name Type Description
p list

The (x, y) of curve with given t

dp list

The derivative (dx, dy) of curve with given t