Posts: 227
Threads: 55
Joined: Mar 2018
Reputation:
11
2020-01-25, 10:18 PM
(This post was last modified: 2020-01-25, 10:23 PM by mgrouch.)
You can try running
pypilot_calibration
from command line. Does it give
any errors?
Thanks,
—MG
Might be SignalK needs to be down during
IMU calibration?
Thanks
Posts: 2,215
Threads: 20
Joined: Jun 2016
Reputation:
65
You can enable the debugging output in calibration_fit.py and run boatimu.py directly. This should give a lot of information indicating why calibration did not work.
The debugging is to the console, but I just now hacked together support to output the log into the ui and to update the sigmapoints as the change rather than only if calibration is found. Hopefully this will make calibration easier in the future.
Posts: 17
Threads: 2
Joined: Jul 2017
Reputation:
1
2020-01-26, 03:05 AM
(This post was last modified: 2020-01-26, 04:03 AM by diyc235.)
interesting I ran:
/usr/local/bin/pypilot_calibration |& tee /tmp/out
Oooo! Lots of unhappy stack traces. Initially about the interface window
(pypilot_calibration:9461): Gtk-WARNING **: 19:47:37.072: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkButton)
Followed by this repeating every second and then when ever switching to another tab:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/ui/autopilot_calibration.py", line 145, in receive_messages
msg = self.client.receive_single()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/signalk/client.py", line 187, in receive_single
line = self.receive_line(timeout)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/signalk/client.py", line 139, in receive_line
raise Exception('invalid message from server:', line)
Exception: ('invalid message from server:', 'invalid request: watch unknown value: servo.flags')
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/signalk/client.py", line 137, in receive_line
msg = kjson.loads(line.rstrip())
ValueError: Expected object or value
Rotating the IMU to each a face of the cube does not seem to cause any stack traces.
I have evaluated OP 1.x with a different IMU and I wonder if there is additional setup that for OP2.x?
Maybe I need some signal K integration?
---edit---
I also edited calibration_fit.py to uncomment the debug function and then ran boatimu.py on the CLI and ran:
pi@openplotter:/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot $ python ./boatimu.py
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot/boatimu.py", line 20, in <module>
import autopilot, calibration_fit, vector, quaternion
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot/autopilot.py", line 21, in <module>
from signalk.server import *
ImportError: No module named signalk.server
Is there a venv that this need to run in? I started the "Signal K Installer" and ran the "Reinstall Signal K" procedure, but the results are the same
Posts: 2,215
Threads: 20
Joined: Jun 2016
Reputation:
65
Did you issue "sudo python3 setup.py install" ?
what if you just execute "pypilot_boatimu" from the console not in the github directory?
Posts: 17
Threads: 2
Joined: Jul 2017
Reputation:
1
I dont know where to run "sudo python3 setup.py install
pi@openplotter:~ $ python3 setup.py install
python3: can't open file 'setup.py': [Errno 2] No such file or directory
pi@openplotter:~ $ ls .pypilot
pypilot.conf pypilot.conf.bak pypilot.conf.old RTIMULib.ini.sav signalk.conf
So I ran the pypilot_boatimu, and got some interesting data.
I think when the pypilot_boatimu.service is running the delay I see is it getting restarted.
On the CLI it just aborts.
pi@openplotter:/ $ sudo systemctl pypilot_boatimu.service
pi@openplotter:/ $ /usr/local/bin/pypilot_boatimu
2020-01-26 12:48:56.381797: E tensorflow/core/platform/hadoop/hadoop_file_system.cc:132] HadoopFileSystem load error: libhdfs.so: cannot open shared object file: No such file or directory
Settings file not found. Using defaults and creating settings file
Failed to open settings file for saveUsing settings file RTIMULib.ini
Detected MPU9250/MPU9255 at standard address
Failed to open settings file for save
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
accelfit count 1 7694869 roll -77.50676728185351 heading 342.28544210815704
accelfit count 2 27485174 roll -152.2621289283252 heading 303.7283570507189 4
accelfit count 2 6677834 roll -140.08888877750096 heading 289.10159283028685
FitPointsCompass [[14.2557133436203, -43.67223858833313, 22.100274920463562, -0.1235603175559481, -0.8430772661834296, 0.5136304375772691, -0.030890079388987024, -0.2107693165458574, 0.12840760939431728], [20.78366084098816, -43.423911857604985, 22.94057931900024, -0.03809630500012289, -0.9119414391868278, 0.4002456505365452, -0.009524076250030723, -0.22798535979670695, 0.1000614126341363], [32.866821722550824, 6.200708475979892, 35.537058743563556, 0.07808928338389783, 0.24761561321761083, 0.9655241785772803, 0.019522320845974456, 0.06190390330440271, 0.2413810446443201], [23.98492169380188, -43.73866033554077, 21.939056873321533, 0.1374177011771569, -0.8576179501997436, 0.49338184595299334, 0.034354425294289226, -0.2144044875499359, 0.12334546148824833], [17.30472755432129, -43.78429889678955, 23.101877212524414, -0.07120380195671716, -0.8721650268469405, 0.4839276926879126, -0.01780095048917929, -0.21804125671173513, 0.12098192317197815], [22.458370685577393, -43.77533435821533, 22.425469875335693, 0.10954605092977765, -0.846014700496456, 0.521343804383424, 0.027386512732444412, -0.211503675124114, 0.130335951095856], [15.5418758392334, -43.658793449401855, 22.89375114440918, -0.1137152051903092, -0.8691425551188191, 0.48116646517166545, -0.0284288012975773, -0.21728563877970478, 0.12029161629291636], [18.56390619277954, -43.51535415649414, 22.442813873291016, 0.037614063240518636, -0.8208234619587575, 0.5699094739263064, 0.009403515810129659, -0.2052058654896894, 0.1424773684815766], [13.239375591278076, -43.533284187316895, 21.26343822479248, -0.1284906512261399, -0.8190881216126877, 0.5590914145609094, -0.032122662806534974, -0.20477203040317193, 0.13977285364022735]] [0, 0, 0, 30, 0] [0.0, 1.0000000000000002, 0.0]
Process Process-2:
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.12-py3.7-linux-armv7l.egg/pypilot/calibration_fit.py", line 614, in CalibrationProcess
fit = FitCompass(compass_cal, compass_calibration, norm)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot/calibration_fit.py", line 496, in FitCompass
fit = FitPointsCompass(p, compass_calibration, norm)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot/calibration_fit.py", line 189, in FitPointsCompass
guess.append((diff[0]+diff[1]+diff[2])/3)
AttributeError: 'map' object has no attribute 'append'
got signal 17 cleaning up
got signal 15 cleaning up
Process Process-3:
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.12-py3.7-linux-armv7l.egg/pypilot/boatimu.py", line 147, in imu_process
time.sleep(t)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot/boatimu.py", line 487, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
Traceback (most recent call last):
File "/usr/local/bin/pypilot_boatimu", line 11, in <module>
load_entry_point('pypilot==0.12', 'console_scripts', 'pypilot_boatimu')()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot/boatimu.py", line 530, in main
boatimu.iteration()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot/boatimu.py", line 522, in iteration
time.sleep(dt)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot/boatimu.py", line 487, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
got signal atexit cleaning up
got signal 15 cleaning up
Process Process-1:
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.12-py3.7-linux-armv7l.egg/signalk/pipeserver.py", line 157, in pipe_server_process
time.sleep(.1)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot/boatimu.py", line 487, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
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.12-py3.7-linux-armv7l.egg/pypilot/boatimu.py", line 487, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
terminate imu process
terminate calibration process
pi@openplotter:/ $
Posts: 17
Threads: 2
Joined: Jul 2017
Reputation:
1
2020-01-27, 08:08 PM
(This post was last modified: 2020-01-27, 08:15 PM by diyc235.)
back to square one...
1) new SD card new install new update
2) completed setup over eth0 instead of wlan0 ( much faster !!)
3) enabled VNC, ssh and i2c, set resolution
4) reboot
5) verified pypilot 2.0.5-beta
6) connected with VNC
7) opened calibration window in pypilot selected accel tab
8) open term window ran:
pi@openplotter:~ $ sudo systemctl stop pypilot_boatimu.service
pi@openplotter:~ $ /usr/local/bin/pypilot_boatimu
Rotated compas to to 3 sides of the cube. pypilot_boatimu aborts with this stacktrace
2020-01-27 13:53:33.725775: E tensorflow/core/platform/hadoop/hadoop_file_system.cc:132] HadoopFileSystem load error: libhdfs.so: cannot open shared object file: No such file or directory
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
Using accel calibration
MPU-925x init complete
Process Process-2:626616 roll 97.67474992733253 heading 313.89466915710517
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.12-py3.7-linux-armv7l.egg/pypilot/calibration_fit.py", line 602, in CalibrationProcess
fit = FitAccel(accel_cal)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.12-py3.7-linux-armv7l.egg/pypilot/calibration_fit.py", line 473, in FitAccel
diff = vector.sub(maxa[:3], mina[:3])
TypeError: 'map' object is not subscriptable
What am I missing as far as the set up goes ?
This should work
Posts: 2,879
Threads: 59
Joined: Mar 2016
Reputation:
275
Re-install openplotter-pypilot app from openplotter-settings app.
Posts: 2,215
Threads: 20
Joined: Jun 2016
Reputation:
65
diyc,
all of your errors posted are related to fallout from python3 which until recently has not been supported. Now python3 should work (since a few days ago) but you need to install the latest version
Posts: 17
Threads: 2
Joined: Jul 2017
Reputation:
1
YAHOO! I got yellow dots on the accel sphere!!
I uninstalled pypilot and made sure that I had the latest I2C Sensors app installed then reinstalled pypilot. Presto!! no more aborts on /usr/local/bin/pypilot_boatimu !!
Calibrating the compass and checking for drift... looks good so far !
Posts: 76
Threads: 14
Joined: Nov 2019
Reputation:
1
(2020-01-28, 04:01 AM)diyc235 Wrote: YAHOO! I got yellow dots on the accel sphere!!
I uninstalled pypilot and made sure that I had the latest I2C Sensors app installed then reinstalled pypilot. Presto!! no more aborts on /usr/local/bin/pypilot_boatimu !!
Calibrating the compass and checking for drift... looks good so far !
Stupid question maybe:
I start with Red dots which turn eventually into Green ...
Pls comment
Bart
|