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
Getting wind mode and GPS mode into pypilot
#20
Sorry please disregard the log posted above, I forgot i had opencpn running in the meantime with the NMEA connections ON! I am re-doing it properly...

So here we are, I fixed the pypilot.conf issue, router is OFF and servo is ON at the beginning:

tc@pypilot:~$ sudo sv stop pypilot
ok: down: pypilot: 0s
tc@pypilot:~$ pypilot
autopilot start 257.745779797
ERROR loading wind.py cannot import name 'HeadingOffset' cannot import name 'HeadingOffset'
ERROR loading gps.py cannot import name 'HeadingOffset' cannot import name 'HeadingOffset'
imu process 4186
nmea process 4191
listening on port 20220 for nmea connections
made imu process realtime
Using settings file RTIMULib.ini
Settings file not found. Using defaults and creating settings file
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
loading servo calibration /home/tc/.pypilot/servocalibration
WARNING: using default servo calibration!!
gps process 4194
Available Pilots: ['simple', 'basic', 'absolute']
warning: failed to open special file /dev/watchdog0 for writing
cannot stroke the watchdog
warning, failed to make calibration process idle, trying renice
pypilotServer process 4196
server setup has 5 pipes
autopilot init complete 258.013293338
servo probe ('/dev/ttyAMA0', 38400) 258.022901828
server add socket ('127.0.0.1', 35378)
server add socket ('127.0.0.1', 35380)
arduino servo found ['/dev/ttyAMA0', 38400]
serialprobe success: /home/tc/.pypilot/servodevice ['/dev/ttyAMA0', 38400]
ICM-20948 init complete
read imu running too _slowly_ 0.06269718700002613 0.05
imu rate set to rate 20
read imu running too _slowly_ 0.05710453099999313 0.05
setting initial gyro bias [-0.751, 0.087, -0.2]
server add socket ('127.0.0.1', 35382)
read imu running too _slowly_ 0.031576614999949015 0.05
gpsd connected
GPSD devices []
EEPROM SIGNATURE ok
calibration loaded, starting 4185
sensors is running too _slowly_ 0.07680781200002684
read imu running too _slowly_ 0.025872551999952975 0.05
signalk process 4192
signalkread token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXZpY2UiOiJweXBpbG90LTI1MTcwMjk3NDg5IiwiaWF0IjoxNjI4MjQ0MjkyLCJleHAiOjE2NTk4MDE4OTJ9.64SjpKncbuBgWYlyWYfFQ9JCkl9TOO-4OOVpBPRgG6s
nmea client failed to connect 192.168.14.5:20220
server, remove socket ('127.0.0.1', 35380)
server add socket ('127.0.0.1', 35388)

# Router is switched ON

nmea client connected 192.168.14.5:20220
sensor found gps tcp AIsocket0
sensor found wind tcp WIsocket0
server, remove socket ('127.0.0.1', 35388)
server add socket ('127.0.0.1', 35394)
server, remove socket ('127.0.0.1', 35394)
server add socket ('127.0.0.1', 35396)
read imu running too _slowly_ 0.031569634999982554 0.05
pypilot socket failed to send to 192.168.14.5:20220 1
pypilot socket failed to send to 192.168.14.5:20220 10
servo calibration invalid False
read imu running too _slowly_ 0.026525311999989754 0.05
pypilot socket failed to send to 192.168.14.5:20220 100
nmea client lost connection
sensor gps lost tcp AIsocket0
sensor wind lost tcp WIsocket0
nmea client connected 192.168.14.5:20220
sensor found gps tcp AIsocket1
sensor found wind tcp WIsocket1
server, remove socket ('127.0.0.1', 35396)
pypilot socket failed to send to 192.168.14.5:20220 1
pypilot socket failed to send to 192.168.14.5:20220 10
pypilot socket failed to send to 192.168.14.5:20220 100
nmea client lost connection
sensor gps lost tcp AIsocket1
sensor wind lost tcp WIsocket1
nmea client connected 192.168.14.5:20220
sensor found gps tcp AIsocket2
sensor found wind tcp WIsocket2
server add socket ('127.0.0.1', 35402)
pypilot socket failed to send to 192.168.14.5:20220 1
pypilot socket failed to send to 192.168.14.5:20220 10
pypilot socket failed to send to 192.168.14.5:20220 100
nmea client lost connection
nmea client connected 192.168.14.5:20220
sensor gps lost tcp AIsocket2
sensor wind lost tcp WIsocket2
sensor found gps tcp AIsocket3
sensor found wind tcp WIsocket3
read imu running too _slowly_ 0.026561561999983496 0.05
pypilot socket failed to send to 192.168.14.5:20220 1

So it seems to work but it is not stable, pypilot interface looks OK I can switch from compass to anything back and forth, engage disengage etc.
Sean: the router cannot work as client only, a WIFI AP is always started (192.168.4.1 default IP)

Here is what comes from the router TCP/192.168.14.5:20220 (Opencpn log)

<GREEN>20:31:20 (TCP:192.168.14.5:20220) $AIGSV,3,2,11,31,30,204,47,29,29,068,48,27,23,270,41,23,18,140,47*6B<0x0D><0x0A>
<GREEN>20:31:20 (TCP:192.168.14.5:20220) $AIGSV,3,3,11,05,14,043,43,25,04,129,28,10,01,165,*57<0x0D><0x0A>
<GREEN>20:31:20 (TCP:192.168.14.5:20220) $AIRMC,193120.000,A,4330.7166,N,00407.9883,E,0.01,0.00,030123,1.8,E,A*12<0x0D><0x0A>
<GREEN>20:31:20 (TCP:192.168.14.5:20220) !AIVDM,1,1,,B,13IVTI?000PBt9VHrOKQW4b`0<0>,0*2F<0x0D><0x0A>
<GREEN>20:31:21 (TCP:192.168.14.5:20220) $AIGSA,A,3,02,16,26,18,23,27,31,05,29,,,,1.66,0.90,1.39*1E<0x0D><0x0A>
<GREEN>20:31:21 (TCP:192.168.14.5:20220) $AIGSV,3,1,11,26,77,289,48,18,74,102,51,16,41,308,45,02,37,050,46*6B<0x0D><0x0A>
<GREEN>20:31:21 (TCP:192.168.14.5:20220) $AIGSV,3,2,11,31,30,204,47,29,29,068,48,27,23,270,41,23,18,140,47*6B<0x0D><0x0A>
<GREEN>20:31:21 (TCP:192.168.14.5:20220) $AIGSV,3,3,11,05,14,043,43,25,04,129,28,10,01,165,*57<0x0D><0x0A>
<GREEN>20:31:21 (TCP:192.168.14.5:20220) $AIRMC,193121.000,A,4330.7166,N,00407.9883,E,0.00,0.00,030123,1.8,E,A*12<0x0D><0x0A>
<GREEN>20:31:22 (TCP:192.168.14.5:20220) $AIGSA,A,3,02,16,26,18,23,27,31,05,29,,,,1.66,0.90,1.39*1E<0x0D><0x0A>
<GREEN>20:31:22 (TCP:192.168.14.5:20220) $AIGSV,3,1,11,26,77,289,48,18,74,102,51,16,41,308,45,02,37,050,46*6B<0x0D><0x0A>
<GREEN>20:31:22 (TCP:192.168.14.5:20220) $AIGSV,3,2,11,31,30,204,47,29,29,068,48,27,23,270,41,23,18,140,47*6B<0x0D><0x0A>
<GREEN>20:31:22 (TCP:192.168.14.5:20220) $AIGSV,3,3,11,05,14,043,43,25,04,129,28,10,01,165,*57<0x0D><0x0A>
<GREEN>20:31:22 (TCP:192.168.14.5:20220) $AIRMC,193122.000,A,4330.7166,N,00407.9883,E,0.00,0.00,030123,1.8,E,A*11<0x0D><0x0A>
<GREEN>20:31:23 (TCP:192.168.14.5:20220) $AIGSA,A,3,02,16,26,18,23,27,31,05,29,,,,1.66,0.90,1.39*1E<0x0D><0x0A>
<GREEN>20:31:23 (TCP:192.168.14.5:20220) $AIGSV,3,1,11,26,77,289,48,18,74,102,50,16,41,308,45,02,37,050,46*6A<0x0D><0x0A>
<GREEN>20:31:23 (TCP:192.168.14.5:20220) $AIGSV,3,2,11,31,30,204,47,29,29,068,48,27,23,270,41,23,18,140,47*6B<0x0D><0x0A>
<GREEN>20:31:23 (TCP:192.168.14.5:20220) $AIGSV,3,3,11,05,14,043,43,25,04,130,28,10,01,165,*5F<0x0D><0x0A>
<GREEN>20:31:23 (TCP:192.168.14.5:20220) $AIRMC,193123.000,A,4330.7166,N,00407.9883,E,0.00,0.00,030123,1.8,E,A*10<0x0D><0x0A>
<GREEN>20:31:23 (TCP:192.168.14.5:20220) $WIMWV,298.0,R,4.6,N,A*22<0x0D><0x0A>
<GREEN>20:31:24 (TCP:192.168.14.5:20220) $AIGSA,A,3,02,16,26,18,23,27,31,05,29,,,,1.66,0.90,1.39*1E<0x0D><0x0A>
<GREEN>20:31:24 (TCP:192.168.14.5:20220) $AIGSV,3,1,11,26,78,288,48,18,74,102,50,16,41,308,45,02,37,050,46*64<0x0D><0x0A>
<GREEN>20:31:24 (TCP:192.168.14.5:20220) $AIGSV,3,2,11,31,30,204,47,29,29,068,48,27,23,270,41,23,18,140,47*6B<0x0D><0x0A>
<GREEN>20:31:24 (TCP:192.168.14.5:20220) $AIGSV,3,3,11,05,14,043,43,25,04,130,27,10,01,165,*50<0x0D><0x0A>
<GREEN>20:31:24 (TCP:192.168.14.5:20220) $AIRMC,193124.000,A,4330.7166,N,00407.9883,E,0.01,0.00,030123,1.8,E,A*16<0x0D><0x0A>
<GREEN>20:31:25 (TCP:192.168.14.5:20220) $AIGSA,A,3,02,16,26,18,23,27,31,05,29,,,,1.66,0.90,1.39*1E<0x0D><0x0A>
<GREEN>20:31:25 (TCP:192.168.14.5:20220) $AIGSV,3,1,11,26,78,288,48,18,74,102,50,16,41,308,45,02,37,050,46*64<0x0D><0x0A>
<GREEN>20:31:25 (TCP:192.168.14.5:20220) $AIGSV,3,2,11,31,30,204,47,29,29,068,48,27,23,270,41,23,18,140,47*6B<0x0D><0x0A>
<GREEN>20:31:25 (TCP:192.168.14.5:20220) $AIGSV,3,3,11,05,14,043,43,25,04,130,27,10,01,165,*50<0x0D><0x0A>
<GREEN>20:31:25 (TCP:192.168.14.5:20220) $AIRMC,193125.000,A,4330.7166,N,00407.9883,E,0.01,0.00,030123,1.8,E,A*17<0x0D><0x0A>
<GREEN>20:31:26 (TCP:192.168.14.5:20220) $AIGSA,A,3,02,16,26,18,23,27,31,05,29,,,,1.66,0.90,1.39*1E<0x0D><0x0A>
<GREEN>20:31:26 (TCP:192.168.14.5:20220) $AIGSV,3,1,11,26,78,288,48,18,74,102,50,16,41,308,45,02,37,050,46*64<0x0D><0x0A>
<GREEN>20:31:26 (TCP:192.168.14.5:20220) $AIGSV,3,2,11,31,30,204,47,29,29,068,48,27,23,270,41,23,18,140,47*6B<0x0D><0x0A>
<GREEN>20:31:26 (TCP:192.168.14.5:20220) $AIGSV,3,3,11,05,14,043,42,25,04,130,26,10,01,165,*50<0x0D><0x0A>
<GREEN>20:31:26 (TCP:192.168.14.5:20220) $AIRMC,193126.000,A,4330.7166,N,00407.9883,E,0.00,0.00,030123,1.8,E,A*15<0x0D><0x0A>
Reply


Messages In This Thread
RE: Getting wind mode and GPS mode into pypilot - by MBJ335 - 2023-01-03, 08:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)