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.
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.
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.
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.