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
Question about the estimated heading in GPS mode
#11
Unfortunately I think I didn't record the compass for this time, only the gyro with other things... I'll try to optimize all this with your information, thanks again for everything!

[Image: 2022-10-05-133604_1824x984_scrot.png]
Reply
#12
Hello to all,

After receiving Sean's pilot, I was able to compare it with my version and it's night and day, now I'm going straight and the boat is super stable! I am very happy with it. We'll see how it goes over time, but I'm optimistic.

The only thing I couldn't do was to activate the LCD screen... the famous pypilot_hat daemon doesn't exists and the executable doesn't produce any results. But I didn't spend much time there and it's a minor problem, having a perfectly working autopilot is a real pleasure, thanks!
Reply
#13
So your original IMU was bad?

What kind of error message did you see related to pypilot_hat? What do you mean the executable doesnt produce any results?
Reply
#14
(2023-04-16, 03:45 PM)seandepagnier Wrote: So your original IMU was bad?

Probably. I use the same RPI as before, with the same settings. I have just crossed from France to England, everything went perfectly well.

Quote:What kind of error message did you see related to pypilot_hat?    What do you mean the executable doesnt produce any results?

The LCD display shows nothing.

Code:
$ pypilot_hat
hat start 81252.403403063
have gpio for raspberry pi
hat import done 81252.440801153
loading config file: /home/guillaume/.pypilot/hat.conf
failed to load /proc/device-tree/hat/custom_0 : [Errno 2] No such file or directory: '/proc/device-tree/hat/custom_0'
host localhost
lcd process on 10824
lcd driver default False False
hat init complete 81253.649992655
10826 (process ID) old priority 0, new priority 19
have lirc for remote control 0.16617706899705809
web process 10826
web process on port 33333


Code:
jq . ~/.pypilot/hat.conf
{
  "host": "localhost",
  "actions": {
    "auto": [],
    "menu": [],
    "port1": [],
    "starboard1": [],
    "select": [],
    "port10": [],
    "starboard10": [],
    "tack": [],
    "dodge_port": [],
    "dodge_starboard": [],
    "engage": [],
    "disengage": [],
    "1": [],
    "-1": [],
    "2": [],
    "-2": [],
    "5": [],
    "-5": [],
    "10": [],
    "-10": [],
    "compassmode": [],
    "gpsmode": [],
    "windmode": [],
    "truewindmode": [],
    "center": [],
    "tackport": [],
    "tackstarboard": [],
    "none": [],
    "pilot_absolute": [],
    "pilot_basic": []
  },
  "pi.ir": true,
  "arduino.ir": false,
  "arduino.nmea.in": false,
  "arduino.nmea.out": false,
  "arduino.nmea.baud": 4800,
  "lcd": {},
  "hat": {
    "lcd": {
      "driver": "default",
      "port": "/dev/spidev0.0"
    },
    "lirc": "gpio4"
  }
}

I tried to change the value of "driver" without success.
Reply
#15
driver should be either nokia5110 (for older hats) or jlx12864 (for newer ones)
Reply
#16
(2023-04-20, 08:31 PM)stelian Wrote: driver should be either nokia5110 (for older hats) or jlx12864 (for newer ones)

Yes, I tried these 2 values without success.
Reply
#17
This is what I have in my hat.conf, pay attention to the backslashes around the /dev/spidev0.0 parameter:

Code:
{"host":"localhost","actions":{},"pi.ir":false,"arduino.ir":true,"arduino.nmea.in":false,"arduino.nmea.out":false,"arduino.nmea.baud":"38400","lcd":{"contrast":49.76359479840021,"invert":false,"backlight":9.975309329761362,"flip":false,"language":"en","bigstep":10,"smallstep":1,"hue":214,"buzzer":1.715823535791976},"remote":false,"hat":{"lcd":{"driver":"jlx12864","port":"\/dev\/spidev0.0"},"arduino":{"device":"\/dev\/spidev0.1","resetpin":16,"hardware":0.23},"lirc":"gpio4"},"modes":["compass","gps","nav","wind","true wind"]}
Reply
#18
Thank you for this information stelian. I've tried a lot of different configurations using your setup and other info and my LCD screen is definitely blank. But that's not the most critical thing, so I'll put that aside for now.

I've just done two days and one night of sea crossing and I obviously spoke too quickly... this time, my pilot never found the north. I had to manage without him and it was a misery. In my logbook I complained about the IMU not being able to behave like a normal, stable compass. There is a huge contrast between the impeccable operation on the crossing to England and this sailing, which started with a heavy upwind swell, which seems to have thrown everything off. Even when the weather conditions improved afterwards.

I tried a lot of things though. I've restarted the services 50 times, tried to recalibrate the IMU in the open sea, which is difficult with a big swell all the time. Basically, it seems stable when the sea is flat, even if it "turns" a little, then the compass becomes very unstable with the swell, to finish completely crazy.

So I've noticed again that, when the IMU is unusable (and without wind info), either because it's badly calibrated or because it's dead, having a "degraded" mode that pilots only from the GPS data (not affected by completely wrong IMU data), even if the boat makes huge zigzags, is still much better than having to stay at the helm day and night. However, as this situation should never happen, I understand that developing this option is unnecessary.

Now that I'm at anchor I'll take advantage of the stability to recalibrate. Sorry for this pessimistic message and my bad English. To be continued.
Reply
#19
Not sure what went wrong. You should familiarize yourself with the calibration display. It will really give a lot of clues if the compass is wrong and if it is recalibrated or not.

Is there any chance you placed some metal magnet near the sensors? Also, wire carrying current even only a few amps can really affect the operation. Be sure the motor controller itself is not mounted so the wires to the motor go too close to the sensors since they carry enough current.
Reply
#20
I thought of something that would disrupt the sensor but I couldn't find anything. Since then I went for a new sailing stage which went well at first, I was happy, it worked great. Then the IMU suddenly went out of order and when I was using "pypilot_boatimu" to try things, I lost the IMU...

Anyway, I just spent 2 days reinstalling everything and getting familiar with the calibration. It's possible that I didn't master this step correctly. I'm going to open a topic on calibration soon with a number of questions that I can't find answers.

Thanks for your contributions, especially Sean... I hope your situation improves.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)