Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pause button causes Copter-3.3.2 to fly off #1695

Closed
rmackay9 opened this issue Jan 9, 2016 · 11 comments
Closed

Pause button causes Copter-3.3.2 to fly off #1695

rmackay9 opened this issue Jan 9, 2016 · 11 comments
Milestone

Comments

@rmackay9
Copy link

rmackay9 commented Jan 9, 2016

I've reproduced this problem just now after being reported by Stephan on the Copter-3.3-beta testing thread.

I'm looking into the cause as a top priority but it's not clear to me yet if the problem is in Tower or in Copter.

@rmackay9
Copy link
Author

I think there may be an issue with Tower or 3DR Services caching an old version of the last known vehicle position. This cache may persist beyond a single flight and may somehow be being used the next time the Pause button is pushed.

@rmackay9
Copy link
Author

The report can be found in the Copter-3.3-beta testing thread (search for "Stephan"):
http://diydrones.com/forum/topics/copter-3-3-beta-testing?xg_source=activity&id=705844%3ATopic%3A1964465&page=425#comments

here's the dataflash log (which doesn't show much): http://diydrones.com/forum/attachment/download?id=705844%3AUploadedFile%3A2163944
here's the video: http://youtu.be/WGdAYg2UGJU

@rmackay9
Copy link
Author

I believe this will recreate the issue although I have not tested on a real vehicle because I destroyed my IRIS today:

  1. start up the vehicle in location A, connect with Tower
  2. unplug vehicle and move to location B (leave Tower on and do not push disconnect)
  3. plug in vehicle, Tower will reconnect automatically but may not request data stream to be sent at regular intervals (?) meaning that position is not updated
  4. take-off and switch to follow-me
  5. push Pause button, vehicle will attempt to fly to Location A

@m4gr3d
Copy link
Member

m4gr3d commented Jan 11, 2016

@rmackay9 The pause button sends a guided point to the vehicle's current location, causing the vehicle to stop in place if its reported GPS location matches its actual location.
I took a look at the code, and realize we're not doing checks on the validity of the reported GPS location.
That could be the cause of the issue.

@m4gr3d
Copy link
Member

m4gr3d commented Jan 11, 2016

@rmackay9 Although, on the posted video, the user was doing follow-me before pressing pause, which would imply its vehicle had GPS lock.
Do you have access to the tlog data. From it we should be able to see which guided point coordinates were sent to the vehicle when it pressed pause.

@rmackay9
Copy link
Author

Follow-me actually doesn't require that the tablet know the vehicle location and it's the out of date vehicle location within the tablet that is the problem.

BillBonney adds this: After some more investigation if you look at
https://github.com/dronekit/dronekit-android/blob/9ce20c8d48e9bbc25b92065d73ba883907074fbd/ServiceApp/src/org/droidplanner/services/android/core/drone/variables/GuidedPoint.java#L87
You can see that pauseAtCurrentPosition calls getGpsPosition so if the GPS location reported by the system is reported inaccuratly it can fly anywhere.

During this week's dev call, this issue came up and the general consensus was that Tower should use the Brake flight mode when the Pause button is pressed instead of sending a new position request.

@mtbsteve
Copy link

Thanks guys for investigating the issue.
Please find the tlog file of the day attached.
The error occurred while processing exactly the sequence as described by Randy above:

  1. start up the vehicle in location A, connect with Tower
  2. unplug vehicle and move to location B (leave Tower on and do not push disconnect)
  3. plug in vehicle, Tower will reconnect automatically

log_usb_2016_01_03_11_53_20.zip

@m4gr3d
Copy link
Member

m4gr3d commented Jan 13, 2016

@mtbsteve thanks for the logs!

@rmackay9 I'm going to review the logs for additional data. In the meantime, we're planning to update the logic for the pause button on solo vehicles and vehicles running AC 3.3 by using BRAKE instead as discussed in the dev's call.

Since the issue doesn't seem to affect AC 3.2, for now we can leave the current implementation as is for these versions. We'll still add some checks to validate the gps position value before usage.

@rmackay9
Copy link
Author

@ne0fhyk, great, thanks a lot!

@m4gr3d
Copy link
Member

m4gr3d commented May 16, 2016

Fixed with the release of Tower v3.2.1!

@m4gr3d m4gr3d closed this as completed May 16, 2016
@m4gr3d m4gr3d added this to the Tower-v3.2.1 milestone May 16, 2016
@rmackay9
Copy link
Author

great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants