Skip to main content

An ultra-fast and powerful ICM20948 sensor reading library

Project description

Enhanced-ICM20948 Python Library

1. Introduction

Based on libmraa, this library aims to provide a tool for generic Linux boards to read data from ICM-20948 9-Axis MotionTracking device at a high speed(200Hz+ for accelerometer,gyroscope and 100Hz for magnetometer).

The core of the library is written in C++, with the help of Pybind11 providing Python bindings. The library also supports reading data from multiple ICM-20948 simultaneously from multiple I2C Bus(Works with single I2C Bus as long as there is no address conflict. However, limited by I2C Bus Frequency, the speed of reading data may be restricted)

Besides, relative 3D orientation estimation between different sensors is supported as well. Based on Eigen3, Extended Kalman Filters(EKF) is implemented and applied with considerable efficiency.

The library is a part of two students’ Undergraduate Final Year Project conducted in NUS(Suzhou) Research Institute, Zhejiang University and University of Electronic Science and Technology of China.

At present, the library is under development.

If you have problems with the library or find any bugs during usage, feel free to contact with us: flyinghorse0510@zju.edu.cn or 2019021412017@std.uestc.edu.cn

2. Installation

2.1 Install Dependencies

For Ubuntu-based systems, you can install dependencies by the following commands:

sudo apt update
sudo apt install git build-essential swig3.0 libnode-dev cmake libjson-c-dev python3-pip python3-dev

2.2 Install libmraa

If your currently used boards have official supports for libmraa, it will be highly recommended that you install libmraa through the corresponding package manager or under tutorials provided by boards’ manufacturers.

If not, following instructions may help you to some extent:

2.2.1 Get Source Code

git clone https://github.com/eclipse/mraa.git

2.2.2 Compile libmraa

cd mraa
mkdir build
cd build
#########################################
###### if you use ARM-based boards ######
cmake .. -DBUILDSWIGPYTHON=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILDARCH=arm
###### if you use X86-based boards ######
cmake .. -DBUILDSWIGPYTHON=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr
#########################################
make -j

2.2.3 Install Compiled Files

sudo make install
sudo ldconfig

2.3 Install Enhanced-ICM20948

python3 -m pip install enhanced-icm20948==0.1.0

3. Usage Examples

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enhanced_icm20948-0.1.0.tar.gz (1.3 MB view details)

Uploaded Source

File details

Details for the file enhanced_icm20948-0.1.0.tar.gz.

File metadata

  • Download URL: enhanced_icm20948-0.1.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for enhanced_icm20948-0.1.0.tar.gz
Algorithm Hash digest
SHA256 49f4d0bf3f8be2b7574469a3d7b293e52416d43cd2b419471c70854a6bafa396
MD5 8bca08c7f45c37ff15807dac42296220
BLAKE2b-256 7d399c04618935df5d412e02ef21c1587d8a604c7b0a90fc03fa75cfe4748b7c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page