Dubins¶
python_motion_planning.curve_generation.dubins_curve.Dubins
¶
Bases: Curve
Class for Dubins curve generation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
step
|
float
|
Simulation or interpolation size |
required |
max_curv
|
float
|
The maximum curvature of the curve |
required |
Examples:
>>> from python_motion_planning.curve_generation import Dubins
>>> points = [(0, 0, 0), (10, 10, -90), (20, 5, 60)]
>>> generator = Dubins(step, max_curv)
>>> generator.run(points)
References
[1] On curves of minimal length with a constraint on average curvature, and with prescribed initial and terminal positions and tangents
LRL(alpha, beta, dist)
¶
Left-Right-Left generation mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha
|
float
|
Initial pose of (0, 0, alpha) |
required |
beta
|
float
|
Goal pose of (dist, 0, beta) |
required |
dist
|
float
|
The distance between the initial and goal pose |
required |
Returns:
Name | Type | Description |
---|---|---|
t |
float
|
Moving lenght of segments |
p |
float
|
Moving lenght of segments |
q |
float
|
Moving lenght of segments |
mode |
list
|
Motion mode |
LSL(alpha, beta, dist)
¶
Left-Straight-Left generation mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha
|
float
|
Initial pose of (0, 0, alpha) |
required |
beta
|
float
|
Goal pose of (dist, 0, beta) |
required |
dist
|
float
|
The distance between the initial and goal pose |
required |
Returns:
Name | Type | Description |
---|---|---|
t |
float
|
Moving lenght of segments |
p |
float
|
Moving lenght of segments |
q |
float
|
Moving lenght of segments |
mode |
list
|
Motion mode |
LSR(alpha, beta, dist)
¶
Left-Straight-Right generation mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha
|
float
|
Initial pose of (0, 0, alpha) |
required |
beta
|
float
|
Goal pose of (dist, 0, beta) |
required |
dist
|
float
|
The distance between the initial and goal pose |
required |
Returns:
Name | Type | Description |
---|---|---|
t |
float
|
Moving lenght of segments |
p |
float
|
Moving lenght of segments |
q |
float
|
Moving lenght of segments |
mode |
list
|
Motion mode |
RLR(alpha, beta, dist)
¶
Right-Left-Right generation mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha
|
float
|
Initial pose of (0, 0, alpha) |
required |
beta
|
float
|
Goal pose of (dist, 0, beta) |
required |
dist
|
float
|
The distance between the initial and goal pose |
required |
Returns:
Name | Type | Description |
---|---|---|
t |
float
|
Moving lenght of segments |
p |
float
|
Moving lenght of segments |
q |
float
|
Moving lenght of segments |
mode |
list
|
Motion mode |
RSL(alpha, beta, dist)
¶
Right-Straight-Left generation mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha
|
float
|
Initial pose of (0, 0, alpha) |
required |
beta
|
float
|
Goal pose of (dist, 0, beta) |
required |
dist
|
float
|
The distance between the initial and goal pose |
required |
Returns:
Name | Type | Description |
---|---|---|
t |
float
|
Moving lenght of segments |
p |
float
|
Moving lenght of segments |
q |
float
|
Moving lenght of segments |
mode |
list
|
Motion mode |
RSR(alpha, beta, dist)
¶
Right-Straight-Right generation mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha
|
float
|
Initial pose of (0, 0, alpha) |
required |
beta
|
float
|
Goal pose of (dist, 0, beta) |
required |
Returns:
Name | Type | Description |
---|---|---|
t |
float
|
Moving lenght of segments |
p |
float
|
Moving lenght of segments |
q |
float
|
Moving lenght of segments |
mode |
list
|
Motion mode |
generation(start_pose, goal_pose)
¶
Generate the Dubins 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 |
---|---|---|
best_cost |
float
|
Best planning path length |
best_mode |
list
|
Best motion modes |
x_list |
list
|
Trajectory of x |
y_list |
list
|
Trajectory of y |
yaw_list |
list
|
Trajectory of yaw |
interpolate(mode, length, init_pose)
¶
Planning path interpolation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
str
|
motion, e.g., L, S, R |
required |
length
|
float
|
Single step motion path length |
required |
init_pose
|
tuple
|
Initial pose (x, y, yaw) |
required |
Returns:
Name | Type | Description |
---|---|---|
new_pose |
tuple
|
New pose (new_x, new_y, new_yaw) after moving |
run(points)
¶
Running both generation and animation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
points
|
list[tuple]
|
path points |
required |