Until goal is reached or max_iter is reached:
- Sample a random point (x, y).
- Find the nearest node (by position) in the tree to the random point.
- Drive from the nearest node towards the random point and get new node position.
- Check collision and reachability.
- If collision or unreachable, continue.
- Add the new node to the tree with the parent node.
- The heading of the new node is assigned by the path from the parent node chosen for that node.
NOTE: When connectin
For unicycle robot.
Fig. 1: RRT*-SmoothUnicycle tree and path with path length as a cost.- Sample a random point (x, y).
- Find the nearest node (by position) in the tree to the random point.
- Drive from the nearest node towards the random point and get new node position.
- Find the nodes withing near_node_threshold distance from the new node position.
- Choose the parent node with minimum cost from the near nodes.
- For each near node:
- Get arc path from the near node to the new node.
- Check collision and calculate the cost of the path.
- For each near node:
- Add the new node to the tree with the parent node.
- The heading of the new node is assigned by the path from the parent node chosen for that node.
- Rewire the tree.
- To check if two pose can be connected, try connecting poses only using the two arc.
- If the pose connecting two arc (the intersection pose) is within dist_near from both poses, they can be rewired.
- If rewired, the pose connecting two arcs is also added as a node.
- Try in-place pivot only in the start node.
When finding near nodes, nodes added in the rewiring steps are ignored.:Not implemented
Difference from RRT*-unicycle (Yokoyama, 2023)
- Robot does not pivot.
- In rewiring step, dubins path is used. TODO: add graceful control (park, 2011)
Implementation of A* algorithm.
Plans shortest path with minimum bending.
- Cost: dist + 1(bending)
- TODO: Score total num bending to fix some edge cases.
Implementation of Theta* algorithm. LineOfSight function is implemented using supercover Bresenham-based supercover line algorithm.
Fig. 2: A* planner path (left), Theta* planner path (middle) and A* bending planner path(right).- Setup env using Conda.
conda env create --file environment.yml conda activate pgpp
- Run examples
python examples/4_theta_star.py
bash run_tests.shRename check_unicycle_reachability -> check_unicycle_pos_reachability
- N. Yokoyama, S. Ha, and D. Batra, “Success weighted by completion time: A dynamics-aware evaluation criteria for embodied navigation,” in IROS, 2021.
- K. Daniel, A. Nash, S. Koenig, and A. Felner, “Theta*: Any-angle path planning on grids,” Journal of Artificial Intelligence Research, vol. 39, pp. 533–579, 2010.
- D. Eugen, "Bresenham-based supercover line algorithm", http://eugen.dedu.free.fr/projects/bresenham/, 2001




