Python code for Simulating a Potential Field based obstable avoidance and path planning
You can use a code editor of your choice, but I personally find PyCharm very user friendly and easy to use.
- Download the tarball .tar.gz from Here
- Extract the tarball to a directory that supports file execution.For example, if the downloaded version is 1.17.7391, you can extract it to the recommended /opt directory using the following command:
sudo tar -xzf jetbrains-toolbox-1.17.7391.tar.gz -C /
- Switch to the bin subdirectory:
cd /opt/pycharm-*/bin
- Run pycharm.sh from the bin subdirectory:
sh pycharm.sh
- Go to your workspace (any folder where you which to maintain this code)
- Open terminal at that location (Right-Click -> Open in Terminal)
- Clone the repostory by pasting the following into the opened terminal:
git clone "https://github.com/PulkitRustagi/Potential-Field-Path-Planning.git"
The obstacle locations have been preset in the main()
function which you can scroll to the bottomof the script and specify (x,y) for obstables:
Upon execution you should get an animation such as shown below (this is a different obstacle setting than shown above):