Rover 4.5.2 Large Raft tuning help

Hi guys,

Sorry for this TL;DR post.

So, I have this huge raft that I’m trying to control using ArduPilot (I’m riding along at all times, so very little risk for collision with others) . But I’m about to give up on the tuning, so looking for some advice on where to focus going forward before I bury the project.
The raft is 4x10 meters
3 rows of pontoons. Rounded underneath, so basically no keel.
Dry weight approx 1500kg
Powered by an electric outboard (Haswing Ventura 5.0) i.e. Vectored thrust
FC is Matek H743 Slim V3 running Rover 4.5.2
GPS is Holybro M9N DroneCAN
Telemetry via ESP32 (Dronebridge)
GSC is Mission Planner
Max speed is about 2 - 2.5 m/s but I usually cruise around 1.5-1.9.

The steering angle of the outboard is controlled using a home built servo (stepper motor with pulley and feedback pot). It’s not perfect, nor fast, but it works for me in manual mode. Driving this vehicle manually requires a constant flow of small corrections to keep her straight. It’s just that I’m unable to teach the FC to do it as well as me.

The throttle is electronically controlled using a microcontroller with a digipot that’s emulating the throttle signal from the original throttle lever.

On the tuning part. I think I’ve successfully tuned the speed/throttle controller reasonably OK. But the Turn Rate controller overshoots a bit, which I ultimately think makes it impossible for the navigation controller to do a proper job. And the only way to get that somewhat OK is to turn down the turn rate gains by a lot. Or cap the ATC_STR_RAT_MAX (it can do around 7 if unlimited). But even then, I can’t get it to complete an auto mission without weaving big time.

I suspect, due to its weight, there is too much mass involved, that makes it 1) slow to react to “desiredpid” demands, and 2) overshoots if too agressively tuned and then turns into weaving. My servo is not fast - takes about 6 seconds to go full left to right, but most of the (manual) navigation takes way smaller corrections to keep it on a straight path. So the effective time of changing the angle is much less. I just mean the servo is physically able to do it. The question is if there is a chance I can get Rover to do the same?

For some time I thought the problem was mainly the PSC_POS_P parameter being way to high for the vehicle. I reduced it to 1E-13 which I think improved things a bit. But I’m not that sure anymore.

I have some logs. But unfortunately I don’t have any clean runs where I’m not changing any parameters during the sessions. So just providing what I have here.

I have some logs, even though I realize the testing has not been very structured.

A session where I did some auto. Got a bad gyro error (I think due to rebooting the FC on a wavy lake, when not being still…) but hopefully that’s not the issue here.
https://www.dropbox.com/scl/fi/w55f6xqggsbjzvdbw7tf8/00000105.BIN?rlkey=48ecm37awghnl5v5t3g146hpk&st=urc5as0v&dl=0

A mix of everything, not sure if useful
https://www.dropbox.com/scl/fi/ikknjx9gchp3s1jg5fj0m/00000106.BIN?rlkey=7xxjulbf0bmxb1xpfea6e9i8i&st=plg1wsr4&dl=0

I think mostly driving around in Acro (trying to tune the steering rate controller)
https://www.dropbox.com/scl/fi/xkmea9y2ubadauqi44vnl/00000107.BIN?rlkey=tqienq2ulbfdzqjkb9lybr82l&st=ciq4da7r&dl=0

If the logs are useless, I’m happy to collect new ones based on instructions.

Where should I focus next? Improve my servo agility? Just spend more time on tuning the rate controller? Please be nice :slightly_smiling_face:

Any help is very much appreciated.

Best Regards,
Andreas

Skeptical that it will provide a good tune but you could try the Quick Tune Script anyway. Nothing to loose!
Quick tune
I imagine it’s going to be a very large circle…

1 Like

To clarify, because I was corrected a while ago regarding the code of conduct:

“ArduPilot is NOT certified for use in applications where ArduPilot is effectively in control of human lives.”

So benign applications like ride-along sensors, slow speed ground vehicles with appropriate overrides/safeties, and potentially (depending on the implementation) even wheelchairs do abide the guidelines. If your raft takes flight…we have a much different discussion at hand :rofl:

cool project - love to see a video, or at least a photo (especially if it takes flight)

Tried it already but it never seemed to actually kick off. Not sure if it’s due to the poor turning performance, compared to small vehicles?! (too small G forces maybe?).

@Yuri_Rage I’m sure it wont take flight (unless I misunderstand what you really mean by that :slight_smile: )

I’m well aware that ArduPilot is not designed or intended for manned applications. Hence I’m doing this with the utmost respect of safety of myself and others. The lake (and area) where I’m operating is very quiet with almost no other boats or people. I can physically cut power at any time and also drop an anchor. And even if 1500kg+ obviously could hurt (kill) on collision, even at low speeds like 2m/s, it gives plenty of time to react to avoid that.

I think the main risk with me doing this is if I inspire someone else to do something similar less safe. But I hope I’m a good advocate :slight_smile:

Thanks @paul_arthur , Me and my family enjoys it very much.

I shot a video yesterday but the wind was crazy so the audio was very bad. I’ll shoot a new video in the coming days and let you know where to find it.

1 Like

It’s been a while now and I’ve been busy working on improving my steering servo. The previous design was way too weak, slow and unreliable. The new design has a bigger motor and can respond very rapidly and has been rock solid. Now I still struggle with the tuning, primarily the turn rate. I’m following the tuning docs, driving around in acro mode. And from what I understand, Acro mode should also act like heading hold. Meaning, once I put the vehicle in a certain heading, it should keep that, even if external factors like wind is affecting.

What I see is that when I have a tune that is pretty OK, pidachieved is lining up pretty nicely with piddesired. But if returning the steering to center (piddesired = 0), pidachieved gets there (or close) but eventually wanders off to either side of it (probably due to wind and/or fluid dynamics). At that point, when achived is getting farther from desired, what is the main tuning parameter that would get it to react faster and get it closer to desired again?

Haven’t shot a decent video yet, but including some pictures here at least.




A bit messy in the electronics compartment at the moment as I had to redesign the steering servo and move things around. But it works great.
Matek H743 Slim V3 in the transparent enclosure, together with a pair of arduinos for steering and throttle management.

Just posting an update here now that I’ve finally managed to dial in a solid tune for my vehicle. Here are some key lessons I’ve learned along the way:

  • The tuning guides are excellent, but if you’re working with something large or out of the ordinary (like my 4x10 meter behemoth), the PID values you need may differ significantly from what you expect after reading the guide. After many hours of experimenting and observing, I settled on FF = 0.25, P = 2, I = 0.1, D = 0.5. These could likely be improved further, but I’m hesitant to mess with them now! :slight_smile:
  • The PSC_POS_P and PSC_VEL_P values had to be reduced significantly, even below the “minimum” recommended values.
  • I struggled with navigation not cutting corners, even after increasing WP_RADIUS substantially. My craft kept heading all the way to the center of each waypoint before turning. I eventually realized I hadn’t properly tuned the acceleration/deceleration parameters, which likely caused the system to expect unrealistic rates, leading to overshooting in the corners. After adjusting those, it immediately started performing smoother turns.
  • If you’re building your own servo, like I did, make sure it’s responsive and reliable. This was crucial in achieving consistent performance.

Big thanks to the team behind this project – the software is incredible. You just need to invest the time to fine-tune it for your specific vehicle.

1 Like

I’m not sure if this is the correct way to “fix” this, but after countless hours of trying to tune my mower to accurately hit way points and not over shoot I stumbled upon a solution gps and ins position offsets. A higher value makes it over shoot, a lower value, negative in my case, actually made it undershoot which was a pleasant surprise in my case. Seems wrong to lie to the controller about the position of the gps and controller, but I’m amazed how well it worked. Also how closely is your heading matching up to GPS heading?

Interesting. I’ll have a look at the headings tomorrow if I get a chance.

Re: position offsets: you are potentially discussing offsetting errors, which can be surprisingly effective but terribly difficult to troubleshoot if ever anything changes.

Regarding GPS heading - you are asking for a naive analysis of GSF performance on a vehicle with different hardware, which likely makes no difference to your own use case.

Yuri would be the guy to listen to if you want to correctly fix the issue as he actually understands how these work and why it might behave this way.

In my experience, I haven’t been able to pinpoint the cause of this WP overshoot trend for months, then I got a tip from a member on here and I’m grateful for that, just wish I would have tried it sooner.

With that being said, sounds like I should stay in my own lane and not spread this sort of info into other people’s threads, I wish you luck my friend!

You’re certainly not wrong to inquire, and I don’t want to stifle too much discussion. Your gut feeling about fixes that clearly provide inaccurate details to the autopilot is correct, and it’s a good observation that the net effect can be positive. But when you start down that path, it’s often hard to troubleshoot undesired side effects.

I also think we have some work to do on the waypoint arrival trigger for Rover 4.3+ firmware, so your struggles are real. However, this is a minor issue overall, and very good results should be achievable.