Hi,
The mavlink method SetHome(0,0,0) stopped working on Copter 3.6.0. I used to use this with dronekit, to save the current position as the Home position.
Eduardo,
Thanks for the report.
In this case the vehicle has a GPS? So you’re trying to move the home location and possibly lock it so that it doesn’t change when the vehicle is armed? … or maybe you’re moving the home location after the vehicle is flying and you want to control where it returns to when the vehicle next RTLs?
… I just want to distinguish this from another potential issue where someone might be using AP in a non-GPS environment and wants to tell the vehicle where it is in the world.
Hi Randy,
The vehicle has GPS, and I lock the home position before start the operation, because in the operation I stop the vehicle in another position, disarm, and arm again, and I don’t want it to save the new home, but keep the starter one.
Are you in a position to test my PR here?:
Peter
Sure. I never did, can you point me the instructions?
What have changed? It stopped working in 3.6 intentionally (someone decided to remove this feature), or got broken because of other changes?
Sure. I never did, can you point me the instructions?
I’d have to compile a binary up for you and place it somewhere - unless
you’d like to learn how to do that?
What have changed? It stopped working in 3.6 intentionally (someone decided of remove this feature), or got broken because of other changes?
Well… I’ve just tested setting home on Copter-3.6.0 and it does work
for me.
I tested it by firing SITL up and right-clicking and saying “set home”. I
then took off and said “rtl” - it went towards the set home. I landed the
vehicle (mode land) and it disarmed itself, and home did not move. I took
off again and rtl’d and it again moved towards the set-home.
Peter
From looking at the code it seems we have had a change in our handling of DO_SET_HOME.
In Copter-3.5 we would set the home location to the current location if param1 = 1 OR lat, lon and alt were all zero. In 3.6 it seems we only support setting home using param1.
I’ve created an issue and although I need to discuss with some of the other developers I think/hope we can fix this for a point release. Txs for the report!
Thank you Randy, that would be helpful.
Yes, I would like to learn to do that. I can compile and upload the code, I just don’t know how to access you PR. Is it available as a branch in the original ardupilot github?
This becomes a Git question then really… we have some advice here on using Git with ArduPilot but the short form is that you’ll need to:
- git remote add peterbarker https://github.com/peterbarker/ardupilot.git
- git fetch peterbarker
- git checkout peterbarker/name-of-branch-in-his-repo
- git submodule update --recursive
Hi,
Sorry for the delay. I got involved on other tasks and missed this. The @peterbarker PR does not work for me (setHome on dronekit android at least). Probably the way to go will be to return the code that was changed from previous versions.
Best,
Eduardo Mendes