Bezier¶
python_motion_planning.curve_generation.bezier_curve.Bezier
¶
Bases: Curve
Class for Bezier curve generation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
step
|
float
|
Simulation or interpolation size |
required |
offset
|
float
|
The offset of control points |
required |
Examples:
Python Console Session
>>> from python_motion_planning.curve_generation import Bezier
>>> points = [(0, 0, 0), (10, 10, -90), (20, 5, 60)]
>>> generator = Bezier(step, offset)
>>> generator.run(points)
bezier(t, control_points)
¶
Calculate the Bezier curve point.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
t
|
float
|
scale factor |
required |
control_points
|
list[tuple]
|
control points |
required |
Returns:
Name | Type | Description |
---|---|---|
point |
array
|
point in Bezier curve with t |
generation(start_pose, goal_pose)
¶
Generate the Bezier Curve.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start_pose
|
tuple
|
Initial pose (x, y, yaw) |
required |
goal_pose
|
tuple
|
Target pose (x, y, yaw) |
required |
Returns:
Name | Type | Description |
---|---|---|
x_list |
list
|
x of the trajectory |
y_list |
list
|
y of the trajectory |
yaw_list |
list
|
yaw of the trajectory |
getControlPoints(start_pose, goal_pose)
¶
Calculate control points heuristically.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start_pose
|
tuple
|
Initial pose (x, y, yaw) |
required |
goal_pose
|
tuple
|
Target pose (x, y, yaw) |
required |
Returns:
Name | Type | Description |
---|---|---|
control_points |
list[tuple]
|
Control points |
run(points)
¶
Running both generation and animation.
Text Only
Parameters:
points (list[tuple]): path points