pyrobosim.navigation.rrt.RRTPlanner.rewire_node

RRTPlanner.rewire_node(graph: SearchGraph, n_tgt: Node) None

Rewires a node in the RRT by checking if switching the parent node to another nearby node will reduce its total cost from the root node.

This is the key modification in the RRT* algorithm which requires more computation, but produces paths that are shorter and smoother than plain RRT. The vicinity around the node is defined by the rewire_radius parameter.

Parameters:
  • graph – The tree to rewire.

  • n_tgt – The target tree node to rewire within the tree.