In this project work, we have designed an algorithm to spray seeds at regular intervals in fields through drone whose parameters are provided by the user.
This required the calculation of Waypoints which define the traversal of the drone across the land.
The time complexity of the proposed algorithm for the calculation of Waypoints is O((l/d)^2)
where l is the side of the fitted square and d is the distance between seeds dropped.
Walkthrough to set up the PC for successful execution
sudo apt-get update
sudo apt install python2
DroneKit-Python and the dronekit-sitl simulator are installed from pip on all platforms. On Linux you will first need to install pip and python-dev:
sudo apt-get install python-pip python-dev
pip install dronekit
pip install dronekit-sitl -UI
pip install MAVProxy
Download the latest deb file for your machine from:
firmware.ardupilot.org/Tools/APMPlanner
Open a terminal window and go to the location where you downloaded the .deb file from step 2 and type the following command:
sudo apt-get -f install
sudo dpkg -i apm_planner*.deb
python filename.py
Method 2: Run the APM Planner2 and minimize it. Open 3 terminals and execute each of the following in each terminal:
dronekit-sitl copter --home=10.0,20.0,0,180
Above command runs the start the simulation with copter at home location (latitude = 10.0 and longitude = 20.0 in above command) and 0 and 180 are copter parameters like model etc. It starts the SITL connection at: tcp:127.0.0.1:5760
mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551
APM Planner should automatically connect to one of the out links from above command.
python drone_GUIDED.py --connect udp:127.0.0.1:14551
or
python drone_AUTO.py --connect udp:127.0.0.1:14551
Monitor the drone in APM Planner and terminal outputs. For detailed terminal outputs view the Master.log generated by the code.