DStar¶
python_motion_planning.global_planner.graph_search.d_star.DStar
¶
Bases: GraphSearcher
Class for D* motion planning.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start
|
tuple
|
start point coordinate |
required |
goal
|
tuple
|
goal point coordinate |
required |
env
|
Env
|
environment |
required |
Examples:
>>> import python_motion_planning as pmp
>>> planner = pmp.DStar((5, 5), (45, 25), pmp.Grid(51, 31))
>>> cost, path, _ = planner.plan() # planning results only
>>> planner.plot.animation(path, str(planner), cost) # animation
>>> planner.run() # run both planning and animation
References
[1]Optimal and Efficient Path Planning for Partially-Known Environments
min_k: float
property
¶
Choose the minimum k value for nodes in OPEN list.
min_state: DNode
property
¶
Choose the node with the minimum k value in OPEN list.
OnPress(event)
¶
Mouse button callback function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event
|
MouseEvent
|
mouse event |
required |
delete(node)
¶
Delete node from OPEN list.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node
|
DNode
|
the node to delete |
required |
extractPath(closed_list)
¶
Extract the path based on the CLOSED list.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
closed_list
|
dict
|
CLOSED list |
required |
Returns:
Name | Type | Description |
---|---|---|
cost |
float
|
the cost of planning path |
path |
list
|
the planning path |
getNeighbor(node)
¶
Find neighbors of node.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node
|
DNode
|
current node |
required |
Returns:
Name | Type | Description |
---|---|---|
neighbors |
list
|
neighbors of current node |
insert(node, h_new)
¶
Insert node into OPEN list.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node
|
DNode
|
the node to insert |
required |
h_new
|
float
|
new or better cost to come value |
required |
modify(node, node_parent)
¶
plan()
¶
D* static motion planning function.
Returns:
Name | Type | Description |
---|---|---|
cost |
float
|
path cost |
path |
list
|
planning path |
_ |
None
|
None |
processState()
¶
Broadcast dynamic obstacle information.
Returns:
Name | Type | Description |
---|---|---|
min_k |
float
|
minimum k value of map |
run()
¶
Running both plannig and animation.