- Simple UI
- Run multiple different missions with home point at the starting location.
- Change conditions
- Inject failures
- Interface with MissionPlanner, etc.
- [ ]
Run SITL: sim_vehicle.py --console --out 192.168.5.32:14550 -L MEX -v ArduPilot
Run Fault Injector (in folder): python FaultInjector.py
I quickly realized the best way to write testing scripts would not be with bash scripts or anything archaic and Windows-y, but with Python instead. My ultimate goal would quickly become a Python simulation UI - one where it is easy to load missions, add complicating factors, etc.
I found a UAV Fault Injector project which seemed like a great place to start. I ended up deciding to modify this script with an ability to load and run custom missions via DroneKit to build a fully-featured, all-in-one platform.
My first tragedy arrived when I realized the entire python-dronekit website was down. Luckily, some fans had created another host, so I was in business.
My first order of business was to modify this Python script to get it to work with my particular Python setup. This involved changing capitalization, package names, spaces, tabs, etc. Then I had to connect this package to my flight controller, which also ended up not being too difficult.
Modifications
Changelogs below, and available on my GitHub commit history:
- Spelling mistakes
- Renamed packages
- Changed
FS_BATT_MAH
toBATT_CRT_MAH
to reflect ArduPilot development. - Added ability to load custom Waypoint files.
The thing that I first noticed was the absolute lat/long coordinates for missions. I thought it would be quite helpful to write a Python script that would generate new Waypoint files based on the drone’s current home position.