John Easton's boat navigation

Thank you, there is a post somewhere here that shows the beginning of the build, I will try find it.

Nice video and thanks for the logs. Certainly it’s performing better and I think the latest beta will help some more because it fixes a bug that affects the “origin” of a track.

Here are some other things I found in the logs:

  • increase CRUISE_THROTTLE from “10” to “80”. If CRUISE_THROTTLE is 10% while the CRUISE_SPEED has been left up at 3.5 (m/s), this means that to the throttle controller thinks the vehicle can reach 3.5m/s at only 10% throttle. It’s closer to 100% throttle required to reach 3.5m/s. This leads to the I-term having to do all the work to control the speed and this leads the throttle control to be quite slow I think.
  • ATC_SPEED_I can probably be safely increased from 0.02 to 0.05.

The result is the throttle is much smoother than before but I think increasing CRUISE_THROTTLE to 80 would be good for the next test.

For the steering control, it’s doing much better than before but this could help:

  • reduce TURN_MAX_G from “1” to “0.2”. We can see from the Desired lateral acceleration (in red) that the navigation controllers are requesting up to 3.8m/s/s (0.4G) but the vehicle can only do about 1.8m/s/s (0.18G).
  • increase NAVL1_PERIOD from “12” to “15”. This should help stop the weaving I think.
  • increase ATC_STR_RAT_FF to 0.8. Reduce ATC_STR_RAT_P to 0.5.

below is a graph Desired Lateral Acceleration (red) vs Actual Lateral Acceleration (green)

below is a graph of the contribution by P, I, D and FeedForward to the output

Thank you so much for all this information Randy, I can’t wait to get back on the water with these new settings.

I will post today’s results shortly, it was an absolute stinker on the water today, I thought I was going to melt. LOL

No problem. By the way, the parameter to slow the vehicle during turns is SPEED_TURN_GAIN although 3.2 should do a better job than 3.1 did. 3.1 would only slow-down after it reached a waypoint but 3.2 should slow down before reaching the waypoint as well.

Actually the ATC_ACCEL_MAX value should probably be reduced from 5 (m/s) to 1. This is a more realistic value for this frame and should lead to smoother accelerations.

Today I tried the same settings but with a different motor as I thought it might be my hardware in some way.

It turned out to be exactly the same, but the good news is that due to me making so many passes of the same mission, I could see that it was repeating the same error time and time again.

The Error:-
When the craft arrives at a waypoint, it is very accurate (mostly), but as it over runs the waypoint it seems to ‘panic’ and starts taking radical action to try correct this taking 120m before it is back on track.
The tighter the turn to the next waypoint makes this worse.

1 Like

Updated to the latest Rover Beta firmware and all the settings updates as instructed above.

Did 4 passes of the same mission:
Pass1 -

Pass 2 -

Pass 3 -

Pass 4 -

Log File for Pass 4 - https://www.dropbox.com/s/q034qyi3kli8bs6/00000102.BIN?dl=0

Video 1

Video 2 - Look at the crazy angle it took here! This is very aggressive and potentially a big failure in rough conditions!

Comparison between yesterday’s settings and today: An improvement for sure, but the excessive throttle after the waypoint is still a big problem.

1 Like

John,

I hope you don’t mind, I used a picture of your boat in our monthly report. Although we still have a ways to go to get it tuned perfectly, it’s a cool boat that I’m sure others are interested in seeing it.

I’ll reply with a more detailed analysis of the logs a bit later today.

1 Like

Randy,
Not at all, I look forward to reading that report.
Thank you once again.
Regards
John Easton
FishTec HD Fishing Charts
www.fishtec.co.za

Hi John,

I had a look at the logs and a few parameter changes may help:

  • CRUISE_THROTTLE to 35. sorry, I’d asked for this to be raised from 10 to 80 but that was overdoing it. From these logs anyway it appears that at least once the vehicle gets going, 40% is all it needs to travel at 4m/s.

  • reduce ATC_SPEED_FILT from 1 to 0.1. This should further slow the throttle response.

This is what it looks like in the Rover simulator with the NAVL1 parameter from your log. Obviously a boat acts differently than a Rover but this shows what the upper level navigation controller is trying to do. I think this path looks good which means the problems are not in the navigation controller but rather in the lower level steering and throttle controllers.

There is definitely one issue in the navigation controllers though and that is the sudden jumps in desired lateral acceleration when passing waypoints. This is largely the cause of the scary turn at WP76. These jumps appear in your log but also in the simulator so we need a code fix for this issue.

I’ll have a chat with Leonard our control expert to see if he has some more advice.

I’m also planning to ask Peter Barker if he can whip up a boat simulator for us. The key difference I think is the super low friction and also the turn rate of the vehicle is dependent upon the motor output not the vehicle’s speed. I think if we have a simulator it’ll help us with coding and tuning real vehicles.

1 Like

I’ve found that a properly tuned boat in a certain sea state and wind conditions is badly tuned for different conditions. John’s boat not only works in a fluid environment, unlike a rover, but also has a lot of prop steer being that it is a single screw vessel. Auto pilots for manned boats learn as they are being used to adjust for such things. My arduboat is a twin screw and will behave very differently turning to port or starboard depending on how the boat is being effect by windage. I have it dialed in good but I just live with the fact that sometimes left turns are smoother than right and vise versa.

David R. Boulanger

1 Like

Great info as always Randy, I will make adjustments and give it a test.

David,

OK, that’s interesting info. I’m working on getting a RC power boat (I already have the square skid-steering boat) to help with development so then hopefully I can experience some of these issues directly.

One issue that I know we have is how the steering is scaled. Currently it’s scaled by vehicle speed (unless it’s a skid-steering vehicle) which is not correct for one of these boats. I think it should be scaled by throttle output (i.e. more throttle gives faster steering response, vehicle speed is not directly important). The throttle output is also incorrect because it’s not adjusted for the steering angle.

I’ll probably make an experimental firmware to adjust the steering and throttle on these boats and then we can see if they perform better.

Unfortunately no improvement with the latest settings
What should I add or change to this list?
pixhawk%20settings

I have noticed that there is still excessive throttle after the waypoint and trying to get back on track.

Outboard motor type boats don’t like lots of throttle with steering.

With Regard to WP_ RADIUS:-
Is this the radius that the CRUISE_SPEED is reduced to WP_SPEED?

With regard to CRUISE_SPEED:-
What takes preference, 35% CRUISE_THROTTLE or 3m/s CRUISE_SPEED?

Captains Log:- 13 April 2018

More testing today playing around with speed and waypoint radius.

Log - https://www.dropbox.com/s/nnvpoj20jproudb/00000107.BIN?dl=0

Settings -
13AprSettings

Trail -
Major failure between wpt37 - wpt39 !!!

I will be changing WP_RADIUS to 1 and WP_SPEED to 4 for starters

NAVL1_DAMPING: L1 control damping ratio - I would be very interested to see you change this parameter, even outside of its limits because of your scenario.

The range of damping rates work really well for my plane in the air, but they may need to be vastly different for your boat on the ground. It looks like your steering control is improving, maybe now it’s time to try improving navigation.

I think the damping will control a bit of your overshoot after hitting the waypoints. Usually the waypoint radius is set so that the turn radius is about the same as the waypoint radius (so that the next leg is activated at the perfect moment for you to be aligned without overshoot). Your WP_Radius was set too high before, but now it appears just a little too low. It’s good to see improvement.

The other procedure I would recommend is setting a shorter test course for faster tuning changes and changing parameters while you’re monitoring the progress. You can do live tuning. It will save you a lot of time in my opinion, but just make sure to bring a notepad or save your progress so that you can return to settings if it gets worse at points.

Setting a “figure 8” style mission with turns of various angles will probably get things done the quickest, and that way you’re testing both left and right turns.

Here’s a video showing the repeat (Do Jump mission command) https://www.youtube.com/watch?v=-ph182oROT0. I would recommend a course like this:

Thank you Nathan, yes, I look forward to testing those NAVL1_DAMPING settings. If I look at the loops created after the mission in Loiter they have a radius of 15m, I presume I should use that as my turning radius?

As far as making changes to parameters wirelessly, this has never been possible for me as I can link to the board, but have never been able to make parameter changes and save them. This is what I have been using - https://rcworld.co.za/product_details.php?proid=161