Rover/Boat QuikTune alpha testers wanted!

Hey Randy,
I have just got back from a 3 week survey on one of our largest reservoirs in South Africa, the Vaal Dam, and had all sorts of conditions from perfect glass to howling winds with storms and large chop.
In summary, the boats handled exceptionally well albeit that the QuickTune would not get past the ‘Steering’ stage of the test due to the large size and design of my craft.
The only thing I notice that is still a bit of an issue is the OVER THROTTLING on a turn. Yes, a boat does need some throttle to do a turn but it is just a hair too much. Is there any parameter you can suggest to control this throttle just on the turns?
BIG THANK YOU to you and the team as always, you are doing an amazing job.

1 Like

I want to run autotune on a new boat. This boat has no telemetry. Is there a way to know, without telemetry, when the tune is complete?

Hi @iter,

I can’t think of a way that you would know for sure. Perhaps you might notice that it hasn’t done any shaking for a while. … probably best to just get a telemetry system though.

-Randy

OK. I’ll try to squeeze one in.

OK, I have telemetry. Now I feel very silly. The instructions tell me to set RTUN_ENABLE = 1, but I don’t see RTUN_* parameters in the parameter tree page in MP. I’m running ArduRover V4.4.0-beta7 (f3d3a226) from MP beta download.

Ari.

image

Either the script isn’t running or you need to refresh the parameters.

Yeah, OK, now I feel even sillier. The RTUN_* parameters are coming from the script. They showed up next time I booted (refreshing params would probably have been enough). Thank you @Yuri_Rage .

Ari.

I tried to run quick tune, but it appears that I’m missing something in my setup. The log is here: https://github.com/arikrupnik/ardupilot-config/raw/master/logs/SURFACE_BOAT/19/2023-10-10%2014-11-25.bin
I know the script is running and the relevant 3-position switch is registering. If I try to start tune without arming, I get RTun error messages.

With the boat in the water and running, I switch to CIRCLE and then try to tune. I see no RTun messages, and no apparent tuning behavior. (Photo after pulling the boat out and disarming)

pic1 show your GPS is not locked ,and pic 2 the gps is 3dfix you should trun it to circle mode ,and ,set a RC chanle as scripting1 .
Setup an RC auxiliary switch to “scripting1” by setting RCx_OPTION = 300 (“scripting1”). Low position stops the tune, Middle position starts the tune. High position saves gains (if a tune has completed successfully). Alternatively MP’s Aux Function screen can be used (this is my preferred method).

Thank you @admired. I read @rmackay9’s instructions. I also read “NO GPS” on my TX. My purpose in posting this image is to show that the script is running and a switch has been configured as 300 and the script is recognizing this switch and the script is able to send messages to GCS and GCS is displaying them. In other words, I have performed rudimentary troubleshooting and have eliminated the failure modes you enumerate, plus some others. I also posted a link to the log file that corresponds to the second image, in case you want to verify, e.g., RC7_OPTION = 300 or the value of RC7 through the log. The photo shows no messages from the script, despite the switch toggling from low to middle.

Hi @iter,

I had a look at the log file you posted above and while the script is creating the RTUN_ parameters it is not displaying any messages even when the auxiliary switch is moved to the middle position. It looks to me like the script has stopped for some reason but normally there should be messages sent to the GCS explaining why the script has stopped. The only other way that I know of is if the user has manually stopped the script using MP’s “scripting cmd stop” feature but it’s hard to imagine you’ve executed this.

. So I’m at a bit of a loss to explain why the script isn’t running. I’ve just tested it here in SITL and it seem to work fine. Others have also been using it so I’m not sure what’s happening although I suspect it is local to the autopilot being used.

Maybe you could check these SCR_DEBUG_OPTS bits?

I wonder which version of the script you’ve loaded. It should be the version from the Rover-4.4 branch although the “latest” version will probably also work.

By the way, I noticed that the servo outputs are non-standard. Servo2 output is configured for the steering servo and Servo4 output is configured for throttle (output). Servo3 is RC3InScaled which makes me think that perhaps you’re manually controlling the throttle output with the RC3 input. Doing this won’t allow the speed/throttle tuning to work because it needs to control the throttle output.

Thank you for looking into my log, Randy. I took the script from the link in your first post in this thread, which is the tip of Rover-4.4. If there is a specific git hash you recommend, I’m happy to try that.

I am equally confused about this behavior. I posted the first photo to demonstrate that the script not only creates the relevant parameters–but in other circumstances it communicates successfully with the GCS. I have not stopped the script manually. There is no SiK telemetry on this boat–there’s no room in the hull, if you can imagine that. The only telemetry I have is FrSky passthrough and Yaapu on OpenTX. No SiK, no MP connection while sailing.

The input AND the output order is unusual on this boat. The input order follows the unusual order from this particular boat’s original 75 MHz transmitter. You can see my RCMAP_* values. The output order–you are going to laugh–is the result of cramped quarters inside the pressure hull. I literally had to choose servo pins that had enough headroom to fit inside the water-tight cylinder and clear the insane submarine plumbing. The passthrough SERVO3_FUNCTION=142 connects RCMAP_PITCH=3 to control dive planes. Throttle and rudder settings are correct to the best of my understanding.

One question that comes up, although you haven’t mentioned it in the list of parameters in your instructions, is LUA memory allocation. Is the default SCR_HEAP_SIZE=204800 sufficient, or do you think the script is running out of that?

Ari.


Hi @iter,

That is a truly awesome vehicle.

I think the SCR_HEAP_SIZE should be enough. I wonder if you could connect a USB cable to the autopilot and test running the script while it’s on land? Maybe then some messages will appear.

Failing that a manual tune is in order I think. It should be fairly easy to get the speed/throttle tuned just by setting up and auxiliary switch to “Learn Cruise” and then drive it straight forward at 100% throttle. Instructions are here.

Then for the turn rate controller it can be done in real-time and really the most important parameter to get right is the ATC_STR_RAT_FF.

1 Like

Thank you for saying this.

I have done that, and the same messages appear in MP as in the Yaapu screenshot.

Ari.

I would also suggest tuning manually. You are not guaranteed a better tune with Auto Tune. Absolutely try it after working out your issues in running it but be prepared to return to the Manually tuned parameters.

1 Like

Hello!

What is the basis for determining the CIRC_RADIUS value for a boat?

@Zoli,

Normally between 10m and 20m should work. The radius needs to be small enough that the vehicle turns at 10deg/sec or more… so it also depends upon the speed of the vehicle…

Hi,

You may have misunderstood me.
It’s about an 85 cm RC small boat…

Will the new quick tune option be integrated in the new public FW?

THX :slight_smile:

Hi @Zoli,

Really sorry about not seeing your response here.

Yes, QuikTune is included in 4.4. I’ve got a new version that we will probably backport to 4.4 and will certainly be included in 4.5.

… but to be clear what “integrated” means, Lua scripts are always separate from the main flight code binary so an extra step to install them on the autopilot’s SD card is always required.

image

Hello @rmackay9.
Thank you for releasing the quiktune script. We’ve used it successfully in the past for our autonomous boat to do some bathymetry work. We recently changed the hull and did a recalibration and retune but have found a significant variance in those sine curve patterns along our navigation path. Had speculated that it could be due in part due to accuracy limitations with WAAS corrections but some of the other comments in this thread make me think otherwise. Additionally there was an error in the logs with the dates recorded, unsure of what caused that but we’re not getting that issue anymore. We’re using Rover 4.4.0beta8. I’ve attached the pre-tune and post tune parameters as well as our tuning log below. We ran the script twice. Any suggestions to help us improve the system are appreciated.
Log: 00000018
Calibrated param 2024.1.29 Thruster Fix.param (15.5 KB)
Post Tune Params.param (15.5 KB)