Follow-me arducopter

The is actually another underlying problem. Tower actually stopped doing Follow-me quite a while back.

@kellyschrock had to update the dronekit-android code to account for new changes that were made in the Android’s underlying GPS-precision data. Solex Follow-me had stopped working as well. I believe it had something to do with Android not providing an accurate enough position to a 3rd party tool, so he ended up, against his best judgement, changing the variable for accuracy so that it would allow follow-me mode in slightly less accurate conditions.

I started trying to take those changes and incorporate them into dronekit-android, but my PRs never even got looked at…also…I’m kinda dumb at programming. (Not blaming Bill I know the app isn’t top priority) Regardless, the underlying dronekit-android framework is where the follow-me is broken, and since noone is maintaining either dronekit-android or Tower at this time, it will remain broken. LocationRelay: Overload Constructor with option by billbonney · Pull Request #485 · dronekit/dronekit-android · GitHub

I’m not sure on the claims that follow-me was working pre-RC3.6, because it certainly wasn’t for me. Around February, it was all still working (Tower and Solex), but it stopped around that time and kelly made a mention on his Facebook page of why it wasn’t working and how he fixed it.

The offending code:

private static final float LOCATION_ACCURACY_THRESHOLD = 10.0f;

My idea was to first modify dronekit-android to make this setable (is that a word?) by the connected app, then modify Tower to send it’s required accuracy for follow-me mode.

My justification here is that a Rover might not require as high of a threshold, so the app developer using dronekit could set the accuracy based on the requirements.

What you’re doing there is basically what I did, but I didn’t provide a means for a client to set an accuracy threshold. My previous accuracy threshold was 10 if memory serves, and I bumped it to 15 based on what I observed coming from the Android device’s GPS.

FWIW, Rover benefits from as much accuracy as possible with locations, at least for the things I mess with. 3 or 4-meter accuracy on a copter is generally pretty good for a copter. But since a Rover operates in close quarters next to bushes, people, houses, pets, etc. it’s actually much more likely to run into things than any of my copters if the location isn’t sufficiently accurate. The low speed and absence of spinning blades makes a collision less of an event, but that’s only until I attach a mower deck to my rover. :slight_smile:

Will the SOLEX app work on TAROT hex with arducopter 3.6?

Randy
I noticed this, now Tower display altitude above sea-level where normally I saw the relative altitude and where, I think, should be relative altitude.
I don’t remember precisely when but some month ago I used Tower as GCS and I saw relative altitude displayed.
It is annoying to not know the relative alt when you fly.
Do you think it is feasible to correct this relative alt problem independently from the follow me problem (that I think is more difficult to solve)?

Andrea,

I’m not sure… I’ve never done any development on Tower I’m afraid… I’ll bring it up with the other developers on the weekly meeting and I guess we will see if we can find someone to fix it.

2 Likes

Since the follow-up of the AC3.6rcX version of the firmware, my Tradheli test followed me mode and never succeeded. I look forward to the Tower update to fix this long-standing problem.

This topic has been discussed on the dev call.

If there are candidates here to go and debug the current issues on Tower would be great.

@rmackay9 to test your hypothesis I rebuilt Copter-3.6 rc12 after modifying GCS_MAVLINK::send_vfr_hud() to send relative alt instead of msl alt.
In this way I see relative alt in the actionbar on Tower and follow me works.
I have to say that I see strange behavior when I activate follow me, it seems that Tower thought that I were in another place so the quadcopter begin to fly towards this other place, then I switched in loiter to regain control. This could be due to the fact that i did the test in a little space and i was near my quadcopter. Another explanation could be what @lordneeko wrote:

I know that this could not be a solution, the VFR_HUD message must contain global alt and not relative alt. Tower should be changed to use another message with relative alt both to display in actionbar and to use in follow me mode. I don’t have enough android programming skill. I was only able to clone Tower and build the apk with android studio, but I was not able to find the relevant code to modify.

[EDIT]
The strange behavior about which I wrote was due to the fact that I activated follow me mode with type circle, I see this now on the log. Anyway on the log (Tower log) I see some messages like:

10-21 15:16:19.261 D/Follow : Location not accurate
10-21 15:16:20.241 W/LocationRelay : isLocationAccurate() – High/bad accuracy: 15.708

so the problem of accuracy is to keep in count.

1 Like

One solution, to have relative alt in instead of global alt, could be to use msg_global_position_int in ArduCopter.java as they did in ArduPlane.java


and change LOCATION_ACCURACY_THRESHOLD in LocationRelay.java as suggested by @kellyschrock for the problem of accuracy.

Andrea,

great, thanks for looking into this. I’ll pass this onto anyone I can find who might be able to do Tower development although there doesn’t seem to be much interest in supporting it from the devs I know. I wonder if Solex or QGC on android might work?

This is something I tracked down earlier this year in Solex, and adjusted. I have no idea why, but at some point Android GPS location accuracy dropped from its normal 2-3 meters to around 15m accuracy. My follow logic in Solex started to fail and I found that it was because locations arriving via Android’s GPS location service were never more accurate than 15m. So I adjusted the accuracy threshold to compensate, and the various follow smart shots started working again (although less accurate than before unfortunately).

And reading the comments above, it appears I said pretty much the same thing I just finished typing a few months ago. D’oh! It’s still true, so I’m leaving it here for posterity. :slight_smile:

That’s not the issue here. (well maybe one part of it). The issue seems that the VFR_HUD message for copter has been changed to report MSL now. Before it reported only rel_alt in that field

As for the accuracy part. The whole location system in the library uses androids FUSED_LOCATION provider. and not just the GPS coordinates. It only updates at 1Hz. If you use an external bluetooth device to get better precision it just doesn’t work well at all. I rewrote this in Tower to only use GPS and hence work better for external GPS units. (this was at the beginning of 2017) I just have had no time to merge it in. :frowning:

I suspect that newer version of Android are reporting the FUSED location with a better inaccuracy that it provides and that is reflected in the algorithm breaking

For this part of the issue is my proposed solution to use GLOBAL_POSITION_INT instead of VFR_HUD message a good one?

Yes… you can use GLOBAL_POSITION_INT

Thanks
I hope to find the time this weekend to open a PR to dronekit/dronekit-android with this little change

1 Like

I did this commit on my fork of dronekit-android

I built Tower with this and for now I have tested only indoor so I wait to test it outdoor before to do a pull request to the main dronekit repository.

2 Likes

I tested the Copter with this PR outdoor and I see relative alt in the actionbar on Tower and Follow Me works.
So I put the PR on the main repository;

1 Like

in any case I do not know if this will have a following, I see no activity both on dronekit-android and on Tower from one year. The Tower app is also disappeared from google play store.

That’s not good! I’ve got an old tablet with it I use often, that I need to retire soon.

What other options are there for android GCS? Just QGC? Does it work well?

SOLVED!!!

Hi everyone,

I’m very happy to contribute and give the solution to SOLVE this problem. There is a new development of Tower call “Mission Maker for Ardupilot” for android made by Aero Hawk Technologies. Follow me works like a charm with last copter beta firmware 3.6.

@rmackay9 and everyone, forget Solex or QGC guys. I haven’t tried QGC since doesn’t work if we have Tower installed. Once you removed Tower, QGC gets serial port used by Tower.

What is dificult to believe is that we did not heard about this app since Tower stoped its developed.