Skip to content

Node

python_motion_planning.utils.environment.node.Node

Bases: object

Class for searching nodes.

Parameters:

Name Type Description Default
current tuple

current coordinate

required
parent tuple

coordinate of parent node

None
g float

path cost

0
h float

heuristic cost

0

Examples:

Python Console Session
>>> from env import Node
>>> node1 = Node((1, 0), (2, 3), 1, 2)
>>> node2 = Node((1, 0), (2, 5), 2, 8)
>>> node3 = Node((2, 0), (1, 6), 3, 1)
...
>>> node1 + node2
>>> Node((2, 0), (2, 3), 3, 2)
...
>>> node1 == node2
>>> True
...
>>> node1 != node3
>>> True