I have implemented the RRT Algorithm on a .pgm file of a 2D occupancy grid map generated using Hector-SLAM
- In the file
RRT.py
change the path to the .pgm file of the map in the lines 131,132,133 according to your system. - Go to the directory containing
RRT.py
file and run the python script using the commandpython3 RRT.py
I have implemented the RRT Algorithm using Sahayak as a base robot. I have previously worked on it hence I used the same robot as a base to test the algorithm.
- Build the Sahayak Robot as per the instructions given in GitHub Repository.
- Run
roslaunch sahayak launch_all.launch
- Run
rosrun sahayak_mapping odom-pub.py
- Add the
RRT_ros.py
to the sahayak_navigation/src folder - Run
rosrun sahayak_navigation RRT_ros.py
- Use
2D Nav Goal in RVIZ
to give a goal to Sahayak.