Skip to main content

RING: Recurrent Inertial Graph-based Estimator

Project description

Recurrent Inertial Graph-based Estimator (RING)

RING provides a pluripotent, problem-unspecific plug-and-play IMT solution that, in contrast to conventional IMT solutions, eliminates the need for expert knowledge to identify, select, and parameterize the appropriate method. RING's pluripotency is enabled by a novel online-capable neural network architecture that uses a decentralized network of message-passing, parameter-sharing recurrent neural networks, which map local IMU measurements and nearest-neighbour messages to local orientations. This architecture enables RING to address a broad range of IMT problems that vary greatly in aspects such as the number of attached sensors, or the number of segments in the kinematic chain, and even generalize to previously unsolved IMT problems, including the challenging combination of magnetometer-free and sparse sensing with unknown sensor-to-segment parameters. Remarkably, RING is trained solely on simulated data, yet evaluated on experimental data, which indicates its exceptional ability to zero-shot generalize from simulation to experiment, while outperforming several state-of-the-art problem-specific solutions. For example, RING can, for the first time, accurately track a four-segment kinematic chain (which requires estimating four orientations) using only two magnetometer-free inertial measurement units.

ℹ️ Tip:

Check out my new plug-and-play interface for inertial motion tracking (RING included) here.

Installation

Supports Python=3.10/3.11/3.12 (tested).

Install with pip using

pip install imt-ring

Typically, this will install jax as cpu-only version. For GPU install instructions for jax see https://github.com/jax-ml/jax?tab=readme-ov-file#instructions.

Documentation

Available here.

Quickstart Example

import ring
import numpy as np

T  : int       = 30         # sequence length     [s]
Ts : float     = 0.01       # sampling interval   [s]
B  : int       = 1          # batch size
lam: list[int] = [-1, 0, 1] # parent array
N  : int       = len(lam)   # number of bodies
T_i: int       = int(T/Ts)  # number of timesteps

X              = np.zeros((B, T_i, N, 9))
# where X is structured as follows:
# X[..., :3]   = acc
# X[..., 3:6]  = gyr
# X[..., 6:9]  = jointaxis

# let's assume we have an IMU on each outer segment of the
# three-segment kinematic chain
X[..., 0, :3]  = acc_segment1
X[..., 2, :3]  = acc_segment3
X[..., 0, 3:6] = gyr_segment1
X[..., 2, 3:6] = gyr_segment3

ringnet = ring.RING(lam, Ts)
yhat, _ = ringnet.apply(X)
# yhat: unit quaternions, shape = (B, T_i, N, 4)

Known fixes

Offscreen rendering with Mujoco

mujoco.FatalError: an OpenGL platform library has not been loaded into this process, this most likely means that a valid OpenGL context has not been created before mjr_makeContext was called

Solution:

import os
os.environ["MUJOCO_GL"] = "egl"

Windows-related: ImportError: DLL load failed while importing ...

ImportError: DLL load failed while importing _multiarray_umath: Das angegebene Modul wurde nicht gefunden.

Solution:

  1. pip uninstall -y jax jaxlib
  2. conda install -c conda-forge jax

Publications

The main publication is:

The following publications also utilize this software library, and refer to it as the Random Chain Motion Generator (RCMG) (more specifically the function ring.RCMG):

Other useful ressources

Particularly useful is the following publication from Roy Featherstone

Contact

Simon Bachhuber (simon.bachhuber@fau.de)

How to bump verion in this python package

  1. commit and push your code changes. Make sure to also update the version in pyproject.toml
  2. create the tag and push the tag

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

imt_ring-1.7.0.tar.gz (17.5 MB view details)

Uploaded Source

Built Distribution

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

imt_ring-1.7.0-py3-none-any.whl (17.5 MB view details)

Uploaded Python 3

File details

Details for the file imt_ring-1.7.0.tar.gz.

File metadata

  • Download URL: imt_ring-1.7.0.tar.gz
  • Upload date:
  • Size: 17.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for imt_ring-1.7.0.tar.gz
Algorithm Hash digest
SHA256 38466c6fa16fcf3ad453e074ece2754a4ae5a220ddbba862026405fd757f2433
MD5 1b0d317840a1b1bc22a3c1b4d1f88703
BLAKE2b-256 414dedbcaeb4019702ad7989d0c1de49a37dc4ffe8b0c1a2ce8b63e3294ccfe9

See more details on using hashes here.

Provenance

The following attestation bundles were made for imt_ring-1.7.0.tar.gz:

Publisher: publish-to-pypi.yml on simon-bachhuber/ring

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

File details

Details for the file imt_ring-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: imt_ring-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 17.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for imt_ring-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4cff04ef76ec3b7b91c75afe4237ac4d824e2260e0ca8b429edac64361e0eb54
MD5 8a002bf7ef7ec505513a90a65e4435d3
BLAKE2b-256 04b228433a6b1b85be151ed3b1db4fe6700cd5bba37cab5a562defdf4d37a04f

See more details on using hashes here.

Provenance

The following attestation bundles were made for imt_ring-1.7.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on simon-bachhuber/ring

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