PID¶
python_motion_planning.local_planner.pid.PID
¶
Bases: LocalPlanner
Class for PID motion planning.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start
|
tuple
|
start point coordinate |
required |
goal
|
tuple
|
goal point coordinate |
required |
env
|
Env
|
environment |
required |
heuristic_type
|
str
|
heuristic function type |
'euclidean'
|
**params
|
other parameters can be found in the parent class LocalPlanner |
{}
|
Examples:
Python Console Session
>>> from python_motion_planning.utils import Grid
>>> from python_motion_planning.local_planner import PID
>>> start = (5, 5, 0)
>>> goal = (45, 25, 0)
>>> env = Grid(51, 31)
>>> planner = PID(start, goal, env)
>>> planner.run()
angularRegularization(w_d)
¶
Angular velocity controller with pid.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
w_d
|
float
|
reference angular input |
required |
Returns:
Name | Type | Description |
---|---|---|
w |
float
|
control angular velocity output |
linearRegularization(v_d)
¶
Linear velocity controller with pid.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
v_d
|
float
|
reference velocity input |
required |
Returns:
Name | Type | Description |
---|---|---|
v |
float
|
control velocity output |
plan()
¶
PID motion plan function.
Returns:
Name | Type | Description |
---|---|---|
flag |
bool
|
planning successful if true else failed |
pose_list |
list
|
history poses of robot |
run()
¶
Running both plannig and animation.