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
[OP2] Pypilot not working in GPS mode
#1
Hi

I installed the newest noobs.zip from 23.04.2020 on a RPI3+

Pypilot seems to work fine in Compass mode. After switching to GPS, pypilot seems to crash (connection is lost to the arduino) After a few seconds, pypilot switches back to compass mode, and the connection could be established again.

Any suggestions?

regards, Stephan
  Reply
#2
Is openplotter-pypilot switching back to compass mode by itself?

Please set openplotter-pypilot to "disabled" and type "pypilot" in a terminal. Do you get any error?

Moving this post to pypilot forum
  Reply
#3
(03-26-2020, 07:16 AM)Sailoog Wrote: Is openplotter-pypilot switching back to compass mode by itself?

Please set openplotter-pypilot to "disabled" and type "pypilot" in a terminal. Do you get any error?

Moving this post to pypilot forum

Hi

While running in autostart, it is switching back to compass mode by itself. By runnimng pypilot in a terminal, it just stop.

I got the result from the terminal: everything is ok until line "EEPROM SIGNATURE ok"




pi@openplotter:~ $ pypilot
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
Loaded Pilots: ['wind', 'absolute', 'learning', 'simple', 'basic']
connected to gpsd
warning: failed to open special file /dev/watchdog0 for writing
         cannot stroke the watchdog
Settings file RTIMULib.ini loaded
Using settings file RTIMULib.ini
Detected MPU9250/MPU9255 at standard address
Using fusion algorithm Kalman STATE4
IMU Name: MPU-925x
min/max compass calibration not in use
Using ellipsoid compass calibration
Using accel calibration
autopilot failed to read imu at time: 1585252469.0611365
sensors is running too _slowly_ 0.05521082878112793
MPU-925x init complete
autopilot failed to read imu at time: 1585252469.2705443
gpsd is using device /dev/ttyOP_gps
found gps on gpsd /dev/ttyOP_gps
arduino servo found on ['/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0', 38400]
serialprobe success: /home/pi/.pypilot/servodevice ['/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0', 38400]
found rudder on servo /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
servo calibration invalid False
nmea ready for connections
listening on port 20220 for nmea connections

Big Grin up to here: everything is fine!! 
EEPROM SIGNATURE ok

Huh "here i switch to GPS mode":

Traceback (most recent call last):
  File "/usr/local/bin/pypilot", line 11, in <module>
    load_entry_point('pypilot==0.16', 'console_scripts', 'pypilot')()
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 395, in main
    ap.run()
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 214, in run
    self.iteration()
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 335, in iteration
    pilot.compute_heading()
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/pilots/pilot.py", line 60, in compute_heading
    gps = resolv(compass + ap.gps_compass_offset.value, 180)
NameError: name 'resolv' is not defined
got signal atexit cleaning up
got signal 15 cleaning up
got signal 15 cleaning up
got signal 15 cleaning up
Process NmeaBridgeProcess-4:
Process Process-1:
Process Process-3:
Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/nmea.py", line 622, in process
    events = self.poller.poll(timeout)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 107, in cleanup
    raise KeyboardInterrupt # to get backtrace on all processes
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/boatimu.py", line 154, in imu_process
    time.sleep(t)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 107, in cleanup
    raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
KeyboardInterrupt
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/pipeserver.py", line 147, in pipe_server_process
    time.sleep(.1)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 107, in cleanup
    raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
got signal 15 cleaning up
Process gpsProcess-5:
got signal 17 cleaning up
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/popen_fork.py", line 28, in poll
    pid, sts = os.waitpid(self.pid, flag)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 107, in cleanup
    raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
got signal 15 cleaning up
Process Process-2:
Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/calibration_fit.py", line 618, in CalibrationProcess
    p = cal_pipe.recv(1)
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/pipeserver.py", line 36, in recv
    if self.pollin.poll(1000.0*timeout):
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 107, in cleanup
    raise KeyboardInterrupt # to get backtrace on all processes
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/gpsd.py", line 66, in gps_process
    self.read(pipe)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/gpsd.py", line 39, in read
    gpsdata = self.gpsd.next()
  File "/usr/local/lib/python3.7/dist-packages/gps/gps.py", line 301, in next
    return self.__next__()
  File "/usr/local/lib/python3.7/dist-packages/gps/gps.py", line 292, in __next__
    if self.read() == -1:
  File "/usr/local/lib/python3.7/dist-packages/gps/gps.py", line 281, in read
    status = gpscommon.read(self)
  File "/usr/local/lib/python3.7/dist-packages/gps/client.py", line 115, in read
    frag = self.sock.recv(8192)
  File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 107, in cleanup
    raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
KeyboardInterrupt
closing autopilot
pi@openplotter:~ $
  Reply
#4
I tried to fix in git just now. Sorry for the bug, the recent version since restructuring the code is not tested much yet. The stable version 0.12 is recommended for the time being.
  Reply
#5
To apply latest changes in pypilot code re-install openplotter-pypilot app from openplotter-settings app.
  Reply
#6
(03-27-2020, 04:47 AM)Sailoog Wrote: To apply latest changes in pypilot code re-install openplotter-pypilot app from openplotter-settings app.

ok, it works! thanks a lot,

all the best for you,

Stephan
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)