DroneKit mission not sent to drone


I'm trying to create simple mission using Drone-Kit android.

Mission myMission = new Mission(); myMission.clear(); Takeoff to = new Takeoff(); ReturnToLaunch rtl = new ReturnToLaunch(); //set Altitude in meters rtl.setReturnAltitude(2); to.setTakeoffAltitude(2); myMission.addMissionItem(to); myMission.addMissionItem(rtl); MissionApi.getApi(this.drone).setMission(myMission,true);

The problem is that sometimes it works, and sometimes it's doesn't... I don't know why it not working... I'm not getting any errors in the code.

I'm listening to the


but only the AttributeEvent.MISSION_UPDATED is fired when I run the code. And even if its fired, this doesn't mean that the mission updated correctly. I'm checking the mission with Mission Planer. I just don't understand why it is working sometimes and sometimes not.

I did make sure that the drone connected to the app. Also I made sure that the drone is OK and arm-able. I really stuck here... and any help will be appreciated.


I have not tried dronekit-android before but I think it is better to open an issue <a href="https://github.com/dronekit/dronekit-android" rel="nofollow">here</a>.

The source code for android project has not been updated for more than two years!

In general,there is a protocol to upload/download a mission. It is not easy to implement but you can implement it. I did that in c++. You should always check the acknowledgment from the drone before going in the next step. Check the protocol <a href="http://qgroundcontrol.org/mavlink/waypoint_protocol" rel="nofollow">here</a>.


I will answer my question, in case someone have the same problem.

I have contacted the developers, and it seems that I'm not the only one who have this BUG. It seems that when you add ReturnToLaunch to Mission something happening in the API and the mission is not sent to the drone. As soon as I removed ReturnToLaunch object from the Mission all worked properly.

<strong>Work-Around</strong>: To overcome the issue, I am putting the drone in RTL mode, when the Mission is done.


  • Add a column in a numpy_array Python
  • Word 2013 VBA - opening document aborts macro
  • Rails 3 development environment keeps caching, even without caching on?
  • Gogs + Drone getsockopt: connection refused
  • MCMCglmm binomial model prior
  • Error: no 'dimnames' attribute when trying to assign to array
  • How to avoid multiple loops with multiple variables in R
  • Find all linesegments=edges within a certain distance to a point in a graph, how to combine boost-gr
  • Remove GPS on matrice 100
  • GOGS secret key
  • How to get ggplot ecdf to plot with filled background
  • Reinstating the correct extension on image files where the extension was removed
  • How to make a 2D Gaussian Filter in Tensorflow?
  • Polyarea returns false value
  • Why the graph is not proper in R?
  • JTable grid lines disappear unexpectedly
  • Notice: Undefined index: image - unable to find the error
  • Why don't we register broadcast receiver for BOOT_COMPLETED events
  • How to get the probabilities of classes in Spark Naive Bayes classifier?
  • How to sort mysql coloumn that has data in Bytes KB MB GB?
  • Is it possible to disable esc/F11 key during full screen mode of webpage, programmatically?
  • How do `pass` and `listen` work in WriterT?
  • How to revert to previous XCode version?
  • Make VS2015 use angular-cli ng at build time in a .NET project
  • ILMerge & Keep Assembly Name
  • Where to put my custom functions in Wordpress?
  • Large data - storage and query
  • WOWZA + RTMP + HTML5 Playback?
  • Numpy divide by zero. Why?
  • Matrix multiplication with MKL
  • Acquiring multiple attributes from .xml file in c#
  • Hits per day in Google Big Query
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • File not found error Google Drive API
  • How can I remove ASP.NET Designer.cs files?
  • Busy indicator not showing up in wpf window [duplicate]
  • Why is Django giving me: 'first_name' is an invalid keyword argument for this function?
  • How can I use `wmic` in a Windows PE script?
  • Converting MP3 duration time
  • java string with new operator and a literal