ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Copter: resume auto mission at last waypoint even after reboot

Open roque-canales opened this issue 10 years ago • 12 comments

pause auto-mission, it works, but there is possible to move current waypoint number variable to eeprom? like this even when copter no finish big mission, and when it rtl, land and we change batteries (reboot), when we restart mission, automatically copter go to waypoint targeted just before rtl?

roque-canales avatar Aug 13 '14 21:08 roque-canales

also I noticed that when switch back to auto mission mode after having paused, all the functions such as do_set or condition_ commands are not reactivated, it would be possible to ensure that all (or the last ones) of the do_set_ and conditon_ be before current waypoint be reprocessed when switching back to automission?

roque-canales avatar Aug 13 '14 21:08 roque-canales

My view is that resuming at a particular waypoint even after a reboot is something that a ground station could handle better. For example allowing the operator to start the mission from any waypoint (i.e. one before the last one executed).

rmackay9 avatar Aug 14 '14 02:08 rmackay9

Okey, so it's enhancement for mission planner.

I will test MP Actions buttons like set waypoint,mission start... and I will feedback it in MP Issues/enhancement.

roque-canales avatar Aug 14 '14 07:08 roque-canales

Randy, we can implement this feature directly in pixhawk.... Saving current waypoint to eeprom (alias full parameter tab list) And reloading commands before this waypoint following this: takeoff command last Do-Set-ROI last Do-Change-Speed last Do-Set-Home last Do-Set-Cam-Trigg-Dist last Do-Set-Relay last Do-Repeat-Servo

What do you think ?

roque-canales avatar Aug 17 '14 14:08 roque-canales

i have been working on my old apm 2.6 for a while with firmware version arducopter 3.2.1 . While testing the AUTO mission, i found that the arducopter does not support resuming to the last waypoint once the AUTO mission is interrupted, and instead restarts from waypoint 1. Is there a way we can do that? like, by changing the source code? or is there already a solution to that in newer firmware verions?

samannoy avatar Jan 12 '17 10:01 samannoy

@samannoy your question was answered in https://github.com/ArduPilot/ardupilot/issues/5550 and is different than this issue which is about continuing after a reboot.

magicrub avatar Jan 12 '17 18:01 magicrub

I'd like to change my opinion from what I said way back in Aug 2014.. I think we could add a new parameter to the AP_Mission library to store the last active command and then when the user switches into Auto it resumes from the command number stored in the parameter. We'd need to be careful that it's properly cleared when a new mission is uploaded I think.

rmackay9 avatar Sep 04 '18 08:09 rmackay9

Randy,this idea is very useful, for example for sprayer drone, if when liquid level sensor declare the tank is empty,active the RTL failsafe, Resume the auto mission and save last Wp for refilling the tank or change the battery if it necessary.

babakmtd avatar Sep 17 '18 10:09 babakmtd

This would be useful for Plane as well.

Naterater avatar Dec 28 '18 21:12 Naterater

On Fri, 28 Dec 2018, Nathan E wrote:

This would be useful for Plane as well.

I wonder if we should just store the current waypoint in a parameter....

peterbarker avatar Dec 30 '18 10:12 peterbarker

Hey, I wonder if this functionality has been added to the Ardupilot firmwares yet. If not, I was thinking of a Lua Script based solution, where the script would write the last waypoint index that the vehicle had covered before disarming/rebooting to a file (on the SD Card). And Based on a custom parameter (say RESUME_LASTWP; 0 = Do not Resume, 1 = Resume the Mission), the copter would travel to the last waypoint index that was written to the file before rebooting.

SuyashMali avatar Apr 25 '24 06:04 SuyashMali

Hi @SuyashMali, yes, that would work I think. Instead of writing to the SD Card the script could store the waypoint number in a custom parameter. In any case, good idea!

rmackay9 avatar Apr 25 '24 23:04 rmackay9