Skip to main content

IMU sensor codes in Python for the exosuit

Project description

IMU Module for Python

Coverage Status Docker Image CI

This is the repository for imu sensor codes for the lower-limb exosuit.

Install

To install the library run: d

uv pip install imu-python

OR

uv pip install git+https://github.com/TUM-Aries-Lab/imu-module.git@<specific-tag>

Development

  1. Install uv
  2. git clone git@github.com:TUM-Aries-Lab/imu-module.git
  3. make init to create the virtual environment and install dependencies
  4. make format to format the code and check for errors
  5. make test to run the test suite
  6. make clean to delete the temporary files and directories

Publishing

It's super easy to publish your own packages on PyPI. To build and publish this package run:

  1. Update the version number in pyproject.toml and imu_module/init.py
  2. Commit your changes and add a git tag "<new.version.number>"
  3. Push the tag git push --tag

The package can then be found at: https://pypi.org/project/imu-python

Module Usage

"""Basic docstring for my module."""
import time
from imu_python.definitions import IMUUpdateTime
from imu_python.factory import IMUFactory


def main() -> None:
    """Run a simple demonstration."""
    sensor_managers = IMUFactory.detect_and_create()
    for manager in sensor_managers:
        manager.start()

    try:
        while True:
            for manager in sensor_managers:
                manager.get_data()
            time.sleep(IMUUpdateTime.freq_hz)
    except KeyboardInterrupt:
        for manager in sensor_managers:
            manager.stop()


if __name__ == "__main__":
    main()

Program Usage

uv run python -m imu_python

Structure

├── .vscode
│   └── settings.json
├── src
│   └── imu_python
│       ├── data_handler
│       │   ├── __init__.py
│       │   ├── data_plotter.py
│       │   ├── data_reader.py
│       │   ├── data_writer.py
│       │   └── gain_calculator.py
│       ├── __init__.py
│       ├── __main__.py
│       ├── base_classes.py
│       ├── definitions.py
│       ├── devices.py
│       ├── factory.py
│       ├── i2c_bus.py
│       ├── orientation_filter.py
│       ├── sensor_manager.py
│       ├── utils.py
│       └── wrapper.py
├── tests
│   ├── __init__.py
│   ├── base_classes_test.py
│   ├── conftest.py
│   ├── devices_test.py
│   ├── factory_test.py
│   ├── i2c_bus_test.py
│   ├── orientation_filter_test.py
│   ├── reader_writer_test.py
│   ├── sensor_manager_test.py
│   ├── utils_test.py
│   └── wrapper_test.py
├── .dockerignore
├── .gitignore
├── .pre-commit-config.yaml
├── .python-version
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── pyproject.toml
├── repo_tree.py
└── uv.lock

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

imu_python-0.0.10.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imu_python-0.0.10-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file imu_python-0.0.10.tar.gz.

File metadata

  • Download URL: imu_python-0.0.10.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for imu_python-0.0.10.tar.gz
Algorithm Hash digest
SHA256 370e43f2f0443dbe93b8742dc0562dd5ae5a24d016f77019e2815f71feba6f3b
MD5 57206aa56a0738c2b7d8065e6f524a58
BLAKE2b-256 69cf5c1a93973fc3a3277d2ac0d092a41c96867c024ca3c17ce2ffb638ddeeb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for imu_python-0.0.10.tar.gz:

Publisher: pypi-publish.yml on TUM-Aries-Lab/imu-module

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file imu_python-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: imu_python-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for imu_python-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 03026b968b39731611e794274e9a4080ad44caf2fe0e4017ce417207ede751d9
MD5 6a7eca75fa6edf82d0c64db26288977f
BLAKE2b-256 d6a2ec8f5426c27656bbd68acf1ded18b2bf0fa08e8c2d9ce3976ea7e6ca0068

See more details on using hashes here.

Provenance

The following attestation bundles were made for imu_python-0.0.10-py3-none-any.whl:

Publisher: pypi-publish.yml on TUM-Aries-Lab/imu-module

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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