Skip to content

ThetaStar

python_motion_planning.global_planner.graph_search.theta_star.ThetaStar

Bases: AStar

Class for Theta* 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'

Examples:

Python Console Session
>>> import python_motion_planning as pmp
>>> planner = pmp.ThetaStar((5, 5), (45, 25), pmp.Grid(51, 31))
>>> cost, path, expand = planner.plan()
>>> planner.plot.animation(path, str(planner), cost, expand)  # animation
>>> planner.run()       # run both planning and animation
References

[1] Theta*: Any-Angle Path Planning on Grids [2] Any-angle path planning on non-uniform costmaps

lineOfSight(node1, node2)

Judge collision when moving from node1 to node2 using Bresenham.

Parameters:

Name Type Description Default
node1 Node

start node

required
node2 Node

end node

required

Returns:

Name Type Description
line_of_sight bool

True if line of sight exists ( no collision ) else False

plan()

Theta* motion plan function.

Returns:

Name Type Description
cost float

path cost

path list

planning path

expand list

all nodes that planner has searched

updateVertex(node_p, node_c)

Update extend node information with current node's parent node.

Parameters:

Name Type Description Default
node_p Node

parent node

required
node_c Node

current node

required