Skip to content

Commit 348e490

Browse files
updated all notebooks to run again
1 parent 48f2d85 commit 348e490

10 files changed

Lines changed: 210 additions & 181 deletions

docs/index.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
<p align="center">
2-
<img src="https://raw.githubusercontent.com/simon-bachhuber/ring/main/docs/img/icon.svg" height="200" />
2+
<img src="https://raw.githubusercontent.com/simon-bachhuber/ring/main/docs/img/concept_v4.png" height="200" />
33
</p>
44

5+
56
# Recurrent Inertial Graph-based Estimator (RING)
67
<img src="https://raw.githubusercontent.com/simon-bachhuber/ring/main/docs/img/coverage_badge.svg" height="20" />
78

9+
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.
10+
811
> **ℹ️ Tip:**
912
>
1013
> Check out my new plug-and-play interface for inertial motion tracking (RING included) [here](https://github.com/simon-bachhuber/imt.git).
@@ -17,10 +20,7 @@ Install with `pip` using
1720

1821
`pip install imt-ring`
1922

20-
Typically, this will install `jax` as cpu-only version. Afterwards, gpu-enabled version can be installed with
21-
```bash
22-
pip install --upgrade "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
23-
```
23+
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.
2424

2525
## Documentation
2626

@@ -31,12 +31,12 @@ Available [here](https://simon-bachhuber.github.io/ring/).
3131
import ring
3232
import numpy as np
3333

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

4141
X = np.zeros((B, T_i, N, 9))
4242
# where X is structured as follows:
@@ -79,7 +79,11 @@ Solution:
7979

8080
## Publications
8181

82-
The following publications utilize this software library, and refer to it as the *Random Chain Motion Generator (RCMG)* (more specifically the function `ring.RCMG`):
82+
The main publication is:
83+
84+
- [*Recurrent Inertial Graph-Based Estimator (RING): A Single Pluripotent Inertial Motion Tracking Solution*](https://openreview.net/pdf?id=h2C3rkn0zR)
85+
86+
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`):
8387

8488
- [*RNN-based Observability Analysis for Magnetometer-Free Sparse Inertial Motion Tracking*](https://ieeexplore.ieee.org/document/9841375)
8589
- [*Plug-and-Play Sparse Inertial Motion Tracking With Sim-to-Real Transfer*](https://ieeexplore.ieee.org/document/10225275)
@@ -93,3 +97,8 @@ Particularly useful is the following publication from *Roy Featherstone*
9397
## Contact
9498

9599
Simon Bachhuber (simon.bachhuber@fau.de)
100+
101+
### How to bump verion in this python package
102+
103+
1) commit and *push* your code changes. Make sure to also update the version in `pyproject.toml`
104+
2) create the tag and push the tag

docs/notebooks/batched_simulation.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"!!! note\n",
88
"\n",
9-
" This example is available as a jupyter notebook [here](https://github.com/SimiPixel/ring/blob/main/docs/notebooks/batched_simulation.ipynb)."
9+
" This example is available as a jupyter notebook [here](https://github.com/simon-bachhuber/ring/blob/main/docs/notebooks/batched_simulation.ipynb)."
1010
]
1111
},
1212
{
@@ -194,7 +194,7 @@
194194
],
195195
"metadata": {
196196
"kernelspec": {
197-
"display_name": "x_xy",
197+
"display_name": "ring",
198198
"language": "python",
199199
"name": "python3"
200200
},

docs/notebooks/control.ipynb

Lines changed: 9 additions & 9 deletions
Large diffs are not rendered by default.

docs/notebooks/custom_joint_type.ipynb

Lines changed: 9 additions & 9 deletions
Large diffs are not rendered by default.

docs/notebooks/experimental_data.ipynb

Lines changed: 25 additions & 23 deletions
Large diffs are not rendered by default.

docs/notebooks/getting_started.ipynb

Lines changed: 70 additions & 67 deletions
Large diffs are not rendered by default.

docs/notebooks/knee_angle_tracking.ipynb

Lines changed: 16 additions & 15 deletions
Large diffs are not rendered by default.

docs/notebooks/machine_learning.ipynb

Lines changed: 28 additions & 19 deletions
Large diffs are not rendered by default.

docs/notebooks/visualisation.ipynb

Lines changed: 23 additions & 23 deletions
Large diffs are not rendered by default.

src/ring/rendering/base_render.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,12 @@ def render(
134134
if xs is None and qs is None:
135135
xs = _jit_forward_kinematics(sys)
136136
if xs is None:
137-
qs = jnp.stack(utils.to_list(qs), axis=0)
137+
# throw error if `xs` has been given by accident as `qs` argument
138+
qs = utils.to_list(qs)
139+
assert not isinstance(
140+
qs[0], base.Transform
141+
), "`qs` should be `jax.Array` and not `Transform`; maybe you want to pass `xs` as keyword argument `xs=xs`?" # noqa: E501
142+
qs = jnp.stack(qs, axis=0)
138143
xs = _jit_vmap_forward_kinematics(sys, qs)
139144

140145
# convert time-axis of batched xs object into a list of unbatched x objects
@@ -263,7 +268,7 @@ def render_prediction(
263268
sys, xs, yhat, transparent_segment_to_root, offset_truth, offset_pred
264269
)
265270

266-
frames = render(sys_render, xs_render, **kwargs)
271+
frames = render(sys=sys_render, xs=xs_render, **kwargs)
267272
return frames
268273

269274

0 commit comments

Comments
 (0)