This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AP gone wild!
#1
So things had been going well with my setup so far this season (RPI4 with OP2, IMU 9255, Sean's controller connected to ST4000 wheel pilot).  I had the AP running reasonably well for the last 1.5 months with just some adjustments to P and D gains, all other gains 0.  I always run in compass mode.  I can't put my finger on when it happened, but there's been a big change for the worse.  With the AP engaged, the AP will wait for the course to be off by 20 deg or so and then make a big change in the other direction:  1/4 to 1/2 a turn on the wheel.  It will then make another huge correction in the other direction, overshoot the desired course by 20 to 40 deg, wait at that course for 2 sec, make another huge correction the other way.  Left this way, it will continue to make big 20 to 50 deg S turns.  Each turn is a big correction, never small.  I spent a couple hours fooling around with it yesterday.  The boat was in light air and small seas, one of the those days where the boat will go for a long time in a straight line with the wheel locked.  With all kinds of adjustments to P, D, DD and PR, the best I could do was to get the S turns down to +/-25 deg.  The "desired course" and "current course" always appear stable.

My next move was going to be new install on an SD card and start from scratch.  Before I do, any thoughts on what could have happened here, or how I even start to troubleshoot?
Reply
#2
So the autopilot used to work fine, and now it is not? The obvious thing is to try to figure out what changed. If you changed the gains, what about ~/.pypilot/pypilot.conf? Can you delete/backup this file? Maybe the default settings will help. Also the motor controller, what are the settings?

Do you by any chance have a pi zero? I would suggest loading tinypilot onto it. This will give a working autopilot at boot without other programs, and would help you determine if the autopilot computer is for sure the cause. It could be loose wires or magnetic interference which are neither problems of software, but probably not. So you will have to do some testing to determine the problem.
Reply
#3
Thanks Sean. I was at the boat yesterday and checked for loose connections. Nothing obvious. I also verified that I wasn't being stupid by putting new interfering devices near the computer. Lastly, I tried renaming pypilot.conf and rebooting, hoping that a new default file would be created, but it seems that doesn't happen. I'll get a pypilot.conf out of the distribution package and try that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)