These are chat archives for dronekit/dronekit-android

11th
Feb 2016
Dennis Baldwin
@dbaldwin
Feb 11 2016 20:31
Hey guys, first off great job with DroneKit. I've really enjoyed diving in with my Solo and it's been fairly straightforward to get started. I come from a world of DJI development (don't shoot me) and am looking to write my app called DronePan for the Solo. The concept is simple and allows pilots to specify a location and then shoot a 360 panorama. In the world of DJI we can create waypoints and actions and upload them before the aircraft even takes off. For example, we can tell it to take off, go to location A, rotate 60 degrees, take a photo, pitch gimbal down, repeat, repeat. In the world of DroneKit I've seen there's a mission API, but there is also the ability to control the aircraft in guided mode. Does the mission API support actions beyond waypoints (aircraft yaw, gimbal pitch)? Or would what I described above be better suited for guided mode? If using guided mode it's unclear to me the best way to do this since we'd need to tell Solo to perform a command and then receive a callback saying the command was completed before we issue the next. I hope this makes sense. I'm sure we'll have other questions, but this would help us get going in the right direction. Thanks for all the hard work and I'm excited to be a part of a more open platform!
Hamish Willee
@hamishwillee
Feb 11 2016 22:08

@dbaldwin Yes, you can do pretty much anything in missions (actually more than you can do in guided mode, albeit with less control) - control servos, relays, fire of parachutes etc. The list of supported commands on Copter is here: copter.ardupilot.com/wiki/common-mavlink-mission-command-messages-mav_cmd. This would be trivially easy as a mission - you'd set the waypoint, set yaw to rotate a bit, command a photo, rinse and repeat.

This would also be pretty easy in guided mode too (the set of instructions that are supported by the autopilot in this mode are here: http://dev.ardupilot.com/wiki/copter-commands-in-guided-mode/)

The difference in approach would depend mostly on why you are doing this. If everything is "static"/same every time then you'd do it as a mission - all the infrastructure is set up for that. If however you're thinking that you will want to do this regularly, and you will want to change the position and the rate of rotation/number of photos etc then DroneKit is good for this, since the description is programmatic and hence easy to change.

And of course you can mix and match a bit - DroneKit can create missions too.

If you want to get a better view of the possibilities, I suggest you actually look at the DK-Python docs since these better explain the sorts of functionality that is "possible" (http://python.dronekit.io/) - though of course what has been implemented and the approach is different in java.

chaviw
@chaviw
Feb 11 2016 22:19
@dbaldwin If you’d like to get an idea of how Missions work with the Android app, take a look at Tower. https://github.com/DroidPlanner/Tower. That app gives you an easy way to generate mission items. The app also allows you to place the vehicle in Guided mode and control the vehicle manually in the app. You can test both those out and see which fits your needs.