OpenMarine

Full Version: Calibrate :Openplotter3, pypilot 3.2.6, 3.2.8 doesn't work for me
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I have a problem calibrating the 9250.

? How do I initiate the calibration of the sensor ?

I opened calibrien/compass and turn the imu9250 clockwise...
But it doesn't happen, nor does it update.
Pipilot 3.2.6 / 3.2.8 also behave differently than in 2.x!
Here's a picture:

[Image: GFe1zIk.png]


[Image: 0MCVhhA.png]

nothing is displayed

[Image: 5MnB3xx.png]
I'm turning my fingers sore Smile)
Nothing is displayed, not updated ???

What am I doing wrong there?
Many thanks
From your screenshot it seems most likely there was some magnetic interference, however nothing is output to the log so I am unsure. You could restart the pypilot service and try rotating carefully. It will not calibrate if there are distortions to protect the previous calibration from being replaced with something wrong.


Check the log:
journalctl -u pypilot.service

Or stop pypilot:
sudo systemctl stop pypilot

and run from command line:
pypilot

check for errors especially related to calibration. Also consider at the command line:

python3
>>> import scipy

ensure scipy is available
Hello seandepagnier,

according to your recommendation I now work with the icm20948
I also have a 9250 which is also recognized in pypilot, but it behaves exactly the same way  Huh


>Check the log:

>journalctl -u pypilot.service
https://drive.google.com/file/d/18XXW3-O...sp=sharing

>Or stop pypilot:
>sudo systemctl stop pypilot
>
>and run from command line:
>pypilot

https://drive.google.com/file/d/14YvdScz...share_link


I completely reinstalled openplotter3 on the rassperry pi 4 (64 bit) - without success
I have absolutely no idea what to do!


I hope for help!
Hi Sean,

I had the same problem in "Enable IMU Only" mode. Went to "Enable Autopilot" and everything calibrated up just fine.

Thanks
Yes
Autopilot selected, calibrate - works.(almost)
But then it's probably a bug in the PypilotApp?!
Current problem is now:
insufficient coverage 12 needs 14
at least something happens and I get feedback now.
Calibrate compass first. Turn it slowly, it should calibrate. Once done do the accel calibration.

They had a problem with the IMU-only portion a few versions back, perhaps this issue is back.
Thanks for feedback. I will look into imu only mode.

The insufficient coverage message is very helpful. It means you are very close but dont have enough data. Are you on a boat making 360 or trying to do this in a building?

Really you should do the accel calibration first because it uses the accelerometers to help calibrate the magnetic sensors. If there is a significant accelerometer bias it would mess everything up. So far I have not seen any icm20948 with significant bias (dont require accelerometer calibration) but it won't hurt.
Hello, first of all thank you for your support.
@ Opie91

I'm not there yet, but the needle never points north

@seandepagnier
I disassembled my complete system for openplotter 3.
Pi4, MCS, AIS, GPS and now trying to get everything up and running.
Everything I try happens indoors.
GPS is off.

an excerpt from the log window:
0d fit, insufficient data 0.3 0.8 < 9 0d fit, insufficient data 1.1 3.4 < 9 0d fit, insufficient data 1.5 2.9 < 9 0d fit, insufficient data 1.5 2.8 < 9 0d fit, insufficient data 1.3 3.1 < 9 0d fit, insufficient data 1.1 3.2 < 9 0d fit, insufficient data 1.2 3.2 < 9 0d fit, insufficient data 1.7 3.4 < 9 0d fit, insufficient data 1.6 3.5 < 9 0d fit, insufficient data 1.6 3.4 < 9
0d fit, insufficient data 2.5 4.6 < 9 0d fit, insufficient data 2.7 4.4 < 9 0d fit, insufficient data 2.7 4.4 < 9 0d fit, insufficient data 2.7 4.5 < 9 0d fit, insufficient data 2.7 4.5 < 9 0d fit, insufficient data 2.7 4.5 < 9 0d fit, insufficient data 2.7 4.5 < 9 0d fit, insufficient data 2.7 4.5 < 9 0d fit, insufficient data 2.7 4.5 < 9 0d fit, insufficient data 2.7 4.5 < 9 0d fit, insufficient data 2.8 4.6 < 9 0d fit, insufficient data 2.8 4.8 < 9 0d fit, insufficient data 2.8 4.8 < 9 0d fit, insufficient data 2.8 4.8 < 9 0d fit, insufficient data 2.8 4.8 < 9 0d fit, insufficient data 2.8 4.9 < 9 0d fit, insufficient data 2.8 4.9 < 9 0d fit, insufficient data 2.8 5.0 < 9 0d fit, insufficient data 2.8 5.1 < 9 0d fit, insufficient data 2.8 5.2 < 9 0d fit, insufficient dat0d fit, insufficient data 2.8 5.5 < 9 8 5.3 < 9


Another thing I noticed, if I press reset under alignment, the boot settles down in OP2, this doesn't happen in OP3. Here the boat is always leveled
>journalctl -u pypilot.service

-- Journal begins at Thu 2022-09-22 05:17:24 CEST, ends at Sun 2022-11-27 11:24:50 CET. --
Nov 24 18:01:03 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:03 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:03 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:03 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:03 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:03 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:06 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:06 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:07 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:07 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:07 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:07 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:07 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:07 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:07 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:07 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
-- Boot f58ff95deab54456bf9c73c733b1ce36 --
Nov 24 18:01:54 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:54 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:54 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:54 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Nov 24 18:01:54 raspberrypi systemd[1]: /etc/systemd/system/pypilot.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
lines 1-23

>Or stop pypilot:
>sudo systemctl stop pypilot
>
>and run from command line:
>pypilot



pi@raspberrypi:~ $ pypilot
autopilot start 84927.176471385
world magnetic model not available
ERROR loading wind.py cannot import name 'HeadingOffset' from partially initialized module 'pypilot.autopilot' (most likely due to a circular import) (/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py)   cannot import name 'HeadingOffset' from partially initialized module 'pypilot.autopilot' (most likely due to a circular import) (/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py)
imu process 18795
nmea process 18799
listening on port 20220 for nmea connections
gps process 18802
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
Available Pilots: ['absolute', 'basic']
warning: failed to open special file /dev/watchdog0 for writing
        cannot stroke the watchdog
made imu process realtime
Using settings file RTIMULib.ini
pypilotServer process 18807
Settings file RTIMULib.ini loaded
server setup has 6 pipes
Detected ICM20948 at standard address
Using fusion algorithm Kalman STATE4
IMU Name: ICM-20948
min/max compass calibration not in use
Using ellipsoid compass calibration
Using accel calibration
server add socket ('127.0.0.1', 39744)
autopilot init complete 84927.411750739
zeroconf addresses ['127.0.0.1', '192.168.178.69'] 2
autopilot iteration running too slow 0.07768379600020126
ICM-20948 init complete
autopilot iteration running too slow 0.07465631498780567
gps filter process 18804
imu rate set to rate 20
read imu running too _slowly_ 0.05582203499216121 0.05
autopilot iteration running too slow 0.07219342500320636
setting initial gyro bias [0.545, -1.24, 1.333]
gpsd connected
GPSD devices []
calibration loaded, starting 18793
server/client is running too _slowly_ 0.05901375399844255
autopilot iteration running too slow 0.06031498599622864
signalk process 18800
signalkread token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXZpY2UiOiJkMjAwZjI4YS0wOTAyLTQzYzItOWI5Yi0wMGNkMDkwODcyMjQiLCJpYXQiOjE2NjkzMDk1NzEsImV4cCI6MTcwMDg2NzE3MX0.OGuh4USdVLn_XxJ45q1WK5oR_TfAvMDhY1ivrActFps
signalk zeroconf service add DIVA-27._http._tcp.local. _http._tcp.local.
signalk zeroconf service add raspberrypi._http._tcp.local. _http._tcp.local.
signalk server found 127.0.0.1:3000
signalk probe... 127.0.0.1:3000
signalk zeroconf service add EPSON ET-4750 Series._http._tcp.local. _http._tcp.local.
signalk found ws://127.0.0.1:3000/signalk/v1/stream?subscribe=none
signalk connected to ws://127.0.0.1:3000/signalk/v1/stream?subscribe=none
^CTraceback (most recent call last):
 File "/usr/local/bin/pypilot", line 33, in <module>
   sys.exit(load_entry_point('pypilot==0.35', 'console_scripts', 'pypilot')())
 File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 453, in main
   ap.iteration()
 File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 445, in iteration
   time.sleep(dt)
 File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 186, in cleanup
KeyboardInterrupt
closing autopilot
I will change services from syslog to journal on next openplotter-pypilot version, let me know if you need more changes.