imt-ring 1.4.0__tar.gz → 1.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {imt_ring-1.4.0 → imt_ring-1.4.1}/PKG-INFO +1 -1
- {imt_ring-1.4.0 → imt_ring-1.4.1}/pyproject.toml +1 -1
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/imt_ring.egg-info/PKG-INFO +1 -1
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/imt_ring.egg-info/SOURCES.txt +1 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/__init__.py +19 -6
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/ml/base.py +6 -2
- imt_ring-1.4.1/src/ring/ml/params/0x1d76628065a71e0f.pickle +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/readme.md +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/setup.cfg +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/imt_ring.egg-info/dependency_links.txt +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/imt_ring.egg-info/requires.txt +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/imt_ring.egg-info/top_level.txt +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algebra.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/__init__.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/_random.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/custom_joints/__init__.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/custom_joints/rr_imp_joint.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/custom_joints/rr_joint.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/custom_joints/suntay.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/dynamics.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/generator/__init__.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/generator/base.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/generator/batch.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/generator/motion_artifacts.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/generator/pd_control.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/generator/randomize.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/generator/transforms.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/generator/types.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/jcalc.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/kinematics.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/algorithms/sensors.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/base.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/__init__.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/branched.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/exclude/knee_trans_dof.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/exclude/standard_sys.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/exclude/standard_sys_rr_imp.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/inv_pendulum.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/knee_flexible_imus.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/spherical_stiff.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/symmetric.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_all_1.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_all_2.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_ang0_pos0.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_control.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_double_pendulum.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_free.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_kinematics.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_morph_system/four_seg_seg1.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_morph_system/four_seg_seg3.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_randomize_position.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_sensors.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples/test_three_seg_seg2.xml +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/examples.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/test_examples.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/xml/__init__.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/xml/abstract.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/xml/from_xml.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/xml/test_from_xml.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/xml/test_to_xml.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/io/xml/to_xml.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/maths.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/ml/__init__.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/ml/callbacks.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/ml/ml_utils.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/ml/optimizer.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/ml/params/0x13e3518065c21cd8.pickle +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/ml/ringnet.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/ml/rnno_v1.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/ml/train.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/ml/training_loop.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/rendering/__init__.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/rendering/base_render.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/rendering/mujoco_render.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/rendering/vispy_render.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/rendering/vispy_visuals.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/sim2real/__init__.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/sim2real/sim2real.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/spatial.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/sys_composer/__init__.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/sys_composer/delete_sys.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/sys_composer/inject_sys.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/sys_composer/morph_sys.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/utils/__init__.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/utils/backend.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/utils/batchsize.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/utils/colab.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/utils/hdf5.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/utils/normalizer.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/utils/path.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/src/ring/utils/utils.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_algebra.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_base.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_custom_joints.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_dynamics.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_generator.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_jcalc.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_jit.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_kinematics.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_maths.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_ml_utils.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_motion_artifacts.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_pd_control.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_quickstart_example.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_random.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_randomize.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_rcmg.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_render.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_sensors.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_sim2real.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_sys_composer.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_train.py +0 -0
- {imt_ring-1.4.0 → imt_ring-1.4.1}/tests/test_utils.py +0 -0
@@ -68,6 +68,7 @@ src/ring/ml/rnno_v1.py
|
|
68
68
|
src/ring/ml/train.py
|
69
69
|
src/ring/ml/training_loop.py
|
70
70
|
src/ring/ml/params/0x13e3518065c21cd8.pickle
|
71
|
+
src/ring/ml/params/0x1d76628065a71e0f.pickle
|
71
72
|
src/ring/rendering/__init__.py
|
72
73
|
src/ring/rendering/base_render.py
|
73
74
|
src/ring/rendering/mujoco_render.py
|
@@ -69,21 +69,34 @@ def RING(lam: list[int], Ts: float | None):
|
|
69
69
|
from pathlib import Path
|
70
70
|
import warnings
|
71
71
|
|
72
|
-
if Ts > (1 / 40) or Ts < (1 / 200):
|
72
|
+
if Ts is not None and (Ts > (1 / 40) or Ts < (1 / 200)):
|
73
73
|
warnings.warn(
|
74
74
|
"RING was only trained on sampling rates between 40 to 200 Hz "
|
75
75
|
f"but found {1 / Ts}Hz"
|
76
76
|
)
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
|
78
|
+
if Ts is not None and Ts == 0.01:
|
79
|
+
# this set of parameters was trained exclusively on 100Hz data; it also
|
80
|
+
# expects F=9 features per node and not F=10 where the last features is
|
81
|
+
# the sampling interval Ts
|
82
|
+
params = Path(__file__).parent.joinpath("ml/params/0x1d76628065a71e0f.pickle")
|
83
|
+
add_Ts = False
|
84
|
+
else:
|
85
|
+
# this set of parameters was trained on sampling rates from 40 to 200 Hz
|
86
|
+
params = Path(__file__).parent.joinpath("ml/params/0x13e3518065c21cd8.pickle")
|
87
|
+
add_Ts = True
|
88
|
+
|
89
|
+
ringnet = ml.RING(params=params, lam=tuple(lam), jit=False, name="RING")
|
81
90
|
ringnet = ml.base.ScaleX_FilterWrapper(ringnet)
|
82
91
|
ringnet = ml.base.LPF_FilterWrapper(
|
83
|
-
ringnet,
|
92
|
+
ringnet,
|
93
|
+
ml._LPF_CUTOFF_FREQ,
|
94
|
+
samp_freq=None if Ts is None else 1 / Ts,
|
95
|
+
quiet=True,
|
84
96
|
)
|
85
97
|
ringnet = ml.base.GroundTruthHeading_FilterWrapper(ringnet)
|
86
|
-
|
98
|
+
if add_Ts:
|
99
|
+
ringnet = ml.base.AddTs_FilterWrapper(ringnet, Ts)
|
87
100
|
return ringnet
|
88
101
|
|
89
102
|
|
@@ -144,11 +144,13 @@ class LPF_FilterWrapper(AbstractFilterWrapper):
|
|
144
144
|
cutoff_freq: float,
|
145
145
|
samp_freq: float | None,
|
146
146
|
filtfilt: bool = True,
|
147
|
+
quiet: bool = False,
|
147
148
|
name="LPF_FilterWrapper",
|
148
149
|
) -> None:
|
149
150
|
super().__init__(filter, name)
|
150
151
|
self.samp_freq = samp_freq
|
151
152
|
self._kwargs = dict(cutoff_freq=cutoff_freq, filtfilt=filtfilt)
|
153
|
+
self.quiet = quiet
|
152
154
|
|
153
155
|
def apply(self, X, params=None, state=None, y=None, lam=None):
|
154
156
|
if X.ndim == 4:
|
@@ -166,7 +168,7 @@ class LPF_FilterWrapper(AbstractFilterWrapper):
|
|
166
168
|
dt = X[0, 0, -1]
|
167
169
|
samp_freq = 1 / dt
|
168
170
|
|
169
|
-
if self.samp_freq is None:
|
171
|
+
if self.samp_freq is None and not self.quiet:
|
170
172
|
print(f"Detected the following sampling rates from `X`: {samp_freq}")
|
171
173
|
|
172
174
|
yhat, state = super().apply(X, params, state, y, lam)
|
@@ -293,7 +295,9 @@ class NoGraph_FilterWrapper(AbstractFilterWrapper):
|
|
293
295
|
|
294
296
|
|
295
297
|
class AddTs_FilterWrapper(AbstractFilterWrapper):
|
296
|
-
def __init__(
|
298
|
+
def __init__(
|
299
|
+
self, filter: AbstractFilter, Ts: float | None, name="AddTs_FilterWrapper"
|
300
|
+
) -> None:
|
297
301
|
super().__init__(filter, name)
|
298
302
|
self.Ts = Ts
|
299
303
|
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|