[USRP-users] [EXT] Re: Question about the IMU (MPU-9150) on the E310

Beeman, Isaac L. ilbeeman at wpi.edu
Mon Nov 18 12:30:35 EST 2019


I figured I should modify the RTIMULib.ini file in /etc/ to at least point at the correct bus 0 instead of 1:

I2CBus=0

because the MPU-9150 should be at address 0x69 on bus 0. But got an output of

root at ni-e31x-:~/usr/E312IMUTest/build# ./E312IMUTest
Do something here with example option input: for example
Settings file /etc/RTIMULib.ini loaded
Using fusion algorithm RTQF
min/max compass calibration not in use
Ellipsoid compass calibration not in use
Accel calibration not in use
I2C read error from 0, 117 - Failed to read MPU9150 id
I2C read error from 0, 114 - Failed to read fifo count
Press Ctrl + C to stop streaming...
I2C read error from 0, 114 - Failed to read fifo count
I2C read error from 0, 114 - Failed to read fifo count
I2C read error from 0, 114 - Failed to read fifo count
...

At least I get an output now, even if it failed to work. I don't know how to fix this error.


I decided to do some investigating and found that the I2C device at 0x69 is not the MPU-9150, but the MPU-6050, which is one of the two chips on the MPU-9150.

root at ni-e31x-:~# cat /sys/class/i2c-dev/i2c-0/device/0-0069/name
mpu6050

There is no sign of the other chips: AK8975 (3-axis compass) at 0x0C or BMP085 (pressure sensor) at 0x77. Maybe I'm doing something wrong, but it seems as if something is more wrong than just the failed I2C read.


Isaac Beeman

________________________________
From: Beeman, Isaac L. <ilbeeman at wpi.edu>
Sent: Monday, November 18, 2019 11:24 AM
To: Samuel Prager <sprager at usc.edu>; usrp-users at lists.ettus.com <usrp-users at lists.ettus.com>
Subject: Re: [EXT] Re: [USRP-users] Question about the IMU (MPU-9150) on the E310

Hi Sam,

Thanks for linking your simple example program for streaming IMU data. I finally got the RTIMULib built and installed on the E312, but when I run your program I get this output:

root at ni-e31x-:~/usr/E312IMUTest/build# ./E312IMUTest
Do something here with example option input: for example
Settings file not found. Using defaults and creating settings file
Failed to open I2C bus 1
Failed to open SPI bus 0, select 0
Failed to open SPI bus 0, select 1
No IMU detected
Using fusion algorithm RTQF
No IMU found
Error intializing IMU


Was there any other setup I needed to do before running it (i.e. creating a settings file for the radio)? Do you think using a newer version of UHD and the E312 image might cause this issue?

Isaac Beeman


________________________________
From: Samuel Prager <sprager at usc.edu>
Sent: Tuesday, November 12, 2019 5:50 PM
To: Beeman, Isaac L. <ilbeeman at wpi.edu>; Michael Dickens <michael.dickens at ettus.com>
Cc: usrp-users at lists.ettus.com <usrp-users at lists.ettus.com>
Subject: [EXT] Re: [USRP-users] Question about the IMU (MPU-9150) on the E310

Hi Isaac,

Here is a simple example program I wrote a while back for continuously streaming IMU data on the E310/E312.

https://github.com/samprager/E312IMUTest<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsamprager%2FE312IMUTest&data=02%7C01%7Cilbeeman%40wpi.edu%7Ccef26121da504f6f64ef08d767c2b4d7%7C589c76f5ca1541f9884b55ec15a0672a%7C0%7C0%7C637091958270712195&sdata=3pQUZTIvh45iFS8enyrS1MPGDiscUBdpVv0mHpg5W0o%3D&reserved=0>

See the README for RTIMULib installation instructions (the correct library is https://github.com/RPi-Distro/RTIMULib<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRPi-Distro%2FRTIMULib&data=02%7C01%7Cilbeeman%40wpi.edu%7Ccef26121da504f6f64ef08d767c2b4d7%7C589c76f5ca1541f9884b55ec15a0672a%7C0%7C0%7C637091958270722198&sdata=Fw44bvF609L1W4chj1NfTr1dr42qRkkm71JnaqZRP98%3D&reserved=0>).

Sam
On Nov 12, 2019, 12:30 PM -0800, Michael Dickens via USRP-users <usrp-users at lists.ettus.com>, wrote:
Hi Isaac - UHD itself provides no API to the IMU; never has. The RTIMULib, possibly an older version than current and assuming it can be built and installed on the E310, should be able to access the IMU to provide information from it. Note "possibly", "assuming", "should" ... clearly this isn't a majorly supported feature of the E310! Good luck! - MLD

On Tue, Nov 12, 2019 at 12:37 PM Beeman, Isaac L. via USRP-users <usrp-users at lists.ettus.com<mailto:usrp-users at lists.ettus.com>> wrote:
Marcus and List,

I was hoping someone knew the steps involved to get the RTIMULib setup on the USRP. I tried building and installing both the RTIMULib and Linux folders, but the Linux one fails:


-- Found unsuitable Qt version "" from NOTFOUND
Qt QTOPENGL library not found.
Qt QTGUI library not found.
Qt QTCORE library not found.
CMake Error at RTIMULibGL/CMakeLists.txt:90 (QT4_ADD_RESOURCES):
    Unknown CMake command "QT4_ADD_RESOURCES".
-- Configuring incomplete, errors occurred!


I figured that I can't install the RTIMULibDemo apps because they use a GUI, so I built and installed the RTIMULibDrive and RTIMULibCal individually. Only, when I try to run one of these apps I get the following error:


RTIMULibDrive: error while loading shared libraries: libRTIMULib.so.7: cannot open shared object file: No such file or directory


I don't get how to fix this. When I build and install the same apps on my host computer they run fine (but obviously can't find any IMU). Considering that any applications I write also use the same libraries, I feel like this is going to be an issue.

There isn't any documentation that I can find on the usage of the C++ library for RTIMULib. Just reading the code in RTIMULibDrive.cpp as an example, it doesn't seem too complicated, but it obviously is a generic program that isn't using the settings needed to connect to the MPU-9150.

If anyone knows how to get one of these apps (RTIMULibDrive or RTIMULibCal) working or how to use RTIMULib.h in connecting to the MPU-9150 over I2C, it would be much appreciated.

-Isaac Beeman



P.S. I also tried 'i2cdetect -y 0' to see if the MPU-9150 has the I2C address 0x69 like the schematics say, but I only get:

Warning: Can't use SMBus Quick Write command, will skip some addresses
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:
10:
20:
30: -- -- -- -- -- -- -- --
40:
50: UU UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
60:
70:

with nothing under 0x69. So that's weird.


-----Original Message-----
From: USRP-users <usrp-users-bounces at lists.ettus.com<mailto:usrp-users-bounces at lists.ettus.com>> On Behalf Of Marcus D. Leech via USRP-users
Sent: Tuesday, November 12, 2019 10:35 AM
To: usrp-users at lists.ettus.com<mailto:usrp-users at lists.ettus.com>
Subject: [EXT] Re: [USRP-users] Question about the IMU (MPU-9150) on the E310

On 11/12/2019 10:26 AM, Beeman, Isaac L. via USRP-users wrote:
> Hi List,
>
> I have recently started working with the E310/E312 and have gotten multichannel RX/TX and GPS working, but I can't figure out how to grab data off of the internal IMU/MPU-9150. I found some website (http://gnuradio.cn/en/html/support/en/page_usrp_e3x0.html<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttp-3A__gnuradio.cn_en_html_support_en_page-5Fusrp-5Fe3x0.html%26d%3DDwMFaQ%26c%3DclK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI%26r%3DopIuWAKmywF059tAs2i3Pg%26m%3DrGLxgINOMrS4sAfnjQ9mFF9r3gnmnGlRtI8Lfh1c_9g%26s%3DfT3qR8x5-PwNd6mUUK4W_0mJBVKoBdE53vAvmpAFz6M%26e%3D&data=02%7C01%7Cilbeeman%40wpi.edu%7Ccef26121da504f6f64ef08d767c2b4d7%7C589c76f5ca1541f9884b55ec15a0672a%7C0%7C0%7C637091958270722198&sdata=iwZjSXpqEEE1kJ%2FS9w%2FUrDgu6ogXQIsj38VxZwelHNE%3D&reserved=0>) that said that the USRP image should contain RTIMULib applications with allow the user to test the IMU, but, unless I am looking in the wrong place, the current image for the E310 does not have any RTIMULib applications on it.
>
> I want to know if there are any API calls or libraries that would allow me to do development with the IMU.
>
> -Isaac Beeman
>
> _______________________________________________

You might start here:

https://github.com/RTIMULib<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttps-3A__github.com_RTIMULib%26d%3DDwMFaQ%26c%3DclK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI%26r%3DopIuWAKmywF059tAs2i3Pg%26m%3DrGLxgINOMrS4sAfnjQ9mFF9r3gnmnGlRtI8Lfh1c_9g%26s%3DNIewtdUlqSB7hPPCxPdlvxHxo4oRBNidm-Df5qiTLFc%26e%3D&data=02%7C01%7Cilbeeman%40wpi.edu%7Ccef26121da504f6f64ef08d767c2b4d7%7C589c76f5ca1541f9884b55ec15a0672a%7C0%7C0%7C637091958270732197&sdata=fe55C%2BuNXLda1CKtlfeK0OvJbaAZvH5UnrFnlM61PI4%3D&reserved=0>

_______________________________________________
USRP-users mailing list
USRP-users at lists.ettus.com<mailto:USRP-users at lists.ettus.com>
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttp-3A__lists.ettus.com_mailman_listinfo_usrp-2Dusers-5Flists.ettus.com%26d%3DDwMFaQ%26c%3DclK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI%26r%3DopIuWAKmywF059tAs2i3Pg%26m%3DrGLxgINOMrS4sAfnjQ9mFF9r3gnmnGlRtI8Lfh1c_9g%26s%3D8wPPngBEnPiaAxtUARbH1opcSV3Pgih5Konyr2kf9-c%26e%3D&data=02%7C01%7Cilbeeman%40wpi.edu%7Ccef26121da504f6f64ef08d767c2b4d7%7C589c76f5ca1541f9884b55ec15a0672a%7C0%7C0%7C637091958270742195&sdata=lAzQHTWL%2FMinepF93tvzrtFVBGFLSQjCI8meyoB59tc%3D&reserved=0>


--
Michael Dickens
Ettus Research Technical Support
Email: support at ettus.com<mailto:support at ettus.com>
Web: https://ettus.com/<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttps-3A__ettus.com_%26d%3DDwMFaQ%26c%3DclK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI%26r%3DopIuWAKmywF059tAs2i3Pg%26m%3DrGLxgINOMrS4sAfnjQ9mFF9r3gnmnGlRtI8Lfh1c_9g%26s%3DFVmNPR5VsaNFSu2W3JXNVpqQiNivgYWHJAGCOGvRw3c%26e%3D&data=02%7C01%7Cilbeeman%40wpi.edu%7Ccef26121da504f6f64ef08d767c2b4d7%7C589c76f5ca1541f9884b55ec15a0672a%7C0%7C0%7C637091958270742195&sdata=XGZ%2BclKFjKQlvHy4ig5up44eShLfbBogAEy%2F1S9EFpA%3D&reserved=0>
_______________________________________________
USRP-users mailing list
USRP-users at lists.ettus.com
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ettus.com_mailman_listinfo_usrp-2Dusers-5Flists.ettus.com&d=DwICAg&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=opIuWAKmywF059tAs2i3Pg&m=rGLxgINOMrS4sAfnjQ9mFF9r3gnmnGlRtI8Lfh1c_9g&s=8wPPngBEnPiaAxtUARbH1opcSV3Pgih5Konyr2kf9-c&e=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20191118/e34827dc/attachment.html>


More information about the USRP-users mailing list