ENPM 661: Planning for Autonomous Robots Project - 3 Akshay Bajaj Directions to Run the program: 1 To run the code "python3" and "pygame" must be installed on the PC. 2 Copy the astar_ttbot folder in your workspace and build package (using 'catkin_make' command in the workspace directory). 3 Open a new terminal and go inside astar_ttbot/src directory and type “rosrun map_server map_server rrl_custom_small.yaml” (Let it run in the background). 4 Now, open a new terminal and go inside astar_ttbot/src directory and type “python AStar_Grid1.py”. OR If you want to generate the mapData that is stored in the file "astar_ttbot/readMap.txt" so do the following. - The file is generated by calling a "static_map" service client using the command "rosrun astar_ttbot readMapCpp". (NOTE: Make sure readMapCpp is build properly in CMakeLists.txt, as it is not a python file it is a .cpp file) In this case the procedure is as follows:- 1. Follow the first 3 steps mentioned above in the same order. 2. Open a new terminal and go inside astar_ttbot/src directory and type “rosrun astar_ttbot readMapCpp”. 3. Do step 4 (mentioned above). Understanding the Output: - Wait for a while after running the command. - The output will comprise of 2 windows. - On the terminal in which you ran the command you can see "Final Velocites" and "Final Path Nodes" printed. - A new window will appear with the map of freespace and the optimal path between start and goal node. - Screenshots are stored inside "astart_ttbot/output" subfolder. - In the output: - "Red" = "Path nodes", - "Black" = "Obstacle space nodes" and "Unmapped nodes" - "White" = "Free space" - "Green" = Goal node - "Blue" = Start node Project Details:- - I have made a new world in gazebo due the problem with the given map not opening (The given map "rrlab.sdf" is still kept in "astar_ttbot/config" folder, if needed). - The world created is saved by the name "custom_map_small" in the 'world' folder (Ignore all other files in the world folder). - The world can be opened using the command "gazebo rrl_custom_small", when inside the world directory in the terminal. - The map for this world was generated using the command "roslaunch turtlebot_navigation gmapping_demo.launch". - Then the map was saved in the folder using the command "rosrun map_server map_saver -f rrl_custom_small". (The command was run when I was inside the astar_ttbot/map directory in the terminal). - This generated 2 files in the "astar_ttbot/map" folder named as "rrl_custom_small.yaml" and "rrl_custom_small.pgm". Some information about the code and files: - The map is generated using "gmapping" package service which runs SLAM with AMCL at its core. - The map nodes are converted into obstacles and non obstacle nodes and all the nodes with "free-space" are stored in "obstaclePoints" list. - The code stops when the goal is found or more than 100,000 nodes have been generated (in the "visited" list) or else when "openNodes" list is empty. - The algorithm makes sure that it does not copy the same nodes in the "Visited" list. - The path is computed and stored in a list "n". - The index to parent nodes along with cost are stored in the dictionary "finalTableDict".