(2023-05-23, 01:06 PM)SVHM Wrote: (2023-05-23, 04:56 AM)seandepagnier Wrote: Check if the serial port is setup correctly:
ls - l /dev/serial0
If this points to /dev/ttyAMA0 it should work. In the newer openplotter I believe you can do this from the serial configuration.
Next, ensure the pypilot_hat service is running. You must enable SPI in raspi-config for this to work, but normally the lcd should be autodetected. You should be able to enable it from the interface from running openplotter-pypilot, or by
sudo service pypilot_hat start
sudo service pypilot_hat enable
Here are results from 1st
pi@openplotter:~ $ ls -l /dev/serial0
lrwxrwxrwx 1 root root 7 May 21 07:23 /dev/serial0 -> ttyAMA0
pi@openplotter:~ $ openplotter-pypilot
active
active
active
Settings file not found. Using defaults and creating settings file
Failed to open SPI bus 0, select 0
Using fusion algorithm RTQF
active
(openplotter-pypilot:1867): Gtk-CRITICAL **: 07:34:24.962: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
Here are other commands
pi@openplotter:~ $ sudo service pypilot_hat start~
pypilot_hat: unrecognized service
pi@openplotter:~ $ sudo service pypilot_hat enable
pypilot_hat: unrecognized service
pi@openplotter:~ $
Her are the same commands after reinstalling OP3:
pi@openplotter:~ $ ls - l /dev/serial0
ls: cannot access '-': No such file or directory
ls: cannot access 'l': No such file or directory
/dev/serial0
pi@openplotter:~ $ sudo service pypilot_hat start
pi@openplotter:~ $ sudo service pypilot_hat enable~
pypilot_hat: unrecognized service
pi@openplotter:~ $
Here are the commands in the wiki:
pi@openplotter:~ $ pypilot boatimu
autopilot start 422.196537104
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 2275
nmea process 2279
nmea server on port 20220: bind failed.
gps process 2281
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
Available Pilots: ['basic', 'absolute']
warning: failed to open special file /dev/watchdog0 for writing
cannot stroke the watchdog
pypilotServer process 2284
pypilot_server: bind failed; already running a server?
made imu process realtime
Using settings file RTIMULib.ini
Settings file RTIMULib.ini loaded
Failed to open SPI bus 0, select 0
Using fusion algorithm Kalman STATE4
ERROR: No IMU Detected 422.487744334
autopilot init complete 422.533326817
serialprobe removing gps device /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0
autopilot iteration running too slow 0.07958608799998501
autopilot iteration running too slow 0.10437151899998298
autopilot iteration running too slow 0.0844185899999843
gps filter process 2282
autopilot iteration running too slow 0.09999870900003316
autopilot iteration running too slow 0.08603793099996437
autopilot iteration running too slow 0.09813967899998488
autopilot iteration running too slow 0.08866608499999984
nmea server on port 20220: bind failed.
autopilot iteration running too slow 0.09545324300000857
autopilot iteration running too slow 0.09107756999998173
autopilot iteration running too slow 0.09487047599998277
autopilot iteration running too slow 0.0907275659999982
autopilot iteration running too slow 0.09468375500000548
autopilot iteration running too slow 0.09223930100000644
autopilot iteration running too slow 0.0938905689999956
autopilot iteration running too slow 0.09200434999996787
autopilot iteration running too slow 0.09389963199998874
nmea server on port 20220: bind failed.
gpsd connected
GPSD devices ['/dev/ttyUSB1']
autopilot iteration running too slow 0.09359546199999613
autopilot iteration running too slow 0.09269482700000253
autopilot iteration running too slow 0.09330920900004003
autopilot iteration running too slow 0.09352931500001205
autopilot iteration running too slow 0.09331019899997273
autopilot iteration running too slow 0.09289212099997712
autopilot iteration running too slow 0.09358254500000385
^CTraceback (most recent call last):
File "/usr/local/bin/pypilot", line 33, in <module>
sys.exit(load_entry_point('pypilot==0.36', '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 321, in iteration
File "/usr/local/lib/python3.9/dist-packages/pypilot/client.py", line 385, in receive
self.poll(timeout)
File "/usr/local/lib/python3.9/dist-packages/pypilot/client.py", line 277, in poll
events = self.poller.poll(int(1000 * timeout))
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 186, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
closing autopilot
pi@openplotter:~ $
pi@openplotter:~ $ pypilot servo
autopilot start 554.773446253
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 2345
nmea process 2349
nmea server on port 20220: bind failed.
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
gps process 2351
Available Pilots: ['basic', 'absolute']
warning: failed to open special file /dev/watchdog0 for writing
cannot stroke the watchdog
pypilotServer process 2354
pypilot_server: bind failed; already running a server?
made imu process realtime
Using settings file RTIMULib.ini
Settings file RTIMULib.ini loaded
Failed to open SPI bus 0, select 0
Using fusion algorithm Kalman STATE4
ERROR: No IMU Detected 555.08776801
autopilot init complete 555.106278855
serialprobe removing gps device /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0
autopilot iteration running too slow 0.0805108529999643
autopilot iteration running too slow 0.10352211599990824
autopilot iteration running too slow 0.08586914599993634
gps filter process 2352
autopilot iteration running too slow 0.09915112600003795
autopilot iteration running too slow 0.08726879799996823
autopilot iteration running too slow 0.0971526130000484
autopilot iteration running too slow 0.08985387999996419
nmea server on port 20220: bind failed.
autopilot iteration running too slow 0.09556806399996276
autopilot iteration running too slow 0.09084602699999778
autopilot iteration running too slow 0.09484836700005417
autopilot iteration running too slow 0.09227682599998843
autopilot iteration running too slow 0.09381116700001257
autopilot iteration running too slow 0.09254724600009467
autopilot iteration running too slow 0.09330954699998983
autopilot iteration running too slow 0.09274344699997528
autopilot iteration running too slow 0.09276313400005165
nmea server on port 20220: bind failed.
gpsd connected
GPSD devices ['/dev/ttyUSB1']
autopilot iteration running too slow 0.09451945699993303
autopilot iteration running too slow 0.09230010800001764
autopilot iteration running too slow 0.09376007299999856
autopilot iteration running too slow 0.09206406399994194
autopilot iteration running too slow 0.09352137200005473
autopilot iteration running too slow 0.09286152100003164
autopilot iteration running too slow 0.0933044420000897
autopilot iteration running too slow 0.0931725660000211
nmea server on port 20220: bind failed.
pypilot_server: bind failed; already running a server?
autopilot iteration running too slow 0.09370163500000217
autopilot iteration running too slow 0.09201119800002289
autopilot iteration running too slow 0.09371330099997977
autopilot iteration running too slow 0.09335579699995833
autopilot iteration running too slow 0.09206406400005562
autopilot iteration running too slow 0.09304621000001134
^CTraceback (most recent call last):
File "/usr/local/bin/pypilot", line 33, in <module>
sys.exit(load_entry_point('pypilot==0.36', 'console_scripts', 'pypilot')())
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 453, in main
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 349, in iteration
time.sleep(pd10)
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 186, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
closing autopilot
pi@openplotter:~ $ pypilot
autopilot start 716.320660638
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 2386
nmea process 2390
nmea server on port 20220: bind failed.
gps process 2392
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
Available Pilots: ['basic', 'absolute']
warning: failed to open special file /dev/watchdog0 for writing
cannot stroke the watchdog
pypilotServer process 2395
pypilot_server: bind failed; already running a server?
made imu process realtime
Using settings file RTIMULib.ini
Settings file RTIMULib.ini loaded
Failed to open SPI bus 0, select 0
Using fusion algorithm Kalman STATE4
ERROR: No IMU Detected 716.642852074
autopilot init complete 716.660674944
serialprobe removing gps device /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0
autopilot iteration running too slow 0.08006781399990359
autopilot iteration running too slow 0.1032024309999997
autopilot iteration running too slow 0.08573585799990724
gps filter process 2393
autopilot iteration running too slow 0.09914056199988863
autopilot iteration running too slow 0.08736849000001712
autopilot iteration running too slow 0.09705017500004942
autopilot iteration running too slow 0.089471949999961
nmea server on port 20220: bind failed.
autopilot iteration running too slow 0.09527785600005245
autopilot iteration running too slow 0.09085661800008893
autopilot iteration running too slow 0.09497260099999494
autopilot iteration running too slow 0.09125963199994658
autopilot iteration running too slow 0.09369220200005657
autopilot iteration running too slow 0.0922198279999975
autopilot iteration running too slow 0.09387001200002487
autopilot iteration running too slow 0.0923515969999471
autopilot iteration running too slow 0.09364256699996076
nmea server on port 20220: bind failed.
gpsd connected
GPSD devices ['/dev/ttyUSB1']
autopilot iteration running too slow 0.09316038700001172
autopilot iteration running too slow 0.09290841199992883
autopilot iteration running too slow 0.09323194799992507
autopilot iteration running too slow 0.09320434500000374
autopilot iteration running too slow 0.09331278100000873
autopilot iteration running too slow 0.09299257700001817
autopilot iteration running too slow 0.09309752299998308
autopilot iteration running too slow 0.09314189700000952
nmea server on port 20220: bind failed.
autopilot iteration running too slow 0.0940421969999079
pypilot_server: bind failed; already running a server?
autopilot iteration running too slow 0.09169269900007748
autopilot iteration running too slow 0.09370376399999714
autopilot iteration running too slow 0.09200321599996641
autopilot iteration running too slow 0.09383647099991776
autopilot iteration running too slow 0.09199451899996802
autopilot iteration running too slow 0.0937508470000239
autopilot iteration running too slow 0.09185957300007885
nmea server on port 20220: bind failed.
autopilot iteration running too slow 0.09370397300006061
autopilot iteration running too slow 0.09211477700000614
autopilot iteration running too slow 0.0951521289999846
autopilot iteration running too slow 0.09123208100004376
autopilot iteration running too slow 0.0945514599999342
autopilot iteration running too slow 0.09246164699993642
autopilot iteration running too slow 0.09335126999997101
autopilot iteration running too slow 0.0929101819999687
autopilot iteration running too slow 0.09312471000009737
nmea server on port 20220: bind failed.
autopilot iteration running too slow 0.09407881200002066
servo probe ('/dev/AMA0', 38400) 721.782395683
failed to open servo on: ('/dev/AMA0', 38400) [Errno 2] could not open port /dev/AMA0: [Errno 2] No such file or directory: '/dev/AMA0'
server/client is running too _slowly_ 0.0771410319999859
autopilot iteration running too slow 0.14972650499998963
calibration loaded, starting 2384
autopilot iteration running too slow 0.09227946199996495
autopilot iteration running too slow 0.0933261659999971
autopilot iteration running too slow 0.0922527950000358
autopilot iteration running too slow 0.09355074600000535
autopilot iteration running too slow 0.09340220700005375
autopilot iteration running too slow 0.09396047999996426
signalk process 2391
nmea server on port 20220: bind failed.
pypilot_server: bind failed; already running a server?
autopilot iteration running too slow 0.09324179199995797
signalkread token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXZpY2UiOiI3YjkyZTBlZC0xYmE5LTQ2MGQtOTg1ZS02YTRjOTk5MmM4MTkiLCJpYXQiOjE2ODQ4NjUyOTgsImV4cCI6MTcxNjQyMjg5OH0.58Ym64d085El7Yu_PbXW_yA5673l75fejlHeFeReRGA
autopilot iteration running too slow 0.0941139149999799
signalk server found 192.168.78.106:3000
signalk server found 127.0.0.1:3000
autopilot iteration running too slow 0.09141124600000694
autopilot iteration running too slow 0.09320372000001953
autopilot iteration running too slow 0.09218545300007008
autopilot iteration running too slow 0.09329429100000652
autopilot iteration running too slow 0.09248742800002674
autopilot iteration running too slow 0.09354027799997766
nmea server on port 20220: bind failed.
autopilot iteration running too slow 0.0941016760000366
autopilot iteration running too slow 0.09209566300000915
autopilot iteration running too slow 0.09494958000004772
autopilot iteration running too slow 0.0924971160000041
^CTraceback (most recent call last):
File "/usr/local/bin/pypilot", line 33, in <module>
sys.exit(load_entry_point('pypilot==0.36', '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 321, in iteration
File "/usr/local/lib/python3.9/dist-packages/pypilot/client.py", line 385, in receive
self.poll(timeout)
File "/usr/local/lib/python3.9/dist-packages/pypilot/client.py", line 277, in poll
events = self.poller.poll(int(1000 * timeout))
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 186, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
closing autopilot
pi@openplotter:~ $ pypilot calibration 127.0.0.1
autopilot start 1051.309453682
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 2474
nmea process 2478
gps process 2480
nmea server on port 20220: bind failed.
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
Available Pilots: ['basic', 'absolute']
warning: failed to open special file /dev/watchdog0 for writing
cannot stroke the watchdog
pypilotServer process 2483
made imu process realtime
Using settings file RTIMULib.ini
Settings file RTIMULib.ini loaded
Failed to open SPI bus 0, select 0
Using fusion algorithm Kalman STATE4
ERROR: No IMU Detected 1051.621062568
pypilot_server: bind failed; already running a server?
autopilot init complete 1051.664486838
serialprobe removing gps device /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0
autopilot iteration running too slow 0.07766433000006145
autopilot iteration running too slow 0.10497305399985635
autopilot iteration running too slow 0.08324268999990636
gps filter process 2482
autopilot iteration running too slow 0.10117616100001214
autopilot iteration running too slow 0.08516400099983912
autopilot iteration running too slow 0.09806187499998487
autopilot iteration running too slow 0.08851360000016939
nmea server on port 20220: bind failed.
autopilot iteration running too slow 0.09656598299989128
autopilot iteration running too slow 0.08961496000006264
autopilot iteration running too slow 0.0957184789999701
autopilot iteration running too slow 0.09123048899982678
autopilot iteration running too slow 0.0938310740000361
autopilot iteration running too slow 0.09193038699982026
autopilot iteration running too slow 0.09410018900007344
autopilot iteration running too slow 0.0919015329998274
autopilot iteration running too slow 0.09406201199999487
nmea server on port 20220: bind failed.
gpsd connected
GPSD devices ['/dev/ttyUSB1']
autopilot iteration running too slow 0.09355414499987091
autopilot iteration running too slow 0.09286961100019653
autopilot iteration running too slow 0.0931723730000158
autopilot iteration running too slow 0.09301164199996492
autopilot iteration running too slow 0.0929175280000436
autopilot iteration running too slow 0.09331596700008049
autopilot iteration running too slow 0.09323742500009757
autopilot iteration running too slow 0.09309502900009647
nmea server on port 20220: bind failed.
pypilot_server: bind failed; already running a server?
autopilot iteration running too slow 0.09352826000008463
autopilot iteration running too slow 0.09290612100016915
autopilot iteration running too slow 0.09308955899996363
autopilot iteration running too slow 0.09326148799982548
autopilot iteration running too slow 0.09319445599999199
autopilot iteration running too slow 0.09300721499994324
autopilot iteration running too slow 0.09310237199997573
autopilot iteration running too slow 0.09301909100008743
nmea server on port 20220: bind failed.
autopilot iteration running too slow 0.09340898799996467
autopilot iteration running too slow 0.0931879449999542
autopilot iteration running too slow 0.09362461400019129
autopilot iteration running too slow 0.09307237200005147
autopilot iteration running too slow 0.09325393499989332
autopilot iteration running too slow 0.09323304999998072
autopilot iteration running too slow 0.09359008199999153
autopilot iteration running too slow 0.09377263600003971
autopilot iteration running too slow 0.09286909000002197
nmea server on port 20220: bind failed.
autopilot iteration running too slow 0.09397737600011169
servo probe ('/dev/AMA0', 38400) 1056.782658963
failed to open servo on: ('/dev/AMA0', 38400) [Errno 2] could not open port /dev/AMA0: [Errno 2] No such file or directory: '/dev/AMA0'
server/client is running too _slowly_ 0.07448879300000044
calibration loaded, starting 2472
autopilot iteration running too slow 0.14654861700000765
autopilot iteration running too slow 0.09174762600014219
autopilot iteration running too slow 0.0933306019999236
autopilot iteration running too slow 0.09228846199994223
^CTraceback (most recent call last):
File "/usr/local/bin/pypilot", line 33, in <module>
sys.exit(load_entry_point('pypilot==0.36', '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
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 186, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
closing autopilot