Showing posts from June, 2017

Drone Controller Software -- Part 1

With looking at the last post, I'm detailing out 4 main modules. The largest of the modules is the Drone Software module. This module is the executable that actually runs on the drone itself. This post will detail the architecture of the drone executable module; along with how to get started writing it. First, let's talk about how to get navigator libraries to work in Android Studio. Remember that we're linking in a dependent pre-built library. I suggest using CMake as it has strong integration within Android Studio and is well supported. To use CMake, create the project as detailed here . Now, edit the CMakeLists.txt file and add the library dependency like so: include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/snav/1.2.31_8/include ) add_executable( drone-controller ${SourceList} ) add_library( libsnav-arm SHARED IMPORTED ) set_target_properties( libsnav-arm PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT

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 de

Machine Learning Part 1 -- Linear Regression

In working with the Drone project, I ran into an issue. It turns out to be really hard to control the drone while transitioning from/to VR. That is to say, when the drone is in the air, flying it in VR is really comfortable and easy. However, getting it to the air and then transitioning to VR mode is a challenge. Also, what happens when the VR mode allows the drone to do something that would allow it to crash. There's two potential solutions to this problem. 1.) I could advocate for having a buddy control the drone and keep it in stable flight allowing manual switch over for when ready for VR control, or 2.) I could advocate for writing some AI to allow the drone to control itself. I'm Opting for #2 for a few reasons, first I'd rather be able to fly the drone whenever I wish whether a buddy is available or not. Also I'd like to avoid creating multiple control capabilities and then require a certain skill level to control my drone. Finally, I'm a programmer,