Starting fresh with a clean install of openplotter (V 2020-12-16), on a rasp4@4go. (in the last system, I had installed then removed the openplotter version of pypilot).
sudo apt-get update / upgrade, adding the arduino controller and GPS in serial app, then cloning from
https://github.com/pypilot/pypilot.
sudo python3 setup.py install runs without any issue and installs pypilot v0.25
then, running
pypilot
Code:
falling back to python nonblocking socket, will consume more cpu cannot import name 'linebuffer' from 'pypilot.linebuffer' (/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/linebuffer/__init__.py)
pypilot failed to import required modules. Did you forget to run sudo python3 setup.py install?
running
sudo python3 setup.py install a second time fixes(?) the issue.
pypilot stops running and returns this :
Code:
imu process 3585
nmea process 3590
listening on port 20220 for nmea connections
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
Loaded Pilots: ['basic', 'learning', 'simple', 'absolute']
warning: failed to open special file /dev/watchdog0 for writing
cannot stroke the watchdog
gps process 3593
pypilotServer process 3596
failed to load /home/pi/.pypilot/pypilot.conf [Errno 2] No such file or directory: '/home/pi/.pypilot/pypilot.conf'
Process Process-6:
made imu process realtime
Using settings file RTIMULib.ini
Settings file not found. Using defaults and creating settings file
Detected MPU9250/MPU9255 at standard address
Traceback (most recent call last):
Using fusion algorithm Kalman STATE4
IMU Name: MPU-925x
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/server.py", line 332, in load
self.load_file(open(default_persistent_path))
min/max compass calibration not in use
Using ellipsoid compass calibration
Using accel calibration
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.pypilot/pypilot.conf'
During handling of the above exception, another exception occurred:
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.25-py3.7-linux-armv7l.egg/pypilot/server.py", line 394, in run
self.init()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/server.py", line 423, in init
self.values = ServerValues(self)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/server.py", line 206, in __init__
self.load()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/server.py", line 337, in load
file = open(persist_fail, 'a')
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.pypilot/persist_fail'
Traceback (most recent call last):
File "/usr/local/bin/pypilot", line 11, in <module>
load_entry_point('pypilot==0.25', 'console_scripts', 'pypilot')()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 386, in main
ap.iteration()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 310, in iteration
self.sensors.poll()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/sensors.py", line 164, in poll
self.nmea.poll()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/nmea.py", line 335, in poll
self.probe_serial()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/nmea.py", line 421, in probe_serial
self.probedevicepath = serialprobe.probe('nmea%d' % self.probeindex, [38400, 4800], 8)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/serialprobe.py", line 242, in probe
if enumerate_devices():
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/serialprobe.py", line 163, in enumerate_devices
read_last_working_devices()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/serialprobe.py", line 54, in read_last_working_devices
for filename in os.listdir(pypilot_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.pypilot/'
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.25-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 169, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
closing autopilot
terminate calibration process
I gave
pypilot_boatimu a try, it worked, and judging by the refresh rate of the information in the terminal, I would say it ran at about 4 to 6 refreshed per second.
here is the output
Code:
imu process 1362
pypilotServer process 1364
failed to load /home/pi/.pypilot/pypilot.conf [Errno 2] No such file or directory: '/home/pi/.pypilot/pypilot.conf'
Process Process-3:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/server.py", line 332, in load
self.load_file(open(default_persistent_path))
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.pypilot/pypilot.conf'
During handling of the above exception, another exception occurred:
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.25-py3.7-linux-armv7l.egg/pypilot/server.py", line 394, in run
self.init()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/server.py", line 423, in init
self.values = ServerValues(self)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/server.py", line 206, in __init__
self.load()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.25-py3.7-linux-armv7l.egg/pypilot/server.py", line 337, in load
file = open(persist_fail, 'a')
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.pypilot/persist_fail'
made imu process realtime
Using settings file RTIMULib.ini
Settings file RTIMULib.ini loaded
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
MPU-925x init complete
calibration process 13617 roll -176.83042102012172 heading 89.40022002455703
calibration loaded, startingll -176.5742518850847 heading 89.40354398969419
pitch -0.9196784228614798 roll -175.89673271415342 heading 89.51804941709719
Maybe a forgot a step somewhere ?