The Greatest Puzzle of All Time - Path Wobble

You are correct. That is why it appears to be a navigation controller problem, not a position/attitude estimation problem. That kind of oscillation happens to me when my L1 period is too low for my plane.

Nathan I am currently using L1 Period of 8, if I go higher the drift off the path is increased dramatically

I remember reading you can use a recorded log as a simulated file, maybe that will give us some answers, in particular what the heading was doing at that point (3:55:45) when it told the craft to start wobbling

185 has the wobble

Have you tried raising


How can we check what the compass was doing at 3:55:45?

@John_Easton. The most perplexing thing about this is it happens and then goes away. You are also using developer code with the vectored thrust. I did my best to look through your log and I can’t see anything unusual that happens to cause the boat to get in a funk. However, I did notice somethings that can be seen in the graphs below. Your Y axis vibes are high. But then again it works most of the time. NAVL1 is 6 which seems a bit low to me but yet it works most of the time. The Throttle out and desired throttle Vs. throttle are slightly suspicious to me. But again it usually works. I see you run your missions at 4 m/s. Your CRUISE_SPEED is set to 1 and CRUISE_THROTTLE is 5. Perhaps setting CRUISE_SPEED to 4 and figuring out what the CRUISE_THROTTLE should be would help the algorithm.

How can we tell what heading the compass is reading just before the wobble starts?

I’m not sure but I looked at des yaw / yaw and desired yaw looked correct but not so good on actual yaw. To me it looks like the controller new where to go but something prevent the desired actions. To answer your question I don’t know. I’ll look at it again

Thank you David, I know Randy is going to be releasing a brand new Rover (from scratch) this year.

That will sure get rid of the bloated code and unnecessary features

Well I have looked at all 3 mag’s and imu’s and I don’t see anything that looks like a hardware problem. I hope you get this solved. Sea monster maybe.

WOAHHHH. My NVL1-DAMP = 0.75 and XTRACK=0.02

I wonder if that damping gain is far too high and causing the oscillations.

Its a typo I think. His included log has NAVL1_DAMP @ .9 and XTRACK @ .02

yes, sorry, that is correct. I was looking at an old printout


If you were to build a controller for a boat, what would the bare essentials be from a controller perspective?

I understand that a plane, and especially a multi rotor drone requires a very complex controller, but surely a boat is position, heading and throttle - DONE!

I think this issue is caused by a feedback between the throttle controller and the navigation controller. So the L1 controller uses the vehicle’s current speed to decide how quickly it can turn back onto the line. So if the vehicle is currently moving slowly, it will turn back onto the line more quickly.

The vehicle’s speed control is very uneven during turns (sometimes) and I think this is leading to the navigation controller demanding changes in the turn rate which leads to the wobble.

One possible code solution is to change the L1 controller so that it accepts a desired speed and uses this instead of the current speed. Another solution is to sort out the speed controller so that it doesn’t oscillate during some turns.

1 Like

Yes, that makes sense, especially in the real world of boating.

You definitely need throttle / thrust for turning, but it has to be constant and gentle.

1 Like


As mentioned here and there, I think there is a feedback loop between the throttle controller and the navigation controller and perhaps it is made worse by some physical effect like the speed at which the boat begins to plane on the water.

The underlying cause of the wobble is the poor speed control. Because the navigation controller uses the current speed to decide how quickly it should turn back onto the line between waypoints (instead of the desired speed) the oscillation in speed turns into a steering wobble.

To fix the problem we need to improve the speed control. Below is a graph of the desired speed (in red) vs actual speed (in green). See how a small dip in desired speed turns into a massive drop in actual speed? This is the problem we need to fix.

Could you try these changes?

The two changes below should help smooth out the speed control response
ATC_SPEED_P = 0.1 (was 0.2)
ATC_SPEED_I = 0.4 (was 0.05)

WP_OVERSHOOT = 5 (was 1). This is used for lane-based-speed-control. If it’s too narrow then the vehicle will try to slow down too often as it bounces against each side of the lane. I hope increasing this number will reduce the dips in desired speed.

MOT_THR_MAX = 100 (was 40). Is there any reason why it must be set low? If there is a physical reason (i.e. an output of 40% is actually demanding 100% from the motor) then it might be better to instead reduce SERVO3_MAX.


Thank you Randy, I will try these settings this weekend.

The MOT_THR_MAX of 40 was to attempt to minimise the severe over throttle when doing the ‘wobble’.

A couple of questions / suggestions:

  1. What’s your WP_RADIUS? That is used as the minimum L1 look-ahead distance and could compensate for some of the wobble when you slow down. When you’re going very slowly, the look-ahead distance shortens (L1_Period * speed). Setting your WP_RADIUS to something like 10m will make sure it’s always looking a decent distance ahead.

  2. How does your physical throttle controller work? Propeller thrust is a function of RPM^2, which means it becomes more and more sensitive as you increase throttle. Maybe you need some exponential in your servo / throttle response so that 0-10% “commanded” throttle moves the physical throttle 20-30%, but from 10-20% it may only move the physical throttle 5%. Does that make sense?

Can you drive the boat manually? You might be able to get a “feel” for the sensitivity of the throttle.

Have you done a mapping of steady-state throttle setting vs. speed?

Randy has suggested changing the SPEED_I and SPEED_P. It may also be worth looking at the _D and the rate as this might catch some of the dips - what are your values for these?

1 Like