Drone VR Software Architecture
Finally we're at the point in our opus VR drone project that we need to look at the software. If you're following along, I have the Hardware drone built, using Snapdragon flight. To review, we have knowledge of how to create a project in Android Studio that can target Snapdragon Flight for deployment. We know how to utilize the Daydream controller to build an arm model. We also know how to setup a VR project in Android Studio. Finally, we know how to communicate with the Snapdragon flight controller. So, if we put it all together, we only need to figure out how to program the controller aspect of the Flight.
Thankfully there's rich support available for Flight that allows us to have full C-API control over both the ESC and the controller board. It is provided through the navigator api library.
Now let's talk about the overall design. I envision four main modules:
- VR Controller App
- interfaces with the user
- gets positional updates and issues commands
- delivers status messages.
- Phone 2d App
- Used for diagnosis, easy classical control and informational display when VR not available.
- gives ability to get realtime updates and settings from a third party
- Phone service
- used to handle communication between apps and drone.
- survives app pause/resume.
- handles network connection with drone.
- Drone Software
- used to handle communication between network and drone.
- handles state information about the drone.
- handles AI to self control the drone when connection is lost or about to be lost.
- accepts commands from network and translates commands to drone actions
Over the next few blog posts, I will dedicate one post per main module and deep dive in places that deserve further investigation.