This project is a simulator for autonomous flight in agricultural environment. It aims to help test different strategies of autonomous flights in simulated environments containing high-fidelity argricultral features.
We created this project with Ubuntu environments. We recommend you to run it on Ubuntu 20.04 as the current AirSim version is not fully tested on future ubuntu distributions.
The project is based on following common libraries. Make sure you have them installed on your computer.
- Boost Library
- Open CV (The oldest version we have tested is 3.2. We suggest using later version.)
- Eigen
Unity editor is needed to run the simulated environment. An installation guide for Unity on Linux environment can be found here.
Go to the directory where you want to install the code.
git clone --recurse-submodules https://github.com/muellerlab/agri-fly
cd AIFS_AirSim
./setup.sh
./build.sh
Then navigate to the folder containing Unity wrapper code.
cd AirSim/Unity
./build.sh
A detailed instruction for setting up AirSim project can also be found:
https://microsoft.github.io/AirSim/build_linux/
https://microsoft.github.io/AirSim/Unity/
We recommend using cmake with graphic interface if you are not familiar with compiler setup.
-
to get it: run
sudo apt install cmake-qt-gui
-
then open the app:
-
where is the source code:
$PATH TO REPOSITORY$ -
where to build the binaries:
$PATH TO REPOSITORY$ /Build (this will ask to make new directory and say yes) -
Click Configure, then:
-
Select "Unix makefiles" and "Use default native compilers"
-
Click configure until the red items disappear
-
Click Generate
Now the code is ready to be compiled.
Notice that the single-thread simulation is extremely slow and we recommend to use it only as a tool to check if code installation is successful. We recommend to use ROS Simulator as basis for developement.
-
Start Unity Hub, import the argricultral world via selecting the folder 'AIFS_AirSim\Unity\UnityDemo', and then hit the OK button.
-
Click on the new project which showed up in the Unity Hub menu to open it in Unity.
-
In the bottom pane, click on Projects->Assets->Scenes. Then, double-click on SimModeSelector. Choose the Drone-Demo.
-
Hit the play button to start the simulation (and hit play again to stop the simulation.
-
Then run the compiled Rappids_Simulator executive. You should see the vehicle taking off and trying to autonomously fly through the almond orchard.
See readme.md inside the AIFS_ROS folder.
-
The flight simulator code, including physics and example estimator and controller are based on work of HiPeRLab. The depth-camera based RAPPIDS controller is used in the onboard path planning example.
-
The high-fidelity argricultral models used in the project comes from Helios developed by Bailey Lab of UC Davis.
-
Rendering of the argricultral world is implemented with Unity. The tool is not open source and not free to use, but Unity provides personal/educator license that can be easily obtained without charge.
-
The visualization and sensor fabrication is built upon the AirSim and its pilot Unity-based simulation demo.
The project is supported by USDA-NIFA/NSF AI Institute for Next Generation Food Systems AIFS
The high fidelity tree models in the simulator is generated with the Helios developed by Bailey lab of UC Davis.