A 2D simulation in the framework Pygame of the paper Rapidly-exploring random trees: A new tool for path planning.
The environment has 2 non-convex obstacles that can be used or not. It shows different elements of the tree while building it, like the
usage: RRT.py [-h] [-o | --obstacles | --no-obstacles] [-n] [-e] [-init [...]] [-goal [...]]
[-srn | --show_random_nodes | --no-show_random_nodes] [-snn | --show_new_nodes | --no-show_new_nodes]
Implements the RRT algorithm for path planning.
options:
-h, --help show this help message and exit
-o, --obstacles, --no-obstacles
Obstacles on the map
-n , --nodes Maximum number of nodes
-e , --epsilon Step size
-init [ ...], --x_init [ ...]
Initial node position in X and Y respectively
-goal [ ...], --x_goal [ ...]
Goal node position in X and Y respectively
-srn, --show_random_nodes, --no-show_random_nodes
Show random nodes on screen
-snn, --show_new_nodes, --no-show_new_nodes
Show new nodes on screen
Generate obstacles in the map and show the random nodes
python3 RRT.py --obstacles --show_random_nodes
No obstacles, show the new nodes
python3 RRT.py --no-obstacles --show_new_nodes
MIT License
Copyright (c) [2022] [Angelo Espinoza]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.