MPU9250 heading is slowly drifting - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17) +--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18) +--- Thread: MPU9250 heading is slowly drifting (/showthread.php?tid=2210) |
RE: MPU9250 heading is slowly drifting - Sailoog - 2020-01-18 Here my test in fresh Raspbian for python 2 and python 3. Pypilot does not work on any of them python3 ####### sudo apt autoremove sense-hat sudo apt install python3-serial libpython3-dev python3-numpy python3-scipy swig python3-ujson python3-pyudev python3-pil python3-flask python3-opengl python3-pip python3-dev python3-setuptools python3-flask-socketio libatlas-base-dev python3-wxgtk4.0 sudo pip3 install pywavefront pyglet gps gevent-websocket python-socketio tensorflow git clone https://github.com/seandepagnier/RTIMULib2.git cd RTIMULib2/Linux cd python sudo python3 setup.py build sudo python3 setup.py install cd git clone https://github.com/pypilot/pypilot git clone https://github.com/pypilot/pypilot_data cp -rv pypilot_data/* pypilot cd pypilot sudo python3 setup.py build sudo python3 setup.py install cd mkdir .pypilot result ------------------------------------------------------------------------ 2020-01-18 16:05:53.666728: 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 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 MPU-925x init complete Fast drifting pitch 6.324074922525247 roll -91.53618928287831 heading 75.27876668630839 pitch -44.22218193641304 roll 175.96489709053526 heading 6.5329903265509754 Alignment reset in calibration window does not work. Boat is not rendered python2 ####### sudo apt autoremove sense-hat sudo apt install python-serial libpython-dev python-numpy python-scipy swig python-ujson python-pyudev python-pil python-flask python-opengl python-pip python-dev python-setuptools python-wxgtk3.0 sudo pip install pywavefront pyglet gps gevent-websocket python-socketio flask-socketio # unable to install tensorflow for python2 git clone https://github.com/seandepagnier/RTIMULib2.git cd RTIMULib2/Linux cd python sudo python setup.py build sudo python setup.py install cd git clone https://github.com/pypilot/pypilot git clone https://github.com/pypilot/pypilot_data cp -rv pypilot_data/* pypilot cd pypilot sudo python setup.py build sudo python setup.py install cd mkdir .pypilot result ------------------------------------------------------------------------ ERROR loading learning.py No module named tensorflow , No module named learning ERROR loading learning.py No module named tensorflow , No module named learning 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 MPU-925x init complete Slow but continous drifting: pitch -1.02317380473 roll -92.9565552682 heading 76.9911142959 pitch -1.24983757477 roll -91.073889727 heading 78.5113350684 Alignment reset in calibration window does not work. Boat is rendered RE: MPU9250 heading is slowly drifting - seandepagnier - 2020-01-18 with python3 the drift is fast and with python2 the drift is slow?? RE: MPU9250 heading is slowly drifting - Sailoog - 2020-01-18 (2020-01-18, 08:21 PM)seandepagnier Wrote: with python3 the drift is fast and with python2 the drift is slow?? Yes, if I uninstall tensorflow in python3, drift and initial values are similar in python2 and python3. RE: MPU9250 heading is slowly drifting - seandepagnier - 2020-01-19 I have just now found and fixed a bug in python-rtimulib2 that affects only python3: tensorflow should not have any effect. let me know if this fixes the drifting issue: https://github.com/seandepagnier/RTIMULib2/commit/1331eaffac6d88960cc4f73b05bffde7d0f1d29d RE: MPU9250 heading is slowly drifting - seandepagnier - 2020-01-19 I fixed the issue with alignment just now. Please pull both RTIMULib2 and pypilot from git again. RE: MPU9250 heading is slowly drifting - It Paradyske - 2020-01-19 Yes, it is stable! Great job! Although, I don't get a compass calibration... RE: MPU9250 heading is slowly drifting - Sailoog - 2020-01-19 Thanks Sean, it seems that drift has gone and alignment is working again. Now I get this error when calibrating and a fit is achieved: Code: Settings file RTIMULib.ini loaded RE: MPU9250 heading is slowly drifting - seandepagnier - 2020-01-19 python3 is still broken for calibration, but very close.. I'll look at it tomorrow. RE: MPU9250 heading is slowly drifting - Sailoog - 2020-01-19 Ok, in the meantime I will apply your latest changes in RTIMULib2 and pypilot web to OP. Error with tensorflow has gone in python 3 too thanks RE: MPU9250 heading is slowly drifting - ddelorme - 2020-01-19 looks much better my pitch and roll are mixed up but it is stable and levels out |