Steering Boat Not following the Waypoint exactly? Heading angle error too big

Dear friends,

I have a steering boat(with 2 thrusters, no rudder) which is using Pixhawk as a hardware controller, and using the ArduRover as firmware and mission planner as GCS. It functions very well in manual mode, but when I switch to auto mode and make it follow the waypoint, it does not follow exactly. I followed the ArduRover wiki to tune the controller but it still not good.
For example, here I did an experiment in a pool with a size of 10m * 25m, and it is in Auto mode:

  1. In the first video, here is the link: experiment 1 I made it to go straight to reach the only waypoint, the direction is roughly correct, but it just cannot be exactly where it should reach.
  2. In the second video, experiment 2I made 2 waypoints, but it seems after the boat “roughly reached the 1st waypoint”, it cannot turn its head to the 2nd waypoint and struggled to reach it.

Here I also attached the log filebin file here in the post. The May I know is it because of the controller problem? Which parameter should I tune in order to get good results?

Btw, the boat is about 1.8 meters long, and it is really heavy with a weight of 90kg. And the weather is quite windy on that day which also cause waves in the pool.

I have been struggling with this issue for a few months, hope to hear from some suggestions to solve this problem. Thank you!

How fast do you run it in manual? It looks like you may have a number of problems.

Hi David, thanks for the kind reply. In manual mode it runs about 0.5-1m/s, and the boat is quite responsive. But when I switch it to Auto mode, the heading angle error is too big, and it cannot turn itself to the correct direction.

What do you think could be the problem? In the .bin file, the last 30mins log shows the experiment 1 and experiment 2.

It looks like you are asking it to run to fast in Auto. I’ll look at the log again later today.

Alright, thanks David~
Btw, here attached is the part which corresponding to experiment 1 that I tried to make it going straight. Hope it can provide some useful info to figure out this problem.(also, the speed measured by the GPS can reach to a maximum of 1 m/s.)

And this is the basic tuning page for the current setup, where I tried to follow the ArduRover wiki page, but seems does not work well…

I’m not real good at logs except for pick out stuff the looks to be a problem. Steering PID’s with 0 P looks to be a problem. P and I should be about the same for starters I think. I noticed your NAV_L1 was up to 40 or 50. That may be way to high. The real problem I see , I think, is your boat cannot achieve cruise speed. Your RC_OUT to the motors is all over the place. How does it behave in Steering Mode? Maybe also your Accel Max on the speed is way off. Here are some parameters from my boat just to give you the idea of the relationships to one another.last params before 3.5.param (11.8 KB)


Thank you David, I will take note of these parameters and make a comparison. Will do another run on the boat.

Hi David,

I tried to tune my controller again today, and yes I noticed that my main problem is that the boat cannot function well in the steering mode. I tried to follow your parameters, as well as the wiki guide to re-tune the steering rate controller, the behavior is just very strange. For example, in the Steering mode, I tried to make a right turn on the boat, the piddesired is always zero. The pidachieved is always away from the piddesired, as shown below:

You mentioned that RC_OUT to the motors is all over the place, may I know what could be the possible causes?

During today’s test, I redo all the procedures and noticed the following problems:

  1. In the speed and throttle controller, in the manual mode, it cannot learn the cruise speed. I set the channel 7 as Auxiliary Function Switch]( to “Learn Cruise Speed”, but it just do not update the parameter CRUISE_SPEED and CRUISE_THROTTLE value. I am not sure whether it is also something cause this steering rate tuning problem? Anyway, I set the CRUISE_SPEED and CRUISE_THROTTLE manually to 2m/s and 50% respectively.

  2. The position given by the GPS shown in the mission planner is not very accurate. It has a discrepancy of about 2-3 meters, as you can see, the trajectory of the boat falls onto the trail(width is about 2-3 meters) along the pool. would it be that the gps is not accurate enough?

  3. In the above image, I am not sure what does it mean by “Direct to current WP”(orange), “Target heading”(green), and “GPS track”(black)? I tried to google but cannot find any useful info about this specification.

  4. How do you usually tune the PID controller in steering mode? Is it just by observing the piddesired and pidachieved graph, like the overshoot, oscillation behavior etc? Same, as I follow the wiki guide again, but just cannot get reasonable results.

  5. In this steering mode, when I make the boat to turn purely right, or left,(I use different stick to control the throttle(forward/backward) and the steering (left/right)) the boat will make a big circle(radius about 2m) to turn. And the moment I release the steering stick, the boat will randomly go forward or backward, even though I did not give any input to the stick.

  6. Another info is that, the pixhawk controller is not fix at the center of the gravity due to the boat design.(it is fixed slightly to the back right of the boat) If it also cause the difficulties to make the boat to turn in the correct way, should I change the code/setting to shift it the center of gravity?

Thank you for the kind read. I am looking forward to any inputs and hope to solve this problem as soon as possible. Here also I attached thelog file for your info if needed, and today’s video for the test.

@rmackay9 also. A lot of this I can’t help you with. But, a few things I notice. I never see the boat move faster than 1.25 M/S. So Cruise speed of 2 and Cruise Throttle of 50% doesn’t help. The GPS drift is more than I get and your test area is very small for something like this. Most notably is in the videos you shared I can hear the propulsion system cavitate or suck air in a lot. I have attached a few screenshots of your logs that I think are important. Does this boat really weigh 90KG? What is it powered with? One last thing regarding your logs. You may want to do a short test and then reboot. This would make your logs a lot smaller and easier to read. You may have a grossly under powered boat, heavy, a lot of windage, and be asking it to do things it cant with your current parameters. Randy is in Japan I think so he is more on the same time schedule as you are. I’m in Florida with a 12 hour or so time difference I think. I’ll keep trying to help if I can. Good Luck.

@Yu_Chen. Have you made anymore progress?

1 Like

Hi David, thanks for the kind suggestions, I went to a test again during the weekend, this time I put the boat into the big water area to test.

Firstly, Here are some basic background of the Rover you asked about:

  1. The boat is powered by electricity. There are two thrusters on each side. I use separate stick to control the steering and throttle. The sound of the boat you hear from the video is only produced when it tried to make a turn or stop. I guess it is because when there is an obvious dynamics changes, the water come through from the motor produced this sound.
  2. Yes, the boat is really weigh 90Kg with the battery(There are two portable battery on each side, each weighs about 16Kg. The hull is made of carbon fiber and steel which weighs about 50+kg, so the total weight is 90kg)

During the weekend testing, as in the manual mode everything works fine, I focus on observing the Steering mode and auto mode behavior.
As you mentioned, the rover struggles to reach the cruise speed or so. The I tried to lowered the cruise speed from 2m/s to 1m/s, and also tried to increase the P gain to 0.02.

  1. In the Steering mode, when I just moved the left stick which control the steering to the right, the boat turn right, with a radius of about 9m. If I move the stick to the left, it will make a left turn with a radius of about 4m. Here attached the graph for right turn and left turn respectively:

  2. In the Auto mode, I just set 1 waypoint to make it follow, but the boat just cannot find the direction. In my first post about this issue testing in the small pool, I guess maybe the boat also moved randomly, but the pool is too small to observe. Here attached the one for this time:

So I think now the main issue is that the steering mode is not properly tuned. But I have no direction how to make it work :(( Here I will attach the logs. I will update you further once I have other observation. Also, if possible, hope Mr. @ramackay9 could help me take a look too. Thank you very much!

log 00007.bin: shows the manual mode and steering mode run in circle direction
log 00008.bin: includes the auto mode (with 1 waypoint)
log 00009.bin: I changed the cruise speed to 0.5m/s. It also shows the manual mode and steering mode run in circle direction

I think you forgot to attach the logs.

I agree with @David_Boulanger that a core problem may be that the vehicle is very under powered. I think it might be important to improve the frame design by moving the motors to the middle of the vehicle on either side of the center-of-gravity and/or use much more powerful motors.

Here is some advice after looking at the earlier log:

  • reduce ATC_ACCEL_MAX from 4 to 0.5
  • reduce CRUISE_SPEED to 0.7
  • increase CRUISE_THROTTLE to 80
  • reduce WP_SPEED to 0.8 (the vehicle can’t reliably drive at 1m/s I think so better to keep it within it’s capabilities
  • reduce WP_RADIUS to 0.5 if it will be tested in a really small space like this
  • increase WP_OVERSHOOT to 2. 0.5 is very narrow so it will switch into Pivot turns too easily

For turning the steering controller I think it is best to use Acro mode rather than Steering mode. The reason is that Steering mode uses the navigation controller but it is best to first get the lower level turn rate controller working well before moving to navigation.

Could you put it into Acro mode and follow the advice on this wiki page and try plotting desired turn-rate vs actual turn rate and then adjust the ATC_STR_RAT_FF?

  • ACRO_TURN_RATE is probably too high at 180deg/sec. I suspect it is more like 20deg/sec unfortunately but maybe start with 45.
  • ATC_STR_RAT_P of 0 should be similar to ATC_STR_RAT_I (as DavidB says). It’s OK to set both P and I to zero during tuning of the steering rate control but afterwards it should probably be set to at least 20% of what ATC_STR_RAT_FF is.

As DavidB said, NAVL1_PERIOD is far too high at 50. I would start by returning this to the default of 8 but in any case, let’s focus on the turn-rate controller before worrying about navigation.

Hope this helps a bit…


Hi David, sorry I just noticed my previous upload is not successful. I just create a dropbox link and now they are in the post.

@Yu_Chen. I would follow Randy’s suggestions exactly. Then give it a try. Thanks for the smaller logs:grinning:. I’m not sure why the boat turns tighter one direction over the other. Was it windy? Maybe an ESC overheated and you were running on 3 thrusters instead of 4. If you are using Blue Robotics thrusters and the original ESC’s, Afro , this could be. I had a problem with the Afro ESC having a short reliable lifespan. Keep trying.


Thanks for the kind respond! I will try these changes and update you about this. Btw, I got some difficulties to learn the cruise speed, the AXU function were properly set but the value just doesn’t update. Could this be solved? If cannot, maybe I will just manually set the value in the panel.


I’m pretty sure the learning of cruise speed works but I’ve seen some users not quite understand how it should be done. It’s on the wiki here but in short the aux switch should be in the “on” position for just a second or two while the throttle is above zero. the mistake I most often see is the user leaves the switch on for too long and during that period they reduce the throttle to zero.

Alright, thanks~ I will try again then.

Thanks Randy. Btw, I am using the ArduRover V3.4.2. If I want to update it to the latest verision, it is that:

  1. backup the parameters and save in a file
  2. then follow the instructions in the mission planner, click install firmware
  3. reload the backup parameters, and it will be the same configuration with the newest version.

I am wondering is this the way? After I upgrade to the new version, do I need to redo the calibration on the sensors, and the RC controller?