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
pypilot disconnected at startup - Steps toward troubleshooting?
#7
(2020-03-24, 04:30 AM)AlanH Wrote: systemctl status pypilot shows
Unit pypilot.service could not be found.
In openplotter 1.2 pypilot is not really managed by systemd, so the loose collection of scripts in openplotter starts it and this causes issues. For openplotter 2.0 pypilot is managed as a system service and you can see the logs with journalctl.
Quote:Running from the console shows
Code:
pi@blue:~ $ python /usr/local/bin/pypilot
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
failed to open special file /dev/watchdog0 for writing:
autopilot cannot strobe the watchdog
connected to gpsd
Settings file not found. Using defaults and creating settings file
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
Accel calibration not in use
autopilot failed to read imu at time: 1585012430.11
servo probe... (u'/dev/ttyOP_ap', 38400)
arduino servo found on (u'/dev/ttyOP_ap', 38400)
serialprobe success: /home/pi/.pypilot/servodevice {u'path': u'/dev/ttyOP_ap', u'bauds': [38400]}
servo is running too _slowly_ 0.0625510215759
autopilot failed to read imu at time: 1585012430.31
MPU-925x init complete
nmea client connected
listening on port 20220 for nmea connections
Process NmeaBridgeProcess-5:
Traceback (most recent call last):
 File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
   self.run()
 File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
   self._target(*self._args, **self._kwargs)
 File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/nmea.py", line 615, in process
   self.receive_nmea(line, msgs)
 File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/nmea.py", line 434, in receive_nmea
   result = parser(line)
 File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/nmea.py", line 63, in parse_nmea_gps
   speed = float(data[6])
ValueError: could not convert string to float:
Alan,
Your error is related to parsing nmea0183 gps and a bug in pypilot.   I think you have an early version of pypilot since this bug was fixed.  If you can instead assign your gps to gpsd, you won't have this problem if you don't want to upgrade.   pypilot will automatically get gps from gpsd if available.

(2020-03-24, 03:31 PM)jamos.tan@gmail.com Wrote:
Code:
pi@openplotter:~ $ journalctl -u pypilot
-- No entries --
In openplotter 1.2 the log for pypilot is normally not saved unfortunately.
Quote:
Code:
pi@openplotter:~ $ ps aux | grep pypilot
pi        1121  0.1  2.8  40944 26736 ?        Sl   11:11   0:13 /usr/bin/python /usr/local/bin/pypilot_webapp 8081
pi        1142  2.6  2.4  35144 22792 ?        S    11:11   5:01 /usr/bin/python /usr/local/bin/pypilot
pi        1202  0.9  1.8  35044 17404 ?        S    11:12   1:46 /usr/bin/python /usr/local/bin/pypilot
pi        1207  0.3  1.7  35044 16780 ?        S    11:12   0:37 /usr/bin/python /usr/local/bin/pypilot
pi        1210  1.3  1.8  35044 17524 ?        D    11:12   2:35 /usr/bin/python /usr/local/bin/pypilot
pi        1217  0.4  1.7  35044 17028 ?        S    11:12   0:52 /usr/bin/python /usr/local/bin/pypilot
pi        1218  0.4  1.8  35172 17852 ?        S    11:12   0:48 /usr/bin/python /usr/local/bin/pypilot
pi       14336  0.0  0.0   4368   536 pts/0    S+   14:24   0:00 grep --color=auto pypilot
[code]pi@openplotter:~ $ python /usr/local/bin/pypilot
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
failed to open special file /dev/watchdog0 for writing:
autopilot cannot strobe the watchdog
connected to gpsd
Settings file not found. Using defaults and creating settings file
Using settings file RTIMULib.ini
Detected LSM9DS1 at standard/standard address
Using fusion algorithm Kalman STATE4
IMU Name: LSM9DS1
min/max compass calibration not in use
Using ellipsoid compass calibration
Accel calibration not in use
LSM9DS1 init complete
autopilot failed to read imu at time: 1585060023.64
busy, try again later {u'path': u'/dev/ttyOP_uno', u'bauds': [38400]} servo
busy, try again later {'path': '/dev/ttyOP_uno', 'bauds': [38400, 4800]} nmea0
nmea source for gps source gpsd 1585060023.71
busy, try again later {'path': '/dev/ttyOP_uno', 'bauds': [38400]} servo
signalk_server: bind failed, try again.
nmea client connected
nmea_bridge: bind failed.

bind failing indicates pypilot already has some processes running. Try running "killall python" before running pypilot from the console.
Reply


Messages In This Thread
RE: pypilot disconnected at startup - Steps toward troubleshooting? - by seandepagnier - 2020-03-24, 03:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)