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:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New IMU BerryGPS-IMUv4
#21
(2022-02-09, 02:38 PM)Sailoog Wrote: To fix that you have 2 options:

1. Run the following and manually answer y when asked to confirm the relevant changes:


Code:
sudo apt update


2. Run apt-get update with the --allow-releaseinfo-change flag to automatically confirm the changes:


Code:
sudo apt-get update --allow-releaseinfo-change

The timeline of OP3 is: ASAP Smile

If I am not wrong the default mode for that GPS is serial, adding support for I2C needs some hardware modification and python scripting in openpotter-i2c app to add only method 1 of your link and that is not the most efficient. I do not know if using this device by I2C is the best option.

Thanks, I will try that while waiting for OP3.

Yes, serial is default for the berrygps, you are correct that I2C requires soldering jumpers and python script.
I got both the IMU and magnet to respond over I2C the first try before I messed up, but not the gps.
I'm installing it on top of a PICAN-M, I believe this excludes serial?
Reply
#22
You could use berryGPS by serial as long as you do not connect anything to the NMEA 0183 input in the PICAN but you could use the berryGPS and the PICAN NMEA 0183 output at the same time.

I do not have any of these devices so this is all guesswork...
Reply
#23
(2021-07-12, 11:39 AM)Mark_OzzMaker Wrote: Below is what I did to get it working.
I am sure that sometime in the future this will not be needed as it will be in the main image.


  1.  burn the openplotter image to sd card  2020-12-16-OpenPlotter-v2-Starting.img

  2.   enable i2c interface with sudo raspi-config

  3.   open OpenPlotter settings app and install I2C and PyPilot

  4.   the updates need to be downloaded and installed, go to terminal window and enter the below commands;

    1. sudo apt-get update
      the above may fail, still continue
    2. sudo apt-get install libqt4-dev cmake -y
    3. git clone https://github.com/seandepagnier/RTIMULib2.git
    4. git clone https://github.com/pypilot/pypilot.git
    5. cd RTIMULib2/Linux/
    6. mkdir build
    7. cd build/
    8. cmake ..
    9. make -j4
    10. sudo make install
    11. sudo ldconfig
    12. cd ../python/
    13. python3 setup.py build
    14. sudo python3 setup.py install
    15. cd ~/pypilot/
    16. sudo python3 setup.py install
      run the above command twice
  5. Open PyPilot, it should now have detected the IMU

(2022-02-10, 01:50 PM)Sailoog Wrote: You could use berryGPS by serial as long as you do not connect anything to the NMEA 0183 input in the PICAN but you could use the berryGPS and the PICAN NMEA 0183 output at the same time.

I do not have any of these devices so this is all guesswork...

Update successful, but following the procedure above now breaks pypilot.
Starting fresh again and keeping a closer eye on where it fails:


Install latest starting image 
     -> OK
Setting up system (country, language, keyboard, wifi etc.)
sudo apt-get update --allowreleaseinfo-change 
     -> OK
Enable I2C
Install latest OP packages (signalk, I2C, pypilot) from OP settings, OP settings updated as part of process
     -> signalk OK
     -> i2c OK, able to add pressure/temperature sensor and send to signalk
     -> pypilot OK, opens from Openplotter menu
     -> IMU not detected by pypilot (as expected at this stage)
Continuing procedure above (skipping step 1 as already updated) step 2 to 9 
     -> OK, pypilot opens from OP menu
     -> IMU not detected by pypilot (as expected at this stage)
Continuing step 10 - 16 
     -> pypilot no longer available from menu
Reinstall pypilot from OP installer
     -> OK, pypilot opens from OP menu
     -> IMU not detected by pypilot (as expected at this stage)

Conclusion 1: 
The python commands step 10 - 16 above breaks pypilot, incompatible after Raspi Buster update?

Conclusion 2:
Wait for OPv3, hoping BerryGPS-IMU v4 is supported in new version of pypilot

For the gps I would prefer to get the I2C and gpsd route working, I plan on connecting an external gps to PICAN-M NMEA 0183 interface as secondary source. 

Cheers
Reply
#24
a quick search shows the LSM6DSL. It should be supported although this is not the usual sensor. I tested and the gyroscope has a higher noise level than icm20948/mpu9255 so I would prefer that sensor if possible instead.

What does i2cdetect -y 1 show?
Reply
#25
(2022-02-15, 03:43 AM)seandepagnier Wrote: a quick search shows the LSM6DSL.  It should be supported although this is not the usual sensor.   I tested and the gyroscope has a higher noise level than icm20948/mpu9255 so I would prefer that sensor if possible instead.

What does i2cdetect -y 1 show?

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- 1c -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- 42 -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- 6a -- -- -- -- --
70: -- -- -- -- -- -- -- 77

Where from BerryGPS-IMU v4 documentation:
0x1c = LSM6DSL accelerometer (not detectable from pypilot, even after procedure above and reinstalling pypilot)
0x1e = LIS3MDL magnetometer (not detected by i2cdetect above)
0x42 = GPS chip (this is a whole other kettle of fish)
0x6a = LSM6DSL gyro (not detectable from pypilot, even after procedure above and reinstalling pypilot)
0x77 = BM388 pressure/temperature sensor (these are visible in i2c app and connected to signalk)
Reply
#26
Which version of rtimulib2 is installed? It should detect it. Can you stop all pypilot processes and services and perhap install rtimulib2 from source and run the basic drive demo?

It could be something very simple like the sensors set to the secondary address or something like that. It should be supported.

try single stepping RTIMUSettings::discoverIMU in gdb
especially line 213:

} else if (result == LSM6DS33_ID || result == LSM6DSL_ID || result == ISM330DHCX_ID) {

and check the value of "result"
Reply
#27
(2022-02-15, 01:30 PM)cortinaman Wrote:
(2022-02-15, 03:43 AM)seandepagnier Wrote: a quick search shows the LSM6DSL.  It should be supported although this is not the usual sensor.   I tested and the gyroscope has a higher noise level than icm20948/mpu9255 so I would prefer that sensor if possible instead.

What does i2cdetect -y 1 show?

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- 1c -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- 42 -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- 6a -- -- -- -- --
70: -- -- -- -- -- -- -- 77

Where from BerryGPS-IMU v4 documentation:
0x1c = LSM6DSL accelerometer (not detectable from pypilot, even after procedure above and reinstalling pypilot)
0x1e = LIS3MDL magnetometer (not detected by i2cdetect above)
0x42 = GPS chip (this is a whole other kettle of fish)
0x6a = LSM6DSL gyro (not detectable from pypilot, even after procedure above and reinstalling pypilot)
0x77 = BM388 pressure/temperature sensor (these are visible in i2c app and connected to signalk)

(2022-02-16, 12:46 AM)seandepagnier Wrote: Which version of rtimulib2 is installed?    It should detect it.    Can you stop all pypilot processes and services and perhap install rtimulib2 from source and run the basic drive demo?

It could be something very simple like the sensors set to the secondary address or something like that.   It should be supported.

try single stepping RTIMUSettings::discoverIMU  in gdb
especially line 213:

           } else if (result == LSM6DS33_ID || result == LSM6DSL_ID || result == ISM330DHCX_ID) {

and check the value of "result"

Sorry, my mistake.
I was mistaken about the i2c adresses, 0x1e should not be there. Correct addresses are:
  • 0x6A for the gyroscope and accelerometer

  • 0x1C for the magnetometer

  • 0x77 for the pressure sensor

  • 0x42 for GPS
I was more worried about pypilot being broken, so I started from scratch again.
This time I checked on pypilot after each step, after step 14 pypilot detected the imu and magnetometer so I stopped.
  1. sudo apt-get update
    the above may fail, still continue
  2. sudo apt-get install libqt4-dev cmake -y
  3. git clone https://github.com/seandepagnier/RTIMULib2.git
  4. git clone https://github.com/pypilot/pypilot.git
  5. cd RTIMULib2/Linux/
  6. mkdir build
  7. cd build/
  8. cmake ..
  9. make -j4
  10. sudo make install
  11. sudo ldconfig
  12. cd ../python/
  13. python3 setup.py build
  14. sudo python3 setup.py install
I.e. I did not perform the final two steps.
  1. cd ~/pypilot/
  2. sudo python3 setup.py install
    run the above command twice
Pypilot runs and data are sent to signalk. Same with temp. and press from I2C app.

Maybe it's time to clone the sd card before I continue with gps and PICAN-M.
Reply
#28
cortinaman

I was more worried about pypilot being broken, so I started from scratch again.
This time I checked on pypilot after each step, after step 14 pypilot detected the imu and magnetometer so I stopped.
  1. sudo apt-get update
    the above may fail, still continue
  2. sudo apt-get install libqt4-dev cmake -y
  3. git clone https://github.com/seandepagnier/RTIMULib2.git
  4. git clone https://github.com/pypilot/pypilot.git
  5. cd RTIMULib2/Linux/
  6. mkdir build
  7. cd build/
  8. cmake ..
  9. make -j4
  10. sudo make install
  11. sudo ldconfig
  12. cd ../python/
  13. python3 setup.py build
  14. sudo python3 setup.py install
[Image: Cmake-Error.png]

does not work, no idea why or what to do
Reply
#29
(2022-02-20, 10:54 AM)Surfer2010 Wrote: cd RTIMULib2/Linux/
  1. mkdir build
  2. cd build/
  3. cmake ..
  4. make -j4
  5. sudo make install
  6. sudo ldconfig
  7. cd ../python/
  8. python3 setup.py build
  9. sudo python3 setup.py install
[Image: Cmake-Error.png]

does not work, no idea why or what to do

are you sure you have executed this
Quote:2. sudo apt-get install libqt4-dev cmake -y
Reply
#30
(2022-02-20, 12:30 PM)BlackSea Wrote:
(2022-02-20, 10:54 AM)Surfer2010 Wrote: cd RTIMULib2/Linux/
  1. mkdir build
  2. cd build/
  3. cmake ..
  4. make -j4
  5. sudo make install
  6. sudo ldconfig
  7. cd ../python/
  8. python3 setup.py build
  9. sudo python3 setup.py install
[Image: Cmake-Error.png]

does not work, no idea why or what to do

are you sure you have executed this
Quote:2. sudo apt-get install libqt4-dev cmake -y

ok that did the trick.
executed all stepts up to 14, rebooted but no change. Pypilot still does not recognize the MPU9250 Sad
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)