dji-sdk / Mobile-SDK-iOS

DJI Mobile SDK for iOS: http://developer.dji.com/mobile-sdk/
Other
576 stars 254 forks source link

Vehicle aborts mission and switches to hover mid-mission #114

Open poli0048 opened 7 years ago

poli0048 commented 7 years ago

We have found that when we fly waypoint missions the vehicle will sometimes stop the mission and switch to hover mid-mission. We fly the Inspire 1 V2, and we have customers running into the same problem. They are also flying the Inspire 1 V2.

The mission is planned using our App (Drone Survey) with the DJI iOS mobile SDK (version 3.X). We are in the process of switching over to the 4.1 SDK, but we have not started testing with that yet. The tablet running to App is an iPad mini 2.

The mission upload appears to be successful on our end, and when the switch happens, we are not getting any associated error.

I have personally witnessed this happen 3 times. In each of these instances, the event occurred at some waypoint mid-mission. I have never seen the issue in between waypoints. Once the vehicle has switched to hover, I have tried pausing the current mission to see if pause/resume might get us back on track; we get an error saying that no mission is currently being flown. These things, along with the fact that there is no apparent error being reported, makes me wonder if the issue is that some of the waypoints are not getting uploaded. The behavior seems consistent with the last N waypoints being lost in the upload.

There do appear to be other reports online of the same behavior with other DJI vehicles and other mission planners. For example: http://www.phantompilots.com/threads/litchi-stops-mid-mission.100724/ That obviously doesn't prove that it is not a problem on the App side, but it does support the idea that it is in the SDK or on the vehicle side.

The issue is not easy to reproduce. I have flown lots of missions with the same flight planner and vehicle and have only seen it happen 3 times, so it will take a lot of testing to see if any change "fixes it".

chasemgray commented 7 years ago

We also have customers that see this issue quite a bit. It isn't easy to reproduce like you said.

oliverou commented 7 years ago

Hi @poli0048 @chasemgray , please connect your DJI Product to the DJI Assistant 2 Software and get the flight data as shown below:

screen shot 2017-07-03 at 11 30 15 am

Then send us the flight data for investigation. Thanks!

poli0048 commented 6 years ago

Hi. Sorry for the delay here - have been very busy this last week. I just had a chance to try this. The DJI Assistant App does not appear to support the Inspire 1. I have been trying to get the logs through other means, and people on forums say I can get them off the vehicle through the little USB port on the tail, but to do so I need to put the vehicle into "Flight Data Mode" using the Pilot App so that the vehicle will emulate a storage device on that little port. Unfortunately, the Pilot App does not appear to exist anymore. Using to Go App I see no such options. Please give me clear and explicit instructions on how to retrieve the logs you need from my Inspire 1 and I will gladly send them to you. Thanks,

Bryan

poli0048 commented 6 years ago

Ok. I appear to have figured out how to get the flights logs. There is a button in the Go App to put the vehicle into "Flight Data Mode" - it was just not easy to find.

I am using a 3rd-party tool to convert to CSV so I can try to find a flight that exhibits the behavior I mentioned here and I think I found one. Please download the DAT file using the following link:

https://www.dropbox.com/s/3za35480ecib38r/FLY331.DAT?dl=0

oliverou commented 6 years ago

Hi @poli0048 , thanks! We got your flight data, will investigate the issue then.

poli0048 commented 6 years ago

Thanks oliverou,

I have seen the issue twice since my last post and in at least one of the events the vehicle was definitely not at a waypoint when the mode switch occurred. It seems to be more common at waypoints, but that is not the only time it happens. This means that my hypothesis about it being related to mission uploading is probably incorrect. It also means that it might be more common when the vehicle is turning than when flying straight, but I don't have solid data to back that up.

Another observation: It seems more likely to happen on windy days than on still days. Again, I do not have a large enough number of observations to say this with any confidence, but it seems to be true. I hope this helps.

Bryan

wenqianqiao commented 6 years ago

Hi Poli0048,

You said you met this situation when it is not in the waypoint mission. However, if you are not in the waypoint mission, if you don't do anything , it would just hover there. How could you know that it would switch the mode? You wrote some codes to record that?

For your flight log, it still needs sometime for us to analyze that.

poli0048 commented 6 years ago

I said the vehicle was not at a waypoint when the issue occurred. It was flying a waypoint mission though. I just mean it was about half way between waypoints when it happened.

chasemgray commented 6 years ago

We regularly see htis issue as well. in between waypoints the drone will just abort and hover.

poli0048 commented 6 years ago

Has there been any progress in resolving this issue? It is a serious problem for our customers, and we now have a few customers flying Inspires who are asking us to support vehicles by different manufacturers because of this problem.

oliverou commented 6 years ago

Hi @poli0048, it's the firmware issue, and my colleagues of the flight controller team are still investigating it. Will get back to you once we have a conclusion.

poli0048 commented 6 years ago

Thank you Oliverou,

I will be monitoring this thread. Best regards,

Bryan

oliverou commented 6 years ago

Hi @poli0048, after investigating the flight data you send us, we found that there is electromagnetic interference during the waypoint mission even though the GPS signal is good. Because of insufficient conditions to execute the waypoint mission, the aircraft switch to Attitude mode automatically and stop the waypoint mission.

We will improve the iOS SDK and provide more detailed errors in the future version.

poli0048 commented 6 years ago

Hi Oliverou,

I am glad that your firmware team has had a chance to look at this, but I must say that this conclusion seems remarkably unlikely. This happens several hundred feet above ground, well away from any local emitters (like personal electronics), and it happens at different fields in different states, making large-scale fixed sources an unlikely culprit as well. Furthermore, the avionics electronics on these vehicles is very well shielded - the main flight controller is in an aluminum box with EMI gaskets for heaven's sake. The comm link and GPS are the only points that might really be susceptible to EMI, and they are both rock solid during these events (and GPS is usually the first thing to fail when you have EMI issues).

If EMI is the problem, what is the mechanism by which the vehicle is being effected? You know it isn't GPS or your comm link... so do they think it is causing memory corruption or something? The other mechanisms by which EMI can get into your system would not have such graceful failure modes as a flight mode switch - we would likely be shoveling vehicle remnants into a bag if EMI were effecting the core electronics.

EMI might sound like a vaguely plausible explanation to this problem, but it is almost certainly not the correct one. This is probably a bug in the flight controller firmware. My company has great interest in seeing this problem fixed and I am willing to help as much as I can. If there are specific things you need tested, I am willing to try them. But please don't give up on fixing this and write it off as an EMI problem.

poli0048 commented 6 years ago

Oliverou,

Can you tell me if there is any progress on this issue? There are many different customers running into this issue on different vehicles.

dji-dev commented 6 years ago

Hi @poli0048, you are right that the chance to encounter EMI during the flight is low. According to the engineer from the flight controller team, this may happen when the environment of calibration is not ideal. Please try calibrating the compass in a better environment before the flight.

BTW, we are not going to give up fixing this issue, the thing is that based on the flight log you provide us, we can only come up with the conclusion of EIM issue.