Boat Loiter unstable

Hi,

I have a boat (4.2.0) that works great in auto and guided mode, but is very oscillatory in loiter mode. It does not have much speed but the skid-steer is near max throttle left-turn, right-turn, left-turn, etc until it drifts away, does a 180 turn and repeats.

Here is a screenshot of the PID tuning plot with the yaw rate commands, you can see that in loiter and after reaching the guided waypoint I get the big oscillations in yaw-rate command (the biggest spikes are the 180 turn):

I did a short test yesterday just to gather data on this problem but unfortunately my dataflash got corrupted in an earlier mission and I don’t have a bin file. I do have the tlog file here. If it is not a well-known issue I will go out for another test to get the bin file and a video.

The steering motion is similar to an issue raised here (see the video, this is similar to what my boat does except with skid-steer and faster oscillations):

Does anyone know what I can tune to fix this? It works well in auto including pivot turns.

Thanks,
Mike

Hi Mike,

I’m not aware of this problem… I guess that it is caused by some issue in the tuning of the turn rate controller or perhaps with the configured vehicle limits but it’s just a guess. … a .bin log would be really good. The tlogs are a bit of a struggle to work with because they lack so much information.

2 Likes

Thanks. I suspect a limit as well- when I went into guided mode the boat had to do an 180ish turn and the command maxes out at a lower value than in loiter, but I’m not sure that is the only issue.

I’ll get the boat out again early next week and get a bin log file. I appreciate your help.

I gathered more data today. I meant to get a small log file of just the loiter behavior but it is a big file with an autonomous run at the end, sorry about that. But the loitering is in the beginning, and I guess you can also use this to see that the autonomous guidance works fine.

Here is the bin file: 2022-08-02.BIN

Here is a video of it trying to loiter:

Thanks for any ideas!

Seems like I read here some time ago about the same issue could be caused by the WP/loiter radius being too small. Hope that helps. Good luck!

1 Like

I had the same problem. I think the issue was related to the speed controllers being more powerful in the forward direction than the reverse direction. (This was built into the esc hardware.)

I was able to mostly tune it out by lowering the max trim in forward to match max output in reverse. Of course, this also limited my boats max speed and power during normal missions, so it wasn’t really an acceptable fix.

1 Like