Switch Missions 'on the fly'

hi @Target0815
thanks for the link! As I understand it, this script saves the mission to the controller’s memory? The next step is to use saving the current mission to the SD card.

TESTERS WANTED!

Hello @Target0815 @McKey @Yuri_Rage @HaBa @Allister and all other users of that script.
I started a PR for pulling that script into ArduPilot codebase.

Therefor I tuned the code a little and prepared a document.

Please see last posts for last lua-file.
SM_SwitchMission-md.txt (3.3 KB)

It would be great if you could test the latest version and leave a comment in GitHub or here.
Thank you in advance

1 Like

I wish I could offer some help but winter has set in here with vengeance so only hangar flying for me for the foreseeable future.

@Allister No clue where you are living, but here in Germany it’s just the same :o(
One hour a week in a tripe gym is the only possible activity.

I will test on Pixhawk 2.4.8 version of rover.

1 Like

I’m in Canada so spring is a long way off still. If I have any luck bench testing I’ll let you know.

1 Like

I improved the return structure and avoided the return of a nil-value.
For test and using you should download that updated Script (14.12.2022) :
SM_SwitchMission.lua (11.3 KB)

1 Like

Hi @Quaxwilly!
I tested your last script. Everything works fine!
Tested on Pixhawk 2.4.8 and the latest stable version for the rover. The radio was a Radiomaster TX16S.
Thank you so much for your hard work!

1 Like

@McKey Thank you for testing and the positive Feedback.

1 Like

Hi all, i just stumbled upon this. I was asking late 2022 about exactly this function and wondering how i might be able to achieve the switching of pre loaded missions via the transmitter without connecting a GCS. Is it difficult to implement this script? Or has it been added into the ardupilot code? Do scrips like this just run on the transmitter and somehow send a mavlink command to select missions or is it new code on the fc which makes this possible?

I don’t think so, if you read the introduction in the WIKI ( Lua Scripts — Plane documentation ) and regarding this script the thread here. Willy Zehnder @Quaxwilly has written a detailed script guide: Switch Missions 'on the fly' - #44 by Quaxwilly

LUA scripts run with Arduplane on the flight controller. Not every controller has enough memory capacity to run LUA scripting. It works very well e.g. with the Mateksys F765 and H743 boards.

Rolf

1 Like

Thanks for the reply, I cant wait to try it. Ardupilot is completely addictive and exciting, but can be very frustrating aswell.

Thank you @Rolf for the really quick response :smile:
@Scott_Nunan It would be great if you would post a feedback here after your try, because the developers are waiting for positive feedback of testers before they will merge that PR in the example-code.

No problem Willy, I’m not far off being able to test, i have installed flight controller and done the first drives in manual and acro a few days ago so hopefully will be soon.

Is nobody interested in testing that script?
Or too lazy to write some lines? :wink:

Hi Willie I’ve tested the multi position switch method and it worked perfectly, i will also set a larger number of missions and try the button method for cycling through the missions.
I should be able to test this over the weekend.
Thanks again for your work, it achieves my objectives very well and this was one of my major concerns of how i was going to choose different way points without a gcs. Now we can

1 Like

Other than a post here in support is there something that you’d like to get it over the line like commissioning document testing the functions and failure modes or something?

No, only a user-test and a short notice what you tested is sufficient. We don’t need a CMM Level 5 test :wink:
Your previous post is perfect - thanks!

@Scott_Nunan did you have you a chance to test it?

Life got in the way last weekend for the mission toggle testing on the water.
I could test it here at home but I’d be just relying on the status messages to indicate that the mission had loaded rather than checking the auto mode like I did with the switch