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.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Intermittent IMU problem
#1
Hi,

Today I connected my IMU to the Pi Zero W, and watched the heading on the web interface.  I was guessing that the heading would change with rotating the IMU around the Z axis (as indicated on the board) but the numbers aren't making much sense.

I logged into the Pi, and ran (cd pypilot/pypilot; python boat_imu.py).  Some of the time I'm getting numbers, and some of the time the software thinks the IMU has disappeared.  This happens in a loop, ie, numbers then a disconnect.

   

Any ideas?  (I wired 1-1, 2-9, 3-5, 4-3.  Wires are short and directly soldered)
  Reply
#2
I had a very similar issue where the system would loose orientation when under load.
In my case, I solved all of my problems by using different USB to Serial converters. It seems unrelated but my converters produced crap values once in a while that caused my serial process to crash and with it, the I2C process. More CPU load, for example when scope is drawing a bunch of telemetry and the CPU runs hot at 60% load, also causes this behavior.

Try different usb to serial converters. Try reducing CPU load. Try cooling the Raspberry Pi. All three solved this for me, for now.
  Reply
#3
did you end up solving it?
  Reply
#4
The problem from the log it seems there are two pypilot processes running and they are both competing for the i2c imu.
  Reply
#5
(12-16-2019, 10:45 PM)seandepagnier Wrote: The problem from the log it seems there are two pypilot processes running and they are both competing for the i2c imu.

Good pick up, thanks, I'll look into this.

Is there any situation in which it's desirable to have two pypilot processes?  If not, would it be possible to have a lock file that would prevent starting a second process (w/ suitable error message)?

@McNugget, no, but I'll fix the above problem first.  I have been busy lately getting ready for a weekend cruise (last weekend) that got aborted after 3nm of 124nm.  Will try again this weekend.  I really hope to have my autopilot operational for a 280nm cruise planned for first week of Jan.
  Reply
#6
I see! Good luck!

I remember that I saw this issue after fiddling around with Pypilot for some time without rebooting! It is quite possible that I clicked on Autopilot Control from OpenPlopper as well as from OpenCPN. Both open different pypilot windows but both seem to be pypilot! Maybe that happened to you as well.?
  Reply
#7
Naah mine happened because I started boat_imu.py from the command line.
  Reply
#8
(12-17-2019, 06:17 PM)CapnKernel Wrote: Naah mine happened because I started boat_imu.py from the command line.

Finally had a chance to try this.  I ran sv d pypilot then boatimu.py, and I get me some nice pitch roll and heading numbers.  Cross that one off, getting closer to an operational autopilot!
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)