Rover Steering Setup for Big Craft / Vehicles

Cool to see the video and thanks for the log.

For speed control we still see significant overshoot when the boat first starts moving but I hope this will be fixed when ATC_ACCEL_MAX is reduced to 0.5. I actually don’t think it is useful to set ATC_DECEL_MAX to a non-zero value at this point.

The steering control is still not performing well. Below is a graph of the desired turn rate (in red) vs the actual turn rate (in green) and we can see that the actual is far far below the desired.

It looks like maybe MOT_VEC_ANGLEMAX is still zero?

Also do you see these impossibly high desired turn rates? … and see how quickly they climb to these impossible values? This is because the ATC_TURN_MAX_G, ATC_STR_ACC_MAX and ATC_STR_RAT_MAX values have been left at very high values. I really think it would be best to return them to the values I suggested.

Thank you Randy once again.
[EDIT] Here is the log - Dropbox - JohnEaston20211231.BIN - Simplify your life

Just got off the water after testing again today.
These were my findings:
1 - ATC_ACCEL_MAX at 0,5 works well and ATC_DECEL_MAX is at 0
2 - I personally don’t think the desired turn rate is achievable with this craft
3 - MOT_VEC_ANGLEMAX was set to 21 but strangely enough it seems to be back to 0 today, not sure how that happened
4 - ATC_TURN_MAX_G at the suggested 0,15 does not work at all, the craft veers completely off course and battles to make the next wpt completely, but when changed to 1,6 it seems to work quite well. Pushed this up to 3 and the only difference was excessive throttling after making the wpt then heading to the next one. I have taken this back to 1,6
5 - ATC_STR_ACC_MAX and ATC_STR_RAT_MAX when changed from 360 and 180 respectively, the craft once again starts to wonder way off course in big turns so I put them back to default.
6 - ATC_STR_RAT_FF changed from 0,1 to 0,8 and there is very little change.

With my current settings the craft does very well on obtuse angle heading changes from wpt to wpt, but when an acute heading change is required, things go bad. I will explain this in detail in another post.

You’re making very large changes in the bounding parameters. Make some smaller changes, particularly to the g, rate, and accel max params. You need to clamp that desired rate and force it to be achievable, or the turns will always frustrate you a bit.

1 Like

I have just been reading where you and Randy are working on S-Curves - Rover S-Curves alpha testing - #33 by rmackay9

This is very interesting!

As a footnote, I believe setup is 90% about the craft and 10% parameters.

1 Like

Saw your social media post regarding wild turn behavior when the waypoints are close together. This is almost certainly a function of WP_RADIUS being greater than the waypoint spacing. DO NOT mess with your L1 controller parameters trying to overcome it. You will assuredly make it worse. Instead, find a way to space those waypoints farther apart.

1 Like

I agree with this, the waypoints are too close together for the machine to make the angle of turn in time, and the bigger/heavier the craft, the further the waypoints need to be apart.

Unfortunately a lake’s shoreline dictates the waypoints required to cover the smaller bays adequately.

You may be forced to create two or more missions and append one to another. As the waypoints begin to crowd, draw another polygon that ensures full coverage (with some overlap) but eliminates the waypoints that encroach upon one another…

@John_Easton,

Thanks for the log although it looks like it might be the wrong one. The vehicle doesn’t seem to be moving at all and remains in Manual for the whole log.

Part of the problem with having the very high ATC_TURN_MAX_G values is that the vehicle will not try to slowdown before a waypoint in order to turn the corner. … and it will also end up with massive I-term build up.

… anyway, let’s see the log when it is available…

@rmackay9 ,
Sorry about that, I got another one today and will put it up later.

1 Like

It appears the craft is doing what the machine is telling it to do even when the Rover setup as per Rover documentation is not possible for large craft.

1 Like

Your video does not appear to show any impossibilities. What I’m seeing is a craft that’s well on the way to a good tune but could benefit from a reduced WP_RADIUS and slightly longer NAVL1_PERIOD.

Additionally, your turn rate parameters look too aggressive - they are frequently overshooting - not “close” as you claim in the video. I suggest you reduce ATC_STR_RAT_P by quite a bit (even zero it out and see what happens). In fact, before changing the NAVL1_PERIOD at all, get that steering rate tightened up!

2 Likes

Thanks Yuri, I will give that a go in the morning.
Much appreciated as always. :slight_smile:

1 Like

Really nice to see the video, thanks!

I agree with @Yuri_Rage’s suggestions.

@Yuri_Rage, I think that when John talks about impossibilities he means that the desired turn rate is really huge, much higher than what the vehicle can actually achieve.

These impossible values come from the very high ATC_TURN_MAX_G and I think the reason it doesn’t drive well when John reduces these limits is the turn rate controller is underperforming (probably because the ATC_STR_RAT_FF is still too low) meaning really high demands are required to get the vehicle to turn at all… anyway, looking forward to the next log.

… I think we’re getting there…

2 Likes

No doubt that an autopilot designed for control of a Copter at extremely fast update rates with very responsive motors has been an uphill battle for the dev team and users alike when it comes to controlling ground-based vehicles. But I see possibility, not impossibility!

2 Likes

Here is the log from today … even better

First, that looks great by comparison to where you started!

But I must apologize for suggesting that you should decrease any steering rate parameter in my last message - I must’ve mistaken “actual” and “desired” for one another when watching your video.

In the log, it’s very clear that actual turn rate never comes close to desired, as Randy observed. I think by decreasing ATC_STR_RAT_FF the way you did (probably at my mistaken suggestion), you probably masked the NAVL1 oscillation, making the tune appear better, but actually hurting performance.

I fully agree with Randy that to achieve best results, we need to get the steering controller behaving better by reducing ATC_TURN_MAX_G significantly and then driving ATC_STR_RAT_FF up accordingly. This will feel like going back to the drawing board, but the outcome will be far improved if you stick with it.

For your next session, go with Randy’s suggestion of ATC_STR_RAT_MAX=50 and ATC_TURN_MAX_G=0.15 (or very slightly higher). Set ATC_STR_RAT_P=0, and get aggressive with ATC_STR_RAT_FF - a value of 2 or more may be required (but increase in small increments - erratic behavior is highly possible if you set FF too high). We can add some P and I values into the mix as necessary once FF is increased enough to achieve a decent turn.

Also, I’m still seeing room to decrease that WP_RADIUS value. The turns are happening earlier than necessary in most cases, and we know your boat can achieve turn radii of half the set value.

Lastly, your throttle still appears to be saturating quite a bit with your imposed limit of 45% - it’s probably worth allowing a bit more throttle range if you can.

EDIT:
And a small footnote - if you elect to just accept a poor but seemingly well-behaved tune, the vehicle will probably behave predictably so long as conditions are nearly the same as during the test/tune sessions. However, when a variable changes (like wind, chop, etc), things could get out of hand very quickly because the controllers are already performing poorly despite observed “good” results.

I experienced a lot of that while tuning my mower. It’s very easy to arrive at offsetting errors that make the results look very pretty, but one hard jostle could cause things to go badly, oscillating out of control rather than dampening and regaining course/control.

2 Likes

This is on my to-do list for tomorrow, thank you for taking so much time with this.

2 Likes

You’re quite welcome! I just tuned a very small Ackerman-steer Rover today and dealt with the opposite problems you have - everything is very twitchy and responsive. After about an hour, I had very acceptable results using much the same approach as we’ve used for your boat. The experience really underscored the importance of the ATC_TURN_MAX_G, ATC_STR_RAT_MAX, ATC_STR_ACC_MAX, and ATC_STR_RAT_FF values. I never even had to touch ATC_STR_RAT_P, I, or D (all zero), and I suspect we will find similar with your boat, despite the polar opposite challenge.

1 Like

I certainly hope I can get this right and get a better understanding of what does what in my application.
I only wish I lived right on the water then I could test straight away, but it’s a bit of a drive to the lake.

1 Like

Yuri, where should I start with the NavL1 Period and Damper as this is going to have a huge impact as I pop it into auto?

Currently I’m on Period 7 and Damper 4