This is the repository for imu sensor codes for the lower-limb exosuit.
To install the library run: d
uv pip install imu-pythonOR
uv pip install git+https://github.com/TUM-Aries-Lab/imu-module.git@<specific-tag>- Install uv
git clone [email protected]:TUM-Aries-Lab/imu-module.gitmake initto create the virtual environment and install dependenciesmake formatto format the code and check for errorsmake testto run the test suitemake cleanto delete the temporary files and directories
It's super easy to publish your own packages on PyPI. To build and publish this package run:
- Update the version number in pyproject.toml and imu_module/init.py
- Commit your changes and add a git tag "<new.version.number>"
- Push the tag
git push --tag
The package can then be found at: https://pypi.org/project/imu-python
"""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()uv run python -m imu_python├── src
│ └── imu_python
│ ├── data_handler
│ │ ├── __init__.py
│ │ ├── data_reader.py
│ │ └── data_writer.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